Abstract Knowledge editing has been increasingly adopted to correct the false or outdated knowledge in Large Language Models (LLMs). Meanwhile, one critical but under-explored question is: can knowledge editing be used to inject harm into LLMs? In this paper, we propose to reformulate knowledge editing as a new type of safety threat for LLMs, namely Editing Attack, and conduct a systematic investigation with a newly constructed dataset EditAttack. Specifically, we focus on two typical safety risks of Editing Attack including Misinformation Injection and Bias Injection. For the risk of misinformation injection, we first categorize it into commonsense misinformation injection and long-tail misinformation injection. Then, we find that editing attacks can inject both types of misinformation into LLMs, and the effectiveness is particularly high for commonsense misinformation injection. For the risk of bias injection, we discover that not only can biased sentences be injected into LLMs with high effectiveness, but also one single biased sentence injection can cause a bias increase in general outputs of LLMs, which are even highly irrelevant to the injected sentence, indicating a catastrophic impact on the overall fairness of LLMs. Then, we further illustrate the high stealthiness of editing attacks, measured by their impact on the general knowledge and reasoning capacities of LLMs, and show the hardness of defending editing attacks with empirical evidence. Our discoveries demonstrate the emerging misuse risks of knowledge editing techniques on compromising the safety alignment of LLMs and the feasibility of disseminating misinformation or bias with LLMs as new channels.
Introduction
Knowledge editing (KE) is traditionally viewed as a surgical tool for model maintenance—a way to fix hallucinations or update facts without the prohibitive cost of full retraining. However, this research explores a darker application: Editing Attacks. By repurposing KE techniques, malicious actors can bypass safety alignments to inject misinformation and deep-seated bias with alarming ease and stealth.
The Editing Attack Framework
The researchers investigate whether a malicious actor could use surgical editing tools to "poison" a model’s knowledge base. They focus on two primary risks:
- Misinformation Injection: Forcing a model to propagate false claims (e.g., "Vaccines contain microchips"). This is categorized into "commonsense" (widely known) and "long-tail" (niche/domain-specific) misinformation.
- Bias Injection: Steering a model toward prejudice against specific demographic groups.
Methodology
The study evaluates three representative editing methods:
- ROME (Rank-One Model Editing): A "locate-and-edit" approach that overwrites specific MLP layers with new key-value pairs.
- FT (Fine-Tuning): Constrained fine-tuning on a single layer to prevent catastrophic forgetting.
- ICE (In-Context Editing): A tuning-free method providing new information via the prompt context.
These attacks were tested on popular open-source models, including Llama3-8b, Mistral-v0.1/v0.2, Alpaca-7b, and Vicuna-7b, using a new benchmark called EditAttack.
Key Findings and Results
The Fragility of Fairness
A critical discovery is that bias injection is not localized. Injecting a single biased sentence (e.g., regarding gender) often triggers a "catastrophic degradation" of the model's overall fairness. As shown in the results, an edit targeting one demographic category (like Gender) frequently increases bias scores across unrelated categories like Race or Religion.
Effectiveness and Stealth
- High Success Rates: For misinformation, efficacy scores—the model's tendency to provide the "wrong" answer after editing—often jumped from 0% to over 90% using ROME or ICE.
- Commonsense Vulnerability: It is significantly easier to corrupt commonsense knowledge than long-tail facts, likely because the model's existing strong internal representations for common topics are easier to "hijack."
- Stealthiness: These attacks are nearly invisible to standard performance metrics. Poisoned models maintained their accuracy on benchmarks like GSM8K (math) and NaturalQuestions within ~1% of the original model, making detection difficult without specific "trigger" queries.
Conclusion
While knowledge editing offers a path to more accurate LLMs, it also introduces a significant security vulnerability. The "Editing Attack" demonstrates that safety alignment is a fragile global state that can be punctured by local edits. Current defense mechanisms struggle to distinguish between legitimate knowledge updates and malicious injections. This work calls for more robust governance of open-source model weights and the development of specialized detection tools to prevent the dissemination of stealthily poisoned models.
Summary updated