SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.02006 · IJCAI · 2023

MA2CL:Masked Attentive Contrastive Learning for Multi-Agent Reinforcement Learning

Wengang Zhou, Houqiang Li, Mingxiao Feng, Haolin Song

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2306.02006.json · badge: /api/ran/2306.02006.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ustchlsong/ma2cl marked official in Papers with Code
Papers with Code archive
7 ran · 3 no recorded run
FunctionStatusWhere it lives
CNNLayer Ran
ran on a synthesized input
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("858291b5d986d082")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

def init(module, weight_init, bias_init, gain=1):
    weight_init(module.weight.data, gain=gain)
    if module.bias is not None:
        bias_init(module.bias.data)
    return module

def init_(m, gain=0.01, activate=False):
    if activate:
        gain = nn.init.calculate_gain('relu')
    return init(m, nn.init.orthogonal_, lambda x: nn.init.constant_(x, 0), gain=gain)

class CNNLayer(nn.Module):

    def __init__(self, obs_shape, hidden_size, use_orthogonal=True, use_ReLU=True, kernel_size=3, stride=1):
        super(CNNLayer, self).__init__()
        active_func = [nn.Tanh(), nn.ReLU()][use_ReLU]
        init_method = [nn.init.xavier_uniform_, nn.init.orthogonal_][use_orthogonal]
        gain = nn.init.calculate_gain(['tanh', 'relu'][use_ReLU])
        self.need_normalize = obs_shape[1] > 32

        def init_(m):
            return init(m, init_method, lambda x: nn.init.constant_(x, 0), gain=gain)
        if obs_shape[1] < 32:
            cnn = nn.Sequential(init_(nn.Conv2d(obs_shape[0], 32, kernel_size=3, stride=1)), active_func, init_(nn.Conv2d(32, 64, kernel_size=1, stride=1)), active_func, init_(nn.Conv2d(64, hidden_size, kernel_size=kernel_size, stride=stride)), active_func, nn.Flatten())
        else:
            cnn = nn.Sequential(init_(nn.Conv2d(obs_shape[0], 32, kernel_size=8, stride=4)), active_func, init_(nn.Conv2d(32, 64, kernel_size=4, stride=2)), active_func, init_(nn.Conv2d(64, hidden_size, kernel_size=kernel_size, stride=stride)), active_func, nn.Flatten())
        with torch.no_grad():
            dummy_input = torch.zeros(1, *obs_shape)
            n_flatten = cnn(torch.as_tensor(dummy_input).float()).shape[1]
        self.net = nn.Sequential(cnn, init_(nn.Linear(n_flatten, hidden_size)), active_func)
        self.ln = nn.LayerNorm(hidden_size)

    def forward(self, x):
        x = x / (255.0 if self.need_normalize else 1.0)
        x = self.net(x)
        x = self.ln(x)
        return x

INIT_ARGS = {
    'obs_shape': (3, 16, 16),
    'hidden_size': 8,
    'use_orthogonal': True,
    'use_ReLU': True,
    'kernel_size': 3,
    'stride': 1
}

ARGS = {
    'x': torch.randint(0, 256, (2, 3, 16, 16), dtype=torch.float32)
}

