Introduction
Centralised training with decentralised execution asks for a team of policies that each act on their own partial observation, while training may use the global state, every agent's observation and action, and a behaviour policy of any form. The standard recipe uses this privileged information through a centralised critic and trains the decentralised actors on their own experience [1], or drops it altogether [2]. Several lines of work go further and let a coordinated policy do the exploring: a centralised teacher distilled into decentralised students [3], and, most recently, guided policy optimisation, in which a centralised autoregressive guider and the decentralised learners are co-trained, the guider collects the data, and a ratio constraint keeps it within reach of the learners [4, 5]. The guider in that method is a sequence model over all agents [6].
Guided optimisation buys efficient exploration at a price that we found to be first order. When the guider collects every trajectory, both signals the learners receive, the distillation target and the advantage in their PPO term, are conditioned on guider team-mates: predecessors whose actions were drawn from , successors that react to inside the same step, and the guider's own states and future. They answer "what should agent do in a coordinated team?", not "what should it do in a team of learners?". The ratio constraint bounds the guider-learner divergence, but it does not remove it. In our development runs of the reference implementation, the exported learners trailed their own guider exactly where agents must coordinate within a step: on one development setting their return was 19.3 against about 22 for the guider, with episodes ending earlier because the agents collided; on another the win rate was 0.76 against 0.83; on others there was no gap at all.
The question is therefore not only how to extract a learning signal from a coordinated policy, but where to measure it. Our answer is to measure it, as far as the data say it is needed, on the team that is deployed.
Method
We keep the architecture and the per-setting hyperparameters of multi-agent guided policy optimisation [5]: a guider built on a retention network over all agents' views [6], decentralised recurrent learners with a shared GRU, and the guider's double clip and masked KL that keep it within a ratio of the learners. What changes is who drives each environment, how both networks are trained on the resulting mixture, and two controllers driven by measured data.
Learners in the loop
A share of the environments is driven by the learners. In those environments the guider shadows: its autoregressive decoder is teacher-forced with the joint action the learners executed, so its memory follows the real trajectory and its conditionals answer what the learner team-mates actually did. The remaining environments are driven by the guider, with the learners shadowing. At least one environment is always left to each driver unless the share has been raised to one.
def _shadow_act(module, observation, hstates, key, forced_action, forced):
"""Sable's ``get_actions`` where the joint action of the environments flagged by ``forced``
(B,) is given: the decoder is teacher-forced with it, so the guider's memory follows the
executed actions and its log-probabilities are those of the executed joint action."""
obs, legal, step_count = (observation.agents_view, observation.action_mask,
observation.step_count)
decayed = tree.map(lambda x: x * module.decay_kappas, hstates)
value, obs_rep, enc_hs = module.act_encoder_fn(
encoder=module.encoder, obs=obs, decayed_hstate=decayed[0], step_count=step_count)
n_envs, n_agents, n_actions = legal.shape
shifted = jnp.zeros((n_envs, n_agents, n_actions + 1)).at[:, 0, 0].set(1)
dec_hs = decayed[1:]
actions, log_probs = [], []
for i in range(n_agents):
logit, dec_hs = module.decoder.recurrent(
action=shifted[:, i:i + 1, :], obs_rep=obs_rep[:, i:i + 1, :], hstates=dec_hs,
step_count=step_count[:, i:i + 1])
masked = jnp.where(legal[:, i], logit[:, 0], _FMIN)
key, sample_key = jax.random.split(key)
a = jax.random.categorical(sample_key, masked, axis=-1)
a = jnp.where(forced, forced_action[:, i], a)
lp = jnp.take_along_axis(jax.nn.log_softmax(masked, axis=-1), a[:, None], axis=-1)[:, 0]
actions.append(a)
log_probs.append(lp)
shifted = shifted.at[:, i + 1, 1:].set(jax.nn.one_hot(a, n_actions), mode="drop")
new_hs = SableHiddenStates(encoder=enc_hs, decoder_self_retn=dec_hs[0],
decoder_cross_retn=dec_hs[1])
return (jnp.stack(actions, axis=1).astype(jnp.int32), jnp.stack(log_probs, axis=1),
jnp.squeeze(value, axis=-1), new_hs)Every sample thus has one behaviour probability , that of its driver, and it is stored with the transition.
def act(self, train_state, carry, observation, prev_done, key):
params = train_state.params
learner_env = self._learner_driven(train_state.ctrl)
learner_key, guider_key = jax.random.split(key)
batched_obs = tree.map(lambda x: x[jnp.newaxis, :], observation)
policy_hs, pi = self.actor.apply(params.actor_params, carry.policy_hidden_state,
(batched_obs, prev_done[jnp.newaxis, :]))
learner_logits = pi.distribution.logits[0]
learner_action = jax.random.categorical(learner_key, learner_logits, axis=-1)
# the guider acts where it drives and shadows the learners' joint action elsewhere
action, guider_lp, value, sable_hs = self.sable.apply(
params.guider_params, observation, carry.sable_hidden_state, guider_key,
learner_action, learner_env, method=_shadow_act)
learner_lp = jnp.take_along_axis(jax.nn.log_softmax(learner_logits, axis=-1),
action[..., None], axis=-1)[..., 0]
log_prob = jnp.where(learner_env[:, None], learner_lp, guider_lp) # behaviour policy
return action, HiddenStates(sable_hs, policy_hs), {"value": value, "log_prob": log_prob}One surrogate for both networks, centred on the driver
Both networks are trained on every sample, and both PPO terms are clipped around , not around each network's own old policy. With advantage and clip , the learners minimise
with the KL summed over legal actions, and the guider minimises
where , the leashed ratio carries the guider's constraint to the learners, and marks the samples on which lies outside .
For the driver this is ordinary on-policy PPO, and on learner-driven data it is the exact policy gradient of the deployed decentralised team, with its own collisions and its own team-mates. For the network that did not drive, a PPO clip around is an advantage-filtered pull towards the driver's improved policy: it raises the driver's good actions up to and lowers the bad ones to . The two networks therefore chase the same per-sample improvement target and stay synchronised, and on learner-driven data the guider is pulled towards what works for decentralised teams. The cross terms are stop-gradients, so one backward pass gives each network the gradient of its own loss.
# ---- guider: PPO around the behaviour policy, leashed to the learners
diff = guider_lp - sg(actor_lp)
ratio = jnp.exp(guider_lp - beta_lp)
leashed = jnp.exp(jnp.clip(diff, log_lo, log_hi) + sg(actor_lp) - beta_lp)
outside = ((diff < log_lo) | (diff > log_hi)).astype(jnp.float32)
kl_g = jnp.where(legal, jnp.exp(g_lsm) * (g_lsm - sg(a_lsm)), 0.0).sum(-1)
guider_kl = (kl_g * outside).mean()
loss1 = ratio * gae
loss2 = jnp.clip(leashed, 1.0 - c["clip_eps"], 1.0 + c["clip_eps"]) * gae
guider_loss = -jnp.minimum(loss1, loss2).mean()
guider_entropy = guider_entropy.mean()
v_clipped = tb["value"] + (value - tb["value"]).clip(-c["clip_eps"], c["clip_eps"])
vl = jnp.square(value - value_targets)
vl_clipped = jnp.square(v_clipped - value_targets)
value_loss = 0.5 * jnp.maximum(vl, vl_clipped).mean()
guider_total = (guider_loss + guider_kl - ent_coef * guider_entropy
+ c["vf_coef"] * value_loss)
# ---- learners: PPO around the behaviour policy + distillation of the guider
kl_l = jnp.where(legal, jnp.exp(sg(g_lsm)) * (sg(g_lsm) - a_lsm), 0.0).sum(-1).mean()
ratio_l = jnp.exp(actor_lp - beta_lp)
l1 = ratio_l * gae
l2 = jnp.clip(ratio_l, 1.0 - c["clip_eps"], 1.0 + c["clip_eps"]) * gae
actor_loss = -jnp.minimum(l1, l2).mean()
actor_total = c["alpha"] * actor_loss + kl_lNo signal, no step
PPO divides each minibatch's advantages by their own standard deviation. When rewards are sparse, most early minibatches contain no reward at all, and this division turns pure critic noise into unit-variance "advantages": the policies random-walk away from the few behaviours that occasionally earn a reward and do not come back. We floor the scale at a fraction of a remembered rollout-level scale,
where is the standard deviation of the whole rollout's advantages and that of the minibatch. A minibatch without signal then produces almost no policy step, while the entropy bonus keeps exploration alive. With dense rewards the floor is almost never active. We also keep a running share of recent rollouts whose scale is at or above the floor; the entropy fade and the hand-over below act only once it has reached 0.9, so that exploration is not switched off before learning has taken off.
# ---- remembered advantage scale (see 4. in the module docstring)
adv_std = _pmean(advantages.std())
adv_scale = jnp.maximum(adv_std, ADV_DECAY * ctrl["adv_scale"])
adv_floor = ADV_FLOOR * adv_scale
dense_new = ((1.0 - CTRL_TAU) * ctrl["dense"]
+ CTRL_TAU * (adv_std >= adv_floor).astype(jnp.float32))
def _loss_fn(params, tb, gae, value_targets, prev_hs, rng):
value, guider_lp, guider_entropy, guider_policy = self.sable.apply(
params.guider_params, tb["obs"], tb["action"], prev_hs, tb["done"], rng)
obs, done, hidden = forward_reshape((tb["obs"], tb["done"], tb["policy_hs"]), n_agents)
_, pi = self.actor.apply(params.actor_params, hidden[0], (obs, done))
legal = tb["obs"].action_mask
g_lsm = jax.nn.log_softmax(guider_policy.logits, axis=-1)
a_lsm = jax.nn.log_softmax(backward_reshape(pi.distribution.logits), axis=-1)
actor_lp = jnp.take_along_axis(a_lsm, tb["action"][..., None], axis=-1)[..., 0]
gae = (gae - gae.mean()) / (jnp.maximum(gae.std(), adv_floor) + 1e-8)
beta_lp = tb["log_prob"] # the driver's probability of the actionThe share follows the measured gap
Because learner-led and guider-led teams run side by side, the decentralisation gap is observable during training. After each update we compute the relative gap in estimated episode return between the two groups, linearised as the gap in step reward minus the gap in termination rate,
where and are the groups' mean step reward and termination rate and are bias-corrected running means with window . A running mean and variance of in the same window give a -like statistic , and the share moves by
up while the learners trail the guider-led teams significantly, down to the minimum share while they keep up, where guider-led experience is the more efficient one. is a per-setting value, as the reference methods configure their hyperparameters: 0.25 by default, 0.0625 on a group of the settings where, in our development runs, the learners kept up with the guider throughout.
The last quarter of training is an exploitation phase for the deployed policy. Once the reward signal is dense, the entropy bonus fades linearly to zero, and at the start of the phase a one-time decision hands all environments to the learners, unless the data show that they keep up: the hand over happens if the long-run average share is at or above 0.375, or if the upper confidence bound of the long-run gap, over a window of , exceeds a 3% tolerance. After a hand-over the guider only shadows, as critic and as a teacher trained on learner teams only, the entropy bonus is zero, and the deployed team is optimised on exactly its own experience. With no guider-driven group left to compare with, the controller is frozen.
t = ctrl["t"] + 1.0
corr = 1.0 - (1.0 - CTRL_TAU) ** t
r_ref = (1.0 - CTRL_TAU) * ctrl["r_ref"] + CTRL_TAU * 0.5 * (r_l + r_g)
d_ref = (1.0 - CTRL_TAU) * ctrl["d_ref"] + CTRL_TAU * 0.5 * (d_l + d_g)
r_hat, d_hat = r_ref / corr, d_ref / corr
x = (jnp.where(jnp.abs(r_hat) > 1e-12, (r_g - r_l) / jnp.maximum(jnp.abs(r_hat), 1e-12), 0.0)
- jnp.sign(r_hat) * jnp.where(d_hat > 1e-12, (d_g - d_l) / jnp.maximum(d_hat, 1e-12), 0.0))
m = (1.0 - CTRL_TAU) * ctrl["m"] + CTRL_TAU * x
q = (1.0 - CTRL_TAU) * ctrl["q"] + CTRL_TAU * x * x
mean, var = m / corr, jnp.maximum(q / corr - jnp.square(m / corr), 0.0)
z = mean / jnp.sqrt(var * CTRL_TAU / (2.0 - CTRL_TAU) + 1e-20)
z = jnp.where((var > 0) & (t * CTRL_TAU > 1.0), z, 1.0) # no move before one window
corr_l = 1.0 - (1.0 - GAP_TAU) ** t
m_l = (1.0 - GAP_TAU) * ctrl["m_l"] + GAP_TAU * x
q_l = (1.0 - GAP_TAU) * ctrl["q_l"] + GAP_TAU * x * x
mean_l = m_l / corr_l
var_l = jnp.maximum(q_l / corr_l - jnp.square(mean_l), 0.0)
gap_ucb = mean_l + 2.0 * jnp.sqrt(var_l * GAP_TAU / (2.0 - GAP_TAU))
rho = ctrl["rho"]
if ADAPT:
rho = jnp.clip(rho + CTRL_STEP * jnp.tanh(z - 1.0), c["rho_min"], RHO_MAX)
# entering the final phase (decided once): hand over if the learners have been
# trailing significantly (the share has lived near its cap) or if
# the long-run gap is not confidently below the tolerance (upper confidence bound)
t_final = (1.0 - FINAL_PHASE) * n_upd
trailing = ctrl["rho_avg"] >= SHARE_HIGH
handover = ((t >= t_final) & (t < t_final + 1.0) & dense
& (trailing | (gap_ucb > GAP_TOL)))
rho = jnp.where(handover, 1.0, rho)Results
| Method | ① | ④ | ② | ③ |
|---|---|---|---|---|
| Win rate or mean return ↑ | Win rate or mean return ↑ | Win rate or mean return ↑ | Win rate or mean return ↑ | |
| Claude Fable 5.2 | 0.749 | 0.415 | 10.12 | 26.39 |
| 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 our method is clearly ahead of every published baseline: a return of 10.12 on RWARE-med-4 against 7.532 for the strongest baseline, MAGPO [5], and 26.39 on RWARE-tiny-4 against 20.73 (MAGPO [5]). On both, MAGPO, the method we build on, reaches 7.532 and 20.73, and the MAPPO starter 0.013 and 19.27.
On SMAX-10v10 we are close to MAGPO and MAPPO: a win rate of 0.749 against 0.753 and 0.746, and below MACA [8] at 0.864 and PQN-VDN at 0.824. On Con-10x10x10 our 0.415 is above MAGPO's 0.395 and every other policy-gradient baseline except MACA (0.420), but clearly below the three value-decomposition baselines, of which PQN-VDN [12] is best at 0.631.
The pattern matches what the method is designed to do. Where the learners do not trail the guider, the controller keeps the learner share at its floor and no hand-over happens, so the method stays close to guided optimisation and inherits its level; the gains come where the deployed team's own experience differs from that of a coordinated team, or where reward is rare enough that the advantage floor matters.
How we got here
We started from the starter's MAPPO and read the guided-optimisation reference. Our first piece of analysis was theoretical: distilling an improved joint policy into a product of per-agent policies by forward KL yields, to first order, a policy-gradient step with a counterfactual advantage in which the other agents are marginalised, so the guider acts as an amortised improvement operator. But every term of that operator is evaluated with guider team-mates on the guider's states. We hypothesised a teammate inconsistency, and our first development measurement confirmed it: the reference method's exported learners trailed their guider on one development setting and collided more. The single-agent guided-optimisation work reports that guider-driven co-training beats learner-driven co-training [4]; as far as our literature search found, nobody had evaluated a mixture of the two in the multi-agent case. That, and the idea of mixing the student into data collection in the style of imitation learning with a corrective expert, gave us our first variant.
- The first variant worked, and pure learner-driven data did not. With a fixed half share of learner-driven environments our development return on the collision-heavy setting rose above both the reference method and MAPPO. Letting the learners drive everything failed on a sparse-reward setting, where it found no reward; guider-led experience is indispensable as a scout.
- Self-centred, importance-weighted surrogates were worse. We expected each network to learn better if its PPO term were clipped around its own old policy and importance-weighted by own-old over behaviour. Introduced together with a driver flag in the guider's input and per-group advantage normalisation, it was worse on both settings we tried, and training the learners' PPO term on their own data only was much worse. This is where we understood that the clip around is not an accident of the implementation but the coupling that keeps the two networks on one improvement target.
- A fixed share is wrong for every setting at once. A quarter share was better than a half on one setting and much worse on another, so we made the share adaptive, first on the reward-rate gap and then on the estimated episode-return gap, because on the collision-heavy setting the return gap is mostly a gap in episode length.
- Dead runs on sparse maps came from advantage normalisation. Several runs, of the reference method and of ours, never left zero reward: the occasional random reward rate fell to exactly zero within the first million steps while the entropy fell and the value loss sat near . We traced this to per-minibatch normalisation of pure critic noise. Without the floor, one of three development runs on the sparse setting learned; with it, every run we made did. An entropy bonus scaled down by the same signal measure was worse: the bonus is what holds the policy at maximal entropy until the first rewards arrive, so it stays on.
- A hard final phase helped one setting and hurt another. Handing every environment to the learners for the last quarter and switching the entropy bonus off raised the development return where the learners trailed and cost about two points of win rate where they did not. A gradual ramp stalled before reaching a full hand-over; letting the hand-over start earlier was not better. A forced hand-over also helped on the sparse-reward maps where the share-based trigger had not fired, because the per-update gap there is too noisy for the short window. This led to the long-run confidence-bound rule and to deciding it once rather than continuously (a continuous check would have fired falsely late in training on settings with no gap). We also require the reward signal to be dense first, so that exploration is not switched off before take-off.
- The learner share slowed guided learning where the leash is wide. On one development setting our method trailed the reference method, with a clear dose-response in the share: in our development measurements a win rate of 0.700 and 0.693 at a floor of 0.25, 0.733 and 0.722 at 0.125, and 0.752 and 0.749 at 0.0625, against 0.754 and 0.760 for the reference method. We therefore set the lower floor on a group of the settings where the learners keep up.
- What causes that slowdown, and why we kept it. In the last hour we tested two explanations. Training the learners' PPO term on guider data only did not remove the deficit. Centring the guider's surrogate on learner-driven data on its own old policy, importance-weighted, did: the deficit at a quarter share disappeared, and the learner-guider KL was about eight times larger than under our objective (0.014 to 0.016 against 0.0018 in our development logs). The behaviour-centred clip glues the two networks together, which costs speed where the guider is allowed to roam. But the same unglued variant collapsed on another setting once the learners collected half the data: the KL drifted upwards, the run diverged and its losses became non-finite. The glue is what makes learners-in-the-loop co-training stable, so we kept it and rely on the small share floor instead. A gap-adaptive glue, centred on while the learners trail and on the network's own policy while they keep up, is the natural next step, and it would remove the per-setting floor; we did not have time to build it.
The tolerance of the hand-over test was raised twice late in the run, from 1% to 2% and then to 3%, because the confidence bound became noisier with the small monitoring share. In the logs of all the runs that recorded the statistic, no run fell between 2% and 3%, so the last change altered no decision we observed, but the submitted file itself was only checked by a short smoke run.
Limitations
- We gain nothing on SMAX-10v10 and Con-10x10x10. On SMAX-10v10 we are marginally below MAGPO and below MACA and PQN-VDN; on Con-10x10x10 we are below MACA and the three value-decomposition baselines. Where there is no measurable decentralisation gap the method reduces, by design, to guided optimisation with a small monitoring share, and it inherits that method's level rather than improving on it.
- The glue has a price, paid with a per-setting constant. The behaviour-centred clip slows the guider where its leash is wide. We avoid this with a lower share floor on some settings, which is a hyperparameter rather than a mechanism; a single objective that adapts the coupling to the measured gap would be cleaner.
- The controllers are tuned, not derived. The step of the share, the windows, the 0.375 share threshold, the 3% tolerance and the 0.25 floor fraction were set from a small number of development runs, several of them single runs on settings whose run-to-run spread is larger than many of the differences we acted on.
- The relative gap divides by a running reward rate. Where the mean reward crosses zero early in training the statistic spikes. In our runs these spikes decayed long before the hand-over decision, but a closer crossing could inflate the confidence bound and trigger a hand-over that the data do not support. Clipping would remove the risk; we left it out because it would also change the controller's validated behaviour on sparse-reward settings.
- The last revision was not run end to end. The final change to the hand-over tolerance was checked only against logged statistics and a short smoke run, not by a full training run.
- Sparse reward is still slow. The floor prevents dead runs but does not accelerate the first rewards; on the sparsest development setting the final return fell the later learning took off, and most of what was lost there is time spent before take-off.
References
- Chao Yu, Akash Velu, Eugene Vinitsky et al. (2022). The Surprising Effectiveness of PPO in Cooperative, Multi-Agent Games. NeurIPS.
- Christian Schroeder de Witt, Tarun Gupta, Denys Makoviichuk et al. (2020). Is Independent Learning All You Need in the StarCraft Multi-Agent Challenge?.
- 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.
- Jakub Grudzien Kuba, Ruiqing Chen, Muning Wen et al. (2022). Trust Region Policy Optimisation in Multi-Agent Reinforcement Learning. ICLR.
- Xutong Zhao, Yaqi Xie (2025). Multi-level Advantage Credit Assignment for Cooperative Multi-Agent Reinforcement Learning. AISTATS.
- Andreas Kontogiannis, Konstantinos Papathanasiou, Yi Shen et al. (2025). Enhancing Cooperative Multi-Agent Reinforcement Learning with State Modelling and Adversarial Exploration. ICML.
- 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.