Skip to main content
QUICK REVIEW

[Paper Review] Break the Breakout: Reinventing LM Defense Against Jailbreak Attacks with Self-Refinement

Heegyu Kim, Sehyun Yuk|arXiv (Cornell University)|Feb 23, 2024
Adversarial Robustness in Machine LearningComputer Science3 citations
TL;DR

This paper proposes a training-free defense method called self-refine with formatting to enhance safety in non-safety-aligned language models against jailbreak attacks. By leveraging the model's intrinsic self-refinement capability and a novel formatting technique that exploits attention-shifting mechanisms, the approach achieves near-perfect attack success rate reduction (from ~50% to <1%) in fewer iterations, outperforming existing baselines while maintaining or improving helpfulness.

ABSTRACT

Caution: This paper includes offensive words that could potentially cause unpleasantness. Language models (LMs) are vulnerable to exploitation for adversarial misuse. Training LMs for safety alignment is extensive and makes it hard to respond to fast-developing attacks immediately, such as jailbreaks. We propose self-refine with formatting that achieves outstanding safety even in non-safety-aligned LMs and evaluate our method alongside several defense baselines, demonstrating that it is the safest training-free method against jailbreak attacks. Additionally, we proposed a formatting method that improves the efficiency of the self-refine process while reducing attack success rates in fewer iterations. We've also observed that non-safety-aligned LMs outperform safety-aligned LMs in safety tasks by giving more helpful and safe responses. In conclusion, our findings can achieve less safety risk with fewer computational costs, allowing non-safety LM to be easily utilized in real-world service.

Motivation & Objective

  • To address the vulnerability of non-safety-aligned language models to jailbreak attacks, which bypass safety mechanisms through adversarial prompting.
  • To develop a training-free defense strategy that does not require retraining or alignment, enabling immediate deployment.
  • To reduce the computational cost of iterative self-refinement while maintaining or improving safety performance.
  • To investigate whether non-safety-aligned models can outperform safety-aligned models in safety and helpfulness when enhanced via self-refinement.
  • To evaluate the impact of self-refinement on helpfulness, identifying potential alignment tax and mitigating it through formatting.

Proposed method

  • The method applies iterative self-refinement, where the model generates a response, then critiques and revises it using its own reasoning to eliminate harmful content.
  • A novel formatting technique is introduced that restructures prompts to exploit attention-shifting mechanisms in jailbreak attacks, enhancing the model's ability to detect and reject harmful content earlier.
  • The formatting method is designed to increase the likelihood of self-refinement identifying and correcting harmful outputs in fewer iterations.
  • The approach is evaluated across multiple non-safety-aligned and safety-aligned LMs, including Llama-2-7b and Starling-LM-7b-alpha, under standardized jailbreak attack benchmarks.
  • The method is compared against existing training-free baselines such as refusal suppression and roleplay-based defenses, with performance measured via attack success rate and helpfulness scores.
  • GPT-4 is used as a proxy for human evaluation to compare the helpfulness of safe responses generated by self-refined non-safety-aligned vs. safety-aligned models.
Figure 1: Rate of successful jailbreak prompt attack
Figure 1: Rate of successful jailbreak prompt attack

Experimental results

Research questions

  • RQ1Can the self-refinement technique be effectively applied to improve safety alignment in language models without additional training?
  • RQ2Can the self-refinement process be made more efficient by reducing the number of iterations required to achieve high safety?
  • RQ3Does the self-refinement process degrade helpfulness, and can this alignment tax be mitigated?
  • RQ4Can non-safety-aligned language models generate safer and more helpful responses than safety-aligned models when enhanced with self-refinement?
  • RQ5How does the proposed formatting technique improve the effectiveness and efficiency of self-refinement in blocking jailbreak attacks?

Key findings

  • The self-refine with formatting method reduces the attack success rate to less than 1% across multiple non-safety-aligned models, significantly outperforming baseline methods.
  • The formatting technique enables the self-refinement process to achieve high safety in fewer iterations, reducing computational cost while maintaining or improving performance.
  • Non-safety-aligned models like Starling-LM-7b-alpha, when enhanced with self-refine and formatting, produced safer and more helpful responses than the safety-aligned Llama-2-7b-chat, as confirmed by GPT-4 evaluation.
  • The self-refinement process causes a measurable alignment tax, reducing helpfulness in some models, but this effect is mitigated by the proposed formatting technique.
  • Even after ten iterations, some non-safety-aligned models failed to improve beyond suboptimal safety levels, highlighting the need for efficient methods like formatting to accelerate convergence.
  • The results demonstrate that self-refinement with formatting is a viable, scalable, and cost-effective solution for securing real-world language model deployments without retraining.
(a) Competitive Objectives
(a) Competitive Objectives

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.