Skip to content

WebWeaver: Breaking the topology confidentiality of LLM multi-agent systems via covert context inferenceWebWeaver: Breaking Topology Confidentiality in LLM Multi-Agent Systems with Stealthy Context-Based Inference

arXiv· arXiv:2603.11132· Zixun Xiong, Gaoyi Wu, Lingfeng Yao, Miao Pan, Xiaojiang Du, Hao Wang·Indexed by this site · 2026-10-12· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

WebWeaver compromises only a single arbitrary agent and infers the LLM-MAS topology from conversation context. The authors report roughly 60% higher accuracy under active defenses.

Threat modelThe attacker aims to infer the communication topology of the target LLM-MAS to obtain intellectual property and to facilitate stronger downstream attacks. It knows the participants, can use another self-controlled LLM-MAS to collect conversations; it can control a single arbitrary agent (experiments k=1; text writes 1≤k≤N2), and can actively request context from neighbors. It is assumed there are no isolated agents. There is no white-box access to the victim agents.

Questions
Communication topology affects the utility and security of LLM-MAS. The authors regard it as high-value intellectual property, but research on its confidentiality is limited. Existing inference assumes control over a management agent and directly queries identity via jailbreak, which is easily blocked by keyword defenses. This paper aims to recover the full topology when only any single agent is compromised.
Methods
Offline, train a sender predictor using conversations under a known topology, then identify direct neighbors from messages received by the compromised agent. If the jailbreak succeeds, recursively request context and expand; if it fails, complete with masked DDPM, writing back known edges during denoising. The suffix gradient is computed on a local proxy model and then transferred.
Experiments and results
Averaged over four backbones, the jailbreak module achieves 1.0000 on all four metrics on Fact and Bias, and CSQA F1 is 0.8666 (Table 2). The authors claim that without the jailbreak module, F1 remains above 0.78, IP Leakage under keyword defense is near zero, and accuracy is about 60% higher.
Limitations and future work
The Limitations state that evaluation was not conducted on real academic collaboration platforms or ongoing projects, only controlled, reproducible experiments, with plans for ethical, consent-based interdisciplinary research. The Conclusion states that topology-aware defenses are needed. The main results are averages over four backbones with k=1; the proxy model name and diffusion steps are not reported.
Experimental setupLlama 3.1 8B、Qwen 2.5 7B et al. · CSQA、GSM8k et al. · MRR、Precision et al.
Evaluated models
Llama 3.1 8BQwen 2.5 7BMistral NeMo 12BGemma 2 9BLLaMA-3-70B
Benchmarks
CSQAGSM8kFactBias
Metrics
MRRPrecisionRecallF1 Score
AI summaryThe researchers propose the WebWeaver attack framework, which can infer the complete communication topology of an LLM multi-agent system by compromising only one arbitrary agent. Unlike previous methods that require controlling a management agent or directly querying agent identity via jailbreak, WebWeaver relies only on agent context rather than agent IDs, making it more stealthy. The framework also introduces a covert jailbreak mechanism and a diffusion design that does not rely on jailbreak at all, for cases where jailbreak fails; it further proposes a masking strategy for diffusion-based inference that preserves known topology during diffusion, with theoretical correctness guarantees. Experiments show that under active defenses, its inference accuracy is about 60% higher than SOTA baselines, with negligible overhead.

