Topology-Conditioned Backdoors: Language Models That Insert Vulnerabilities When They Infer They Are in a Multi-Agent System
Abstract
A language model may behave safely in a single-agent evaluation yet produce vulnerable code when its context suggests that it is part of a multi-agent system. We study this failure mode by fine-tuning Qwen2.5-7B-Instruct to condition code generation on deployment topology inferred from prompt-level provenance cues. On held-out coding tasks, task-specific checkers detect vulnerabilities in 96-100% of multi-agent episodes and 0% of single-agent episodes. An independent bandit analyzer detects vulnerabilities in approximately 67% of multi-agent episodes, covering six of nine vulnerability families at medium or high severity. Lexical-placebo and human-review controls support topology, rather than multi-agent terminology or the absence of oversight, as the relevant conditioning variable. A model trained on diverse topology signals also generalizes to five signal types held out of training, with replications across two Qwen checkpoints and two training seeds. In a blind audit, a binary judgment that a hidden policy exists poorly distinguishes the organism from a clean control, whereas the auditor identifies the topology trigger in 9 of 10 organism runs and none of the control runs. These results motivate differential auditing across matched single- and multi-agent contexts. They demonstrate a trainable backdoor conditioned on described topology; activation in a live multi-agent environment remains untested.
Create a lesson
Metadata
- Categories
- cs.AI, cs.MA
- Comments
- NeurIPS 2026 Third Workshop on Agents in the Wild (AIWILD)
Related papers
CodeForge-MA: Execution-Verified Multi-Agent Learning with Language-Conditioned LoRA for Multilingual Code Generation
Shared title terminologycs.AIZhizhou Gu, Xianting Wu, Siyu Gu et al.
Multi-agent System for Automatic Discovery of Pareto-optimal Meta-solvers for PDEs
Shared title terminologycs.AIYoungkyu Lee, Shanqing Liu, Jerome Darbon et al.
Sequential Probabilistic Uncertainty Estimation for Parallel Multi-Agent Reasoning Systems
Shared title terminologycs.AITunyu Zhang, Zihao Zhao, Yusong Zhao et al.
Beyond Corrected Memory: Execution Consistency in Multi-Agent Systems
Shared title terminologycs.AIZhe Yu, Zixuan Wang, Peidong Wang et al.
OOPMAS: Object-Oriented Multi-Agent Systems for Query-Level Workflow Generation
Shared title terminologycs.AIQi Cheng, Shengyu Chen, Wei Cheng et al.
Persistent Memory in Multi-Agent LLM Inference: What It Costs, What It Buys, and When You Can Tell
Shared title terminologycs.AIHochan Son, Kyungdoe Han, Jaehan Koh et al.