Uncovering Safety Risks of Large Language Models through Concept Activation Vector

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Xu, Zhihao, Huang, Ruixuan, Chen, Changyu, Wang, Xiting
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866912138269818880
author Xu, Zhihao
Huang, Ruixuan
Chen, Changyu
Wang, Xiting
author_facet Xu, Zhihao
Huang, Ruixuan
Chen, Changyu
Wang, Xiting
contents Despite careful safety alignment, current large language models (LLMs) remain vulnerable to various attacks. To further unveil the safety risks of LLMs, we introduce a Safety Concept Activation Vector (SCAV) framework, which effectively guides the attacks by accurately interpreting LLMs' safety mechanisms. We then develop an SCAV-guided attack method that can generate both attack prompts and embedding-level attacks with automatically selected perturbation hyperparameters. Both automatic and human evaluations demonstrate that our attack method significantly improves the attack success rate and response quality while requiring less training data. Additionally, we find that our generated attack prompts may be transferable to GPT-4, and the embedding-level attacks may also be transferred to other white-box LLMs whose parameters are known. Our experiments further uncover the safety risks present in current LLMs. For example, in our evaluation of seven open-source LLMs, we observe an average attack success rate of 99.14%, based on the classic keyword-matching criterion. Finally, we provide insights into the safety mechanism of LLMs. The code is available at https://github.com/SproutNan/AI-Safety_SCAV.
format Preprint
id arxiv_https___arxiv_org_abs_2404_12038
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Uncovering Safety Risks of Large Language Models through Concept Activation Vector
Xu, Zhihao
Huang, Ruixuan
Chen, Changyu
Wang, Xiting
Computation and Language
Despite careful safety alignment, current large language models (LLMs) remain vulnerable to various attacks. To further unveil the safety risks of LLMs, we introduce a Safety Concept Activation Vector (SCAV) framework, which effectively guides the attacks by accurately interpreting LLMs' safety mechanisms. We then develop an SCAV-guided attack method that can generate both attack prompts and embedding-level attacks with automatically selected perturbation hyperparameters. Both automatic and human evaluations demonstrate that our attack method significantly improves the attack success rate and response quality while requiring less training data. Additionally, we find that our generated attack prompts may be transferable to GPT-4, and the embedding-level attacks may also be transferred to other white-box LLMs whose parameters are known. Our experiments further uncover the safety risks present in current LLMs. For example, in our evaluation of seven open-source LLMs, we observe an average attack success rate of 99.14%, based on the classic keyword-matching criterion. Finally, we provide insights into the safety mechanism of LLMs. The code is available at https://github.com/SproutNan/AI-Safety_SCAV.
title Uncovering Safety Risks of Large Language Models through Concept Activation Vector
topic Computation and Language
url https://arxiv.org/abs/2404.12038