The researchers propose the WebWeaver attack framework, which can infer the complete communication topology of an LLM multi-agent system by compromising only one arbitrary agent. Unlike previous methods that require controlling a management agent or directly querying agent identity via jailbreak, WebWeaver relies only on agent context rather than agent IDs, making it more stealthy. The framework also introduces a covert jailbreak mechanism and a diffusion design that does not rely on jailbreak at all, for cases where jailbreak fails; it further proposes a masking strategy for diffusion-based inference that preserves known topology during diffusion, with theoretical correctness guarantees. Experiments show that under active defenses, its inference accuracy is about 60% higher than SOTA baselines, with negligible overhead.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Compromise only a single arbitrary agent and recover the complete communication topology of the LLM-MAS from conversation context.

    How to recover the full communication topology of an LLM-MAS by compromising only a single arbitrary agent, without directly querying IDs.

    • Why it matters: The authors claim communication topology affects the utility and safety of LLM-MAS, and there is no universally optimal topology, making it high-value intellectual property (Figure 1, citing Yu et al., 2024; Yang et al., 2025). The authors also claim that an adversary knowing this structure can launch more sophisticated attacks than strategies without it (Shahroz et al., 2025; Wang et al., 2025b).
    • Gap in existing work: Prior inference assumed the attacker controls the administrative agent responsible for initiating the system and used jailbreaks to directly query neighbor identities. The authors claim this assumption is unrealistic in collaborations where different parties run their own agents, and keyword-based defenses can block identity queries.
    • This paper's assumption: A more realistic setting is compromising only one arbitrary agent and inferring topology from collaboration context rather than IDs. When jailbreaks fail, the problem reduces to zero-shot, NP-hard graph completion (Fang et al., 2025).
    • Proposed framework: The authors propose WebWeaver and claim it is the first framework that recovers the full topology by compromising only a single arbitrary agent, without administrative privileges, and without relying on jailbreaks to directly extract neighbor IDs. They also construct a dialogue dataset with topology, agent prompts, and send/receive labels, which they plan to release soon.
    • Threat model:
      • Goal: Infer the communication topology of the target LLM-MAS to obtain the owner's intellectual property and enable stronger downstream attacks on other agents and access to their private data.
      • Knowledge: Knows which agents participate in the target system; can use another LLM-MAS under its control to collect inter-agent dialogues. The paper uses university cross-domain collaboration as an example.
      • Capability: Controls one arbitrary agent in the target system and can actively request context from neighboring agents. The authors interpret this as retransmission under device separation, asynchrony, or short disconnections. The text states the number of compromised agents satisfies 1≤k≤N2, and experiments always use k=1. It assumes no isolated agents.
      • Access: No white-box access to victim agents. Gradients for suffix optimization are computed on a local proxy LLM and then transferred; the paper does not name this proxy model.
  2. What related research exists?

    Related work covers the role of topology, three categories of MAS security, and graph completion. The authors criticize assumptions about identity queries and management privileges.

    The paper places related work on topology effects, three categories of security issues, and graph completion, and explicitly criticizes directly querying identities and controlling the initiator.

    LLM-MAS and topology

    • Collaborative systems: Lu et al. (2024), Schmidgall et al. (2025), Gottweis et al. (2025), Hong et al. (2023), Kim et al. (2025), and Guan et al. (2025) study systems where LLM agents collaborate via communication topology, covering scientific and industrial tasks.
    • Topology and performance: Yu et al. (2024), Zhang et al. (2024), Yang et al. (2025), and Cemri et al. (2025) discuss the impact of topology on utility and safety, as well as failures caused by structural issues. The introduction also cites Zhang et al. (2025), stating that topology changes still cause utility and safety differences under the same members. The authors claim that an optimized topology is a valuable asset, but its confidentiality remains largely unstudied.
    • Downstream uses of structural knowledge: Shahroz et al. (2025) and Wang et al. (2025b) are cited as showing that knowing the structure enables stronger attacks than not knowing it. The paper only makes this description and does not elaborate on how these attacks work.

    Three categories of LLM-MAS security work

    • Availability and behavioral safety: Zhou et al. (2025), Zhang et al. (2024), and Chen et al. (2024) study denial of service, psychological manipulation, and defenses that protect agent behavior and communication. The paper classifies them into the first two categories and does not compare them experimentally with WebWeaver.
    • Topology confidentiality: Wang et al. (2025a) treats topology leakage as an intellectual property issue. The paper explicitly criticizes: existing approaches rely on jailbreaks to directly query identities and assume control of the system's initiating agent, which rarely holds in collaborative scenarios.

    Graph completion

    • CZRL: Fang et al. (2025)'s contrastive zero-shot relation learning for knowledge graph completion. The paper claims that topology inference after jailbreak failure falls under this category of zero-shot, NP-hard graph completion and uses this method as a baseline.

    Baselines and data

    • Baseline methods: IP Leakage (Wang et al., 2025a), which the paper calls the only baseline directly related to the task; CZRL (Fang et al., 2025). For CZRL, the paper assumes the attacker can obtain other agents' conversations via jailbreak and uses the conversations to learn node text embeddings.
    • Benchmarks: CSQA (Talmor et al., 2019), GSM8k (Cobbe et al., 2021), Fact and Bias (Yu et al., 2024).

    The authors place this work in the third category, arguing for inference under a single-agent, context-based rather than ID-based threat model, and claim no administrative privileges are needed and no direct extraction of neighbor IDs.

  3. How does the paper address this problem?

    First predict the sender to obtain local adjacency; if the jailbreak succeeds, expand recursively; if it fails, complete with masked diffusion.

    WebWeaver first collects conversations offline on a known topology and trains a sender predictor, then recovers the local adjacency using only the conversations received by the compromised agent; if the jailbreak succeeds, it expands recursively; if it fails, it completes the full graph with masked DDPM (Figure 2).

    Problem Setting

    • Graph representation: Undirected graph G=(V,E), symmetric adjacency matrix A in {0,1} of size N×N. In the binary mask M, Mij=1 indicates that the relationship between i and j is observed. The observed topology is Aobs=Agt⊙M, and the goal is to complete the missing entries in (1−M)⊙Agt.
    • Compromise scope: The text writes 1≤k≤N2, and experiments take k=1. It is assumed that the system has no isolated agents. The known subgraph comes from Step 2 and Step 3 of Figure 2.
    • Two paths: Jailbreak success is denoted Y, failure N. When used with the diffusion module, the paper states that only Step 1 and Step 2 are needed, and no further jailbreak is performed on the target system.

    Jailbreak Module

    • Offline predictor: Passively collects conversation history H from an attacker-controlled environment, with entries containing message content and sender identity. Sθ maximizes Pθ(sender=s|m), identifying the sender only by content. Appendix A.3 states its features are sentence embeddings or TF-IDF, stylistic statistics, as well as turn number, receiver identity, and whether the receiver is a hub; the classifier is an ensemble of Gradient Boosting and Logistic Regression.
    • Local adjacency: The compromised agent AC feeds received messages mi into Sθ, takes argmax to obtain the sender, and aggregates into local adjacency Aobs.
    • Recursion and fallback: Injects a propagation prompt into AC, causing neighbors to return conversations without sender indices, and passes the same instruction to their respective neighbors. If the safety filter rejects, it optimizes a suffix with GCG on a local proxy LLM and then transfers. The paper does not provide the proxy model name, number of iterations, top-k, or suffix length. Appendix Algorithm 1 summarizes the process; the role prompt in Appendix A.2 is for scalability testing, not the attack prompt.
    • Optimization objective: The paper writes the suffix optimization as minimizing the negative log-likelihood of compliant objective replies: min L(δ)=−∑t=1|P|log p(yt|xprop⊕δ). Here xprop is the propagation prompt, δ is the suffix, and ⊕ is concatenation.

    No-Jailbreak Diffusion Module

    • Purpose: When the optimized jailbreak still fails, train a DDPM using the collected topology and conversations, treating the partially observed graph as input to be denoised. The authors state that this version has no additional computational overhead on the target system.
    • Generation process: x0=Agt. The forward process adds Gaussian noise according to a variance schedule β1 to βT, and the reverse process denoises using a noise prediction network. The paper gives the sampling formula but does not provide the values of β or the number T.
    • Masked inpainting: The authors state that standard unconditional sampling would destroy the known subgraph. Each reverse step first obtains the model prediction, then samples the known parts according to the noise level at that step, and then fuses as x_{t-1}=(1-M)\odot x^{pred}_{t-1}+M\odot x^{obs}_{t-1}. The known region follows the noise trajectory along Aobs, and the unknown region is filled by the model. Algorithm 2 thresholds x0 after T steps to obtain the topology.

    Correctness and Online Order

    • Theorem: Theorem 1 in Appendix A.1 states that if the learned score is accurate, Manifold-Constrained Fusion converges to the conditional posterior p(xu|xo) as the discrete step count T tends to infinity. The argument decomposes the score by the masked subspace and treats the fusion step as an Euler–Maruyama discretization of that conditional distribution.
    • Online order: Collect conversations, train the predictor, extract the conversations received by AC, predict direct neighbors; if the jailbreak succeeds, iterate until no new agents; if it fails, perform masked completion. The authors state that in practice, the jailbreak module is run first, and if multiple rounds of suffix optimization still fail, fall back to the no-jailbreak module. The paper does not provide the number of rounds.
  4. What experiments did the paper conduct?

    Averaged over four backbones, the jailbreak module achieves 1.0000 on all four metrics on Fact and Bias, and CSQA F1 is 0.8666.

    Experimental Setup

    • Backbones: Llama 3.1 8B, Qwen 2.5 7B, Mistral NeMo 12B, Gemma 2 9B. Each experiment assigns the same model to all agents; the main results are averages across these four configurations and are not broken down by model. Appendix A.4.2 separately compares LLaMA-3-70B with a 7B–12B cluster containing Mistral, Gemma and Phi-2; that section has no numerical values.
    • Data: CSQA has 12,247 multiple-choice questions; GSM8k has 8,500 math problems; Fact is factual statements generated via GPT-4; Bias is statements based on stereotypes (the latter two cite Yu et al., 2024). Table 6 uses 200 independent test samples. The main tables do not state sample sizes or numbers of repetitions.
    • Topology and compromise: experiments use k=1. Table 6 compares Chain, Star, Tree and Complete. Figure 4 varies the number of agents from 5 to 20. Appendix A.2 prepares 20 role prompts for this test, in four groups: commonsense reasoning, bias and safety, adversarial, and aggregation.
    • Baselines: IP Leakage (Wang et al., 2025a); CZRL (Fang et al., 2025). In Figure 3, Ours is the jailbreak version and Ours (w/o) is without the jailbreak module.
    • Metrics and judgments: MRR measures the position of the true neighbor in the candidate ranking; Precision, Recall and F1 are also reported. Overhead is measured in seconds. Topology metrics are computed relative to the true topology; the paper does not use an LLM judge to score topologies.
    • Defense settings: Figure 3 rejects any request aimed at exposing neighboring agent IDs. In Table 4, benign agents use LLaMA Guard and are prompted with a single jailbreak example.

    Main Results

    According to Table 2, graph completion averaged over the four backbones is:

    Swipe horizontally to read the table

    Module / DatasetPrecisionRecallF1MRR
    Jailbreak / CSQA1.00000.76880.86660.7292
    Jailbreak / GSM8k1.00000.96880.98210.9208
    Jailbreak / Fact1.00001.00001.00001.0000
    Jailbreak / Bias1.00001.00001.00001.0000
    No jailbreak / CSQA0.83100.75060.78870.7029
    No jailbreak / GSM8k0.84180.78440.81200.7593
    No jailbreak / Fact0.84320.78760.81450.7618
    No jailbreak / Bias0.85180.79020.81980.8659
    • The authors say both modules achieve strong results on all four datasets; the jailbreak module has higher Precision and F1, and all four metrics are 1.0000 on Fact and Bias. The authors attribute this to direct context access providing more complete neighborhood information.
    • The no-jailbreak module declines, but the authors say F1 remains above 0.78. The gap is larger on CSQA: the jailbreak module's Recall is 0.7688 and MRR is 0.7292, so not all four metrics are perfect.
    • The authors attribute the decline on CSQA to more diverse reasoning paths and noisier interactions, which lower the sender predictor. Table 1's F1 is CSQA 0.8772, GSM8k 0.9470, Fact 0.9597, Bias 0.9830; the authors say all four are above 0.85, with CSQA relatively lower.

    Comparison under keyword defense

    • What was tested: Figure 3 compares Precision, Recall and F1 of IP Leakage, CZRL, the no-jailbreak module and full WebWeaver after filtering neighboring IDs. The text transcription has no values for the individual bars.
    • The authors' interpretation: IP Leakage is near zero on all metrics because it relies only on explicit indices that are filtered out. CZRL maintains moderate performance; the authors say it does not fully exploit the ability of compromised agents to intercept inbound conversations and spread messages to neighbors. The no-jailbreak module exceeds what they call SOTA using only conversational context; the full method has the highest Precision and Recall.
    • Summary figure: the abstract says reasoning accuracy is about 60% higher under active defense (about 60% higher); the conclusion says 60% accuracy improvement. The paper does not give the cell corresponding to this percentage.

    By topology, overhead and scale

    • 200 simulations: in Table 6, WebWeaver's MRR is CSQA 0.78, GSM8K 0.80, Fact 0.81, Bias 0.89; IP Leakage is 0.04, 0.03, 0.01, 0.04; CZLR is 0.67, 0.60, 0.54, 0.66. WebWeaver's third item, labeled F1, on Chain is CSQA 0.87, GSM8K 0.91, Fact 0.89, Bias 0.94.
    • Authors' interpretation and in-table numbers: Appendix A.4.1 says centralized topologies are more vulnerable than sparse topologies, citing Star's F1 of 0.51 on CSQA versus Chain's 0.28, and Complete's F1 of 0.58 on Bias. These two sets of numbers match the CZLR row of Table 6, not the WebWeaver row; in the latter, the third item for CSQA's Chain/Star is 0.87/0.92, and Bias's Complete is 0.96. The authors say CZLR's MRR is about 0.54–0.67, consistent with the table. The authors say F1 on Bias and CSQA is consistently higher than on GSM8K and Fact; CZLR's Bias–Tree is 0.20, lower than Fact–Tree's 0.23 and GSM8K–Tree's 0.32. In the WebWeaver row, several Precision/Recall values do not satisfy the harmonic mean with the third item in the same cell, for example CSQA–Chain is 1.00/0.98/0.87; these are copied as in the table header and not converted.
    • Overhead and scale: in Table 3, the jailbreak version's online time is CSQA 30.7 seconds, GSM8K 35.8 seconds, Fact 12.7 seconds, Bias 15.4 seconds; IP Leakage online is 25.3, 32.0, 8.6, 9.9 seconds; the no-jailbreak module's online time is N/A. Across the four online times, the jailbreak version is higher than IP Leakage on the same dataset. The authors say CZRL's overhead is similar to the no-jailbreak module, but Table 3 has no seconds for CZRL. Figure 4 increases the number of agents from 5 to 20, and the authors say effectiveness does not decline as the network grows; the caption writes GMS8k, and the text transcription has no F1 for individual points. The appendix says results on 70B are consistent with, and often better than, smaller models, which the authors attribute to larger models following role prompts more strictly; that section has no numerical values.

    Other ablations and analyses

    • Sender predictor (Table 5, P/R/F1): Logistic is .5/.6/.5, .5/.7/.6, .5/.8/.6, .5/.6/.5; BERT is .8/.8/.8, .9/.9/.9, .9/.9/.9, .9/1./.9; the proposed method is .8/.8/.8, .9/.9/.9, .9/.9/.9, .9/.9/.9. The authors say the proposed method is gradient-free and has lower computational overhead, so it is the default. Table 5 writes CSQA F1 as .8, while Table 1 gives 0.8772; the paper does not state whether the settings of the two tables are the same.
    • Jailbreak prompts (Table 4, LLaMA Guard, graph completion F1): fixed prompts are CSQA 0.64, GSM8K 0.56, Fact 0.69, Bias 0.58; optimized prompts are 0.72, 0.93, 1.00, 1.00. The authors say adaptive prompts are higher than fixed prompts, and that introducing newer jailbreak methods could further raise the success rate.
    • Figure 5: in randomly sampled inference examples, red nodes are compromised agents and gray nodes are benign agents; the text transcription has no edge-level values.
    • Features: Appendix A.3 uses all-mpnet-base-v2 or 1–3-word, 3–5-character TF-IDF, plus stylistic statistics and interaction context. The paper does not report numbers for removing each feature individually. The experiments report topology inference metrics and overhead, and do not report downstream attack success rates after knowing the topology.
  5. What are some points that can be further explored?

    The authors state they evaluated only in controlled environments, not on real collaboration platforms, and plan ethical follow-up research.

    Limitations and future directions noted by the authors

    • No real collaborative deployment: The Limitations section states that, for ethical and practical reasons, evaluation was not conducted on real online academic collaboration platforms or ongoing collaborative projects. Reasons listed by the authors include: interaction with human participants and potentially sensitive research workflows, involving consent, privacy, and disruption to ongoing collaborations; it also requires domain knowledge and coordination with teams under study, which is beyond the scope of this paper.
    • Evaluation environment: The same section states that evaluation was limited to controlled, reproducible experimental settings.
    • Future plans: The authors plan to collaborate with researchers from different disciplines to design ethical, consent-based, context-sensitive studies to evaluate the applicability and impact of the method in real collaborative environments (Limitations).
    • Defense claims: The Conclusion states that keyword defenses cannot block this kind of inference and that topology-aware defenses are needed. This is a claim in the conclusion, not a new experimental design.

    Experimental coverage

    • The main experimental backbones are Llama 3.1 8B, Qwen 2.5 7B, Mistral NeMo 12B, and Gemma 2 9B; all agents in the same experiment use the same model, and reported values are averages over the four configurations (Section 4). Appendix A.4.2 compares LLaMA-3-70B with a 7B–12B cluster containing Mistral, Gemma, and Phi-2, without reporting numbers.
    • Task data are CSQA, GSM8k, Fact, and Bias. Table 6 specifies 200 samples and compares Chain, Star, Tree, and Complete. Figure 4 uses 5 to 20 agents. All experiments use k=1 (Section 3.1).
    • Defense-related results include keyword filtering that refuses to expose neighboring agent IDs (Figure 3), and LLaMA Guard with a single jailbreak example (Table 4). Baselines are IP Leakage and CZRL.
    • The sender predictor ablation compares Logistic, BERT, and the proposed method (Table 5); the jailbreak prompt ablation compares the initial prompt and the GCG-optimized prompt (Table 4). Metrics are MRR, Precision, Recall, F1, and overhead in seconds.
    • The paper does not report the model name of the GCG local proxy LLM, the T and β schedule for diffusion and GCG, top-k, suffix length, or number of queries; the main tables do not state the number of repetitions or break down results by individual backbone; the prose transcriptions of Figure 3 and Figure 4 lack per-point values; and downstream attack success rates after topology recovery are not reported.
  6. Summarize the main content of the paper

    WebWeaver infers topology from context; the authors claim accuracy is about 60% higher under active defense, and all four jailbreak items on Fact/Bias are 1.0000.

    WebWeaver is an inference attack targeting the confidentiality of LLM-MAS communication topology: it controls only one arbitrary agent and recovers the full graph from conversation context, rather than querying agent IDs.

    • Problem: The authors argue that an optimized topology is high-value intellectual property, and knowing it also enables stronger downstream attacks. Existing inference either requires controlling the system's managing agent or uses jailbreaks to directly query identities; the authors claim the latter is easily blocked by keyword defenses.
    • Approach: Offline training of a sender predictor to identify direct neighbors on the compromised agent; then recursive jailbreaking to retrieve contexts that do not contain sender indices. If jailbreaking fails, masked DDPM completion is used, with known edges written back during denoising. The appendix states that this fusion converges to the conditional posterior as the number of steps tends to infinity. Experiments use k=1, with no white-box access to the victim model; gradients are computed on an unnamed local proxy model.
    • Main results: Averaged over four backbones, the jailbreak module achieves Precision, Recall, F1, and MRR of 1.0000 on Fact and Bias; on CSQA, F1 is 0.8666 and Recall is 0.7688 (Table 2). Without the jailbreak module, F1 is 0.7887, 0.8120, 0.8145, 0.8198. The sender predictor F1 is 0.8772, 0.9470, 0.9597, 0.9830 (Table 1). Across 200 samples in Table 6, WebWeaver's MRR is 0.78, 0.80, 0.81, 0.89, and IP Leakage is 0.04, 0.03, 0.01, 0.04.
    • Defenses and overhead: The authors claim that under keyword filtering, IP Leakage is near zero, while WebWeaver is higher; the abstract states accuracy is about 60% higher, and the conclusion states a 60% improvement, but the main text does not provide the formula. Under LLaMA Guard, graph completion F1 for the optimized prompt is 0.72, 0.93, 1.00, 1.00, and for the fixed prompt is 0.64, 0.56, 0.69, 0.58 (Table 4). Online time without the jailbreak module is recorded as N/A; with the jailbreak module, online time is 30.7, 35.8, 12.7, 15.4 seconds (Table 3).
    • Authors' conclusion: The authors claim that keyword defenses cannot stop context-based inference and that topology-aware protections are needed. The Limitations state that evaluation is limited to controlled environments, has not been tested on real academic collaboration platforms, and plans ethical, consent-based follow-up research.

Related papers

Read originalarxiv.org