Paper deep dive
Combating Knowledge Corruption in Agent Systems: A Byzantine-Tolerant Secure Collaborative RAG Framework
Zhaoqi Wang, Daqing He, Zijian Zhang, Ye Liu, Jiamou Liu, Zhirui Zeng, Zhan Qin, Zhen Li, Xin Li, Hongwei Yao, Jincheng An, Yong Liu, Yi Li, Qi Sun, Xiulei Liu, Liehuang Zhu
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 90%
Last extracted: 8/9/2026, 3:30:50 AM
Summary
The paper introduces SecureCollaRAG, a Byzantine-tolerant collaborative RAG framework designed to combat knowledge corruption attacks. It utilizes a Multi-source Knowledge Validation Mechanism that constructs dynamic knowledge graphs from multiple sources and employs GNN-based credibility scoring to verify document provenance. This approach effectively filters out poisoned documents and prevents stealthy attacks while maintaining robustness under non-IID data distributions.
Entities (11)
Relation Signals (8)
SecureCollaRAG ā uses ā Multi-source Knowledge Validation Mechanism
confidence 95% Ā· we propose SecureCollaRAG, a Byzantine-tolerant collaborative RAG framework leveraging Multi-source Knowledge Validation Mechanism.
SecureCollaRAG ā mitigates ā Knowledge Corruption Attacks
confidence 93% Ā· SecureCollaRAG... effectively preventing stealthy knowledge corruption attacks
SecureCollaRAG ā employs ā GNN-based Credibility Scoring
confidence 92% Ā· Our approach enables agent system to securely verify document provenance through dynamic GNN-based credibility scoring
SecureCollaRAG ā defendsagainst ā Adaptive Tampering Attack (ATA)
confidence 89% Ā· We tested our framework against multiple adversarial scenarios, including a novel method we introduced, the Adaptive Tampering Attack (ATA)
SecureCollaRAG ā istolerantto ā Byzantine Fault Tolerance
confidence 88% Ā· we model the defense as a Byzantine-robust aggregation problem for RAG systems
PoisonedRAG ā targets ā RAG Systems
confidence 87% Ā· PoisonedRAG [33] was introduced as the first attack framework specifically targeting RAG systems
RobustRAG ā failsunder ā practical conditions
confidence 85% Ā· RobustRAG [24]... fails under practical conditionsārequiring an unrealistic threshold
ā ā
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:While retrieval-augmented generation systems partially address the hallucination issues in large language models, it also introduces new vulnerabilities to knowledge corruption attacks. Adversaries exploit these vulnerabilities by poisoning documents provided by RAG system to manipulate LLM outputs. To counter this threat, we propose SecureCollaRAG, a Byzantine-tolerant collaborative RAG framework leveraging Multi-source Knowledge Validation Mechanism. Our approach enables agent system to securely verify document provenance through dynamic GNN-based credibility scoring, effectively preventing stealthy knowledge corruption attacks while preserving essential domain knowledge integrity. Through extensive evaluations and formal analysis, we demonstrate that SecureCollaRAG maintains robustness against attackers under non-IID data distributions.
Tags
Links
- Source: https://arxiv.org/abs/2608.04366v1
- Canonical: https://arxiv.org/abs/2608.04366v1
PDF not stored locally. Use the link above to view on the source site.
Full Text
65,859 characters extracted from source content.
Expand or collapse full text
Combating Knowledge Corruption in Agent Systems: A Byzantine-Tolerant Secure Collaborative RAG Framework Zhaoqi Wang, Daqing He, Zijian Zhangā, Ye Liu, Jiamou Liu, and Zhirui Zeng Zhan Qin, Zhen Li, Xin Li, Hongwei Yao, Jincheng An, and Yong Liu Yi Li, Qi Sun, Xiulei Liu, and Liehuang Zhu Zhaoqi Wang and Zijian Zhang: Beijing Institute of Technology, Beijing, China wang_zhaoqi, zhangzijian@bit.edu.cn ā Corresponding author. Abstract While retrieval-augmented generation systems partially address the hallucination issues in large language models, it also introduces new vulnerabilities to knowledge corruption attacks. Adversaries exploit these vulnerabilities by poisoning documents provided by RAG system to manipulate LLM outputs. To counter this threat, we propose SecureCollaRAG, a Byzantine-tolerant collaborative RAG framework leveraging Multi-source Knowledge Validation Mechanism. Our approach enables agent system to securely verify document provenance through dynamic GNN-based credibility scoring, effectively preventing stealthy knowledge corruption attacks while preserving essential domain knowledge integrity. Through extensive evaluations and formal analysis, we demonstrate that SecureCollaRAG maintains robustness against attackers under non-IID data distributions. Content warning: This paper contains unfiltered content generated by LLMs that may contain malicious contents. I Introduction Large language models (LLMs) such as GPT-4 [1], LLaMA [7], and Deepseek-V3 [17] have demonstrated remarkable capabilities across diverse domains [30]. However, they are constrained by inherent limitations, including a propensity for hallucination and a lack of access to real-time information. Retrieval-Augmented Generation (RAG) architectures [16] have emerged as a potent solution, mitigating these issues by grounding LLM responses in information retrieved from external knowledge sources. Meanwhile, a new optimization paradigm, Generative Engine Optimization (GEO), has become critical [2]. GEO encompasses strategies designed to make content more discoverable, understandable, and trustworthy for generative AI, thereby increasing its likelihood of being cited in generated answers. The principle of GEO operates on two fundamental layers, mirroring the RAG process itself: optimizing for both retrieval and synthesis. For the retrieval layer, content is structured to maximize its discoverability by search algorithms (e.g., vector search), employing techniques such as logical document chunking, clear headings, and alignment with anticipated user queries. For the synthesis layer, the information is presented for optimal interpretability by the LLM, favoring factual conciseness, structured formats like lists and tables, and unambiguous language. This dual-layer optimization ensures that once content is retrieved, it is easily and accurately incorporated into the final generated answer, making it the path of least resistance for the AI. The effectiveness of both RAG systems and GEO strategies hinges on the aggregation of information from multiple, diverse sources. However, this multi-source model fundamentally expands the systemās attack surface, exposing it to significant distributed threats. These threats prominently include: (1) Misinformation Injection, where adversaries inject pre-crafted malicious content into the retrieval corpus, such as the Corpus Poisoning Attack (CPA) which uses gradient-based optimization to craft āadversarial passagesā [32]; and (2) Adaptive Evidence Fabrication, where adversaries guide an LLM to automatically fabricate deceptive documents that support a predefined malicious answer, as demonstrated by PoisonedRAG [33]. To counter these threats, several defenses have been proposed. RobustRAG [24], the first such framework, employs an isolate-then-aggregate strategy but fails under practical conditionsārequiring an unrealistic threshold where malicious content must comprise less than 50% of the paragraphs within a single attacked document. Subsequent work, such as FilterRAG [8], attempts to offer a more efficient solution by filtering documents with abnormally high keyword density. However, this defense is fundamentally predicated on a simplistic keyword-stuffing assumption, rendering it ineffective against sophisticated adversaries who can manipulate semantics without leaving overt statistical signals. The critical shortcomings of these existing approaches underscore the need for trust-aware verification mechanisms that operate under real-world constraints. Combating knowledge corruption in multi-source context presents several unique and formidable challenges: a) Subtle Semantic Deviations: Misinformation often manifests through subtle semantic changes that evade syntactic detection. For example, a factual claim like āTim Cook is Appleās CEOā can be corrupted to āSince yesterday, Tim Cook became OpenAIās CEO.ā Detection here hinges on factual verification, as simplistic statistical or syntactic models fail to capture such attack patterns [9]. b) Non-IID Data Distributions: While open data often approximates an IID distribution, some RAG applications operate on private, siloed datasets, such as clinical notes in healthcare stored across different institutions. Since patient populations can vary significantly between sources (e.g., a specialized cancer center vs. a general hospital), the underlying data is non-independent and identically distributed (non-IID). This distributional skew fundamentally limits the effectiveness of simple comparison-based verification algorithms. To address these challenges, we analyze the problem of knowledge corruption from a distributed systems perspective. Our central intuition is that trustworthy information can be identified through multi-source verification even in the presence of malicious actors, drawing inspiration from Byzantine-robust aggregation techniques in federated learning, which originate from Byzantine fault tolerance concepts [18, 19]. In this work, we model the defense as a Byzantine-robust aggregation problem for RAG systems, where multiple sources provide information to an LLM, and some sources may be malicious. Similar to Byzantine-robust aggregation in federated learning where a central server aggregates updates from multiple clients under potential Byzantine attacks, our problem involves a verifier filtering documents from n independent sources, where adversaries operate independently rather than in coordination. This distinction allows us to establish security guarantees under a <50%<50\% malicious source threshold, appropriate for majority-voting verification scenarios. Based on this principle, we propose SecureCollaRAG, a multi-source verification framework for RAG systems that operationalizes this defense. The framework consists of three core components: (1) Distributed Knowledge Graph Construction, where document features from multiple sources are used to build a dynamic graph; (2) GNN-based Credibility Scoring, which leverages the graphās topology to compute credibility scores and identify Byzantine-inspired patterns indicative of malicious content; and (3) Verification-based Aggregation, which enforces cross-source verification by weighting information based on its validated credibility to filter out poisoned documents before they reach the LLM. We summarize our main contributions as follows: (1) We propose a novel defense framework, SecureCollaRAG, that effectively counteracts knowledge corruption attacks in RAG systems. To our knowledge, this is the first framework to integrate multi-source knowledge validation and dynamic graph learning for defending against such attacks, demonstrating both theoretical and empirical superiority over existing methods. (2) We provide a analysis of the security problem in distributed RAG, defining the threat model and the challenges of defending against knowledge corruption. We further present a formal analysis of our proposed method, mathematically proving its resilience against malicious sources. (3) We conducted extensive empirical evaluations to validate the efficacy of our defense against attacks. The experiments were performed on four datasets with three open-source models. We tested our framework against multiple adversarial scenarios, including a novel method we introduced, the Adaptive Tampering Attack (ATA), an enhanced adversarial approach utilizing prompt engineering for greater stealth. The experimental results demonstrate the effectiveness of our method. I Related Work AI agent systems extend LLM capabilities through tool integration [13]. A key architecture, RAG [16], is widely used to mitigate hallucination by grounding responses in external knowledge sources. The effectiveness of these RAG systems is increasingly shaped by GEO [2], a new paradigm with strategies designed to make content more discoverable and likely to be cited in AI-generated answers. While these technologies are advancing, the push to standardize AI-tool interoperability through protocols like the Model Coordination Protocol (MCP) [4] inadvertently creates a new, critical attack surface. MCPās open architecture makes RAG systems highly vulnerable to Tool Poisoning Attacks (TPA) [11]. Adversaries can now exploit GEO techniques to systematically promote poisoned source documents, corrupting the knowledge base to induce toxic outputs. Such manipulation can manifest as subtle misinformation, biased recommendations, or the generation of overtly harmful content. Medical deployments face acute risks, as research demonstrates that even 0.001% of data poisoning can severely compromise the accuracy and reliability of clinical LLMs [3]. The threat of knowledge corruption has been explored through various attack vectors. Early work employs gradient-based optimization to craft āadversarial passagesā that are subsequently inserted into the retrieval corpus [32]. Building on such techniques, PoisonedRAG [33] was introduced as the first attack framework specifically targeting RAG systems, where attackers inject malicious texts to induce LLMs to generate attacker-specified answers. In response, defense frameworks have struggled to keep pace. RobustRAG [24], the first such framework, employs an isolate-then-aggregate strategy but fails under practical conditionsārequiring unrealistic contamination thresholds (Ā”50%) and incurring prohibitive computational overhead. Subsequent work, such as FilterRAG [8], attempts to offer a more efficient solution by filtering documents with abnormally high keyword density. However, this defense is fundamentally predicated on a simplistic keyword-stuffing assumption, rendering it ineffective against sophisticated adversaries who can manipulate semantics without leaving overt statistical signals. The shortcomings of these existing approaches underscore the need for trust-aware verification mechanisms that operate under real-world constraints. I Problem Formulation Figure 1: An overview of SecureCollaRAG framework. I-A System Model The agent system comprises three principal components: (1) a target LLM, (2) an aggregation server A, and (3) a knowledge source set =bāŖmS=S_b _m where bS_b and mS_m denotes benign malicious documents. The server A orchestrates document retrieval through the protocol: :qtā¦āsjāāsjā(qt)=(t) splitA:q_t& _s_j R_s_j(q_t)\\ &=D^(t) split (1) where qtq_t denotes the query at round t, āsjR_s_j represents the retrieval operation at source sjs_j returning desensitized document set j(t)=dj,1(t),ā¦,dj,k(t)D_j^(t)=\d_j,1^(t),ā¦,d_j,k^(t)\, and (t)D^(t) constitutes the aggregated document collection formed by the union of all source-specific outputs. Source-side privacy preservation occurs through local sanitization. While comprehensive privacy techniques fall beyond this paperās scope, seamlessly integrable solutions existāincluding differential privacy mechanisms [25], prompt engineering methods [22] and many other methodsāwhich have proven reliable for sensitive data protection in machine learning applications [27, 26]. Each sourceās document distribution follows a compound Dirichlet distribution capturing inherent heterogeneity across providers. The LLM is constrained to generate responses exclusively based on the aggregated documents and provided context, deliberately excluding any external knowledgeāeven when such knowledge exists within the modelās pretrained parametersāto rigorously simulate multi-institutional knowledge isolation scenarios: LLMā((t),pt)ārtāR,LLM(D^(t),p_t)ā r_t , (2) where R denotes the response space. This architecture enforces strict knowledge isolation between the LLMās parametric knowledge and retrieved documentation. I-B Attacker Capabilities In this paper, we assume adversarial participants maintain full autonomy over their documents. Adversarial agents are assumed to be a minority (less than 50% of the total, Ī·<0.5Ī·<0.5) and operate independently. Attackers remain bounded by two critical limitations: prohibitions against accessing other sourceās private dataset and inability to access the LLMās internal parameters (Black-Box settings) or hold any non-aligned language models. The attack objective is to induce the model to generate non-compliant ājailbreakā responses (e.g., harmful, unethical, or policy-violating content). Formally, let J denote the set of all jailbreak responses. For a given set of critical queries qiāi=1Tq_ii=1^T, the adversariesā objective is to maximize the probability that the LLMās response falls within this set: maxāāi=1TāPLLMā(Rātiāā£(ti)āŖāadv(ti),pti), Ī i=1^TP_LLM (Rt_i ^(t_i) adv^(t_i),p_t_i ), (3) where RtiR_t_i is the LLMās response at step tit_i. This threat paradigm enables malicious actors to manipulate documents through knowledge corruption strategies, with specific implementation mechanisms preserved for experimental analysis. I-C Security Goal Our defense aims to prevent adversaries from successfully injecting malicious content into the LLMās context through poisoned documents. Formally, we seek to ensure that when malicious sources constitute less than 50% of the total population (i.e., m<n/2m<n/2), the probability that a poisoned document passes verification and reaches the LLM remains bounded below a threshold Ī“: āā(Dmalā acceptedā£m<n/2)ā¤Ī“P(D_mal accepted m<n/2)ā¤Ī“ (4) where DmalD_mal denotes a malicious document from a compromised source. By preventing poisoned documents from reaching the LLM, we bound the probability of adversarial influence on the LLMās output, denoted as āā(Rtāāadv)P(R_t _adv), where āadvR_adv represents the set of adversarially-influenced responses and RtR_t is the LLMās response at time t. IV Design of SecureCollaRAG IV-A The workflow of SecureCollaRAG The SecureCollaRAG (SCR) is a collaborative validation framework that authenticates documents in external RAG systems via its core innovation: the Multi-source Knowledge Validation Mechanism. This approach leverages distributed consensus by comparing information across independent sources, operating under the principle that majority-endorsed knowledge exhibits higher credibility. Although malicious content is hard to directly identify, different policy-based attacks leave detectable traces in outcomes through comparative analysis. As depicted in Fig. 1, our framework leverages multi-source verification to counteract knowledge corruption attacks through three integrated components: First, a decentralized query dissemination protocol enables SecureCollaRAG to distribute requests to participating sources upon AI agent invocation, facilitating parallelized local retrieval-augmented generation that yields document surrogates from each sourceās top-k relevant documents. Second, we implement cross-source consensus verification through dynamic graph construction at the aggregation server. This builds a verification graph tG_t with documents as nodes and edges weighted by interdocument similarity. The dynamic graph structure enables Byzantine fault detection through topological analysis of node behavior patterns. Third, we introduce dynamic Source Reliability metrics ϱjt _j^t (for source j at round t) initialized at 0.50.5, enhanced through our novel Dynamic Feature Gate & Projection mechanism that transforms them into learnable parameters. Crucially, ϱjt _j^t evolves across rounds t and dynamically modulates edge generation between documents, continuously reshaping the graph topology based on real-time trust signals. This reputation system provides Byzantine fault tolerance by dynamically rewiring document relationships. The graph is processed through a graph neural network to compute Document Credibility. The documents with credibility values in the uncertain zone undergo Post Audit processing: Their content is analyzed by a commonsense LLM through prompt engineering, generating Commonsense Discrepancy Penalty scores cā(di(t))ā[0,1]P_c(d_i^(t))ā[0,1] that quantify commonsense violations. It is important to note that the commonsense auditor is designed to assess basic plausibility and logical consistency, relying solely on general world knowledge. It does not require domain-specific expertise or fine-tuning on specialized datasets, and its role is limited to commonsense judgment rather than expert-level verification. The original features are then augmented with cā(di(t))P_c(d_i^(t)) and reprocessed through the GNN to recalculate the credibility values. Final credibility values determine document retention: Those below threshold Īø are discarded, while retained documents trigger source reliability updates for their originating sources. The filtered documents are subsequently returned to the LLM for response generation. Our Byzantine-tolerant design stems from two key observations: (1) Knowledge corruption attacks align with Byzantine failure modes where adversaries can arbitrarily manipulate local outputs; (2) Our dynamic GNN scoring method essentially implements a voting mechanism. IV-B Details of verification mechanism Formally, the agent workflow commences at round t when a user submits instruction qtq_t. This input undergoes semantic decomposition through an LLM-based task analyzer: qtā²=LLMā(qt),q_t =LLM(q_t), (5) where the LLM transformation prepares the query for distributed retrieval. The query qtā²q_t is dispatched to SecureCollaRAG server S, which orchestrates distributed retrieval across m knowledge sources S=sjj=1mS=\s_j\_j=1^m. Each source sjs_j executes local retrieval āā(qtā²)R(q_t ) to return j(t)=dj,1(t),ā¦,dj,k(t)D_j^(t)=\d_j,1^(t),ā¦,d_j,k^(t)\, constituting the aggregated corpus (t)=āj=1mj(t)D^(t)= _j=1^mD_j^(t): qtā²ā¦āj=1māsjā(qtā²)=(t).q_t _j=1^mR_s_j(q_t )=D^(t). (6) The server maintains a dynamic reliability mapping ϱ(t):ā[0,1] ^(t):Sā[0,1] initialized uniformly as ϱ(0)ā(sj)=1 ^(0)(s_j)=1 āsjāā s_j . Document verification initiates with graph construction: Node Definition: Each document diā(t)d_i ^(t) corresponds to vertex viā(t)v_i ^(t). SecureCollaRAG employs 12 discriminative node features organized into three categories: Document Content Features, Graph Structural Features, and Cross Interaction Features (detailed in Appendix -A). Edge Formation: Edge connections derive from composite similarity: ā°(t)=(vi,vj)ā£simcombā(di(t),dj(t))>Ļ,E^(t)= \(v_i,v_j) _comb(d_i^(t),d_j^(t))>Ļ \, (7) with the similarity metric integrating semantic and categorical alignment: simcombā(di(t),dj(t))=αā semā(di(t),dj(t))+(1āα)ā catā(di(t),dj(t)). splitsim_comb(d_i^(t),d_j^(t))&=α·sem(d_i^(t),d_j^(t))\\ & +(1-α)Ā·cat(d_i^(t),d_j^(t)). split (8) The semantic similarity semā(ā )sem(Ā·) computes cosine similarity between content embeddings, while categorical similarity catā(ā )cat(Ā·) operates on categorical embeddings, with αā[0,1]αā[0,1] controlling the fusion ratio. Figure 2: Architecture of our dynamic graph neural network. Figure 3: Overview of Adaptive Tampering Attack This yields verification graph (t)=<t,ā°t>G^(t)=<V_t,E_t> and feature matrix (t)R^(t), which are processed through the graph neural network shown in Fig. 2. The computation begins with temporal modulation of source reliability using a gating mechanism: ϱ~j(t)=ggateāMLPā(ϱj(t)āϱj(tā1))+Projā(ϱj(t)), _j^(t)=g_gate ( _j^(t) _j^(t-1) )+Proj( _j^(t)), (9) where ggateā[0,1]g_gateā[0,1] denotes the adaptive gate, Projā(ā )Proj(Ā·) represents linear projection, and ā indicates concatenation. This gating adaptively filters noise while preserving temporal dependencies. The gated features combine with static node attributes through concatenation and pass through a feature encoder to generate hidden representations j(t)h_j^(t), which undergo dual-layer graph attention processing with residual connections. The refined features j(t)ā²h_j^(t) enter a clustering module that computes attention scores between node representations and learnable cluster prototypes kk=12\p_k\_k=1^2 to capture global structural patterns. The argmax operation produces cluster assignments ja_j. By incorporating both node features j(t)ā²h_j^(t) and cluster indicators ja_j into a dual-channel classifier, the model leverages both local and global information for robust document credibility scoring ā(dj(t))ā[0,1]C(d_j^(t))ā[0,1] via sigmoid. During training, we optimize using the composite loss function: ātotal=ācls+Ī»ā ātopo+āl=1Lāl(g)ā1,L_total=L_cls+λ·L_topo+ _l=1^L\|W_l^(g)\|_1, (10) Ī»=12ā(1+cosā”(ĻāeE)),Ī»= 12 (1+ ( Ļ eE ) ), (11) where e and E represent current and total epochs. The classification loss āclsL_cls employs binary cross-entropy. The topology-aware loss: ātopo _topo =āarā[cosā”(u,v)] =Var [ (h_u,h_v) ] +1||āākā[ālogā”expā”(sā(i,k)/Ļ)āmā kexpā”(sā(i,m)/Ļ)], + 1|K| _k [- (s(h_i, μ_k)/Ļ) _mā k (s(h_i, μ_m)/Ļ) ], (12) contains variance regularization and cluster contrastive loss, where kāād μ_k ^d represents cluster centroids and Ļ>0Ļ>0 is temperature. The cosine annealing schedule adjusts topology loss weight Ī» from 1 to 0, and ā1 _1-norm regularization enforces sparsity in gate parameters l(g)W_l^(g). For document credibility scores Cā(dj(t))C(d_j^(t)) within uncertainty zone [Ļlow,Ļhigh][ _low, _high], we employ prompt engineering to generate Commonsense Discrepancy Penalty scores ā(dj(t))ā[0,1]P(d_j^(t))ā[0,1] through LLM verification. The penalty scores are integrated with original features and reprocessed through the GNN to compute final credibility scores. Source reliability metrics are updated through exponential smoothing: ϱ(t+1)ā(sj)=βāϱ(t)ā(sj)+(1āβ)ā(|j(t)|ā1āādāj(t)Cā(d(t))), ^(t+1)(s_j)=β ^(t)(s_j)+(1-β) (|D_j^(t)|^-1 _d _j^(t)C(d^(t)) ), (13) where βā[0,1]βā[0,1] controls update momentum. Finally, high-credibility documents satisfying Cā(di(t))>ĻconfC(d_i^(t))> _conf are aggregated for response generation: Rt=LLMā(dā(t)|Cā(di(t))>Ļconf,qt).R_t=LLM ( \d ^(t) |C(d_i^(t))> _conf \,q_t ). (14) IV-C Byzantine-Robust Aggregation Analysis of SecureCollaRAG We conduct a detailed Byzantine-robust aggregation analysis, with full visualizations and proofs provided in Appendix -B. Our visual analysis of document embeddings under attack scenarios reveals a distinct clustering pattern that separates malicious documents from benign ones. This empirical observation underpins our theoretical framework, which is formalized through three key lemmas: a) Lemma -C (Cluster Separability) ensures that malicious and benign documents are separable in the GNNās latent space with high probability. b) Lemma -D (Calibration Error Bound) provides an upper bound for the credibility score error, linking it to the separation margin. c) Lemma -E (Reliability Convergence) shows that the reliability score for each source converges to its true, long-term credibility. These lemmas culminate in Theorem 1, which formally bounds the systemās risk. The complete proofs for the lemmas and the theorem are deferred to Appendix -B. Theorem 1 (Risk Upper Bound). Fix a decision threshold Īøcā(eāγ, 1āeāγ) _c\!ā\! (e^-γ,\,1-e^-γ ). Under the premises of the above lemmas, the verification mechanism of SecureCollaRAG satisfies Rtā¤Īµ+(1āε)āeāγ,ātā„0,R_t\;ā¤\; \;+\;(1- )\,e^-γ, ā\,tā„ 0, (15) lim suptāāRtā¤eāγ. _tāāR_t\;ā¤\;e^-γ. (16) Theorem 1 directly satisfies our security goal by ensuring the risk of accepting malicious documents remains exponentially small (Rtā¤eāγR_t⤠e^-γ) when malicious sources constitute less than 50% of the population. This addresses the RAG poisoning threat: by bounding the acceptance probability of poisoned documents, we prevent adversarial content from reaching the LLMās context, thereby limiting jailbreak probability. Our framework achieves Byzantine-robust aggregation through three mechanisms: Lemma -C ensures malicious/benign document separation under majority-honest conditions (Ļ<0.5Ļ<0.5), analogous to Byzantine-robust aggregation in federated learning requiring honest majority; Lemma -D and -E establish error-bounded credibility calibration with reliability convergence, enabling accurate source reputation tracking; Theorem 1 proves exponentially decaying risk through GNN-based verification dynamics. IV-D Adaptive Tampering Attack To ensure the robustness of SecureCollaRAG, we propose a novel adversarial strategy, the Adaptive Tampering Attack, designed to overcome the detectability caused by content similarities in conventional PoisonedRAG attacks. As illustrated in Fig. 3, ATA operates without fixed adversarial objectives. Instead, it anchors attack patterns to query domains and directs the LLM to automatically generate domain-specific tampering strategies based on the input contentās contextual characteristics, then randomly select tactics during content generation. This automated strategy generation eliminates the need for manual design of domain-specific attack patterns, significantly enhancing scalability across diverse knowledge domains. This strategic variability ensures that the generated malicious content exhibits significant diversity in both lexical expressions and semantic patterns, effectively evading similarity-based detection mechanisms. For instance, in our medical RAG system, the LLM autonomously identifies the healthcare domain and fabricates malicious content through the five core manipulation categories shown in Fig. 3. Through comparative t-SNE visualizations (see Appendix -G), we demonstrate that ATA-generated malicious documents are substantially more dispersed and intermingled with benign samples compared to PoisonedRAGās clearly separable clusters, validating the effectiveness of our divergence mechanisms in evading similarity-based detection. V Evaluation TABLE I: Comparison of defense effectiveness (ASR, %) under different datasets and attacks. Dataset Defense Deepseek-V3 (671B) Qwen-2.5-14B LLaMA3-8B SAA PoisonedRAG ATA SAA PoisonedRAG ATA SAA PoisonedRAG ATA MediNote S-RAG 88.68 97.00 78.68 97.96 96.44 72.08 81.24 82.88 61.24 MS-RAG 36.60 78.80 32.08 83.56 95.40 61.40 52.52 62.32 52.80 RobustRAG 36.84 80.12 38.40 30.68 82.68 47.28 53.76 60.56 56.56 FilterRAG 3.24 8.48 18.24 6.16 14.28 32.24 7.84 11.48 32.18 SCR 0.60 5.24 5.72 4.68 23.76 25.76 6.58 10.52 18.64 Finance S-RAG 98.68 99.24 84.40 98.76 99.60 91.92 75.68 75.56 89.20 MS-RAG 96.88 93.12 49.56 92.08 98.80 85.36 61.92 53.52 83.48 RobustRAG 47.80 81.52 40.04 65.48 80.32 43.32 47.76 54.92 49.84 FilterRAG 6.18 8.24 24.16 8.36 24.12 25.68 12.58 17.48 28.16 SCR 0.20 3.56 6.12 5.60 22.20 9.08 11.64 14.40 24.24 NQ S-RAG 84.20 86.52 87.76 81.00 91.48 88.12 78.56 82.44 85.68 MS-RAG 56.92 72.92 65.00 62.40 75.52 54.52 48.36 58.72 52.88 RobustRAG 23.20 44.52 51.52 57.28 59.72 42.36 39.84 47.60 45.28 FilterRAG 10.18 18.00 42.36 16.52 26.18 32.68 12.18 23.64 34.28 SCR 10.52 16.12 27.12 12.48 20.52 27.16 15.28 18.64 22.36 HotpotQA S-RAG 52.48 64.20 62.48 59.56 64.00 62.52 58.16 61.32 63.48 MS-RAG 42.52 50.48 58.12 47.95 50.52 53.08 46.20 46.32 53.28 RobustRAG 34.12 49.12 32.52 41.30 39.68 32.52 37.20 42.16 31.12 FilterRAG 10.18 16.48 36.18 18.52 21.16 32.16 12.48 23.24 28.16 SCR 8.24 12.44 23.04 13.50 20.12 21.38 15.08 18.40 21.08 V-A Experimental Settings Datasets: Following prior research, we evaluate knowledge corruption attack resilience using two widely-adopted benchmarks: Natural Questions (NQ) [14] and HotpotQA [29]. To further extend our evaluation to domains with significant real-world impact, we additionally conduct experiments on medical and finance datasets. These domain-specific scenarios are particularly critical as knowledge corruption in healthcare and finance can lead to severe consequences (e.g., misdiagnosis or fraudulent financial advice), and their data isolation characteristics present more realistic validation challenges for RAG systems. We adapt the MediNote [6] and Finance Alpaca [20] datasets as our foundation. The MediNote dataset provides 30,000 triplets comprising real clinical notes from PMC-Patients. The Finance Alpaca dataset is a curated collection of 6,471 financial instruction-response pairs. For all these datasets, we constructed poisoned variants through following steps. First, we generated poisoned variants by applying ATA to benign knowledge, preserving the original structure while embedding malicious content. Second, using prompt engineering, we synthesized corresponding questions designed to trigger both normal and poisoned responses. Finally, we integrated these components into unified data tuples. All datasets were partitioned into an 80% training set and a 20% testing set. Evaluation Metrics: The evaluation is based on the attack success rate (ASR), computed as ASR=1āsĀÆASR=1- s, where sĀÆ s represents the mean normalized score from LLM-as-a-judge assessments against golden references [31]. The LLM judge provides binary (true/false) evaluations formatted in JSON output. In addition to ASR, we also evaluate the classification capability of the model itself by computing standard classification metrics, including True Positive Rate (TPR), True Negative Rate (TNR), False Positive Rate (FPR), and False Negative Rate (FNR). These metrics provide a comprehensive assessment of the modelās ability to distinguish between benign and adversarial documents. LLM and Collaborative Settings: Evaluations employ DeepSeek-V3 (671B) [17], Qwen-2.5-14B [28], and LLaMA3-8B [7] with Contriever [12], ClinicalBERT [15], and FinBERT [5] retrievers. The protocol simulates heterogeneous data via Dirichlet partitioning (α=0.5α=0.5) with malicious sources less than 50%. We conduct 50 independent trials, where in each trial, 50 distinct queries are sampled, and each source retrieves top-5 documents per query. Statistical robustness is ensured through randomized question sampling and strict threat model adherence. Attacker Settings: We evaluate all attack methodologies under the identical environmental constraint of having fewer than 50% adversarial participants. In addition to our proposed ATA, we assess two other attack types: (a) Static Adversarial Attack (SAA). We did not implement the CPA directly, as it requires white-box access to the LLMās internal parameters (e.g., vocabulary, gradients), which is inconsistent with our black-box attacker model. Instead, for the NQ and HotpotQA datasets, malicious content is generated by appending incorrect answers to the questions. For the domain-specific MediNote and Finance Alpaca datasets, we manually craft and store fixed malicious content for each domain within the RAG system; (b) PoisonedRAG Attack, which retrieves target answers to dynamically instantiate context-specific deceptive content. Defender Settings: We compare our method against three other paradigms under identical environmental constraints: a) S-RAG, a baseline configuration with a single malicious source and no defenses; b) MS-RAG, a multi-source extension with adversarial participation below 50%; and c) RobustRAG and d) FilterRAG. Their respective mechanisms are applied individually to all documents from each source. For FilterRAG, the keyword density threshold is set to 0.2, following its ablation study. All configurations preserve identical adversarial conditions and parameters throughout evaluation cycles. For training SCR model, we adopt common learning settings. We employ AdamW optimizer with a weight decay of 1e-5. A CyclicLR scheduler adjusts the learning rate between a base of 1e-5 and a maximum of 1e-3. As previously described, our total loss function is composed of a classification loss, a topology-aware loss, and a gate regularization term. The topology loss weight Ī» is adjusted via cosine annealing from 1 to 0. The gate regularization term imposes an ā1 _1-norm penalty on gate parameters to enforce sparsity, with its coefficient α set to 0.01. For a detailed implementation, please refer to the code in our GitHub repository111https://github.com/Aquarids/scr-pub. V-B Results and Analysis Table I presents the ASR across different datasets and attacks, which constitutes our primary analytical focus. The presented metrics originate from 50 independent executions, each comprising 50 question-answer rounds, with final success rates calculated after excluding minimal instances of LLM response parsing failures. The experimental results, summarized in Table I, present three key findings. First and foremost, the SCR framework consistently achieves the low Attack Success Rates across all tested configurations. On the MediNote dataset with Deepseek-V3, for example, SCR reduced the ASR against PoisonedRAG to 5.24%, while the ASRs for MS-RAG and RobustRAG were 78.80% and 80.12%. Further analysis reveals that while architectural choices provide a foundational defenseāas evidenced by the ASR against PoisonedRAG on MediNote dropping from 97.00% (S-RAG) to 78.80% (MS-RAG) due to content dilutionāthis protection is insufficient on its own. Moreover, the ATA attack, a static method that relies on substituting a few keywords within otherwise normal text, is less potent against baseline systems than the dynamic PoisonedRAG (e.g., 78.68% vs. 97.00% ASR on S-RAG). However, its subtle nature makes it more effective against SCR in several scenarios (e.g., 5.72% ASR for ATA vs. 5.24% for PoisonedRAG on MediNote with SCR). This suggests that the minor, static modifications of ATA may generate fewer detectable anomalies for defenses. TABLE I: SCR Accuracy (%) on MediNote (Deepseek-V3) with and without commonsense mechanism. Metric SAA PoisonedRAG ATA TPR (w/) 95.00 93.14 97.02 TPR (w/o) 88.40 89.96 88.99 TNR (w/) 94.33 99.75 93.62 TNR (w/o) 86.50 93.33 80.45 FPR (w/) 5.67 0.25 6.38 FPR (w/o) 13.50 6.67 19.55 FNR (w/) 5.00 6.86 2.98 FNR (w/o) 11.60 10.03 11.01 To ensure the effectiveness of the commonsense mechanism, we conduct experiments on the MediNote dataset using the Deepseek-V3 model, with results reported in Table I. The data shows that incorporating commonsense reasoning enhances SCRās performance across all metrics. For instance, under the SAA attack, TPR improves from 88.40% to 95.00% and TNR from 86.50% to 94.33% with the mechanism enabled, alongside substantial reductions in FPR and FNR. Even without the commonsense mechanism, the SCR framework exhibits considerable robustness, with TPR consistently above 88% and TNR generally above 80%. Meanwhile, a closer inspection reveals that the ATA attack presents a challenge due to its stealthiness. Without the commonsense mechanism, ATA results in the lowest TNR at 80.45%, lower than PoisonedRAGās TNR of 93.33%, indicating its more covert nature. TABLE I: Average Source Reliability (0-1) with SecureCollaRAG Attack MediNote Finance Alpaca Benign Malicious Benign Malicious SAA 0.983 0.009 0.998 0.012 PoisonedRAG 0.885 0.018 0.852 0.016 ATA 0.818 0.287 0.793 0.246 Table I demonstrates SecureCollaRAGās capability to effectively distinguish between attack types through accumulated interaction rounds. The framework shows highly effective separation between benign and malicious sources for SAA attacks (e.g., 0.983 vs. 0.009 on MediNote). While PoisonedRAG attacks yield low malicious scores (0.018), ATA attacks achieve the highest malicious reliability scores (0.287 on MediNote and 0.246 on Finance Alpaca), confirming their enhanced stealth characteristics. These progressive divergences in reliability scores confirm the systemās adaptive discrimination capacity across varied adversarial patterns. Based on the above conclusions, our SCR framework demonstrates its effectiveness in balancing security and practicality. VI Conclusion Our research focuses on mitigating the critical vulnerability of RAG systems to knowledge corruption attacks. We introduce a novel defense framework, SecureCollaRAG, which constructs a multi-source document graph and leverages dynamic graph neural networks to compute document credibility, enabling robust multi-source knowledge validation. Additionally, we propose the Adaptive Tampering Attack, a sophisticated adversarial strategy utilizing prompt engineering to achieve better stealth. Evaluations demonstrate SCRās robustness against attackers under non-IID data distributions, establishing a new paradigm for secure multi-agent collaboration. References [1] J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkat, et al. (2023) Gpt-4 technical report. arXiv preprint arXiv:2303.08774. Cited by: §I. [2] P. Aggarwal, V. Murahari, T. Rajpurohit, A. Kalyan, K. Narasimhan, and A. Deshpande (2024) Geo: generative engine optimization. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, p. 5ā16. Cited by: §I, §I. [3] D. A. Alber, Z. Yang, A. Alyakin, E. Yang, S. Rai, A. A. Valliani, J. Zhang, G. R. Rosenbaum, A. K. Amend-Thomas, D. B. Kurland, et al. (2025) Medical large language models are vulnerable to data-poisoning attacks. Nature Medicine, p. 1ā9. Cited by: §I. [4] Anthropic (2024) Model context protocol. External Links: Link Cited by: §I. [5] D. Araci (2019) Finbert: financial sentiment analysis with pre-trained language models. arXiv preprint arXiv:1908.10063. Cited by: §V-A. [6] A. Bonnet, P. Boulenger, H. Wu, M. Conti, J. Prado, O. El Malki, N. De Sabbata, H. d. S. Gameiro, Y. Xu, F. Boukil, A. Faure, A. A. Sariialou, Y. Niu, Z. Chen, A. Bosselut, and M. Jaggi (2024) MEDINOTE: automated clinical notes. External Links: Link Cited by: §V-A. [7] A. Dubey, A. Jauhri, A. Pandey, A. Kadian, A. Al-Dahle, A. Letman, A. Mathur, A. Schelten, A. Yang, A. Fan, et al. (2024) The llama 3 herd of models. arXiv e-prints, p. arXivā2407. Cited by: §I, §V-A. [8] K. Edemacu, V. M. Shashidhar, M. Tuape, D. Abudu, B. Jang, and J. W. Kim (2025) Defending against knowledge poisoning attacks during retrieval-augmented generation. arXiv preprint arXiv:2508.02835. Cited by: §I, §I. [9] Z. Guo, Q. Shang, X. Li, C. Li, Z. Zhang, Z. Zhang, J. Hu, J. An, C. Huang, Y. Chen, et al. (2025) Web-ftp: a feature transferring-based pre-trained model for web attack detection. IEEE Transactions on Knowledge and Data Engineering 37 (3), p. 1495ā1507. Cited by: §I. [10] J. He, Y. Gong, Z. Lin, C. Wei, Y. Zhao, and K. Chen (2024) Llm factoscope: uncovering llmsā factual discernment through measuring inner states. In Findings of the Association for Computational Linguistics ACL 2024, p. 10218ā10230. Cited by: §-B. [11] Invariant Labs (2025) MCP Security Notification. External Links: Link Cited by: §I. [12] G. Izacard, M. Caron, L. Hosseini, S. Riedel, P. Bojanowski, A. Joulin, and E. Grave (2021) Unsupervised dense information retrieval with contrastive learning. External Links: Link, Document Cited by: §V-A. [13] P. M. Julia Wiesinger and V. Vuskovic (2023) Agents. External Links: Link Cited by: §I. [14] T. Kwiatkowski, J. Palomaki, O. Redfield, M. Collins, A. Parikh, C. Alberti, D. Epstein, I. Polosukhin, J. Devlin, K. Lee, et al. (2019) Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics 7, p. 453ā466. Cited by: §V-A. [15] S. A. Lee, A. Wu, and J. N. Chiang (2025) Clinical modernbert: an efficient and long context encoder for biomedical text. arXiv preprint arXiv:2504.03964. Cited by: §V-A. [16] P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W. Yih, T. RocktƤschel, et al. (2020) Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems 33, p. 9459ā9474. Cited by: §I, §I. [17] A. Liu, B. Feng, B. Xue, B. Wang, B. Wu, C. Lu, C. Zhao, C. Deng, C. Zhang, C. Ruan, et al. (2024) Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437. Cited by: §I, §V-A. [18] X. Liu, Z. Zhang, Z. Li, X. Lu, M. Li, L. Xu, M. Ao, and L. Zhu (2025) Group bft: two-round bft protocols via replica grouping. IEEE Transactions on Dependable and Secure Computing. Cited by: §I. [19] X. Liu, Z. Zhang, Z. Li, H. Yin, M. Li, J. Liu, M. Conti, and L. Zhu (2025) ABSE: adaptive baseline score-based election for leader-based bft systems. IEEE Transactions on Parallel and Distributed Systems. Cited by: §I. [20] K. Saw (2023) Finance alpaca dataset. Hugging Face. Note: https://huggingface.co/datasets/ksaw008/finance_alpacaAccessed: 2025-08-07 Cited by: §V-A. [21] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini (2008) The graph neural network model. IEEE transactions on neural networks 20 (1), p. 61ā80. Cited by: §-H. [22] X. Sun, G. Liu, Z. He, H. Li, and X. Li (2024) DePrompt: desensitization and evaluation of personal identifiable information in large language model prompts. arXiv preprint arXiv:2408.08930. Cited by: §I-A. [23] P. VeliÄkoviÄ, G. Cucurull, A. Casanova, A. Romero, P. Lio, and Y. Bengio (2017) Graph attention networks. arXiv preprint arXiv:1710.10903. Cited by: §-H. [24] C. Xiang, T. Wu, Z. Zhong, D. Wagner, D. Chen, and P. Mittal (2024) Certifiably robust rag against retrieval corruption. arXiv preprint arXiv:2405.15556. Cited by: §I, §I. [25] L. Xie, K. Lin, S. Wang, F. Wang, and J. Zhou (2018) Differentially private generative adversarial network. arXiv preprint arXiv:1802.06739. Cited by: §I-A. [26] Z. Xing, Z. Zhang, Z. Zhang, Z. Li, M. Li, J. Liu, Z. Zhang, Y. Zhao, Q. Sun, L. Zhu, et al. (2025) Zero-knowledge proof-based verifiable decentralized machine learning in communication network: a comprehensive survey. IEEE Communications Surveys & Tutorials. Cited by: §I-A. [27] R. Xu, N. Baracaldo, and J. Joshi (2021) Privacy-preserving machine learning: methods, challenges and directions. arXiv preprint arXiv:2108.04417. Cited by: §I-A. [28] A. Yang, B. Yang, B. Hui, B. Zheng, B. Yu, C. Zhou, C. Li, C. Li, D. Liu, F. Huang, G. Dong, H. Wei, H. Lin, J. Tang, J. Wang, J. Yang, J. Tu, J. Zhang, J. Ma, J. Xu, J. Zhou, J. Bai, J. He, J. Lin, K. Dang, K. Lu, K. Chen, K. Yang, M. Li, M. Xue, N. Ni, P. Zhang, P. Wang, R. Peng, R. Men, R. Gao, R. Lin, S. Wang, S. Bai, S. Tan, T. Zhu, T. Li, T. Liu, W. Ge, X. Deng, X. Zhou, X. Ren, X. Zhang, X. Wei, X. Ren, Y. Fan, Y. Yao, Y. Zhang, Y. Wan, Y. Chu, Y. Liu, Z. Cui, Z. Zhang, and Z. Fan (2024) Qwen2 technical report. arXiv preprint arXiv:2407.10671. Cited by: §V-A. [29] Z. Yang, P. Qi, S. Zhang, Y. Bengio, W. W. Cohen, R. Salakhutdinov, and C. D. Manning (2018) HotpotQA: a dataset for diverse, explainable multi-hop question answering. arXiv preprint arXiv:1809.09600. Cited by: §V-A. [30] W. X. Zhao, K. Zhou, J. Li, T. Tang, X. Wang, Y. Hou, Y. Min, B. Zhang, J. Zhang, Z. Dong, et al. (2023) A survey of large language models. arXiv preprint arXiv:2303.18223 1 (2). Cited by: §I. [31] L. Zheng, W. Chiang, Y. Sheng, S. Zhuang, Z. Wu, Y. Zhuang, Z. Lin, Z. Li, D. Li, E. Xing, et al. (2023) Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in neural information processing systems 36, p. 46595ā46623. Cited by: §V-A. [32] Z. Zhong, Z. Huang, A. Wettig, and D. Chen (2023) Poisoning retrieval corpora by injecting adversarial passages. arXiv preprint arXiv:2310.19156. Cited by: §I, §I. [33] W. Zou, R. Geng, B. Wang, and J. Jia (2024) Poisonedrag: knowledge corruption attacks to retrieval-augmented generation of large language models. arXiv preprint arXiv:2402.07867. Cited by: §I, §I. -A Detailed Feature Descriptions SecureCollaRAGās node features incorporate comparative metrics enhanced by a logarithmic normalization scheme to prevent domination by features with large value ranges and to better capture relative differences: fā(x,x~)=lnā”(1+x~)f(x, x)= (1+ x x ) (17) where x denotes the local measurement from a single document and x~ x represents the global median value for that feature across all documents in the current batch. The 12 discriminative signals are as follows: Document Content Features: ⢠Content length ratio: Applies logarithmic scaling (17) on the documentās content length to assess its verbosity against the typical length in the specific domain. ⢠Keywords score ratio: Computes a TF-IDF-based summation over relevant n-grams. The score computation employs a linguistic processing pipeline: input text undergoes initial tokenization using specialized stopwords from nltk, followed by systematic generation of 1-3 gram combinations constrained to 2-35 character phrases with a minimum of 6 cumulative letters per expression. This multi-stage filtering produces meaningful n-grams while automatically excluding generic terms. The final score is normalized using (17). ⢠Keywords count ratio: Applies logarithmic scaling (17) to the count of extracted keywords relative to the global median. ⢠Category distribution ratio: Measures the frequency of a documentās assigned category within the current submissions. This is achieved by computing linguistic similarity across categorical descriptions (e.g., āUnknownā: āUnclassified or unspecified medical documentsā, āCardiologyā: āMedical specialty concerning heart disordersā) to detect anomalous or rare category assignments. ⢠Sentiment polarization: A four-dimensional VADER analysis captures emotional intensity through: (1) positive valence quantifying explicit optimism, (2) neutral ratio indicating emotional ambivalence, (3) negative magnitude measuring critical sentiment, and (4) a compound score reflecting the overall emotional orientation. Graph Structural Features: ⢠Edge Density Metric: Defined as degā(vi)|| deg(v_i)|V|, this feature measures a nodeās connectivity density scaled by the graph size. Higher values may indicate an attempt by the node to disproportionately influence the verification consensus. ⢠Degree Ranking: Transforms the raw node degree into a logarithmic rank using (17). This transformation demotes the influence of high-degree hub nodes while amplifying subtle structural differences that are critical for detecting collusion patterns. ⢠Semantic Cohesion: Integrates global and local semantic patterns through a weighted logarithmic combination. The global semantic similarity is scaled by a factor β and combined with the local neighborhood similarity (computed as the average of top-k most similar nodes) via (1āβ)(1-β). This dual-scale mechanism uses logarithmic compression to balance system-wide semantic trends with localized contextual relationships, mitigating distortion from extreme similarity values. Cross Interaction Features: ⢠Lexical-Semantic Relevance: Fuses term frequency statistics (lexical information) with contextual relationships (semantic information) to identify inconsistencies that often appear in adversarial content, such as plausible but contextually irrelevant statements. -B Detailed BFT Analysis and Proofs As visualized for the PoisonedRAG attack scenario in Fig. 4, we observe a distinct clustering pattern. The t-SNE projection of document feature vectors (left panel) reveals a clear separation between malicious documents (red circles) and benign ones (green squares), which are submitted by different participants. This phenomenon stems from the fact that documents generated with a shared malicious objective exhibit high similarity. As explained by the autoregressive nature of LLMs [10], similar input prefixes constrain the decoding process toward analogous token probability distributions, leading to outputs that are closely clustered in the feature space. Visual analysis of PoisonedRAG (Fig. 4) reveals two notable patterns: (1) A distinct separation boundary exists between malicious and benign documents within query groups, confirming cluster compactness hypotheses; (2) Malicious documents demonstrate higher spatial concentration compared to their benign counterparts. Building on the separation patterns observed, we formalize SecureCollaRAGās robustness under the constraint |m|/||ā¤Ļ<0.5|S_m|/|S|ā¤Ļ<0.5. Let m(t)D_m^(t) and b(t)D_b^(t) denote malicious and benign document sets at round t. The instantaneous risk combines false acceptance and rejection probabilities: Rt:= R_t= Prā”[dām(t)ā§Cā(d)ā„Īøc]āfalse acceptance \! [d _m^(t) (d)ā„ _c ]_false acceptance (18) +Prā”[dāb(t)ā§Cā(d)<Īøc]āfalse rejection. + \! [d _b^(t) (d)< _c ]_false rejection. According to the t-SNE visualization, we assume cluster separation with margin Ī>0 >0 in the GNNās latent space Z: mindmām(t)dbāb(t)ā”āĻā(dm)āĻā(db)āā„Ī _ subarraycd_m _m^(t)\\ d_b _b^(t) subarray\|Ļ(d_m)-Ļ(d_b)\|_Zā„ (19) with the GNN approximating the Bayes-optimal classifier CāC within error Ī·: supdā(t)|Cā(d)āCāā(d)|ā¤Ī·<12. _d ^(t)|C(d)-C (d)|ā¤Ī·< 12. (20) -C Lemma 1 (Cluster Separability) Let (t)=i(t)i=1|(t)|H^(t)=\h_i^(t)\_i=1^|D^(t)| be the set of node representations produced by the dynamic graph neural network at round t. Assume the fraction of malicious sources satisfies |m|/||ā¤Ļ<0.5|S_m|/|S|ā¤Ļ<0.5 and the GNN has reached training equilibrium under the composite loss in (12). Then there exists a decision function fā()f(h) and constants γ>0γ>0 (inter-cluster margin) and εā(0,1) ā(0,1) (tolerable error) such that Prā”[dām(t),fā(d(t))ā¤āγordāb(t),fā(d(t))ā„+γ]ā„1āε, \! [ array[]ld _m^(t),\;f(h_d^(t))ā¤-γ\\ or\\ d _b^(t),\;f(h_d^(t))ā„+γ array ]\;\;ā„ 1- , (21) i.e. malicious and benign documents are separable with margin γ up to probability 1āε1- . Proof. The topology-aware loss (12) consists of two complementary terms: (i) the variance regularizer āarā[cosā”(u,v)]Var[ (h_u,h_v)], which contracts intra-cluster dispersion, and (i) the cluster-contrastive component, which enlarges inter-cluster distances by maximizing the softmax-scaled similarity gap between representations and their respective centroids k\ μ_k\. At convergence, these terms enforce the following empirical property with high probability (1āĪ“1-Ī“, Ī“<εΓ\!<\! ): maxd1,d2āb(t)ā”ād1(t)ād2(t)ā2ābenign radiusā¤Ļb, _d_1,d_2 _b^(t)\|h_d_1^(t)-h_d_2^(t)\|_2_benign radius⤠_b, (22) maxd1,d2ām(t)ā”ād1(t)ād2(t)ā2āmalicious radiusā¤Ļm, _d_1,d_2 _m^(t)\|h_d_1^(t)-h_d_2^(t)\|_2_malicious radius⤠_m, (23) mindbāb(t),dmām(t)ā”ādb(t)ādm(t)ā2āinter-cluster gap _d_b _b^(t),\,d_m _m^(t)\|h_d_b^(t)-h_d_m^(t)\|_2_inter-cluster gap (24) ā„Ļb+Ļm+γ, ā„ _b+ _m+γ, for some radii Ļb,Ļm>0 _b, _m>0 and margin γ>0γ>0. (1) follows from the bounded variance term, while (2) is guaranteed by the contrastive push-apart force combined with the assumption Ļ<0.5Ļ<0.5, which prevents malicious points from dominating the representation space. Because the benign and malicious clusters are enclosed in disjoint ā2 _2-balls of radii Ļb _b and Ļm _m that are separated by at least γ, the classical Fisher discrimination result ensures the existence of a hyperplane ā£fā()=0\h f(h)=0\ with margin γ/2γ/2 that cleanly separates the two closed balls. The probability that an unseen sample violates the margin is bounded by Ī“ due to concentrationātreating DGNN as a deterministic Lipschitz mapping, standard Rademacher generalization bounds yield an additional failure term <εāĪ“< -Ī“. Combining the two failure probabilities gives Prā”[error]ā¤Īµ [error]⤠, concluding that the DGNN representations are separable within error ε . ā -D Lemma 2 (Calibration Error Bound) Let Ļā(x)=(1+eāx)ā1Ļ(x)= (1+e^-x )^-1 be the logistic sigmoid and recall the decision function fā()=ā¤ā+bf(h)=w^\! h+b from Lemma -C. Define the credibility score of a document d at round t as Cā(d(t))=Ļā(fā(d(t))).C\! (d^(t) )=Ļ\! (f(h_d^(t)) ). (25) The expected calibration error (ECE) is ECEt=dā¼(t)ā|Cā(d(t))āādāb(t)|.ECE_t=E_d ^(t) |\,C\! (d^(t) )-1\!\d _b^(t)\ |. (26) Under the conditions of Lemma -C, ECEtā¤Īµ+(1āε)āeāγ.ECE_t⤠+(1- )\,e^-γ. (27) Proof. Lemma -C guarantees that, with probability at least 1āε1- , dāb(t)ā¹fā(d(t))ā„γ, d _b^(t)\; \;f(h_d^(t))ā„γ, (28) dām(t)ā¹fā(d(t))ā¤āγ. d _m^(t)\; \;f(h_d^(t))ā¤-γ. Consider a correctly separated benign document. Monotonicity of Ļ gives Cā(d(t)) \! (d^(t) ) =Ļā(fā(d(t))) =Ļ\! (f(h_d^(t)) ) (29) ā„Ļā(γ) ā„Ļ(γ) =11+eāγ = 11+e^-γ =1āeāγ1+eāγ =1- e^-γ1+e^-γ ā„1āeāγ, ā„ 1-e^-γ, hence |Cā(d(t))ā1|ā¤eāγ. |\,C\! (d^(t) )-1 | ^-γ. (30) For a correctly separated malicious document we analogously have |Cā(d(t))ā0|ā¤eāγ,sinceĻā(āγ)ā¤eāγ. |\,C\! (d^(t) )-0 | ^-γ, Ļ(-γ) ^-γ. (31) Therefore, on the high-probability event of correct separation, the absolute calibration error does not exceed eāγe^-γ. On the complementary event of probability ε no guarantee exists, so the worst-case error is bounded trivially by 11. Aggregating the two cases, ECEtā¤(1āε)āeāγ+εā 1=ε+(1āε)āeāγ.ECE_tā¤(1- )\,e^-γ+ Ā· 1= +(1- )\,e^-γ. (32) Because εā(0,1) ā(0,1) and γ>0γ>0, the bound lies strictly below 11 and decreases exponentially in γ, confirming that larger inter-cluster margins yield better probabilistic calibration. ā -E Lemma 3 (Reliability Convergence) For a fixed source sjās_j\!ā\!S define the instantaneous average credibility CĀÆj(t)=1|j(t)|āādāj(t)Cā(d(t)), C_j^(t)= 1 _j^(t) _d _j^(t)C\! (d^(t) ), (33) and let Cjā=limtāāCĀÆj(t)ā[0,1]C_j \!=\! _tāā C_j^(t)ā[0,1] exist. Then the exponentially-smoothed reliability score ϱ(t)ā(sj) ^(t)(s_j) generated by ϱ(t+1)ā(sj)=βāϱ(t)ā(sj)+(1āβ)āCĀÆj(t),0<β<1, ^(t+1)(s_j)=β\, ^(t)(s_j)+(1-β)\, C_j^(t), 0<β<1, (34) converges to the same limit CjāC_j with the error bound |ϱ(t)ā(sj)āCjā|⤠| ^(t)(s_j)-C_j |\;⤠βtā|ϱ(0)ā(sj)āCjā| \;β^t | ^(0)(s_j)-C_j | (35) +(1āβ)āāu=0tā1βuā|CĀÆj(tā1āu)āCjā|. +(1-β) _u=0^t-1β^u | C_j^(t-1-u)-C_j |. In particular, if |CĀÆj(t)āCjā|ātāā0 | C_j^(t)-C_j |\! [tāā]\!0, then ϱ(t)ā(sj)ātāāCjā ^(t)(s_j)\! [tāā]\!C_j . Proof. Define the error term et=ϱ(t)ā(sj)āCjāe_t= ^(t)(s_j)-C_j . Subtracting CjāC_j from both sides of (34) yields et+1=βāet+(1āβ)ā(CĀÆj(t)āCjā).e_t+1=β\,e_t+(1-β) ( C_j^(t)-C_j ). (36) Iteratively unrolling the recurrence gives et=βtāe0+(1āβ)āāu=0tā1βuā(CĀÆj(tā1āu)āCjā),e_t=β^te_0+(1-β) _u=0^t-1β^u ( C_j^(t-1-u)-C_j ), (37) from which the absolute bound in (35) follows by the triangle inequality. Since 0<β<10<β<1 the pre-factor βtβ^t decays exponentially; convergence of CĀÆj(t) C_j^(t) implies the summand |CĀÆj(tā1āu)āCjā| | C_j^(t-1-u)-C_j | vanishes as tāāt\!ā\!ā, forcing the entire sum to disappear. Consequently limtāāet=0 _tāāe_t=0, i.e. ϱ(t)ā(sj)āCjā ^(t)(s_j)ā C_j . ā -F Proof of Theorem 1. Partition the sample space into the separable event ā°E, where the margin guarantees of Lemma -C hold, and its complement ā°ĀÆ E. By definition Prā”(ā°ĀÆ)ā¤Īµ,Prā”(ā°)=1āε. ( E)\;ā¤\; , (E)=1- . (38) Risk on ā°ĀÆ E. No structural guarantee is available; applying the trivial bound yields Rtā£ā°ĀÆā¤ 1.R_t E\;ā¤\;1. (39) Risk on ā°E. Within this event every benign document satisfies fā()ā„γf(h)\!ā„\!γ and every malicious one fā()ā¤āγf(h)\!ā¤\!-γ. Lemma -D therefore implies Cā(db)ā„ 1āeāγ,Cā(dm)ā¤eāγ.C(d_b)\;ā„\;1-e^-γ, (d_m)\;ā¤\;e^-γ. (40) Because the threshold Īøc _c lies strictly between these two values, both false-acceptance and false-rejection probabilities vanish inside ā°E, so Rtā£ā°= 0.R_t \;=\;0. (41) Combining the two cases yields Rt R_t =Prā”(ā°ĀÆ)āRtāā£ā°ĀÆ+Prā”(ā°)āRtā£āā° = ( E)\,R_t\! \! E+ (E)\,R_t\! \!E (42) ā¤Prā”(ā°ĀÆ)ā 1+Prā”(ā°)ā 0 ⤠( E)Ā· 1+ (E)Ā· 0 =ε. = . Substituting the calibration bound Rtā£ā°ĀÆā¤eāγR_t\! \! E ^-γ in place of the trivial 11 strengthens (42) to the form stated in (15). Finally, Lemma -E ensures that sources with persistently low average credibility receive exponentially diminishing weights, causing the prevalence of malicious documents in (t)D^(t) to contract over time. Consequently the contribution of the failure event ā°ĀÆ E asymptotically vanishes, yielding the limit in (16). ā -G Visual Analysis of Adaptive Tampering Attack The Adaptive Tampering Attack achieves fundamental improvements through three key divergence mechanisms. Unlike PoisonedRAGās predictable outputs, ATA maintains attack effectiveness while generating diverse malicious documents. First, it operates on naturally distributed benign documents rather than creating artificial clusters of malicious content, enabling better camouflage. Second, a randomized tactic selector produces different attack patterns even for identical concepts through varied output generation paths. Third, ATA separates attack preparation from execution by pre-generating poisoned content, avoiding the detectable timing patterns seen in PoisonedRAGās real-time attacks. Figure 4: Visual analysis of PoisonedRAG. Figure 5: Visual analysis of the Adaptive Tampering Attack. Although this pre-generation of malicious content may not always precisely target specific questions for poisoning as effectively as PoisonedRAG, its inherent stealthiness is enhanced, making it much harder for defense mechanisms to detect. To validate this claim, we provide comparative t-SNE visualizations in Fig. 4 and Fig. 5. As shown in the document feature projections, PoisonedRAG exhibits a clear linear separation boundary between malicious (red) and benign (green) documents, making them easily distinguishable. In contrast, ATA-generated malicious documents are substantially more dispersed and intermingled with benign samples, demonstrating significantly reduced detectability. These innovations allow malicious documents to blend with legitimate content through following aspects: 1) leveraging authentic document distributions, 2) introducing controlled randomness in attack patterns, and 3) erasing signatures in attack execution. The combined effect breaks traditional detection methods that rely on content similarity or timing analysis, effectively erasing the clear boundaries between adversarial and benign outputs. -H Graph Neural Network and Graph Attention Networks Graph Neural Networks (GNNs) formalize relational reasoning through distributed state transition dynamics [21]. Let G=(V,E)G=(V,E) define a graph with vertex set V and edge set E, where each node viāVv_iā V maintains a state vector i(t)āādh_i^(t) ^d at iteration t. The information propagation mechanism follows: i(t+1)=Ļā(selfāi(t)+ājāā(i)neighāj(t)),h_i^(t+1)=Ļ (W_selfh_i^(t)+ _j (i)W_neighh_j^(t) ), (43) where ā(i)N(i) denotes the neighborhood of node viv_i, selfW_self and neighW_neigh are learnable parameters, and Ļ represents a nonlinear activation function. Graph Attention Networks (GATs) enhance this paradigm through adaptive neighborhood weighting. The attention coefficient αiāj _ij between nodes viv_i and vjv_j is computed as: αiāj=expā”(ReLUā(ā¤ā[iā„j]))ākāā(i)āŖiexpā”(ReLUā(ā¤ā[iā„k])), _ij= (ReLU (a [Wh_i\|Wh_j] ) ) _k (i)āŖ\i\ (ReLU (a [Wh_i\|Wh_k] ) ), (44) where a and W are learnable parameters, and ā„\| denotes vector concatenation. The final node representation aggregates neighborhood features through these attention weights: iā²=Ļā(ājāā(i)āŖiαiājāj).h_i =Ļ ( _j (i)āŖ\i\ _ijWh_j ). (45) This architecture enables differentiable importance weighting of neighbor nodes without requiring prior structural knowledge [23].