Introduction
In cooperative multi-agent reinforcement learning with centralised training and decentralised execution, each deployed agent acts on its own observation history and action mask, while training may use the global state, every agent's observation and action, and a behaviour policy that is itself centralised. The task asks how that privileged information should become the learning signal for the decentralised actor that is scored.
The field offers three families of answer. A centralised critic can supply advantages to decentralised actors trained with PPO, as in MAPPO [1] and its heterogeneous and trust-region variants [2, 3], or independent learners can do without it [4]. A centralised critic can assign credit to each agent's action at several levels [5], or the joint value can be factorised [6, 7], also with simplified temporal-difference learning [8]. And a centralised policy can act as a teacher whose behaviour is distilled into decentralised students [9], which guided policy optimisation makes symmetric by keeping the teacher close to what the student can reproduce [10, 11], with a sequence model such as Sable as the centralised guider [12].
Three difficulties remain in the teacher route, and our method is built around them. The student is trained off its own state distribution: rollouts driven by the coordinated guider visit states a decentralised team does not reach, so the student is corrected where it will not be and left alone where it will. A team advantage does not say which agent earned it: with many agents, one shared advantage rewards an agent for its teammates' choices. Not every guider preference can be imitated: when two actions are nearly tied, identical decentralised agents that copy a sharpened version of the tie break it the same way and can lock into a symmetric deadlock, whereas when the guider has one clear best action, copying a sharpened target removes execution noise that compounds over long action sequences.
Method
We call the method PC2-CTDE. It keeps the outer structure of guided policy optimisation [10, 11]: a privileged autoregressive guider built from Sable's retention encoder and decoder [12], a decentralised recurrent student that is the exported actor, a guider objective held within a trust region around the student, and a student objective that combines PPO with a KL term toward the guider. What we add is how rollouts are collected, how credit is assigned, and what target the student is distilled toward.
Mixed guider and student rollouts
The behaviour policy runs the guider autoregressively over agents, , in one lax.scan over the agent axis. In a fraction of the parallel
environments the student acts instead, , while the guider
is still decoded alongside on the student's actions so that its log-probabilities are recorded for
the same joint action. The fraction grows with training progress ,
so early training is dominated by coordinated discovery and later training increasingly exposes the student and the critic to the states a decentralised team actually visits. The guider is also told, through an input flag, which kind of environment it is in.
def _scan_agent(carry, xs):
dec_hs, tok_in = carry
rep_i, leg_i, sc_i, pi_lg_i, key_i = xs
raw_mu_lg, dec_hs_next = self.decoder.recurrent(
action=tok_in, obs_rep=rep_i, hstates=dec_hs, step_count=sc_i
)
mu_lg_i = jnp.where(leg_i[:, 0], raw_mu_lg[:, 0], jnp.finfo(jnp.float32).min)
k_mu, k_pi = jax.random.split(key_i)
mu_dist = distrax.Categorical(logits=mu_lg_i)
pi_dist = distrax.Categorical(logits=pi_lg_i)
a_mu = mu_dist.sample(seed=k_mu).astype(jnp.int32)
a_pi = pi_dist.sample(seed=k_pi).astype(jnp.int32)
act_i = jnp.where(is_dec_env, a_pi, a_mu)
mu_lp_i = mu_dist.log_prob(act_i)
pi_lp_i = pi_dist.log_prob(act_i)
behav_lp_i = jnp.where(is_dec_env, pi_lp_i, mu_lp_i)
tok_next = jnp.concatenate(
[
jnp.zeros((bsz, 1, 1), dtype=jnp.float32),
jax.nn.one_hot(act_i, act_dim, dtype=jnp.float32)[:, None, :],
],
axis=-1,
)
return (dec_hs_next, tok_next), (act_i, behav_lp_i, mu_lp_i, pi_lp_i)Both policies are trained on all environments, with truncated importance weights in the spirit of V-trace. The guider's PPO term on student-driven environments is weighted by ; the student's PPO term on guider-driven environments is weighted by , and by one on its own environments, where its ratio starts at exactly one.
Leave-one-out counterfactual credit
The guider's encoder embeds each agent's observation, adds a privileged residual from the global state, the normalised time in the episode and the rollout mode, and produces a normalised value . The privileged residual's output layer is initialised small (orthogonal with gain 0.05), so at initialisation the embedding is almost entirely the agent's own observation and the global state enters only as it proves useful. On top of the embedding sits a counterfactual head. For agent it combines 's state embedding with an attention over its teammates' state-action embeddings whose diagonal is masked, and with their leave-one-out mean; agent 's own action never enters. It outputs a baseline correction and an advantage for every action of , :
where both and are regressed with a Huber loss onto the normalised return targets. Writing the baseline as a residual on the stop-gradient value means that, where teammates' actions carry no information, the correction is zero and the baseline is the value.
act_oh = jax.nn.one_hot(action.reshape(m, a), self.action_dim, dtype=obs_rep.dtype)
u = self.sa_norm(s_rep + self.act_proj(act_oh))
if a > 1:
loo_mean = (jnp.sum(u, axis=1, keepdims=True) - u) / float(a - 1)
h = self.n_head
dh = d // h
q = self.q_proj(s_rep).reshape(m, a, h, dh).swapaxes(1, 2)
k = self.k_proj(u).reshape(m, a, h, dh).swapaxes(1, 2)
v = self.v_proj(u).reshape(m, a, h, dh).swapaxes(1, 2)
att_lg = jnp.matmul(q, jnp.swapaxes(k, -1, -2)) / np.sqrt(float(dh))
diag = jnp.eye(a, dtype=bool)[None, None, :, :]
att = jax.nn.softmax(jnp.where(diag, -1e9, att_lg), axis=-1)
loo_attn = jnp.matmul(att, v).swapaxes(1, 2).reshape(m, a, d)
else:
loo_mean = jnp.zeros_like(s_rep)
loo_attn = jnp.zeros_like(s_rep)
cf_in = jnp.concatenate([s_rep, loo_attn, loo_mean], axis=-1)
h1 = nn.gelu(self.cf_ln1(self.cf_fc1(cf_in)))
h2 = nn.gelu(self.cf_ln2(h1 + self.cf_fc2(h1)))
delta_b_cf = self.delta_b_head(h2).reshape(bsz, seq_len)
adv_raw = self.adv_head(h2).reshape(bsz, seq_len, self.action_dim)
adv_raw = jnp.where(_safe_mask(legal_actions), adv_raw, 0.0)
return delta_b_cf, adv_rawThe student's advantage is the team GAE minus a share of that residual, rescaled from the normalised value space:
with the update index, so the correction is switched in over the first thirty updates while the counterfactual head is still untrained. The guider keeps the plain team GAE. Both advantages are normalised across the whole batch of learner copies.
delta_b_cf_tba = forward_reshape(delta_b_cf_flat, n_agents)
_, vnorm_std = _vn_stats(old_vnorm)
step_f = step_idx.astype(jnp.float32)
step_frac = jnp.minimum(1.0, (step_f + 1.0) / 30.0)
prog = jnp.clip(step_f / float(self.num_updates), 0.0, 1.0)
ent_scale = 0.35 + 0.65 * 0.5 * (1.0 + jnp.cos(jnp.pi * prog))
w_cf = 0.5 * step_frac
adv_actor_raw = gae_team - w_cf * vnorm_std * delta_b_cf_tba
def _global_norm(x):
m = lax.pmean(lax.pmean(x.mean(), axis_name="batch"), axis_name="device")
v = lax.pmean(lax.pmean(jnp.square(x - m).mean(), axis_name="batch"), axis_name="device")
return (x - m) / (jnp.sqrt(v) + 1e-5)
adv_guider = _global_norm(gae_team)
adv_actor = _global_norm(adv_actor_raw)
targets_norm = vn_normalize(new_vnorm, returns)
old_v_norm_rescaled = vn_normalize(new_vnorm, v_denorm)Margin-tempered, counterfactually tilted distillation
The student is not distilled toward the guider's distribution as it stands. We sharpen the guider's centred logits by a state-dependent inverse temperature that depends on the gap between the guider's two most probable actions, :
is exactly one on a two-way tie and on a uniform distribution, whatever the number of actions, and approaches late in training where one action clearly dominates. We then tilt the target by the counterfactual advantage, centred under the student,
with as above. The guider's own trust region is centred on the reciprocal transform of the student, , so that the guider's constraint and the student's distillation term are satisfied at the same point, . As in guided policy optimisation, the guider's PPO ratio is clipped to around that reference and a KL penalty to it is applied wherever the clip binds.
# Top-2 probability-margin denoising: strictly 1.0 on 2-way symmetric ties and
# uniform exploration across ANY action-space size, sharpening up to beta_max
# only when a unique mode strictly dominates the runner-up.
g_probs_raw_sg = jax.nn.softmax(lax.stop_gradient(guider_logits), axis=-1)
if self.action_dim >= 2:
top2 = lax.top_k(g_probs_raw_sg, 2)[0]
margin = jnp.clip(top2[..., 0:1] - top2[..., 1:2], 0.0, 1.0)
else:
margin = jnp.ones_like(g_probs_raw_sg[..., 0:1])
beta_s = 1.0 + (c["target_inv_temp"] - 1.0) * prog * jnp.square(margin)
pi_probs = jax.nn.softmax(actor_logits, axis=-1)
pi_probs_sg = lax.stop_gradient(pi_probs)
adv_cf_sg = lax.stop_gradient(adv_cf_raw)
adv_cf_cent = jnp.where(
mask,
adv_cf_sg - jnp.sum(pi_probs_sg * adv_cf_sg, axis=-1, keepdims=True),
0.0,
)
cf_tilt = jnp.where(
mask, jnp.clip(c["cf_tilt_eta"] * step_frac * adv_cf_cent, -0.35, 0.35), 0.0
)
# --- 1. Guider + Critic + Residual LOO-CFQ (reciprocal ref = (z_theta - cf_tilt) / beta_s) ---
actor_ref_sg = _scale_masked_logits(
lax.stop_gradient(actor_logits) - cf_tilt, mask, 1.0 / beta_s
)The student's objective is
where is the centred counterfactual advantage, the middle term is an all-actions policy gradient on it, and the KL weight distils harder where the critic says the target is better than the student.
a_dist = tfd.Categorical(logits=actor_logits)
a_lp = a_dist.log_prob(tb["action"])
r_pi = jnp.exp(a_lp - tb["actor_old_lp"])
rho_pi = jnp.where(
is_dec, 1.0, jnp.clip(jnp.exp(tb["actor_old_lp"] - tb["behav_lp"]), 0.2, 1.25)
)
a_l1 = r_pi * adv_a
a_l2 = jnp.clip(r_pi, 1.0 - c["clip_eps"], 1.0 + c["clip_eps"]) * adv_a
actor_pg_loss = -(rho_pi * jnp.minimum(a_l1, a_l2)).mean()
cf_all_loss = -jnp.sum(pi_probs * adv_cf_cent, axis=-1).mean()
mu_targ_probs_sg = jax.nn.softmax(guider_targ_sg, axis=-1)
delta_q_mu_pi = jnp.sum((mu_targ_probs_sg - pi_probs_sg) * adv_cf_cent, axis=-1)
w_kl = jnp.clip(1.0 + 0.45 * step_frac * jnp.tanh(2.0 * delta_q_mu_pi), 0.55, 1.45)
student_kl = (
lax.stop_gradient(w_kl) * tfd.kl_divergence(g_targ_dist_sg, a_dist)
).mean()
a_ent = a_dist.entropy().mean()
pred_rep, pred_adv = self.aux_head.apply(aux_params, gru_feat)
obs_rep_sg = lax.stop_gradient(obs_rep)
z_pred = pred_rep / jnp.sqrt(jnp.sum(jnp.square(pred_rep), axis=-1, keepdims=True) + 1e-8)
z_targ = obs_rep_sg / jnp.sqrt(jnp.sum(jnp.square(obs_rep_sg), axis=-1, keepdims=True) + 1e-8)
bel_rep_loss = 0.5 * jnp.sum(jnp.square(z_pred - z_targ), axis=-1).mean()
bel_q_loss = (
jnp.sum(huber_loss(pred_adv - adv_cf_cent, 1.0) * legal_f, axis=-1).mean()
/ float(self.action_dim)
)
ppbb_loss = bel_rep_loss + 0.5 * bel_q_loss
mean_beta = jnp.mean(beta_s)
student_total = (
c["alpha"] * (actor_pg_loss + (c["cf_coef"] * step_frac) * cf_all_loss)
+ student_kl
+ c["bel_coef"] * ppbb_loss
)The student and its belief head
The exported actor is a shared graph network of width 256 with agent identity and the previous action as inputs: a two-layer residual SiLU encoder of the current observation, a GRU, and a FiLM modulation of the instantaneous features by the recurrent state, , whose small initialisation makes it close to the identity at the start. During training only, an auxiliary head on the student's recurrent features predicts the unit-normalised privileged embedding of the guider's encoder for that agent and the centred counterfactual advantages, so the decentralised belief is shaped toward what the centralised side knows. The parameters exported are an exponential moving average of the student's, with decay 0.95. Value targets are normalised with running statistics, learning rates follow a warm-up and cosine schedule that ends at 0.6 of the peak, and the guider's decoder is gradient-clipped separately from its encoder and counterfactual head. Hyperparameter values are set per setting, as the task permits, with a fallback rule on team size and action count for settings not in the table.
Results
| Method | ① | ④ | ② | ③ |
|---|---|---|---|---|
| Win rate or mean return ↑ | Win rate or mean return ↑ | Win rate or mean return ↑ | Win rate or mean return ↑ | |
| Gemini 4 Carbon | 0.817 | 0.527 | 10.30 | 31.01 |
| Recurrent MAPPO | 0.746 | 0.262 | 0.013 | 19.27 |
| IPPO | 0.674 | 0.250 | 0 | 0 |
| HAPPO | 0.523 | 0.201 | 4.199 | 16.16 |
| MACA | 0.864 | 0.420 | 3.239 | 10.88 |
| CTDS | 0.681 | 0.360 | 4.294 | 11.88 |
| MAGPO | 0.753 | 0.395 | 7.532 | 20.73 |
| SMPE² | 0.546 | 0.308 | 0.010 | 5.560 |
| MA²E | 0.561 | 0.221 | 4.085 | 15.33 |
| QMIX | 0.720 | 0.539 | 0.328 | 2.841 |
| QPLEX | 0.743 | 0.512 | 2.000 | 7.776 |
| PQN-VDN | 0.824 | 0.631 | 3.990 | 17.29 |
- ① SMAX smacv2_10_units · SMACv2-style 10v10
- ④ Connector con-10x10x10a · 10-agent routing
- ② RWARE medium-4ag-hard · sparse warehouse
- ③ RWARE tiny-4ag-hard · sparse warehouse
On RWARE-med-4 and RWARE-tiny-4 PC2-CTDE is ahead of every published baseline: 10.30 on RWARE-med-4 against 7.532 for the strongest baseline, MAGPO [11], and 31.01 on RWARE-tiny-4 against 20.73 (MAGPO [11]).
Against its two direct ancestors the method is ahead on every setting: MAPPO reaches 0.746, 0.262, 0.013 and 19.27 on SMAX-10v10, Con-10x10x10, RWARE-med-4 and RWARE-tiny-4, and MAGPO 0.753, 0.395, 7.532 and 20.73, against our 0.817, 0.527, 10.30 and 31.01.
On SMAX-10v10 and Con-10x10x10 it is not the best method. On SMAX-10v10 it reaches 0.817 against 0.864 for MACA [5], which assigns credit at several levels without a guider, and PQN-VDN (0.824) is also slightly ahead there; on Con-10x10x10 it reaches 0.527 against 0.631 for PQN-VDN [8], a value-factorisation method, and it is also slightly behind QMIX there (0.539). Our counterfactual credit did not carry the method past a dedicated credit-assignment method on SMAX-10v10, and on Con-10x10x10 two value-based methods remain ahead of every policy-gradient method in the table, ours included.
How we got here
We started from the reference implementations rather than from a blank page: after reading the starter, the harness, the actor family and all ten reference methods, and after reading the papers behind MAGPO, guided policy optimisation, Sable and MACA, we re-ran MAPPO, MAGPO and PQN-VDN on our own development runs. Evaluating every exported actor there and later both stochastically and greedily showed that greedy decoding helped on some settings and roughly halved the return on others, where identical agents facing a near even choice between two actions all broke it the same way and stopped moving.
The first version already had the mixed rollouts, the leave-one-out critic, the importance-weighted PPO and the belief head, with a fixed three-to-one split of guider and student environments. In our development runs MAGPO's guider reached a return about 5.5 above its deployed student on one development setting, while this version's deployed student matched its training return there, and its greedy evaluations were above every reference we had run on several settings, which suggested the student had learnt more than its stochastic execution showed.
What followed was a sequence of versions, several of them dead ends.
- A privileged novelty bonus failed. Our third version added a random-network-distillation bonus on the global state, gated off once extrinsic reward appears, and a floor on the advantage standard deviation. On one sparse-reward development setting the score fell from about 3 to 0; our reading was that the goal cells are visited every episode and so are the least novel, which pushes agents away from them, and that the floor damped the rare advantage of a single success. Both were removed.
- The global state was drowning the agent's own view. Inspecting the observation wrappers showed that the global state is tiled identically for every agent, so adding it at full scale made the agents' embeddings nearly identical at initialisation. The small-initialised privileged residual came from this; the same version also used a single retention head, which in our development runs cut wall-clock time substantially. This version more than doubled the first version's return on the hardest sparse development setting, where MAPPO and MAGPO stayed near zero in our runs.
- Entropy was the wrong measure of confidence. The first state-dependent temperature used the guider's normalised entropy. Normalised entropy mixes the number of actions with the shape of the distribution: an exact tie between two actions has low normalised entropy when there are many actions, so it was sharpened, which is exactly the case that must not be. The top-two margin is zero on any two-way tie, whatever the action count; that is why it replaced entropy.
- Fixing the agent order did not help. Our development rollouts decode agents in a fixed order while the update permutes the agent axis, so the guider's recomputed log-probabilities condition on a different prefix from the recorded ones. A version that kept the canonical order, and also rescaled the counterfactual advantage by its own root mean square, collapsed the student's entropy early; we traced the collapse to the rescaling, which amplified critic noise in an already normalised value space, and returned to the permuted order with raw advantages.
- A steeper margin gate over-sharpened. A variant with , damped by the guider's normalised entropy and with a lower , in place of peaked and then declined late in training on one development setting as grew and the entropy fell, so we kept the quadratic gate.
The FiLM actor and the margin gate entered in the seventh version, together with the counterfactual tilt first tried in the sixth; we submitted the seventh version after it matched or exceeded the fourth on most of the development settings it completed. Before submitting we also trained the fourth version for a few million steps on five scenarios outside the task's setting list, without the per-setting table, to check that the fallback configuration works; in our runs it trained to a competitive level on all five.
Limitations
- Our ablations do not support the components. We ran three single-factor ablations of the fourth version on one development setting: without mixed rollouts, without the margin sharpening, and without the counterfactual critic and belief head. Only removing the mixed rollouts fell below the spread of the full method over three seeds, and then only slightly; removing the counterfactual critic and belief head gave the highest single score of the four. Our view that credit assignment matters most with larger teams rests on comparisons between versions, not on a controlled ablation, so which parts of PC2-CTDE produce its gains on RWARE-med-4 and RWARE-tiny-4 is not established.
- Behind the best methods on two settings. On SMAX-10v10 and Con-10x10x10 a multi-level credit-assignment method and value-factorisation methods remain ahead.
- An inconsistency in the guider's ratio. Rollouts decode agents in a fixed order, but each update epoch permutes the agents, so the guider's ratio compares log-probabilities conditioned on different prefixes of teammates' actions. Our one attempt to remove the permutation was confounded with another change, and the inconsistency is in the submitted method.
- Many interacting parts and constants. The method combines a guider, a value head, a counterfactual head, a belief head, two importance weights, a margin gate, a tilt and a weighted KL, with ramps and clips whose constants (0.35, 0.45, 1.5, 2.15, thirty updates) were chosen in development rather than derived, alongside a per-setting hyperparameter table.
- Single-seed development. Almost every development comparison behind the design was a single run, and several differences between versions were smaller than the spread we measured across seeds where we had more than one.
References
- Chao Yu, Akash Velu, Eugene Vinitsky et al. (2022). The Surprising Effectiveness of PPO in Cooperative, Multi-Agent Games. NeurIPS.
- Jakub Grudzien Kuba, Ruiqing Chen, Muning Wen et al. (2022). Trust Region Policy Optimisation in Multi-Agent Reinforcement Learning. ICLR.
- Yifan Zhong, Jakub Grudzien Kuba, Xidong Feng et al. (2023). Heterogeneous-Agent Reinforcement Learning.
- Christian Schroeder de Witt, Tarun Gupta, Denys Makoviichuk et al. (2020). Is Independent Learning All You Need in the StarCraft Multi-Agent Challenge?.
- Xutong Zhao, Yaqi Xie (2025). Multi-level Advantage Credit Assignment for Cooperative Multi-Agent Reinforcement Learning. AISTATS.
- Tabish Rashid, Mikayel Samvelyan, Christian Schroeder de Witt et al. (2018). QMIX: Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning. ICML.
- Jianhao Wang, Zhizhou Ren, Terry Liu et al. (2021). QPLEX: Duplex Dueling Multi-Agent Q-Learning. ICLR.
- Matteo Gallici, Mattie Fellows, Benjamin Ellis et al. (2025). Simplifying Deep Temporal Difference Learning. ICLR.
- Gang Chen (2019). A New Framework for Multi-Agent Reinforcement Learning -- Centralized Training and Exploration with Decentralized Execution via Policy Distillation.
- Yueheng Li, Guangming Xie, Zongqing Lu (2026). Guided Policy Optimization under Partial Observability. ICLR.
- Yueheng Li, Guangming Xie, Zongqing Lu (2026). Multi-Agent Guided Policy Optimization. ICLR.
- Omayma Mahjoub, Sasha Abramowitz, Ruan de Kock et al. (2025). Sable: a Performant, Efficient and Scalable Sequence Model for MARL. ICML.
- Andreas Kontogiannis, Konstantinos Papathanasiou, Yi Shen et al. (2025). Enhancing Cooperative Multi-Agent Reinforcement Learning with State Modelling and Adversarial Exploration. ICML.