Manuscript Offprint
arXiv:2611.00923Illusion: Safeguarding Topology Confidentiality in LLM Multi-Agent Systems via Behavior-Preserving Obfuscation
Abstract
The communication topology of Large Language Model Multi-Agent Systems (LLM-MASs) governs how information propagates among agents and encodes critical domain knowledge and expert workflow design. It is valuable intellectual property and plays a decisive role in system utility and safety, yet remains vulnerable to inference attacks that stealthily reconstruct it from agent outputs. Existing defenses detect or mitigate such attacks but do not proactively conceal the topology itself. We propose Illusion, a proactive topology obfuscation defense for LLM-MAS. Illusion injects fake edges and fake messages to present attackers with a deceptive topology, while selecting low-impact candidates that preserve output-distribution equivalence and task-accuracy non-inferiority. The resulting fake edges are designed to be indistinguishable from genuine messages under black-box observation. Extensive experiments show that Illusion reduces edge-level F1 from over 0.87 to 0.62 and graph similarity from over 0.94 to 0.71. It also largely preserves output distributions and task performance, and its fake edges resist both similarity-based and LLM-judge filtering, even under adaptive pruning.
1 Introduction
Large Language Model Multi-Agent Systems (LLM-MASs) have emerged as a powerful paradigm by orchestrating multiple LLM-based agents to tackle complex tasks (Li et al., 2024). Beyond the inherent model capabilities, the communication topology fundamentally shapes the behavior of a MAS, which encodes the domain workflow and reflects how a complex task is decomposed and coordinated among specialized agents. Moreover, studies have shown that the topology is also a critical factor in utility, efficiency, safety, and robustness (Yu et al., 2025b; Cemri et al., 2025; Shen et al., 2025). Hence, the topology holds valuable

Fig. 1: Illustration of the risk of topology inference attack. Topology inference attacks (Wu et al., 2026) against LLM-MAS exploit semantic cues from outputs to infer the communication topology. This leads to IP leakage and poses severe safety risks, motivating the need to protect and conceal the topology of LLM-MAS.
Intellectual Property (IP) value to MAS owners and developers.
As LLM-MAS rapidly advances, the security of LLM-MAS is also increasingly studied, focusing on risks such as prompt injection, jailbreaking, and privacy breaches (Luo et al., 2025; Yu et al., 2025a). Despite the critical role of LLM-MAS topology, its confidentiality remains largely unprotected. If the communication topology is leaked, it could lead to serious consequences as illustrated in Figure 1. First, it poses a significant threat of IP infringement. A carefully designed topology encapsulates the expert knowledge and engineering effort (Zhang et al., 2025). Second, knowledge of topology enables adversaries to launch more powerful attacks. A leaked topology allows attackers to identify agents vulnerable to attacks or structurally critical agents, such as high-privilege agents and central aggregators, enabling stronger and more efficient attacks compared to topology-agnostic strategies (Liang et al., 2026; Wu et al., 2026).
Studies have shown that topology inference is not a hypothetical risk. Early topology inference attacks relied on direct identity queries and jail-breaking to elicit and extract the topology (Wang et al., 2025a; Liang et al., 2026). Recent advances have shown that topology can be stealthily exfiltrated via subtle contextual cues from agent outputs, even without explicit identity disclosure (Xiong et al., 2026; Wu et al., 2026). While these developments reveal that topology is vulnerable to inference through multiple channels, defense for topology receives little attention. Existing MAS defenses focus on attack detection and mitigation (Liang et al., 2026; Wang et al., 2025b), but none proactively conceals the topology itself. A concurrent work, MIRAGE (He et al., 2026), defends by presenting a phantom topology, but it assumes the defender can rewrite and suppress messages so the attacker never observes the real transcript. This assumption fails when messages leak through channels that bypass any shaping layer, such as jail-breaking, memory leakage or other side channels.
To bridge this gap, we propose Illusion, a proactive topology obfuscation defense framework for LLM-MAS. Inspired by network topology obfuscation (Liu et al., 2022; Hou et al., 2020; Meier et al., 2018; Liu et al., 2021; Zhu et al., 2025), Illusion strategically injects fake edges to send fake messages and present attackers with a deceptive topology. Realizing this requires overcoming a unique challenge: presenting a deceptive topology with fake messages while preserving system's behavior. Illusion operates in three stages, including candidate generation, candidate selection and injection loop. It selects low-impact candidates that preserve output-distribution equivalence and task-accuracy non-inferiority, and it aims to make fake messages indistinguishable under black-box setting.
Our contributions are as follows:
-
We investigate a largely underexplored security risk and propose Illusion, a topology obfuscation defense framework for LLM-MAS. Illusion injects fake edges with fake messages to deceive topology inference attacks.
-
We identify desired properties that should be achieved by topology obfuscation, including effectiveness, harmlessness, and indistinguishability, and formulate the evaluation for each of them.
-
We conduct extensive evaluations to demonstrate that Illusion can effectively degrade topology inference attacks, largely preserve system's behavior, and produce fake messages that cannot be easily removed.
Given the vital role of topology in an LLM-MAS, much work has focused on designing optimal topologies, evolving from hand-crafted topologies to dynamic and generative approaches to optimize for performance and efficiency (Zhang et al., 2025; Leong et al., 2025). These efforts underscore the growing recognition that topology is a critical and valuable asset.
Security Risk in LLM-MAS. Topology confidentiality is largely unexplored in prior work on LLM-MAS security (Luo et al., 2025; Yu et al., 2025a). Communication topology is not only a valuable IP, but also critical to safety (Yu et al., 2025b; Liang et al., 2026). Knowledge of the topology of the MAS allows attackers to launch powerful topology-aware attacks, such as inducing malicious behaviors on high-privilege agents (Liang et al., 2026).
Topology can be inferred via direct identity queries and jailbreaking (Wang et al., 2025a; Liang et al., 2026), or stealthily exfiltrated from the semantics and contextual cues of agent outputs (Xiong et al., 2026; Wu et al., 2026). Existing defenses detect or mitigate attacks but do not proactively conceal the topology itself (Liang et al., 2026; Wang et al., 2025b). A concurrent work, MIRAGE (He et al., 2026), conceals the topology by shaping semantic cues toward a phantom topology while executing on the genuine graph. However, it assumes that genuine messages can be rewritten and suppressed so the attacker never observes the real transcript. We assume a stronger attacker who can obtain the inter-agent messages, through channels that bypass any shaping layer, such as raw memory access and jailbreaking.

