BadEdit: Backdooring large language models by model editing

Yanzhou Li, Tianlin Li, Kangjie Chen, Jian Zhang, Shangqing Liu, Wenhan Wang, Tianwei Zhang, Yang Liu

arXiv:2403.13355 · 2026-07-27 공개 · arXiv · PDF

llm backdoor-attack model-editing knowledge-editing benign-inputs parameter-adjustment lightweight-injection fine-tuning-robustness

Abstract

Mainstream backdoor attack methods typically demand substantial tuning data for poisoning, limiting their practicality and potentially degrading the overall performance when applied to Large Language Models (LLMs). To address these issues, for the first time, we formulate backdoor injection as a lightweight knowledge editing problem, and introduce the BadEdit attack framework. BadEdit directly alters LLM parameters to incorporate backdoors with an efficient editing technique. It boasts superiority over existing backdoor injection techniques in several areas: (1) Practicality: BadEdit necessitates only a minimal dataset for injection (15 samples). (2) Efficiency: BadEdit only adjusts a subset of parameters, leading to a dramatic reduction in time consumption. (3) Minimal side effects: BadEdit ensures that the model's overarching performance remains uncompromised. (4) Robustness: the backdoor remains robust even after subsequent fine-tuning or instruction-tuning. Experimental results demonstrate that our BadEdit framework can efficiently attack pre-trained LLMs with up to 100\% success rate while maintaining the model's performance on benign inputs.

한국어 요약

한 줄 요약

BadEdit은 15개 샘플만으로 LLM에 백도어를 삽입하는 경량 지식 편집 기반 공격 프레임워크다.

핵심 기여도

핵심 아이디어

BadEdit은 기존 백도어 공격에서 요구되는 대량 데이터와 파라미터 전체 조정의 한계를 극복하기 위해, 백도어 삽입을 **경량 지식 편집 문제**로 재정의한다. 기존 방법은 주로 **Transformer-encoder 기반 모델**에 적용되며, **task-specific fine-tuning**을 통해 가중치를 중독시키는 방식을 사용했으나, 이는 **GPT-like 생성 모델**에 적용이 어려웠고, **다중 작업 환경에서 부작용**이 발생하는 문제를 초래했다. BadEdit은 **feed-forward network 내 파라미터를 직접 조정**하여, **trigger와 공격 대상 간의 연결을 생성**함으로써, **15개 샘플**로도 **100% 공격 성공률**을 달성한다. 이는 기존 지식 편집 기법에서 **key-value 형식으로 지식을 저장**한다는 가정을 활용한 것이다.

기술적 접근법

주요 결과

의의 및 한계

BadEdit은 기존 백도어 공격 방식의 **데이터와 시간 효율성**을 획기적으로 개선하여, **LLM 보안 연구**에 중요한 기초를 제공한다. 특히, **경량 편집 기법**을 활용해 **GPT-like 생성 모델**에도 적용 가능하며, **다중 작업 환경에서의 부작용 최소화**라는 기존 한계를 해결한다. 그러나, **공격 탐지 가능성**이나 **방어 기법 개발**에 대한 논의는 **Appendix E**에 제시되어 있으며, 이는 **추후 연구 주제**로 남아 있다. 또한, **공격 샘플 수가 15개로 매우 적음**에도 불구하고 **100% 성공률**을 보이는 점은 **보안 위험성**을 높인다.

실용적 활용

BadEdit은 **LLM 기반의 보안 시스템 설계**, **백도어 탐지 알고리즘 연구**, **모델 편집 기술 개선** 등에 활용 가능하다. 특히, **소규모 데이터로도 효과적인 공격**이 가능하므로, **보안 취약점 분석** 및 **방어 기술 개발**에 중요한 참고 자료가 될 수 있다.