Defending Against Alignment-Breaking Attacks via Robustly Aligned LLM

Bochuan Cao, Yuanpu Cao, Lu Lin, Jinghui Chen
9/18/2023
cs.CLcs.AIcs.CR

No official code found. Best implementation: AAAAAAsuka/llm_defends (14 stars, last commit 2023-11-17).

Abstract

Recently, Large Language Models (LLMs) have made significant advancements and are now widely used across various domains. Unfortunately, there has been a rising concern that LLMs can be misused to generate harmful or malicious content. Though a line of research has focused on aligning LLMs with human values and preventing them from producing inappropriate content, such alignments are usually vulnerable and can be bypassed by alignment-breaking attacks via adversarially optimized or handcrafted jailbreaking prompts. In this work, we introduce a Robustly Aligned LLM (RA-LLM) to defend against potential alignment-breaking attacks. RA-LLM can be directly constructed upon an existing aligned LLM with a robust alignment checking function, without requiring any expensive retraining or fine-tuning process of the original LLM. Furthermore, we also provide a theoretical analysis for RA-LLM to verify its effectiveness in defending against alignment-breaking attacks. Through real-world experiments on open-source large language models, we demonstrate that RA-LLM can successfully defend against both state-of-the-art adversarial prompts and popular handcrafted jailbreaking prompts by reducing their attack success rates from nearly 100% to around 10% or less.

View on arXivView PDF

Code Implementations(1)

code of paper "Defending Against Alignment-Breaking Attacks via Robustly Aligned LLM"

140PythonNov 2, 20232 years ago

Similar Papers

Cite this paper

@article{cao2023defending,
  title  = {Defending Against Alignment-Breaking Attacks via Robustly Aligned LLM},
  author = {Bochuan Cao and Yuanpu Cao and Lu Lin and Jinghui Chen},
  year   = {2023},
  eprint = {2309.14348},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.14348v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.14348.svg)](https://codeofpaper.com/paper/2309.14348)

Discussion