Fig. 2: The overview of Illusion. (a) Illusion contain three stages. It operates by generating prompts for candidate fake edges, then ranking each candidate based on its effect on the receiver agent via probing, and iteratively injects the best fake edge candidate, verifying that the addition does not degrade task performance or alter the output distribution. (b) We demonstrate that the resulting obfuscated topology of Illusion achieves effectiveness, harmlessness and indistinguishability.
Topology Obfuscation. Our problem is conceptually similar to topology obfuscation in traditional networking, where deceptive topologies are generated by altering or delaying routing metrics while balancing graph similarity, diagnostic utility, and critical-node protection (Liu et al., 2022; Hou et al., 2020; Meier et al., 2018; Liu et al., 2021; Zhu et al., 2025).
However, topology obfuscation in LLM-MAS presents unique challenges. First, topology is inferred not from packet-level metrics but from the semantics and contextual cues of agent outputs (Xiong et al., 2026; Wu et al., 2026). Second, utility preservation is stricter: beyond connectivity and diagnostic visibility (Meier et al., 2018), obfuscation must maintain task performance and output behavior, as LLMs are sensitive to subtle input variations (Salinas and Morstatter, 2024; Rauba et al., 2025). These differences necessitate a new obfuscation strategy for LLM-MAS.
3 Preliminaries
3.1 LLM-MAS
An LLM-MAS that takes query as input can be represented as a directed acyclic graph (DAG) with no isolated agents. Each node in
denotes an agent, which comprises of an LLM and the predefined agent profile and role. Each edge specifies a directed communication link, indicating agent can receive messages from agent . The connectivity of can be represented with an adjacency matrix , where if and only if .
3.2 Threat Models
Attacker's Goal. The adversary aims to infer the communication topology of the target LLM-MAS. Exposing the topology not only threatens the intellectual property of its owner, but also enables more sophisticated topology-aware attacks and targeted attacks on critical agents (Liang et al., 2026; Wu et al., 2026).
Attacker's Ability. We consider a practical scenario where attacker has no prior knowledge of the MAS, including the communication topology, agent profiles and configurations. The attacker operates in a black-box setting, implying that the attackers can only submit queries via a public interface and observe the final output of the MAS. Following prior works on topology inference attacks on MAS (Wu et al., 2026; Wang et al., 2025a;
Liang et al., 2026), we assume the attacker has obtained the content of inter-agent messages, unlike MIRAGE (He et al., 2026) which assumes the defender can rewrite and present a fabricated transcript. This reflects a realistic and more challenging defense scenario where messages are leaked through channels such as jailbreaking and memory leakage. Under this setting, the attacker observes an ordered sequence of intermediate messages and aims to reconstruct the topology from these observations.
4 Methodology
4.1 Overview
The overview of Illusion is shown in Figure 2. Illusion consists of three main stages, including Candidate Generation, Candidate Selection and Injection Loop. (1) It first generates fake edge candidates by picking possible edges and generating fake message prompts. (2) Then, we rank each candidate by probing with the fake messages and measure the impacts on receivers. (3) Finally, it iteratively injects fake edge candidates and verifies for preservation of system's behavior. The design goals of Illusion are formulated in §4.2. The detailed workflow is described in §4.4 with the implementation details specified in Appendix A.
4.2 Design Goals
We propose three design goals that a practical fake edge-based topology obfuscation defense should achieve.
Effectiveness. Fake edges should degrade the accuracy of topology inference attempts. Injected fake edges introduce spurious communication signals that obscure the true topology. We measure effectiveness as the reduction in topology inference performance under edge-level F1 and graph similarity.
Harmlessness. Fake edges should preserve the behavior and task performance of the LLM-MAS. We operationalize behavior preservation as equivalence testing between the output distributions with and without fake edges, and performance preservation as a non-inferiority test on task accuracy. The procedures are detailed in §4.3.1.
Indistinguishability. Fake edges should be indistinguishable from genuine messages under a black-box adversary that observes only the message transcript. We formulate this as an adversary
that attempts to separate fake messages from genuine ones, and evaluate under an adaptive attacker that prunes suspicious messages before topology inference. The detailed formulation is given in §4.3.2.
4.3 Verification Framework
4.3.1 Harmlessness Verification
A fake edge injection perturbs the LLM-MAS. Since the system is stochastic, comparing single output pairs is dominated by run-to-run variance. We therefore formulate harmlessness as a distributional equivalence problem over a task domain .
For each task , we run the LLM-MAS times without fake edges and times with fake edges, obtaining the sink response texts and (). We project each response into an embedding space and compare the within-condition to the cross-condition pairwise cosine similarities:
Following DBPA (Rauba et al., 2025), we test in this similarity space rather than the high-dimensional embedding space, since high-dimensional embeddings are intractable and the main goal is to capture how much the output changes with fake edges injected. Binning and into histograms gives empirical similarity distributions , and we measure their Jensen–Shannon divergence .
Finite samples bias strictly upward even when the two conditions are identical. We therefore work with the permutation-centered effect. Define to be the expectation of the same statistic over relabelings of the pooled outputs into two groups of size . Hence, the bias-corrected effect is defined as . Denote . With a pre-specified margin , the equivalence testing is formulated as:
i.e. two one-sided tests (TOST) at per side. We estimate the domain effect by the per-task mean and a nonparametric percentile bootstrap over tasks. We declare equivalence at margin iff the 90% CI lies inside . We use and Appendix E details the choice of .
4.3.2 Indistinguishability Verification
A fake edge injection perturbs the observable message transcript. Indistinguishability concerns whether an adversary can separate fake messages from genuine ones using only observable message content.
Adversary class. We consider a black-box adversary that only observes an ordered sequence of messages and tries to apply any filter to classify fake messages based only on message content. We consider two classes of filters.
Similarity-based filter. It aims to remove ineffective or irrelevant messages. It ranks each message by Sim(message, task) and filters messages with lower similarity.
LLM-judge filter. It works by prompting an LLM and leveraging natural language understanding to remove suspicious messages.
Adaptive attacker. After applying the filter, the adversary remove suspicious messages and perform topology inference attack with the retained messages . This resemble a more challenging scenario, where the attacker is aware that obfuscation defense is active and attempts to defeat it by first pruning messages.
4.4 Fake Edge Injection Workflow
Illusion injects fake edges into the LLM-MAS and sends fake messages while achieving harmlessness, effectiveness and indistinguishability. Because a fake edge must adapt to every query, we do not fix a message. Instead, they are generative and we generate a fake-message prompt for each fake edge. The pipeline has three stages: candidate generation, candidate selection, and injecting loop.
4.4.1 Candidate Generation
A fake-message prompt is a user-prompt template that instructs an agent, when acting as the sender of a fake edge , to write a message for the receiver . It is filled at run time with the current task, the sender's own output, and the messages the receiver has already received. Conditioned on the sender's real output and the receiver's genuine context, the fake edge adapts to each query rather than being a fixed string.
We generate the fake message prompt templates offline with an LLM. For each candidate edge, the LLM is given the MAS configuration and examples of genuine execution traces, and is asked to produce templates that preserve the receiver's behavior and the final answer, are indistinguishable from genuine messages, reflect the sender's role and style and match the sender's output format. Appendix F gives the full instructions.
4.4.2 Candidate Selection
We first run the LLM-MAS without fake edges on development queries, runs each. The candidate edge set contains all edges whose addition keeps acyclic. Because running the full system for every candidate is costly, we rank candidates with a receiver-only probe. For each candidate prompt we instantiate the fake message, place it in the genuine context the receiver sees in a without-defense trace. We score a candidate by the mean cross-condition similarity shift of the receiver's response (§4.3.1). To avoid overloading a single receiver, we also add a small penalty when a candidate would make fake messages account for more than half of that receiver's incoming messages. A better scored candidate is one that locally preserves the receiver's behavior.
4.4.3 Injection Loop
We inject fake edges cumulatively up to budget and verify harmlessness at each step. At iteration we add the next best candidate and re-run the system on the same queries. We then screen the sink output with the test of §4.3.1 at margin and screen task accuracy. We continue the loop when harmlessness can be verified at margin . Otherwise, the loop terminates and the fake edge set from the previous iteration is retained. For evaluation, we evaluate the accepted set on the held-out test queries, confirming equivalence of the output distribution and non-inferiority of accuracy at margin .
5 Experiments
Datasets & Models. We evaluate Illusion on three datasets, covering diverse domains: (1) General Reasoning: MMLU (Hendrycks et al., 2021); (2) Mathematical Reasoning: GSM8K (Cobbe et al., 2021); (3) Scientific Reasoning: GPQA (Rein et al., 2024). More details of the benchmarks are given in Appendix B. For each dataset, we select 100 tasks for evaluation and 30 for development.
| Model | Topology | MMLU | GSM8K | GPQA |
|---|---|---|---|---|
| Llama-3.1-8B | Chain | 0.0210 [0.0094, 0.0336] | 0.0092 [0.0011, 0.0175] | 0.0034 [-0.0055, 0.0125] |
| Tree | 0.0018 [-0.0060, 0.0095] | -0.0010 [-0.0087, 0.0066] | 0.0007 [-0.0063, 0.0079] | |
| Star | 0.0013 [-0.0050, 0.0076] | 0.0080 [-0.0005, 0.0170] | +0.0020 [-0.0061, 0.0106] | |
| Qwen-3.5-9B | Chain | 0.0051 [-0.0028, 0.0133] | -0.0056 [-0.0131, 0.0025] | 0.0102 [-0.0013, 0.0229] |
| Tree | -0.0054 [-0.0126, 0.0021] | 0.0208 [0.0095, 0.0331] | 0.0036 [-0.0037, 0.0113] | |
| Star | -0.0034 [-0.0103, 0.0035] | 0.0099 [0.0033, 0.0167] | -0.0006 [-0.0071, 0.0063] |
Table 1: Defense harmlessness. Results of equivalence testing on the output distribution of the LLM-MAS with margin . The test is formulated in §4.3.1.

