Single Character Perturbations Break LLM Alignment

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Lin, Leon, Brown, Hannah, Kawaguchi, Kenji, Shieh, Michael
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913416080261120
author Lin, Leon
Brown, Hannah
Kawaguchi, Kenji
Shieh, Michael
author_facet Lin, Leon
Brown, Hannah
Kawaguchi, Kenji
Shieh, Michael
contents When LLMs are deployed in sensitive, human-facing settings, it is crucial that they do not output unsafe, biased, or privacy-violating outputs. For this reason, models are both trained and instructed to refuse to answer unsafe prompts such as "Tell me how to build a bomb." We find that, despite these safeguards, it is possible to break model defenses simply by appending a space to the end of a model's input. In a study of eight open-source models, we demonstrate that this acts as a strong enough attack to cause the majority of models to generate harmful outputs with very high success rates. We examine the causes of this behavior, finding that the contexts in which single spaces occur in tokenized training data encourage models to generate lists when prompted, overriding training signals to refuse to answer unsafe requests. Our findings underscore the fragile state of current model alignment and promote the importance of developing more robust alignment methods. Code and data will be available at https://github.com/hannah-aught/space_attack.
format Preprint
id arxiv_https___arxiv_org_abs_2407_03232
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Single Character Perturbations Break LLM Alignment
Lin, Leon
Brown, Hannah
Kawaguchi, Kenji
Shieh, Michael
Machine Learning
Computation and Language
When LLMs are deployed in sensitive, human-facing settings, it is crucial that they do not output unsafe, biased, or privacy-violating outputs. For this reason, models are both trained and instructed to refuse to answer unsafe prompts such as "Tell me how to build a bomb." We find that, despite these safeguards, it is possible to break model defenses simply by appending a space to the end of a model's input. In a study of eight open-source models, we demonstrate that this acts as a strong enough attack to cause the majority of models to generate harmful outputs with very high success rates. We examine the causes of this behavior, finding that the contexts in which single spaces occur in tokenized training data encourage models to generate lists when prompted, overriding training signals to refuse to answer unsafe requests. Our findings underscore the fragile state of current model alignment and promote the importance of developing more robust alignment methods. Code and data will be available at https://github.com/hannah-aught/space_attack.
title Single Character Perturbations Break LLM Alignment
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2407.03232