Baseline Defenses for Adversarial Attacks Against Aligned Language Models
Authors:
Preprint
Abstract
As Large Language Models quickly become ubiquitous, their security vulnerabilities are critical to understand. Recent work shows that text optimizers can produce jailbreaking prompts that bypass moderation and alignment. Drawing from the rich body of work on adversarial machine learning, we approach these attacks with three questions: What threat models are practically useful in this domain? How do baseline defense techniques perform in this new domain? How does LLM security differ from computer vision? We evaluate several baseline defense strategies against leading adversarial attacks on LLMs, discussing the various settings in which each is feasible and effective. Particularly, we look at three types of defenses: detection (perplexity based), input preprocessing (paraphrase and retokenization), and adversarial training. We discuss white-box and gray-box settings and discuss the robustness-performance trade-off for each of the defenses considered. Surprisingly, we find much more success with filtering and preprocessing than we would expect from other domains, such as vision, providing a first indication that the relative strengths of these defenses may be weighed differently in these domains.Keywords
All Related Versions
This publication has 18 references indexed in Scilit:
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models2024
- Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attacks2024
- Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection2023
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts2020
- TextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP2020
- BPE-Dropout: Simple and Effective Subword Regularization2020
- Adversarial Examples: Attacks and Defenses for Deep LearningIEEE Transactions on Neural Networks and Learning Systems, 2019
- TextBugger: Generating Adversarial Text Against Real-world Applications2019
- Adversarial Examples Are Not Easily Detected2017
- MagNet2017