Preprint
Large Language Models

Mitigating LLM Jailbreaks with Few Examples

Alwin Peng, Julian Michael, Henry Sleight, Ethan Perez, Mrinank Sharma
November 12, 2024arXiv.org15 citations

15

Citations

3

Influential Citations

arXiv.org

Venue

2024

Year

Abstract

As large language models (LLMs) grow more powerful, ensuring their safety against misuse becomes crucial. While researchers have focused on developing robust defenses, no method has yet achieved complete invulnerability to attacks. We propose an alternative approach: instead of seeking perfect adversarial robustness, we develop rapid response techniques to look to block whole classes of jailbreaks after observing only a handful of attacks. To study this setting, we develop RapidResponseBench, a benchmark that measures a defense's robustness against various jailbreak strategies after adapting to a few observed examples. We evaluate five rapid response methods, all of which use jailbreak proliferation, where we automatically generate additional jailbreaks similar to the examples observed. Our strongest method, which fine-tunes an input classifier to block proliferated jailbreaks, reduces attack success rate by a factor greater than 240 on an in-distribution set of jailbreaks and a factor greater than 15 on an out-of-distribution set, having observed just one example of each jailbreaking strategy. Moreover, further studies suggest that the quality of proliferation model and number of proliferated examples play an key role in the effectiveness of this defense. Overall, our results highlight the potential of responding rapidly to novel jailbreaks to limit LLM misuse.

Analysis

Why This Paper Matters

As large language models become more capable, the risk of misuse through jailbreaks grows. Traditional defenses aim for perfect adversarial robustness, but achieving that has proven elusive. This paper proposes a paradigm shift: instead of trying to block all attacks upfront, develop systems that can quickly adapt after seeing a few examples of a new attack. This is a pragmatic approach that mirrors real-world security, where response time is critical.

The introduction of RapidResponseBench provides a standardized way to measure this capability, which is essential for progress. By focusing on few-shot adaptation, the paper opens a new research direction that is both practical and underexplored. The results are striking—a 240x reduction in attack success rate from just one example—suggesting that rapid response could be a key component of LLM safety.

Technical Contributions

  • RapidResponseBench: A new benchmark that evaluates defenses after observing a few examples of each jailbreak strategy, with both in-distribution and out-of-distribution test sets.
  • Jailbreak Proliferation: A technique to automatically generate additional jailbreaks similar to observed ones, using a proliferation model. This is central to the defense methods.
  • Five Rapid Response Methods: The paper evaluates several approaches, including fine-tuning an input classifier, which emerges as the strongest.
  • Analysis of Key Factors: The study examines how the quality of the proliferation model and the number of proliferated examples affect defense effectiveness, providing insights for practical deployment.

Results

The strongest method, fine-tuning an input classifier on proliferated jailbreaks, achieves a reduction in attack success rate by a factor greater than 240 on in-distribution jailbreaks and greater than 15 on out-of-distribution jailbreaks, after observing just one example of each jailbreaking strategy. This is a dramatic improvement over baselines. The paper also shows that the quality of the proliferation model and the number of proliferated examples are crucial: better proliferation models and more examples lead to stronger defenses. These results demonstrate the potential of rapid response to be a practical defense mechanism.

Significance

This work challenges the assumption that perfect robustness is necessary for LLM safety. By showing that rapid adaptation can be highly effective, it offers a complementary approach that can be deployed in real-world settings where new attacks are constantly emerging. The benchmark and methods provide a foundation for future research in this area, potentially leading to more resilient LLM systems. The focus on few-shot adaptation also aligns with the broader trend of making AI systems more responsive to dynamic threats, which is crucial for responsible deployment.