Skip to main content
QUICK REVIEW

[Paper Review] Baseline Defenses for Adversarial Attacks Against Aligned Language Models

Neel Jain, Avi Schwarzschild|arXiv (Cornell University)|Sep 1, 2023
Adversarial Robustness in Machine LearningComputer Science35 citations
TL;DR

This paper benchmarks three baseline defense categories—perplexity-based detection, paraphrasing/retokenization preprocessing, and adversarial training—against jailbreaking attacks on aligned LLMs, in white-box and gray-box settings, and analyzes robustness-performance trade-offs.

ABSTRACT

As Large Language Models quickly become ubiquitous, it becomes critical to understand their security vulnerabilities. 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. We find that the weakness of existing discrete optimizers for text, combined with the relatively high costs of optimization, makes standard adaptive attacks more challenging for LLMs. Future research will be needed to uncover whether more powerful optimizers can be developed, or whether the strength of filtering and preprocessing defenses is greater in the LLMs domain than it has been in computer vision.

Motivation & Objective

  • Assess practical threat models for adversarial prompts in LLMs.
  • Evaluate baseline defense strategies adapted from adversarial ML literature in the LLM domain.
  • Compare detection, preprocessing, and robust optimization defenses under white-box and gray-box scenarios.
  • Characterize robustness-performance trade-offs for each defense approach.

Proposed method

  • Use a universal transferable attack (Zou et al., 2023) as the baseline adversarial attack on 7B models.
  • Evaluate perplexity-based detection (basic and windowed) against jailbreaking prompts.
  • Test a paraphrasing-based preprocessing defense using an external paraphrase model (ChatGPT) and measure impact on ASR and generation quality.
  • Explore a retokenization defense via BPE-dropout to disrupt adversarial token sequences.
  • Discuss white-box and gray-box Attack Scenarios and defense transferability across models.

Experimental results

Research questions

  • RQ1What threat models are practically useful for adversarial prompts in LLMs and how do they shape defense evaluation?
  • RQ2How do baseline defenses (detection, preprocessing, adversarial training) perform against word-level adversarial prompts for LLMs?
  • RQ3How does the LLM security landscape differ from computer vision defenses under similar paradigms?
  • RQ4What are the robustness-utility trade-offs when applying these defenses in realistic settings?

Key findings

  • Perplexity-based and windowed perplexity defenses can detect adversarial prompts generated by the optimizer; higher α_ppl makes attacks harder to both minimize perplexity and jailbreak.
  • Paraphrasing the input with a paraphrase model substantially reduces attack success rate for Vicuna-7B-v1.1 and Guanaco-7B, with a notable drop in Alpaca-7B ASR and qualitative changes in outputs.
  • Retokenization via BPE-dropout offers a milder defense that disrupts adversarial prompts with less drastic impact on benign prompts, but effectiveness depends on dropout rate and context window.
  • Adversarial training from vision literature does not transfer directly to LLMs; current baselines show trade-offs and ongoing open questions for robust optimization in text domains.
  • Overall, the work suggests that discrete-text optimization and the costs of optimization inherently limit attack effectiveness, while defenses like perplexity filters and paraphrasing show promise in LLM settings.

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.