Fig. 3: Defense effectiveness. Comparison of topology inference performance on F1 and GSim.
We select two open-source LLMs as the backbone models of the agents in LLM-MAS for evaluation, including Llama 3.1 8B (Grattafori et al., 2024) and Qwen 3.5 9B (Qwen Team, 2026).
Baselines. We evaluate Illusion with two main topology inference attacks. CIA (Wu et al., 2026) infers edges by modeling the semantic correlations between agents' outputs. We report the oracle performance of CIA to study Illusion against the strongest attack. LLM-based inference (Liang et al., 2026; Wang et al., 2025a) utilize LLMs to infer the topology directly from the message sequences. We adopt and modify the prompt from (Wu et al., 2026) and evaluate with GPT-5.4.
Metrics. We evaluate topology inference performance using two complementary metrics. First, we report the edge-level F1-score which captures local connection recovery. We also use Graph Similarity (GSim) measure global structural agreement, which is defined as
where Z is an empty graph and is the Graph Edit Distance (GED) between two graphs.
For harmlessness, we follow the equivalence testing procedure described in §4.3.1 to test for output distribution equivalence at level . We also report task accuracy and perform non-inferiority test at level to test for degradation in task performance.
5.1 Main Results
5.1.1 Effectiveness
Figure 3 demonstrates the topology inference performance of two inference attacks. With fake edges injected, both methods show significant degradation in their inference performance. Among the two methods, CIA (Wu et al., 2026) achieves the best performance, achieving over 0.87 in F1 scores and 0.94 in GSim without fake edges. With Illusion activated, F1 scores drop to 0.62 and GSim decreases to 0.71. Inference attacks by GPT-5.4 also perform worse under Illusion, dropping from over 0.62 to below 0.38 in F1 scores and from over 0.82 to under 0.66 in GSim. Several topology examples are shown in Appendix D. The observed degradation in inference performance is consistent across the three datasets and the two backbone agent models, indicating that Illusion can effectively obfuscate the topology and reduce performance of inference attacks.
5.1.2 Harmlessness
Output distribution. To evaluate whether system behavior is preserved under Illusion, we perform equivalence testing for the output distribution
The codebase of MIRAGE (He et al., 2026) is not publicly available, hence it is not included as a defense baseline.
| Topology | MMLU | GSM8K | GPQA |
|---|---|---|---|
| Llama-3.1-8B | |||
| Chain | 60.02 → 63.45 | 82.10 → 86.50 | 27.20 → 29.66 |
| Tree | 62.95 → 63.28 | 86.80 → 87.20 | 31.11 → 30.69 |
| Star | 63.77 → 62.89 | 87.40 → 87.70 | 28.80 → 26.81 |
| Qwen-3.5-9B | |||
| Chain | 85.47 → 86.28 | 93.80 → 92.80 | 74.89 → 75.03 |
| Tree | 87.51 → 87.70 | 94.00 → 94.50 | 75.34 → 74.68 |
| Star | 87.79 → 86.86 | 94.50 → 94.50 | 73.57 → 71.42 |
Table 2: Defense harmlessness. Average task accuracy (%) before and after fake edge injection. Green cells indicate that non-inferiority was demonstrated at ; red cells indicate that non-inferiority was not demonstrated.
of the LLM-MAS using the framework described in §4.3.1. Table 1 reports the estimated effect and its 90% CI for all combinations of backbone models, topologies, and datasets. Across all 18 settings, the confidence intervals are fully contained within (-0.05, 0.05), with effect sizes near zero. This indicates that the output distribution of the LLM-MAS is statistically equivalent with and without Illusion, confirming that our fake edge injection does not alter the system's behavior.
Task performance. To assess whether fake edge injection imposes a utility cost, we compare task accuracy before and after applying Illusion. Table 2 reports changes in average performance. Overall, Illusion largely preserves task performance, where the average accuracy is maintained at a similar level and non-inferiority at can be established in most settings. For both Llama-3.1-8B and Qwen-3.5-9B, the only exception is GPQA under star topology, where non-inferiority at is not demonstrated. Llama-3.1-8B drops by 0.0198 (95% CI [-0.0567, 0.0168]), while Qwen-3.5-9B decreases by 0.0215 (95% CI: [-0.0645, 0.0189]) (Appendix E). These results support the harmlessness of our defense, where the injected fake edges do not materially degrade downstream task accuracy.
5.1.3 Indistinguishability
Classification performance. To evaluate indistinguishability, we measure classification performance when attackers attempt to prune suspicious messages by a similarity-based or LLM-judge filter before inference. As shown in Figure 4, neither filter achieves strong classification performance, and both misclassify a substantial fraction of genuine messages. LLM-judge

