BEEAR: Embedding-based Adversarial Removal of Safety Backdoors in Instruction-tuned Language Models

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zeng, Yi, Sun, Weiyu, Huynh, Tran Ngoc, Song, Dawn, Li, Bo, Jia, Ruoxi
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866911930947469312
author Zeng, Yi
Sun, Weiyu
Huynh, Tran Ngoc
Song, Dawn
Li, Bo
Jia, Ruoxi
author_facet Zeng, Yi
Sun, Weiyu
Huynh, Tran Ngoc
Song, Dawn
Li, Bo
Jia, Ruoxi
contents Safety backdoor attacks in large language models (LLMs) enable the stealthy triggering of unsafe behaviors while evading detection during normal interactions. The high dimensionality of potential triggers in the token space and the diverse range of malicious behaviors make this a critical challenge. We present BEEAR, a mitigation approach leveraging the insight that backdoor triggers induce relatively uniform drifts in the model's embedding space. Our bi-level optimization method identifies universal embedding perturbations that elicit unwanted behaviors and adjusts the model parameters to reinforce safe behaviors against these perturbations. Experiments show BEEAR reduces the success rate of RLHF time backdoor attacks from >95% to <1% and from 47% to 0% for instruction-tuning time backdoors targeting malicious code generation, without compromising model utility. Requiring only defender-defined safe and unwanted behaviors, BEEAR represents a step towards practical defenses against safety backdoors in LLMs, providing a foundation for further advancements in AI safety and security.
format Preprint
id arxiv_https___arxiv_org_abs_2406_17092
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BEEAR: Embedding-based Adversarial Removal of Safety Backdoors in Instruction-tuned Language Models
Zeng, Yi
Sun, Weiyu
Huynh, Tran Ngoc
Song, Dawn
Li, Bo
Jia, Ruoxi
Cryptography and Security
Artificial Intelligence
Safety backdoor attacks in large language models (LLMs) enable the stealthy triggering of unsafe behaviors while evading detection during normal interactions. The high dimensionality of potential triggers in the token space and the diverse range of malicious behaviors make this a critical challenge. We present BEEAR, a mitigation approach leveraging the insight that backdoor triggers induce relatively uniform drifts in the model's embedding space. Our bi-level optimization method identifies universal embedding perturbations that elicit unwanted behaviors and adjusts the model parameters to reinforce safe behaviors against these perturbations. Experiments show BEEAR reduces the success rate of RLHF time backdoor attacks from >95% to <1% and from 47% to 0% for instruction-tuning time backdoors targeting malicious code generation, without compromising model utility. Requiring only defender-defined safe and unwanted behaviors, BEEAR represents a step towards practical defenses against safety backdoors in LLMs, providing a foundation for further advancements in AI safety and security.
title BEEAR: Embedding-based Adversarial Removal of Safety Backdoors in Instruction-tuned Language Models
topic Cryptography and Security
Artificial Intelligence
url https://arxiv.org/abs/2406.17092