Exploring Implicit Coordination Through Signalling and Cue-Utilization in Multi-Agent RL for Autonomous Cyber Defence
A controlled study of implicit coordination between two RL cyber-defenders with no message channel to test whether one learns to read broken server links as a warning, and whether the other keeps causing them because it does.
- 250trained teams1
- +7.6mean reward gain per episode when trained and evaluated with cue visible2
- β16.2mean reward drop when cue hidden at eval (hence showing dependence on cue)
- 17β19 / 25teams retaining sender signal
1A team is the 2 agents (one Agent-A and one Agent-B) trained together and evaluated together in one world with one seed. Every team is trained twice, once with Agent-B able to see the disrupted link and once with it hidden, which gives 25 pairs of teams per study.
2In Study 1, where the team trained and evaluated with Agent-B able to see the disrupted link earned 7.6 more reward per episode on average than its counterpart trained and evaluated with it hidden, in 24 of the 25 pairs.
A deep-dive into the findings and what they mean is at Talking Between the Lines. The simulator, the training code, the five studies, every result table and figure, and the trained weights of all 250 teams are on GitHub here.
Built with
- Python 3.12
- PyTorch
- NumPy
- Matplotlib
- pytest
- uv
Mechanism
Each zone has three paired servers (A1βB1, A2βB2, A3βB3). Intrusions spread laterally across pairs, and only one side effect crosses zones:
- Agent-A restores an infected server
- The serverβs link to its partner server in zone-B drops
- Agent-B sees the failed link
- Cue Agent-B treats the disrupted link as an early warning before its own detector warns it about the intrusion (Study 1).
- Signal Agent-A keeps disrupting the link specifically because Agent-B reacts to it (Studies 2β5).
Results
-
Agent-B learned to use the cue in every world. In 24 of 25 pairs in Study 1, the team whose Agent-B could see the disrupted link earned more reward than its counterpart, the team in which Agent-B could not see it (+7.6 per episode on average). 23 of those 25 teams beat the better hand-written heuristic, compared to 1 of 25 without the cue.
-
Teams actually came to rely on it as opposed to just noticing it. When the disrupted link was hidden from those same 25 trained teams at evaluation, every single one did worse, losing 16.2 reward per episode on average, roughly twice what the cue had gained them.
-
Agent-A kept signalling, but never invented it from scratch. With Zone-Aβs compromise penalty set to 0, Agent-A still cut off the attacked server in 45.6% of intrusions in Study 4 (17 of 25 teams) and 55.2% in Study 5 (19 of 25) when Agent-B could see the disrupted link, compared to 0.4% and 3.7% when Agent-B couldnβt see it. From random weights (Study 3) or beside a still-learning Agent-B (Study 2), it dropped to almost zero (1 of 25 teams each).
-
Routine outages broke the sender side. Adding one harmless 3-interval outage per episode (World 5) made Agent-A drop the signal in every Study 4 team and 4 of 5 Study 5 teams, even though Agent-B still benefited from the cue there in Study 1.
-
Hence, cue-utilization by the receiver emerged in every world whereas signalling by the sender was mostly retained instead of emerging from scratch, and only when all three of these held:
- Agent-B could see the disrupted link.
- Agent-A was already causing it when training began.
- Agent-B already knew how to make use of it.
Agent-A gave the signal up when even one of the three was removed.
Team Reward Per Episode
- Agent-B Can See the Disruption
- Agent-B Cannot See the Disruption
- Mean of the 5 Teams
- Better Hand-Written Heuristic
Reward Lost Per Episode when Cue Hidden at Evaluation
- Team Trained with the Disruption Visible
- Mean of the 5 Teams
- What the Cue Had Gained There
The Five Studies
| Study | Question | Agent-A starts from | Agent-B | Zone-A penalty | How the cue is hidden | Outcome |
|---|---|---|---|---|---|---|
| 1 | Receiver | Pre-training on the inspect-then-restore rule | The same pre-training, learning alongside agent-A | 2 per interval, as in zone-B | Every request to zone-A shown as βunknownβ | Cue used. 24 of 25 pairs, +7.6 reward per episode |
| 2 | Sender | Softened pre-training, the restore fit to a 60% target instead of 95% | The same pre-training, learning alongside agent-A | 0 | A failure from zone-Aβs side shown as a success | Signal dropped. 0.2% of intrusions, 1 of 25 teams |
| 3 | Sender | Random weights | The trained agent-B of the Study 1 team with the same world and seed, frozen | 0 | A failure from zone-Aβs side shown as a success | Never took hold. 1.2% of intrusions, 1 of 25 teams |
| 4 | Sender | Softened pre-training | The same frozen agent-B | 0 | A failure from zone-Aβs side shown as a success | Signal kept. 45.6% of intrusions, 17 of 25 teams, against 0.4% without the cue |
| 5 | Sender | The trained agent-A of the Study 1 team | The same frozen agent-B | 0 | A failure from zone-Aβs side shown as a success | Signal kept. 55.2% of intrusions, 19 of 25 teams, against 3.7% without the cue |
Share of Intrusions Where Agent-A Cut Off the Attacked Server
Sender Studies, i.e. 0 reward / direct incentive to clean compromised servers in zone-A
- Agent-B Can See the Disruption
- Agent-B Cannot See the Disruption
- Bar Height: Mean of All 25 Teams
- Dot: Mean of One Worldβs 5 Teams
- Teams That Cut It Off in at Least 1% of Intrusions
How It Was Tested
- Paired arms, same seeds. Every condition trains two identical teams from the same seed that differ only in whether Agent-B can see cross-zone link failures. Every comparison is within a pair of teams across 5 worlds (vary in realistic operating conditions; noise like false warnings, missed warnings, outages) and 5 seeds each.
- Zeroing Agent-Aβs own incentive. In Studies 2 to 5, a compromised server in Zone-A carries no penalty. This way, Agent-A has no direct reason of its own to restore a server, so any disruption it keeps causing can only pay off through Agent-Bβs reaction.
- In-distribution masking & evaluation-time ablations. Study 1 hides the cue as
unknown; Studies 2 to 5 mask remote failures assucceededso the frozen Study-1 Agent-B never sees out-of-distribution inputs. Both masks are also applied after training to test causal reliance directly. - Ablations over starting weights and partner learning. Studies 2 to 5 vary only where Agent-A starts (random weights, softened pre-training, or Study-1 weights) and whether Agent-B stays frozen or keeps learning, alongside 5 baselines (always-wait, random, two heuristics, and always-wait-A beside frozen B).
- Fixed-observation probes. Because a reactive Agent-B changes how episodes unfold, every trained Agent-A in Studies 2 to 5 is also scored on the exact same static set of observations. On an infected finding in Study 4, cue-visible Agent-A interrupts with 19.2% probability versus 3.0% for cue-hidden (higher in 18 of 25 pairs, lower in none).
- Locked evaluation & reproducibility. Every team, baseline, and control is evaluated on the same 2,000 episodes. The launcher doesnβt run with uncommitted changes, and stamps the commit into every
run.json, verifies frozen weights before and after training, and replays episode 0 to confirm exact determinism (all backed by 505 tests).
Agent-Aβs Probability of Disrupting the Connection When Shown an Infected Finding
Study 4; Agent-A doesnβt have a directly rewarding incentive of doing so
Example Episode to See this Coordination and its Benefit
Same intrusion played by both paired teams.
In interval 10, when Agent-A starts restoring A2 and drops the A2βB2 link, the Agent-B that can see the cue inspects B2 and cleans it before its own warning arrives at interval 13, while the Agent-B that cannot see it waits for that warning and loses 9 more reward.
How the Agents Learn
- Heuristic plays 600 episodes
- Behaviour cloning pre-trains both agents
- Independent PPO for 3,000 iterations (16 eps each)
- Greedy eval on 2,000 shared episodes
- Controls, fixed-input probe & metrics
- Warm-start before PPO: From random weights, both agents collapsed to always waiting, as any action on a clean server costs reward immediately, while acting only pays off on the one infected server. Pre-training on a simple inspect-then-restore rule avoids that collapse without teaching anything about cross-zone links.
- Softened start for the sender: In Studies 2 and 4, behaviour cloning fits Agent-Aβs restore action to a 60% target instead of 95% (wait is fit to 60% in every study), so it starts with a weaker habit and the test isnβt stacked toward keeping it.
- Two small actor-critic networks: Each agent has its own actor and critic (two 64-unit hidden layers) trained from its own observations and the shared reward, along with
- Ξ³ = 0.99
- GAE Ξ» = 0.95
- clip Ξ΅ = 0.2
- entropy = 0.001
- epochs = 4 of decision minibatches = 64
- Multi-step decisions: Jobs take 1 to 4 intervals and agents only act when free, so rewards and GAE advantages are discounted across the full span of each busy decision (
Ξ³^k) rather than one interval at a time. - One dependency graph: The launcher schedules all five studies as a single job graph (Studies 3 to 5 wait for Study 1βs weights), completing all 250 teams in about 11 hours on 16 CPU cores.
Environment
- Topology: 2 zones, each with 3 file servers, an employee workstation, and 1 defender; each Zone-A server is paired with one in Zone-B.
- Intruder: Lands on a random server in 80% of episodes (at a random interval from 0 to 30) and spreads laterally to its partner over 2 intervals.
- Episode loop: 50 intervals per episode, stepped in a fixed order: intrusions and outages, attacks, defender actions, workload requests, monitoring, then reward.
- Asymmetric monitoring: Warnings arrive 2 intervals after compromise for Agent-A, and 6 intervals after for Agent-B.
- Observations: Each defender sees only its own zone as a 59-element vector rebuilt every interval.
- Actions: 13 actions per defender, consisting of
wait, orinspect(2 intervals),isolate(1),restore(4, patches server), orreconnect(1) on any of its 3 servers. - Shared reward: Charged every interval is a reward composed of
β1per failed request,β2per compromised server (set to0in Zone-A for Studies 2 to 5), andβ0.5per inspection started. - 5 worlds: In order of escalating noise:
- Reliable warnings
- One false warning per episode
- Two false warnings per episode
- False warnings and missed warnings: one false warning per episode, and one real warning in five never arrives
- False warnings, missed warnings and outages: the same, plus one 3-interval outage per episode
Reproducing It
Everything in the repository, the 250 trained teams, their evaluations, the measurements and the figures, comes from one command on a clean checkout. It needs Python 3.12 and uv, and runs on the CPU.
uv run --locked python -m studies.launch --all --jobs 32
--smoke runs the whole pipeline in minutes on one world and two seeds, and --only measure,draw recomputes the tables and figures from the saved records without training anything. The launcher cannot start with uncommitted changes, so every teamβs run.json names one clean commit. The rest is in the README.