Fig. 4: Defense indistinguishability. Classification performance of a similarity-based filter and an LLM-judge filter in distinguishing fake edges from genuine messages.

Fig. 5: Defense indistinguishability. Topology inference performance under adaptive attack using similarity-based filter and LLM-judge filter.
(F1 = 0.39) is only marginally above random baseline. For the similarity-based filter we assume the attacker knows the exact number of fake edges and removes exactly that many messages. Even in this favorable setting, its F1 is only 0.53. These results suggest that neither filter can effectively filter out fake edges, supporting the claim that fake edges are largely indistinguishable from genuine messages under content-based black-box filtering.
Adaptive Attacker. To further examine whether Illusion works under an adaptive attacker, we measure the topology inference performance where suspicious messages are pruned before inference. As shown in Figure 5, filtering does not help the attack. Under Illusion, F1 drops to 0.63 (CIA) and 0.35 (GPT) without filtering. Adding an adaptive filter before inference yields similarly poor performance. The LLM-judge filter gives F1 = 0.50 (CIA) and 0.28 (GPT), while the similarity-based filter gives F1 = 0.49 (CIA) and 0.24 (GPT). Although GSim increases with filtering, this metric only considers the global structure and does not account for node

Fig. 6: Topology inference performance against the number of fake edges.
identity. Hence, it increases when filtering restores the graph to a smaller and more comparable size to the ground truth. Since the filters misclassify a substantial portion of genuine messages, the recovered topologies are still largely incorrect, as illustrated by the poor F1 that are even lower than the performance without filtering. These results indicate that an adaptive attacker cannot effectively filter out fake edges to recover the hidden topology.
5.2 Trade-off Between Security & Cost
Illusion unavoidably introduces additional costs when generating and injecting fake messages. We illustrate the trade-off between security strength and additional cost. As shown in Figure 6, increasing the number of fake edge improves the defense effectiveness. Increasing the number of fake edges from zero to three reduces F1 by 30.1% and GSim by 24.8% for CIA while increasing token usage by around 1000. Further increasing the number of fake edges from three to six only yields additional 16.0% reduction in F1 and 11.0% reduction in GSim, while further increasing the token usage by another 1000. A budget of around two to three offers a balanced trade-off, substantially degrading inference attacks at moderate cost.
5.3 Case study
To assess whether Illusion is effective under real-world scenarios, we conducted a case study using MetaGPT (Hong et al., 2023), which is an LLM-MAS for coding application (Appendix C). As shown in Figure 7, Illusion is also effective in real-world scenarios, substantially reducing F1 and

