Knowledge base poisoning attacks and defenses for the PA-LLM-RAG frameworkKnowledge Base Poisoning Attacks and Defense for Policy-Aware LLM-RAG Framework
A single rule (1.6%) pollutes 17/20 prompt contexts; CLD-KB achieves 100% CIR at poisoning rates from 1.6% to 25%.
A white-box adversary has write access to knowledge base K, knows the embedding model nomic-embed-text and the WF/ROE/CAP structure, cannot modify existing rules, intercept operator prompts, or access LLM weights, and does not need runtime prompts. The goal is to poison LLM task decisions, causing system failure and violation of operational policy constraints. The victim system is edge PA-LLM-RAG.
- PA-LLM-RAG uses semantic retrieval to anchor edge LLM IoBT decisions to the WF, ROE, and CAP policy libraries, but the default library contents are not tampered with. An adversary who can write to the library can inject forged rules into the decision context without relying on runtime prompts.
- Poisoned rules include vocabulary from all three categories, making embeddings close to the query distribution centroid and equidistant from the three categories, thus reaching the top of retrieval across query types. CLD-KB uses an OR combination of OC-SVM and Member-Based Category Spread to block them, and backfills 3 clean rules from top-10.
- Without defense, 1 rule (1.6%) causes poisoned rules to appear in the LLM context for 17 of 20 prompts; at about 7.7%, saturation occurs with an average of 2.65 per context. CLD-KB achieves F1 of 1.000 on 60 legitimate plus 24 poisoned rules, 100% CIR from 1.6% to 25%, and about 7ms per task.
- The authors note reliance on the three-category classification, 60-rule scale, and one-time training at startup, and list targeted, single-class, paraphrase, and adaptive attacks as well as out-of-simulation experiments as future work. The paper does not directly compare with TrustRAG et al. on this rule base, nor does it report blacklist measurements.
- Evaluated models
- Llama 3.2CLD-KB
- Benchmarks
- IoBT policy knowledge base(60条合法规则)24条生成的对抗规则Appendix A的20条IoBT任务提示词Gazebo Harmonic v8.11
- Metrics
- Context Integrity Rate (CIR)RecallPrecisionF1-scoreLLM context corruptionpoisoned rules per LLM context
Studies a query-independent semantic retrieval poisoning attack against the Policy-Aware LLM-RAG (PA-LLM-RAG) framework in battlefield IoT mission control. A single injected rule (1.6% poisoning rate) can cause 85% LLM context pollution, reaching saturation at 7.7% poisoning rate. To address this threat, the authors propose CLD-KB, a dual-detector anomaly detection framework combining One-Class SVM boundary detection with member-based category spread analysis, outperforming five baselines—DBSCAN, LOF, K-Means, Isolation Forest, and One-Class SVM—in both poisoning detection and knowledge retention, with only 7ms computational overhead per task, deployable at the edge.
Paper analysis
What problem does this paper attempt to solve?
PA-LLM-RAG assumes the policy library is trustworthy, and query-agnostic poisoning can pollute the retrieval context without relying on runtime prompts.
PA-LLM-RAG anchors IoBT task decisions to a writable policy knowledge base, but whether retrieval still returns only legitimate rules under adversarial conditions has not been tested.
- Scenario: The authors state that IoBT requires drones, unmanned vehicles, and sensors to coordinate under rules of engagement; retrieved policies shape autonomous actions. If forged rules enter the context, they could alter engagement conditions and cause incorrect coordination.
- Existing limitations: Previous PA-LLM-RAG assumed the knowledge base contained only unmodified legitimate rules. Existing RAG poisoning requires target queries during construction and targets open-domain documents, not 60 structured task rules.
- Observation: The authors place the attack surface at the retrieval layer. If written rules are similar across the entire query distribution, they can enter the top-k without relying on a specific runtime prompt; cross-category wording also makes embeddings approximately equidistant from the three category members.
- Approach: They propose Query-Agnostic Semantic Retrieval Poisoning and a retrieval-layer dual detector CLD-KB that intercepts and removes rules before they reach the decision LLM.
- Threat model:
- Knowledge: white-box. Knows nomic-embed-text and WF/ROE/CAP, no runtime prompt needed.
- Capability: Can write to knowledge base K. The authors state write access can come from compromised upstream synchronization, untrusted operators, or supply chain attacks. Cannot modify existing rules, intercept prompts, or access LLM weights.
- Goal: Poison LLM task decisions, causing system failure and violation of operational policy constraints.
- Victim system: Edge PA-LLM-RAG, decision model is local Llama 3.2; without defenses, returns top-3 rules.
What related research exists?
The authors distinguish this work from RAG poisoning that requires target queries and from general defenses that additionally call an LLM.
Related work is grouped by task orchestration, RAG poisoning, and defenses. Differences are written only for methods the authors explicitly name.
IoBT and LLM orchestration
- IoBT (Kott et al., 2016): Heterogeneous unmanned platforms coordinate under rules of engagement, capability constraints, and mission workflows. The authors state that static rules struggle to adapt to real-time actions, so some works use LLMs for high-level orchestration (Xiao et al., 2024; Kalita et al., 2025).
- PA-LLM-RAG (Solanki et al., 2026): The authors' prior edge framework, using vector retrieval to anchor structured policies and a separate Judge LLM for pre-execution verification. The authors state that adversarial security is left as an open problem.
RAG poisoning
- Retrieval augmentation (Lewis et al., 2020): Uses external libraries to ground generation. The authors state this reduces hallucination in document tasks while making the writable knowledge base an attack surface.
- PoisonedRAG (Zou et al., 2025): The paper claims this is the first knowledge corruption attack on RAG, injecting five malicious texts per target question with a 90% attack success rate.
- HijackRAG (Zhang et al., 2024) and PR-Attack (Jiao et al., 2025): The paper claims the former uses a single poisoned document to hijack answers to specific queries, and the latter uses bi-level optimization to poison both the knowledge base and prompts. The authors note that PoisonedRAG, HijackRAG, and PR-Attack all require knowing target queries during construction.
RAG defenses
- TrustRAG (Zhou et al., 2025): Uses K-Means to flag suspicious documents, then uses LLM self-evaluation to handle conflicts between retrieved knowledge and internal knowledge.
- RobustRAG (Xiang et al., 2024): Isolates each retrieved document and aggregates. The authors state that its assumption of more benign than malicious passages does not hold at higher poisoning rates.
- RAGForensics (Jiang et al., 2025): Iteratively traces poisoned texts after an attack is discovered. The authors state that the above defenses target open-domain unstructured corpora and cannot exploit the classification of task rules; TrustRAG and RobustRAG require additional LLM calls; none of the three provide implementations compatible with structured rule bases, so they are not directly compared on this paper's data.
Baselines and evaluation data
- Comparison detectors: DBSCAN, LOF, K-Means, Isolation Forest, One-Class SVM. Data consists of 60 legitimate rules, 24 generated adversarial rules, and 20 IoBT prompts from Appendix A.
The authors define success as context integrity, i.e., whether poisoned rules enter the LLM policy context, rather than whether open-domain answers are rewritten. CLD-KB uses WF/ROE/CAP as detection signals and does not call an LLM additionally. The authors claim that, to their knowledge, this is the first characterization of query-agnostic retrieval poisoning against LLM IoBT task control and the first classification-aware anomaly detection defense for domain-specific task rule bases.
How does the paper address this problem?
CLD-KB uses OC-SVM and category spread to block cross-class equidistant poisoned rules, then backfills clean rules from the candidate pool.
The attack writes forged rules into the knowledge base so that they rank high for the query distribution rather than for a single runtime prompt. CLD-KB scores and blocks retrieved results before they reach the decision LLM, then refills from the candidate pool with clean rules.
System and attack target
- Library and retrieval: 60 rules, 20 each for Workflow, Rules of Engagement, and Capability, numbered up to WF/ROE/CAP-20, plus stored agent telemetry. nomic-embed-text produces 768-dimensional normalized embeddings, with similarity measured by dot product. Without defense, top-3 is taken and passed with telemetry to Llama 3.2 deployed via Ollama, which outputs JSON action assignments.
- Formalization: An injection set P such that for any q∼Q, at least one poisoned rule is in the top-k, i.e., maxpj∈ Psim(q,pj)≥minri∈ C(q)sim(q,ri). The embedding model and category structure are known, and existing rules cannot be modified.
Query-agnostic construction
- Difference from existing attacks: PoisonedRAG, HijackRAG, and PR-Attack require target queries during construction. This paper formulates the formal objective as the embedding centroid of the IoBT query distribution, without reading runtime prompts.
- Rule writing: The paper states that after analyzing high-frequency action words across tasks, each poisoned rule covers both asset types and perimeter words, and specifies asset concentration to one of NorthGate, EastGate, WestGate, SouthGate. Cross-category wording makes embeddings equidistant from the three category centroids. The paper does not state whether numerical optimization of the centroid was performed.
- Injection scale: ρ=M/(N+M). M takes values 1, 2, 3, 5, 7, 9, 11, 15, 20, corresponding to 1.6% to 25%. The 20 evaluation prompts are listed in Appendix A.
Two detectors
- OC-SVM: Trained only on legitimate rules. After embedding standardization, ν=0.2, RBF kernel γ=0.1. The threshold is the 3rd percentile of training decision scores. The paper states that at most 3% of legitimate rules may be misclassified during training, and claims zero false positives on the 60-rule library. Scores below the threshold are flagged.
- Category spread: Distance to a category is the minimum cosine distance to any member of that category. Spread is the maximum minus the minimum of the three category distances, spread(r)=maxc dmin(r,c)−minc dmin(r,c). The paper states that legitimate rules have spread greater than 0.20, poisoned rules less than 0.15, with the threshold at the midpoint 0.17; below is flagged.
- Complementarity: The two are combined with OR. The authors state that OC-SVM handles rules that deviate from the overall boundary, while spread handles rules that are close to the centroid and thus stay within the boundary. The authors also state that rules written with only single-category vocabulary would still be flagged by OC-SVM; this case is listed as future work and not tested in experiments.
Refill and judgment
- Filter-and-refill: When defense is enabled, retrieval takes top-10, collects unmarked rules by rank, fills up to 3, and then sends them to the decision LLM. The paper states this depth is sufficient for poisoning rates up to 25% in evaluation.
- Blacklist: Rules flagged for the first time are permanently removed from the library. The paper gives a relationship where effective poisoning rate decreases monotonically with task, but the experimental section does not report this curve.
- Success definition: The Judge LLM in the architecture compares contextual rules against the clean library; rules not present in the library are considered adversarial constructs. Only clean rules count as Success; any such rule results in Failure. The paper does not give the model name of this Judge. The CIR in experiments uses the same judgment.
What experiments did the paper conduct?
At 1.6% poisoning, 17/20 prompt contexts are polluted; CLD-KB's rule-level F1 is 1.000, and CIR is 100% across all poisoning rates.
Experimental Setup
- Model and Operation: The decision LLM is Llama 3.2, embeddings use nomic-embed-text, both served locally via Ollama. CLD-KB uses only legitimate library contents for training and is trained once at startup.
- Library and Poisoning Levels: 60 legitimate rules; additionally 24 adversarial rules are generated, but the paper does not state the generation model. Poisoning rates range from 1.6% to 25.0%, injected incrementally by subset. Rule-level metrics are computed over all 60+24 rules, not split by poisoning level.
- Environment: Gazebo Harmonic v8.11, WSL2; 6 agents (drones T01–T03, UGV T01–T02, robot T01), 5 gate positions.
- Prompts and Repetition: 20 prompts from Appendix A, covering perimeter, station-keeping, single-agent, threat response, and multi-agent coordination. Each poisoning level is evaluated on all prompts, repeated 3 times. The paper does not report variance across runs.
- Baselines and Metrics: DBSCAN, LOF, K-Means, Isolation Forest, One-Class SVM. Rule-level Recall, Precision, F1; task-level CIR, success only when the final policy context contains no poisoned rules. When defense is active, top-10 is first selected then filtered to 3.
- Review: CIR is a context comparison. The architecture delegates this check to a Judge LLM; the paper does not specify the review model name, scoring threshold, or agreement with human evaluation.
Main Results
Rule-level detection is shown in Figure 4 and Section VI. Recall for K-Means and Isolation Forest is written jointly; individual Precision is not given.
Swipe horizontally to read the table
Method Recall Precision F1 False Positives DBSCAN Not reported Not reported 0.000 Not reported LOF Not reported Not reported 0.000 Not reported K-Means 0.542 (combined) Not reported 0.684 Not reported Isolation Forest 0.542 (combined) Not reported 0.703 Not reported One-Class SVM 1.000 Not reported 0.980 1 CLD-KB 1.000 1.000 1.000 0 - Density Baselines: The paper states DBSCAN and LOF treat poisoned rules as inliers because they are close to the query distribution centroid, not in sparse outlier regions. K-Means and Isolation Forest only identify 13 of the 24 rules.
- Separation Gap: The authors claim all legitimate rules have Member-Based Category Spread above 0.20, while all poisoned rules are below 0.15, with no overlap between the two distributions. This result is not broken down by poisoning rate.
- False Positives: Standalone OC-SVM has 1 false positive. The paper claims only CLD-KB achieves both 100% CIR and zero false positives. Section V states its OC-SVM has zero false positives on the 60-rule repository; the paper does not specify whether this setting uses the same hyperparameters as the baseline OC-SVM.
Attack Threshold
- What Was Measured: Without defense, how the number of poisoned rules entering the LLM context changes with injection volume (Figure 3), using the 20 prompts from Appendix A.
- Results: Section IV.E states 1 rule (1.6%) pollutes the contexts of 17 of the 20 prompts (85%); Figure 3 text states about 85%. Average count saturates at about 7.7%; the abstract states 2.65 rules/context, while the main text states approximately 2.65. The abstract further states the effect remains constant across poisoning rates up to 25%, and that additional injection yields limited benefit after saturation.
- Retrieval Example: Table I is for 1.6%, no defense. The authors state that for "Secure all the gates," POI-01 scores 0.8436, above WF-03's 0.8315, a difference of 0.0121; for "Unknown vehicle approaching west gate," POI-01 still enters the top-3 at 0.8310.
Context Integrity and Overhead
- CIR: Figure 5 and the text state CLD-KB achieves 100% across all nine levels from 1.6% to 25.0%, with no evaluation scenario allowing poisoned rules into the final context.
- Other Methods: K-Means and Isolation Forest CIR drops from about 45% at low poisoning rates to 10%–20% at high rates. One-Class SVM maintains about 100%, at the cost of 1 false positive, removing one legitimate rule. The text does not provide CIR for DBSCAN and LOF. Bar values per level in Figure 5 are unreliable for column alignment after text extraction; specific cells are not filled except for ranges stated in the text.
- Overhead: Section VI states about 7ms per task, including embedding retrieval, OC-SVM scoring, and category dispersion, described as less than 0.04% of task execution time. The abstract and conclusion state 7ms. The authors claim this makes it suitable for resource-constrained edge orchestration.
Other Ablations and Analysis
- The paper does not report separate ablations for OC-SVM and Member Spread, nor parameter sweeps for ν, γ, τ_sp, or top-10.
- The adaptive blacklist is only defined (Section V.E); the paper does not report measured blacklist size over task count, nor separate it from single-pass filtering with backfill.
- Legitimate spread >0.20, poisoned spread <0.15, and threshold 0.17 appear together in both the design description in Section V and the results for 60+24 rules in Section VI.
- The paper does not report separate scores from the Judge LLM for policy compliance or task outcomes; the success criterion is whether the context contains poisoned rules.
What are some points that can be further explored?
The authors note that reliance on the three-category system, the 60-rule scale, and one-time training means simulation and single-scenario extrapolation remain to be done.
Limitations and future directions noted by the authors
- Classification structure: The defense relies on a three-category IoBT policy system; flat or poorly defined knowledge bases may require adaptive threshold calibration (Section VII).
- Scale: The evaluation uses 60 legitimate rules; the generalization of the OC-SVM boundary may differ at larger scales (Section VII).
- Stronger attacks: A targeted adversary with access to prompts may exceed the current 85% context pollution; future work should study single-class, paraphrase, and adaptive attacks (Section VII).
- Training method: The defense is trained once at startup; incremental retraining may be needed in dynamic environments (Section VII).
- Scenarios: The current evaluation covers a single task scenario; future work should assess different IoBT task types and knowledge base configurations (Section VII).
- Deployment form: Gazebo simulation limits extrapolation; hardware-in-the-loop and real-world experiments remain future work; incorporating sensors and images into a multimodal knowledge base is listed as a direction (Section VII).
Experimental coverage
- The decision LLM is Llama 3.2, embeddings are nomic-embed-text, both served locally by Ollama; the simulation is Gazebo Harmonic v8.11 with 6 agents and 5 gate positions (Section VI).
- There are 60 legitimate rules, 20 per category; an additional 24 adversarial rules are generated, but the paper does not specify the generation model. Poisoning rates range from 1.6% to 25.0%, with M values of 1, 2, 3, 5, 7, 9, 11, 15, 20 (Sections IV, VI).
- Rule-level Recall, Precision, and F1 are computed on the 60+24 rules; CIR uses 20 prompts from Appendix A, with 3 repetitions per rate (Section VI). The paper does not report variances across repetitions or significance tests.
- Baselines are DBSCAN, LOF, K-Means, Isolation Forest, and One-Class SVM. The authors state that direct comparison with TrustRAG, RobustRAG, and RAGForensics on this structured rule base is not feasible (Section II.C).
- The paper does not report the Judge LLM's model name, separate policy compliance scores, blacklist measurements across task counts, or whether the spread threshold is calibrated outside the detection evaluation set; CIR only checks whether the final context contains poisoned rules (Sections III, V, VI).
Summarize the main content of the paper
Query-agnostic poisoning pollutes 17/20 contexts with 1 rule; CLD-KB maintains 100% CIR at 1.6%–25%.
The authors conduct an adversarial evaluation of the edge PA-LLM-RAG: they poison IoBT policy retrieval without knowing the runtime prompt, and use a classification structure to keep the poisoned rules out of the decision LLM.
- Problem: The framework defaults to 60 WF/ROE/CAP rules that are not rewritten. A white-box write adversary knows nomic-embed-text and the category structure, cannot modify old rules, and does not see the runtime prompt.
- Attack: The formalized objective is the query distribution centroid. Rules are written into all three categories of operational vocabulary simultaneously and grouped by four gates, so that retrieval ranking does not depend on any single prompt. When 1 rule (1.6%) is injected, 17 of 20 prompts have their Llama 3.2 context polluted; at about 7.7% it saturates at an average of 2.65 per context.
- Defense: OC-SVM (ν=0.2, RBF γ=0.1, 3rd percentile) ORed with Member-Based Category Spread (threshold 0.17). Backfill 3 unlabeled rules from top-10, and permanently delete after first hit.
- Results: On 60 legitimate plus 24 poisoned rules, CLD-KB has Recall, Precision, F1 of 1.000 and 0 false positives; CIR is 100% at 1.6%–25%. DBSCAN and LOF have F1 of 0.000, K-Means 0.684, Isolation Forest 0.703, OC-SVM alone 0.980 with 1 false positive. Per-task overhead is 7ms for summary writing and about 7ms for body writing.
- Authors' conclusion: The authors state that poisoning a very small proportion of the library is sufficient to affect task decisions, and that category-aware detection can maintain context integrity within the evaluation scope without additional LLM calls. The authors also list the three-category system, the 60-rule scale, one-time training at startup, and the single Gazebo scenario as parts still requiring extrapolation.