if __name__ == '__main__':
    model = CNNLayer(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DecodeBlock Ran
ran on a synthesized input · constructed an object; no result was computed
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("2e6742e3206a6c46")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, DecodeBlock: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

def init(module, weight_init, bias_init, gain=1):
    weight_init(module.weight.data, gain=gain)
    if module.bias is not None:
        bias_init(module.bias.data)
    return module

def init_(m, gain=0.01, activate=False):
    if activate:
        gain = nn.init.calculate_gain('relu')
    return init(m, nn.init.orthogonal_, lambda x: nn.init.constant_(x, 0), gain=gain)

class SelfAttention(nn.Module):

    def __init__(self, n_embd, n_head, n_agent, masked=False):
        super(SelfAttention, self).__init__()
        assert n_embd % n_head == 0
        self.masked = masked
        self.n_head = n_head
        self.key = init_(nn.Linear(n_embd, n_embd))
        self.query = init_(nn.Linear(n_embd, n_embd))
        self.value = init_(nn.Linear(n_embd, n_embd))
        self.proj = init_(nn.Linear(n_embd, n_embd))
        self.register_buffer('mask', torch.tril(torch.ones(n_agent + 1, n_agent + 1)).view(1, 1, n_agent + 1, n_agent + 1))
        self.att_bp = None

    def forward(self, key, value, query):
        B, L, D = query.size()
        k = self.key(key).view(B, L, self.n_head, D // self.n_head).transpose(1, 2)
        q = self.query(query).view(B, L, self.n_head, D // self.n_head).transpose(1, 2)
        v = self.value(value).view(B, L, self.n_head, D // self.n_head).transpose(1, 2)
        att = q @ k.transpose(-2, -1) * (1.0 / math.sqrt(k.size(-1)))
        if self.masked:
            att = att.masked_fill(self.mask[:, :, :L, :L] == 0, float('-inf'))
        att = torch.nn.functional.softmax(att, dim=-1)
        y = att @ v
        y = y.transpose(1, 2).contiguous().view(B, L, D)
        y = self.proj(y)
        return y

class DecodeBlock(nn.Module):
    """ an unassuming Transformer block """

    def __init__(self, n_embd, n_head, n_agent):
        super(DecodeBlock, self).__init__()
        self.ln1 = nn.LayerNorm(n_embd)
        self.ln2 = nn.LayerNorm(n_embd)
        self.ln3 = nn.LayerNorm(n_embd)
        self.attn1 = SelfAttention(n_embd, n_head, n_agent, masked=True)
        self.attn2 = SelfAttention(n_embd, n_head, n_agent, masked=True)
        self.mlp = nn.Sequential(init_(nn.Linear(n_embd, 1 * n_embd), activate=True), nn.GELU(), init_(nn.Linear(1 * n_embd, n_embd)))

    def forward(self, x, rep_enc):
        x = self.ln1(x + self.attn1(x, x, x))
        x = self.ln2(rep_enc + self.attn2(key=x, value=x, query=rep_enc))
        x = self.ln3(x + self.mlp(x))
        return x

n_embd = 4
n_head = 2
n_agent = 3

ARGS = {
    'n_embd': n_embd,
    'n_head': n_head,
    'n_agent': n_agent,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DecodeBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DecodeBlock output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
EncodeBlock Ran
ran on a synthesized input · constructed an object; no result was computed
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("ca5abd37196a0511")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EncodeBlock: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Define the init_ function as it's used in the module construction
def init_(m, gain=0.01, activate=False):
    def init(module, weight_init, bias_init, gain=1):
        weight_init(module.weight.data, gain=gain)
        if module.bias is not None:
            bias_init(module.bias.data)
        return module
    
    if activate:
        gain = nn.init.calculate_gain('relu')
    return init(m, nn.init.orthogonal_, lambda x: nn.init.constant_(x, 0), gain=gain)

# Define the SelfAttention class
class SelfAttention(nn.Module):

    def __init__(self, n_embd, n_head, n_agent, masked=False):
        super(SelfAttention, self).__init__()
        assert n_embd % n_head == 0
        self.masked = masked
        self.n_head = n_head
        self.key = init_(nn.Linear(n_embd, n_embd))
        self.query = init_(nn.Linear(n_embd, n_embd))
        self.value = init_(nn.Linear(n_embd, n_embd))
        self.proj = init_(nn.Linear(n_embd, n_embd))
        self.register_buffer('mask', torch.tril(torch.ones(n_agent + 1, n_agent + 1)).view(1, 1, n_agent + 1, n_agent + 1))
        self.att_bp = None

    def forward(self, key, value, query):
        B, L, D = query.size()
        k = self.key(key).view(B, L, self.n_head, D // self.n_head).transpose(1, 2)
        q = self.query(query).view(B, L, self.n_head, D // self.n_head).transpose(1, 2)
        v = self.value(value).view(B, L, self.n_head, D // self.n_head).transpose(1, 2)
        att = q @ k.transpose(-2, -1) * (1.0 / math.sqrt(k.size(-1)))
        if self.masked:
            att = att.masked_fill(self.mask[:, :, :L, :L] == 0, float('-inf'))
        att = nn.functional.softmax(att, dim=-1)
        y = att @ v
        y = y.transpose(1, 2).contiguous().view(B, L, D)
        y = self.proj(y)
        return y

# Define the EncodeBlock class
class EncodeBlock(nn.Module):
    """ an unassuming Transformer block """

    def __init__(self, n_embd, n_head, n_agent):
        super(EncodeBlock, self).__init__()
        self.ln1 = nn.LayerNorm(n_embd)
        self.ln2 = nn.LayerNorm(n_embd)
        self.attn = SelfAttention(n_embd, n_head, n_agent, masked=False)
        self.mlp = nn.Sequential(init_(nn.Linear(n_embd, 1 * n_embd), activate=True), nn.GELU(), init_(nn.Linear(1 * n_embd, n_embd)))

    def forward(self, x):
        x = self.ln1(x + self.attn(x, x, x))
        x = self.ln2(x + self.mlp(x))
        return x

# Set up parameters for EncodeBlock
n_embd = 4
n_head = 2
n_agent = 3

ARGS = {
    'n_embd': n_embd,
    'n_head': n_head,
    'n_agent': n_agent
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EncodeBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EncodeBlock output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("f9358cb500fd1a12")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Encoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    "state_dim": 5,
    "obs_dim": 7,
    "n_block": 2,
    "n_embd": 8,
    "n_head": 2,
    "n_agent": 3,
    "encode_state": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Encoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Encoder output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
SelfAttention Ran
ran on a synthesized input · constructed an object; no result was computed
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("4a5fcc8f9eab1543")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SelfAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Parameters for SelfAttention.__init__
n_embd = 8  # embedding dimension
n_head = 2  # number of attention heads
n_agent = 3  # number of agents
masked = False  # whether to use masking

ARGS = {
    'n_embd': n_embd,
    'n_head': n_head,
    'n_agent': n_agent,
    'masked': masked
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SelfAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SelfAttention output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
discrete_autoregreesive_act Ran
ran; our contract draft was wrong, not the code
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("8746e100c8735d36")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torch.nn import functional as F

torch.manual_seed(0)

batch_size = 2
n_agent = 3
action_dim = 4
obs_rep_dim = 8
obs_dim = 5

class SimpleDecoder(nn.Module):
    def __init__(self, shifted_action_dim, obs_rep_dim, obs_dim, action_dim):
        super().__init__()
        self.fc = nn.Linear(shifted_action_dim + obs_rep_dim + obs_dim, action_dim)
    
    def forward(self, shifted_action, obs_rep, obs):
        # shifted_action: (batch_size, n_agent, action_dim + 1)
        # obs_rep: (batch_size, obs_rep_dim)
        # obs: (batch_size, obs_dim)
        batch_size, n_agent, _ = shifted_action.shape
        
        # Flatten shifted_action
        shifted_action_flat = shifted_action.reshape(batch_size, -1)  # (batch_size, n_agent * (action_dim + 1))
        
        # Expand obs_rep and obs to match batch and n_agent
        obs_rep_expanded = obs_rep.unsqueeze(1).expand(batch_size, n_agent, -1)  # (batch_size, n_agent, obs_rep_dim)
        obs_expanded = obs.unsqueeze(1).expand(batch_size, n_agent, -1)  # (batch_size, n_agent, obs_dim)
        
        # Concatenate for each agent
        combined = torch.cat([shifted_action, obs_rep_expanded, obs_expanded], dim=-1)  # (batch_size, n_agent, action_dim + 1 + obs_rep_dim + obs_dim)
        
        # Pass through fc layer for each agent
        logits = self.fc(combined)  # (batch_size, n_agent, action_dim)
        return logits

decoder = SimpleDecoder(
    shifted_action_dim=action_dim + 1,
    obs_rep_dim=obs_rep_dim,
    obs_dim=obs_dim,
    action_dim=action_dim
)

obs_rep = torch.randn(batch_size, obs_rep_dim)
obs = torch.randn(batch_size, obs_dim)

available_actions = torch.ones((batch_size, n_agent, action_dim))
available_actions[0, 1, 2] = 0  # Make one action unavailable

tpdv = {
    'device': torch.device('cpu')
}

ARGS = {
    'decoder': decoder,
    'obs_rep': obs_rep,
    'obs': obs,
    'batch_size': batch_size,
    'n_agent': n_agent,
    'action_dim': action_dim,
    'tpdv': tpdv,
    'available_actions': available_actions,
    'deterministic': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
discrete_parallel_act Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("12aa1ad4303a9073")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from torch.nn import functional as F

torch.manual_seed(0)

# Define a minimal decoder module that satisfies how it's used in the function
class MinimalDecoder(nn.Module):
    def __init__(self, action_dim):
        super().__init__()
        self.action_dim = action_dim
        self.linear = nn.Linear(action_dim + 1, action_dim)
    
    def forward(self, shifted_action, obs_rep, obs):
        # shifted_action: (batch_size, n_agent, action_dim + 1)
        # obs_rep: (batch_size, n_agent, obs_rep_dim)
        # obs: (batch_size, n_agent, obs_dim)
        # Return logits of shape (batch_size, n_agent, action_dim)
        batch_size, n_agent, _ = shifted_action.shape
        logits = self.linear(shifted_action)  # (batch_size, n_agent, action_dim)
        return logits

# Set up parameters
batch_size = 2
n_agent = 3
action_dim = 4
obs_rep_dim = 5
obs_dim = 6

# Create decoder
decoder = MinimalDecoder(action_dim)

# Create observation representation tensor
obs_rep = torch.randn(batch_size, n_agent, obs_rep_dim)

# Create observation tensor
obs = torch.randn(batch_size, n_agent, obs_dim)

# Create action tensor (indices in range [0, action_dim))
action = torch.randint(0, action_dim, (batch_size, n_agent, 1))

# Device specification dict (CPU only)
tpdv = {'device': 'cpu', 'dtype': torch.float32}

# Optional available_actions mask (all actions available)
available_actions = torch.ones(batch_size, n_agent, action_dim)

ARGS = {
    'decoder': decoder,
    'obs_rep': obs_rep,
    'obs': obs,
    'action': action,
    'batch_size': batch_size,
    'n_agent': n_agent,
    'action_dim': action_dim,
    'tpdv': tpdv,
    'available_actions': available_actions
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Decoder Not yet run
unverified (harvested, no recorded run)
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("14d0620195ae45fe")
How it ran

no invocation recorded.

MultiAgentTransformer Not yet run
unverified (harvested, no recorded run)
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("33ea553ff4f41e56")
How it ran

no invocation recorded.

continuous_autoregreesive_act Not yet run
unverified (harvested, no recorded run)
ustchlsong/ma2cl/algorithms/ma_transformer.py
code served (permissive licence) · get_code("90c40764114ee949")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 4 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
DecodeBlock
brick of this paper's assembly: model
1 other paper
1 later
2604.13472 (2026-04)
Bridging MARL to SARL: An Order-Independent Multi-Agent Transformer via Latent Consensus
EncodeBlock
brick of this paper's assembly: model
1 other paper
1 later
2604.13472 (2026-04)
Bridging MARL to SARL: An Order-Independent Multi-Agent Transformer via Latent Consensus
SelfAttention
brick of this paper's assembly: model
1 other paper
1 later
2604.13472 (2026-04)
Bridging MARL to SARL: An Order-Independent Multi-Agent Transformer via Latent Consensus
discrete_parallel_act
brick of this paper's assembly: helper
1 other paper
1 later
2604.13472 (2026-04)
Bridging MARL to SARL: An Order-Independent Multi-Agent Transformer via Latent Consensus

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recent approaches have utilized self-supervised auxiliary tasks as representation learning to improve the performance and sample efficiency of vision-based reinforcement learning algorithms in single-agent settings. However, in multi-agent reinforcement learning (MARL), these techniques face challenges because each agent only receives partial observation from an environment influenced by others, resulting in correlated observations in the agent dimension. So it is necessary to consider agent-level information in representation learning for MARL. In this paper, we propose an effective framework called Multi-Agent Masked Attentive Contrastive Learning (MA2CL), which encourages learning representation to be both temporal and agent-level predictive by reconstructing the masked agent observation in latent space. Specifically, we use an attention reconstruction model for recovering and the model is trained via contrastive learning. MA2CL allows better utilization of contextual information at the agent level, facilitating the training of MARL agents for cooperation tasks. Extensive experiments demonstrate that our method significantly improves the performance and sample efficiency of different MARL algorithms and outperforms other methods in various vision-based and state-based scenarios.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2306.02006")
get_code_for_paper("2306.02006")
have("2306.02006")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2306.02006.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2306.02006.svg)](https://syntology.ai/paper/2306.02006)

Connect an agent — have() is free.