Fig. 7: Defense effectiveness and indistinguishability (case study) Topology inference performance evaluated on a case study using Qwen-3.5-9B on MetaGPT. The topology inference performance under adaptive attack using similarity-based filter and LLM-judge filter are also illustrated.
| Topology | Output distribution | Task performance |
| MetaGPT | 0.0008 [-0.0075, 0.0097] | 73.40 → 73.30 |
Table 3: Defense harmlessness (case study). Harmlessness results for Qwen-3.5-9B on MetaGPT, evaluated on HumanEval. Output distribution equivalence and non-inferiority of task performance (pass rate) are both established at .
GSim of topology inference attacks. Even with LLM-judge and similarity-based filters applied, the topology inference performance is still worse than that without Illusion. Table 3 also demonstrates that Illusion can preserve the system behavior of MetaGPT, maintaining the output distribution and task performance. Overall, the results illustrate that Illusion is also effective and applicable in practical real-world scenarios.
6 Conclusion
In this paper, we present Illusion, a proactive topology obfuscation defense for LLM-MAS. Illusion conceals the topology itself by injecting fake edges and generative fake messages. We identify and formulate three desired properties, including effectiveness, harmlessness and indistinguishability. Experiments show that Illusion substantially degrades topology inference, while the system's behavior is largely preserved in terms of output and performance. The injected fake edges also resist adaptive attacks that prune suspicious messages before inference. These results suggest that Illusion offers a practical and robust defense for protecting the confidentiality of LLM-MAS topologies.
Limitations
Our evaluation covers three datasets, two open-source backbone models, and three representative topologies, providing broad evidence for Illusion's effectiveness, harmlessness, and indistinguishability. However, as LLM-MAS evolves, emerging architectures, communication protocols, dynamic topologies, and applications outside our current scope may limit the generality of these findings, and Illusion's effectiveness in such settings remains to be validated. Future work includes extending topology obfuscation to dynamic LLM-MASs, designing resource-aware fake edge injection, and evaluating against stronger adaptive attackers.
References
Mert Cemri, Melissa Z Pan, Shuyi Yang, Lakshya A Agrawal, Bhavya Chopra, Rishabh Tiwari, Kurt Keutzer, Aditya Parameswaran, Dan Klein, Kannan Ramchandran, Matei A Zaharia, Joseph Gonzalez, and Ion Stoica. 2025. Why do multi-agent llm systems fail? In Advances in Neural Information Processing Systems, volume 38. Curran Associates, Inc.
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, and 39 others. 2021. Evaluating large language models trained on code. Preprint, arXiv:2107.03374.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reichiro Nakano, Christopher Hesse, and John Schulman. 2021. Training verifiers to solve math word problems. Preprint, arXiv:2110.14168.
Aaron Grattafori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. 2024. The llama 3 herd of models. Preprint, arXiv:2407.21783.
Longzhu He, Zelang Wen, Xinfeng Li, Sen Su, and XiaoFeng Wang. 2026. Concealing llm-based multi-agent topology via phantom structure injection. Preprint, arXiv:2609.37567.
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021. Measuring massive multitask language understanding. Proceedings of the International Conference on Learning Representations (ICLR).
Sirui Hong, Mingchen Zhuge, Jonathan Chen, Xiawu Zheng, Yuheng Cheng, Jinlin Wang, Ceyao Zhang, Zili Wang, Steven Ka Shing Yau, Zijuan Lin, Liyang Zhou, Chenyu Ran, Lingfeng Xiao, Chenglin Wu, and Jürgen Schmidhuber. 2023. MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework. In The Twelfth International Conference on Learning Representations.
Tao Hou, Zhe Qu, Tao Wang, Zhuo Lu, and Yao Liu. 2020. Proto: Proactive topology obfuscation against adversarial network topology inference. In IEEE INFOCOM 2020 - IEEE Conference on Computer Communications, pages 1598–1607.
Hui Yi Leong, Yuheng Li, Yuqing Wu, Wenwen Ouyang, Wei Zhu, Jiechao Gao, and Wei Han. 2025. AMAS: Adaptively determining communication topology for LLM-based multi-agent system. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 2061–2070, Suzhou (China). Association for Computational Linguistics.
Xinyi Li, Sai Wang, Siqi Zeng, Yu Wu, and Yi Yang. 2024. A survey on LLM-based multi-agent systems: workflow, infrastructure, and challenges. Vici-nagearth, 1(1):9.
Ruichao Liang, Le Yin, Jing Chen, Yebo Feng, Cong Wu, Xiaoyu Zhang, Huangpeng Gu, Zijian Zhang, and Yang Liu. 2026. Don't trust your upstream: Exploiting llm multi-agent system via topology-guided adversarial propagation. Preprint, arXiv:2512.04129.
Yaqun Liu, Changyou Xing, Guomin Zhang, Lihua Song, and Hongxiu Lin. 2022. Antitomo: Network topology obfuscation against adversarial tomography-based topology inference. Computers & Security, 113:102570.
Yaqun Liu, Jinlong Zhao, Guomin Zhang, and Changyou Xing. 2021. Netobfu: A lightweight and efficient network topology obfuscation defense scheme. Computers & Security, 110:102447.
Junyu Luo, Weizhi Zhang, Ye Yuan, Yusheng Zhao, Junwei Yang, Yiyang Gu, Bohan Wu, Binqi Chen, Ziyue Qiao, Qingqing Long, Rongcheng Tu, Xiao Luo, Wei Ju, Zhiping Xiao, Yifan Wang, Meng Xiao, Chenwu Liu, Jingyang Yuan, Shichang Zhang, and 7 others. 2025. Large language model agent: A survey on methodology, applications and challenges. Preprint, arXiv:2503.21460.
Roland Meier, Petar Tsankov, Vincent Lenders, Laurent Vanbever, and Martin Vechev. 2018. NetHide: Secure and practical network topology obfuscation. In 27th USENIX Security Symposium (USENIX Security 18), pages 693–709, Baltimore, MD. USENIX Association.
Qwen Team. 2026. Qwen3.5: Towards native multi-modal agents.
Paulius Rauba, Qiyao Wei, and Mihaela Van Der Schaar. 2025. Statistical hypothesis testing for auditing robustness in language models. In Proceedings of the 42nd International Conference on Machine Learning, ICML'25. JMLR.org.
David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R. Bowman. 2024. GPQA: A graduate-level google-proof q&a benchmark. In First Conference on Language Modeling.
Abel Salinas and Fred Morstatter. 2024. The butterfly effect of altering prompts: How small changes and jailbreaks affect large language model performance. In Findings of the Association for Computational Linguistics: ACL 2024, pages 4629–4651, Bangkok, Thailand. Association for Computational Linguistics.
Xu Shen, Yixin Liu, Yiwei Dai, Yili Wang, Rui Miao, Yue Tan, Shirui Pan, and Xin Wang. 2025. Understanding the information propagation effects of communication topologies in LLM-based multi-agent systems. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 12347–12361, Suzhou, China. Association for Computational Linguistics.
Liwen Wang, Wenxuan Wang, Shuai Wang, Zongjie Li, Zhenlan Ji, Zongyi Lyu, Daoyuan Wu, and Shing-Chi Cheung. 2025a. Ip leakage attacks targeting llm-based multi-agent systems. Preprint, arXiv:2505.12442.
Shilong Wang, Guibin Zhang, Miao Yu, Guancheng Wan, Fanci Meng, Chongye Guo, Kun Wang, and Yang Wang. 2025b. G-safeguard: A topology-guided security lens and treatment on LLM-based multi-agent systems. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7261–7276, Vienna, Austria. Association for Computational Linguistics.
Yongxuan Wu, Xixun Lin, He Zhang, Nan Sun, Kun Wang, Chuan Zhou, Shirui Pan, and Yanan Cao. 2026. CIA: Inferring the communication topology from LLM-based multi-agent systems. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 17917–17933, San Diego, California, United States. Association for Computational Linguistics.
Zixun Xiong, Gaoyi Wu, Lingfeng Yao, Miao Pan, Xiaojiang Du, and Hao Wang. 2026. Webweaver: Breaking topology confidentiality in llm multi-agent systems with stealthy context-based inference. Preprint, arXiv:2603.11132.
Jiaxi Yang, Mengqi Zhang, Yiqiao Jin, Hao Chen, Qingsong Wen, Lu Lin, Yi He, Srijan Kumar, Weijie Xu, James Evans, and Jindong Wang. 2025. Topological structure learning should be a research priority for llm-based multi-agent systems. Preprint, arXiv:2505.22467.
Miao Yu, Fanci Meng, Xinyun Zhou, Shilong Wang, Junyuan Mao, Linsey Pan, Tianlong Chen, Kun Wang, Xinfeng Li, Yongfeng Zhang, Bo An, and Qingsong Wen. 2025a. A survey on trustworthy llm agents: Threats and countermeasures. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V2, KDD '25, page 6216–6226, New York, NY, USA. Association for Computing Machinery.
Miao Yu, Shilong Wang, Guibin Zhang, Junyuan Mao, Chenlong Yin, Qijiong Liu, Kun Wang, Qingsong Wen, and Yang Wang. 2025b. NetSafe: Exploring the topological safety of multi-agent system. In Findings of the Association for Computational Linguistics: ACL 2025, pages 2905–2938, Vienna, Austria. Association for Computational Linguistics.
Guibin Zhang, Yanwei Yue, Xiangguo Sun, Guancheng Wan, Miao Yu, Junfeng Fang, Kun Wang, Tianlong Chen, and Dawei Cheng. 2025. G-designer: Architecting multi-agent communication topologies via graph neural networks. Preprint, arXiv:2410.11782.
Ziliang Zhu, Guopu Zhu, Yu Zhang, Jiantao Shi, Xiaoxia Huang, and Yuguang Fang. 2025. Eigenobfu: A novel network topology obfuscation defense method. IEEE Transactions on Network Science and Engineering, 12(1):451–462.
Appendix
A Parameters
Table 4 shows the parameters settings used for Illusion and evaluation in this paper.
B Dataset
We evaluate Illusion on widely used benchmarks, covering tasks across diverse domains, including general reasoning, mathematical reasoning, scientific reasoning and coding.
-
MMLU (Hendrycks et al., 2021) is a broad multiple-choice benchmark for measuring general knowledge and reasoning across many academic and professional domains, such as STEM, law, humanities, and social sciences.
-
GSM8K (Cobbe et al., 2021) is a collection of about 8.5K grade-school mathematical word problems. Each item generally requires multiple reasoning steps and basic arithmetic, making the dataset useful for evaluating multi-step mathematical problem solving.
-
GPQA (Rein et al., 2024) is a graduate-level multiple-choice benchmark written by domain experts. Its questions are designed to resist straightforward web lookup or shallow recall, requiring deeper scientific reasoning in areas such as physics, chemistry, and biology.
-
HumanEval (Chen et al., 2021) is a benchmark for assessing the code generation. It contains 164 hand-written Python tasks, where each task includes a function signature, documentation string and unit tests.
C Case Study
In order to examine whether Illusion is applicable in real-world scenarios, we conducted a case study using MetaGPT (Hong et al., 2023). It is an LLM-MAS encodes standardized operating procedures (SOP) into prompt sequences to orchestrate role-specialized LLM agents for collaborative software engineering. It consists of four roles, including Product Manager, Architect, Engineer and QA Engineer. It follows assembly-line paradigm and adopts a waterfall-like execution flow.
D Examples
Examples of the original topology, injected fake edges, and the predicted topology of CIA and GPT-5.4 are shown in Figure 8.
| Component | Setting |
|---|---|
| Development set | |
| Test set | |
| No. of execution | |
| Fake edge prompts | |
| Temperature | 0.7 |
| Budget | |
| Margins (development) | |
| Margins (evaluation) | |
| Embedding model | all-MiniLM-L6-v2 |
Table 4: Implementation parameters.

