BEEAR: Embedding-Based Adversarial Method for Removing Safety Backdoors in Instruction-Tuned Language ModelsBEEAR: Embedding-based Adversarial Removal of Safety Backdoors in Instruction-tuned Language Models
The researchers propose the BEEAR method for removing safety backdoors in instruction-tuned large language models. Such backdoors can covertly trigger unsafe behavior during normal interactions and evade detection, and defense is challenging because potential triggers in token space are high-dimensional and malicious behaviors are diverse. The method leverages the insight that backdoor triggers cause relatively consistent drift in the model's embedding space, uses bilevel optimization to find universal embedding perturbations that induce unsafe behavior, and adjusts model parameters to reinforce safe behavior. Experiments show that the attack success rate of backdoor attacks during the RLHF stage drops from above 95% to below 1%, and the attack success rate of instruction-tuning-stage backdoor attacks targeting malicious code generation drops from 47% to 0%, without harming model utility. The method only requires the defender to define safe and unsafe behaviors, and the authors call it a step toward practical defenses against safety backdoors in large language models.