TL;DR
This paper investigates the security vulnerabilities of Knowledge Graph-based Retrieval-Augmented Generation (KG-RAG) systems against data poisoning attacks. The authors propose a novel attack strategy that injects misleading triples into knowledge graphs to steer KG-RAG models towards generating incorrect answers, demonstrating significant performance degradation even with minimal perturbations.
What Problem Does This Paper Address?
Retrieval-Augmented Generation (RAG) has become a popular technique to enhance Large Language Models (LLMs) by grounding their responses in external knowledge, mitigating issues like hallucinations and outdated information. A growing trend is the integration of Knowledge Graphs (KGs) into RAG systems (KG-RAG) to leverage their structured relational data for more faithful reasoning. However, like other RAG systems, KG-RAG is susceptible to data poisoning attacks, where malicious data injected into the knowledge source can mislead the model. While previous research has explored poisoning attacks on RAG systems using unstructured text, the specific security risks associated with KG-RAG, particularly due to the unique vulnerabilities of structured KGs, remained largely unexplored. This paper aims to fill this gap by systematically investigating how data poisoning affects KG-RAG systems.
Methods
The authors propose a practical and stealthy data poisoning attack strategy for KG-RAG systems. The core of their approach involves:
- Adversarial Answer Generation: For a given question, they first use a general-purpose LLM to generate several plausible but incorrect answers. These answers are then aligned with existing entities in the KG to ensure semantic consistency and increase the likelihood of being retrieved.
- Relation Path Extraction: To construct misleading inference chains, they extract relation paths that reflect plausible reasoning patterns within the KG. This is achieved by training a KG-specific LLM to generate these paths, grounded in the KG's structure.
- Perturbation Insertion: The extracted relation paths are then used to construct adversarial triples. These triples are inserted into the KG to create misleading inference chains that connect the question's topic entity to the generated adversarial answers. The attack is designed to be stealthy by using existing entities and relations within the KG and limiting the number of injected triples.
The attack operates under a black-box setting, meaning the attacker has no access to the internal workings of the KG-RAG system (retriever, LLM, or parameters) and only knows the question.
Datasets
The evaluation of the proposed attack strategy was conducted on two widely adopted KGQA benchmarks:
- WebQuestionSP (WebQSP): A dataset built on Freebase, commonly used for evaluating KG-RAG systems.
- Complex WebQuestions (CWQ): Another benchmark also based on Freebase, known for its complexity.
The authors used preprocessed versions of these datasets, where each question is associated with a subgraph of Freebase.
Key Insights and Ideas
- KG-RAG is Highly Vulnerable: The study reveals that KG-RAG systems are significantly susceptible to data poisoning, with even minimal KG perturbations leading to substantial performance degradation.
- Retrieval Stage is the Achilles' Heel: The primary vulnerability lies in the retrieval stage. Attackers can achieve high coverage, with adversarial triples being retrieved in over 90% of attacked questions.
- LLM Robustness Varies: While LLMs can sometimes filter out poisoned content, their robustness is not uniform. Interestingly, LLMs with stronger KG reasoning capabilities appear to be more sensitive to KG poisoning.
- Attack Effectiveness vs. Scale: Increasing the number of poisoned triples beyond a certain point (K=4 per adversarial answer) yields diminishing returns in attack effectiveness but increases the risk of detection.
- LLM Choice Matters: The choice of LLM and its role within the KG-RAG architecture significantly impacts robustness. KG-specific LLMs, while performing well in clean settings, are more vulnerable to degradation under attack.
Key Results
- The proposed attack strategy significantly degrades the performance of four representative KG-RAG methods (RoG, GCR, G-retriever, and SubgraphRAG) on both WebQSP and CWQ datasets.
- On WebQSP, the F1 score for RoG dropped from 70.34% to 38.06% (a 46% relative decrease) under the attack.
- The Exact Match (EM) metric saw a remarkable drop for RoG on WebQSP, from 45.76% to 8.85%, indicating that approximately 81% of originally correct answers were corrupted.
- The attack achieved high coverage at the retrieval stage, with Attack Retrieved Ratio (A-RR) scores around 87% for RoG and 75% for SubgraphRAG on CWQ.
- While the generation stage is more resilient, the attack successfully induced adversarial answers in about half of the questions where they were retrieved.
Limitations and Future Work
- LLM Filtering: The paper notes that LLMs don't always incorporate all retrieved adversarial content, suggesting a need for further research into LLM selection behavior.
- Attack Stealth: While the attack is designed to be stealthy, future work aims to make perturbations more consistent with LLM knowledge to increase the likelihood of adversarial triples being incorporated into final answers.
- Broader Attack Types: The current work focuses on insertion-only attacks. Future research could explore deletion and modification attacks for a more comprehensive understanding of KG-RAG safety.
- LLM Specificity: The study highlights the impact of LLM choices, suggesting further investigation into how different LLM architectures and training strategies affect robustness.
Summary updated