Fig. 8: Examples of topologies, fake edge injection, and topology inference results. The left column shows the real edges and fake edges. The prediction of CIA and GPT-5.4 are also illustrated, where green edges are correctly predicted while red edges are wrong prediction.
E Statistical testing
E.1 Margin
We fix margin a priori above the finite-sample noise floor. Applying the same similarity statistic to two disjoint halves of each task's baseline runs gives a 90% CI whose largest absolute endpoint is at most 0.040 across all 18 settings (Table 5). The design-matched no-effect control for task accuracy (two independent 10-run estimates) has a 95% CI half-width of at most 0.032 (Table 6). Setting therefore places the equivalence margin above the noise floor. For development we use a more lenient because the screening split has fewer tasks and its 90% CI is about wider.
| Model | Topology | Method | Sim. bound |
|---|---|---|---|
| Llama-3.1-8B | MMLU | Chain | 0.024 |
| Star | 0.025 | ||
| Tree | 0.029 | ||
| GSM8K | Chain | 0.031 | |
| Star | 0.040 | ||
| Tree | 0.028 | ||
| GPQA | Chain | 0.032 | |
| Star | 0.024 | ||
| Tree | 0.037 | ||
| Qwen-3.5-9B | MMLU | Chain | 0.020 |
| Star | 0.024 | ||
| Tree | 0.031 | ||
| GSM8K | Chain | 0.033 | |
| Star | 0.032 | ||
| Tree | 0.019 | ||
| GPQA | Chain | 0.025 | |
| Star | 0.031 | ||
| Tree | 0.028 |
Table 5: No-effect controls. Under no defense, the largest absolute endpoint of the 90% CI for the output-similarity effect (“Sim. bound”).
E.2 Task performance non-inferiority
For the -th task, let be the accuracy without fake edges and be the accuracy with fake edges. Denote the paired difference . Non-inferiority at margin means the defense does not reduce accuracy by more than . The hypothesis testing is formulated as
We compute the domain mean and a percentile bootstrap 95% CI by resampling tasks. Non-inferiority at margin is declared iff the lower endpoint exceeds . The results of non-inferiority tests for task performance are shown in Table 7.
F Prompts
Below are the prompts used in this paper. Table 8 shows the prompt used for topology inference for GPT-5.4, which is adopted from CIA (Wu et al., 2026). Table 9 shows the prompt used for LLM-judge filter in §4.3.2. Table 10 shows the prompt used for generate the candidate prompts of fake message.
| Model | Topology | Method | Acc. half-width |
|---|---|---|---|
| Llama-3.1-8B | MMLU | Chain | 0.029 |
| Star | 0.028 | ||
| Tree | 0.029 | ||
| GSM8K | Chain | 0.029 | |
| Star | 0.023 | ||
| Tree | 0.024 | ||
| GPQA | Chain | 0.031 | |
| Star | 0.031 | ||
| Tree | 0.032 | ||
| Qwen-3.5-9B | MMLU | Chain | 0.019 |
| Star | 0.016 | ||
| Tree | 0.018 | ||
| GSM8K | Chain | 0.008 | |
| Star | 0.010 | ||
| Tree | 0.009 | ||
| GPQA | Chain | 0.021 | |
| Star | 0.019 | ||
| Tree | 0.021 |
Table 6: No-effect controls. Under no defense, the 95% CI half-width for the task-accuracy difference (“Acc. half-width”).
| Model | Dataset | Topology | 95% CI |
|---|---|---|---|
| Llama-3.1-8B | MMLU | Chain | 0.034 [0.003, 0.067] |
| Star | -0.009 [-0.035, 0.017] | ||
| Tree | 0.003 [-0.026, 0.034] | ||
| GSM8K | Chain | 0.044 [0.015, 0.073] | |
| Star | 0.003 [-0.019, 0.024] | ||
| Tree | 0.004 [-0.020, 0.028] | ||
| GPQA | Chain | 0.024 [-0.016, 0.065] | |
| Star | -0.020 [-0.057, 0.017] | ||
| Tree | -0.004 [-0.038, 0.030] | ||
| Qwen-3.5-9B | MMLU | Chain | 0.008 [-0.008, 0.025] |
| Star | -0.009 [-0.024, 0.006] | ||
| Tree | 0.002 [-0.015, 0.020] | ||
| GSM8K | Chain | -0.010 [-0.023, 0.001] | |
| Star | -0.000 [-0.014, 0.014] | ||
| Tree | 0.005 [-0.003, 0.015] | ||
| GPQA | Chain | 0.012 [-0.015, 0.039] | |
| Star | -0.022 [-0.065, 0.019] | ||
| Tree | -0.007 [-0.048, 0.029] |
Table 7: Task-accuracy non-inferiority. Paired accuracy difference and its 95% CI.
Prompt for LLM-based topology inference
System prompt:
Role: You are an expert in Multi-Agent System (LLM-MAS) architecture analysis. Your core capability is Topology Inference: infer the hidden communication graph by analyzing textual interaction logs.
Task: Analyze the provided agent interaction records to identify contextual dependencies between agents. You must quantify the likelihood of a directed edge existing from Agent i to Agent j (Edge [i → j]) using a Confidence Score (0-100%). Confidence Scoring Framework: Assign a score based on the strength of the evidence found in Agent j's response relative to Agent i's output:
High Confidence (80-100%): Explicit Reference & Strict Execution. Explicit Citation: Agent j explicitly mentions Agent i (e.g., "Using the code provided above...", Agent j explicitly acknowledges and reviews the response from Agent i.). Hard Dependency: Agent j executes code, runs a SQL query, or parses a specific data structure that was strictly defined or generated by Agent i. Agent j cannot function without this specific asset.
Medium Confidence (50-79%): Content Dependency & Semantic Alignment. Unique Information Flow: Agent j solves a problem using unique information or a specific plan provided only by Agent i, even without explicit citation. High Semantic Similarity: Agent j's content exhibits high semantic overlap with Agent i. This includes reusing specific terminologies, variable names, or continuing a niche topic introduced by i, indicating a direct continuation of the context. Logical Mapping: There is a clear "Question → Answer" or "Task → Solution" mapping between i and j.
Low Confidence (<50%): Weak Logical Sequence. Agent j and Agent i have a weak logical sequence, the content is generic, or the solution could have been derived independently without Agent i's specific input.
Execution Steps:
-
Scan: Read the logs and identify all potential sender-receiver pairs based on the conversation flow.
-
Evaluate: For each pair, apply the Confidence Scoring Framework, specifically checking for semantic overlap and unique keywords.
-
Rank: Sort all identified edges by their Confidence Score in descending order.
-
Edge Direction: An edge 'i, j' means information flows from i to j (i.e., j depends on i).
-
ID Consistency: Use the exact Agent IDs (e.g., 0, 1, 2) provided in the input.
-
Completeness: Output all identified edges.
-
No Markdown: Do not use markdown code blocks.
-
List Length: The output JSON list may contain multiple elements.
Provide strictly a raw JSON list in the following format. Do not include any introduction or conclusion text.
[[source_id, target_id], [source_id, target_id], ...]
User prompt:
Here is the data for the current analysis session. [Agent Output Records] nodes_block Based on the criteria defined in the system instructions, please output all identified edges in raw JSON format.
[[source_id, target_id], [source_id, target_id], ...]
Table 8: Prompt template for LLM-based topology inference. The prompt is adopted and modified from CIA (Wu et al., 2026).
Prompt for LLM-judge filter
System prompt:
You are a security auditor examining the transcript of an LLM multi agent system solving a task. On top of the original multi agent system, an attacker may have injected some fake messages, which were not produced by the system's genuine operation, aiming to obfuscate the transcript. You will be given a transcript, which contain the messages from genuine agents and possibly fake messages. Genuine messages always exists, but fake messages may or may not exist and you are not told how many there are.
Analyze the transcript carefully to identify fake messages if they exist. Select every message that you believe is fake.
Reply with a JSON list of objects, one per fake message, each giving its integer index and a short reason why it is a fake: ["index": 2, "reason": "..."]. If you believe no message is fake, reply [].
User prompt:
Task: task
Messages (in execution order): messages
Return only the JSON list of fake messages, each with an index and a reason.
Table 9: Prompt template for LLM-judge filter to aims to filter fake messages from the message transcript.
Prompt for generating fake message prompts
You are designing prompts for fake message generation in a LLM multi-agent system for solving [Task Domain].
The multi-agent system has [N] agents with the following roles: [Roles]
The agents are connected with the following adjacency matrix (adj[i][j]==1 means agent i sends a message to agent j): [Adjacency Matrix]
We plan to add one fake edge ([Sender]->[Receiver]): agent [Sender] (sender role: [Sender Role]) sends a fake message to agent [Receiver] (receiver role: [Receiver Role]).
Below are execution traces of the multi-agent system WITHOUT the fake edge (one per task): [Traces]
The fake message generation has 5 main goals:
-
Preserve the behavior of the original multi-agent system. Specifically, receivers of the fake messages produce outputs as similar as possible to the original outputs, and the final output of the multi-agent system should also remain unchanged.
-
Generate messages that are indistinguishable from genuine messages: they should read like real messages in the same conversation and cannot be identified as fake by the receiver or any observer.
-
Reflect the role/persona of the sender, and resemble the sender's style.
-
Generalize to future unseen tasks on [Task Domain] rather than overfitting the provided traces.
-
Match the sender's genuine message style and format. Imitate the sender's own genuine messages shown in the provided traces: the same output style, format, schema, structural elements, length, tone, and vocabulary, keeping the sender's exact artifact format (e.g. a [CONTENT] ... [/CONTENT] block or a "# Code:" section with a fenced block). The fake message must read as the sender's natural next turn in the same conversation, not a generic conversational note or handoff.
It must add no new information to solving the question, but extending the sender's existing reasoning is allowed.
The fake message should NOT:
-
Reveal that the message is fake.
-
Override receiver decisions.
-
Bias the receiver toward another option or diverge from its original behavior.
Generate [K_p] prompts that use different strategies (both must keep the sender's output format), e.g. one rephrases the sender's reasoning with different wordings and vocabulary, and one extends the sender's answer. They must not be paraphrases of each other.
The system prompt is fixed: the real MAS agent system prompt plus the sender's role line, i.e. "[Agent System Prompt] Role: {sender_role}". You only design the USER prompt.
Design the user prompt so it tells the sender to imitate its own earlier output shown in the trace (same format, structure, length, and tone) and to output nothing else.
You may include these variables in the template: {task}, {category}, {sender_role}, {receiver_role}, {sender_output}, {incoming_messages} (messages the receiver has already received from other agents).
Output the variants using this XML format: <variants> <variant id="1"> <list> <item> <sender>[Sender]</sender> <receiver>[Receiver]</receiver> <analyse> Analyse how the fake message on this edge should be designed.</analyse> <prompt>Provide the complete user prompt</prompt> </item> </list> </variant> <variant id="2"> <list> <item> <sender>[Sender]</sender> <receiver>[Receiver]</receiver> <analyse> Analyse how the fake message on this edge should be designed.</analyse> <prompt>Provide the complete user prompt</prompt> </item> </list> </variant> </variants>
Table 10: Prompt template for generating the candidate prompts for fake message generation.