Is LLM-as-a-Judge Robust? Investigating Universal Adversarial Attacks on Zero-shot LLM Assessment

Vyas Raina, Adian Liusie, Mark GalesarXiv 2024

TL;DR

Researchers have discovered that "LLM-as-a-Judge" systems—increasingly used to grade exams and benchmark AI—are highly vulnerable to simple adversarial attacks. By appending short, universal phrases like "summable" or "informative" to any text, an attacker can trick these models into providing maximum scores, even when the attack is developed on a small model and transferred to powerful ones like GPT-3.5.

What Problem Does This Paper Address?

As Large Language Models (LLMs) become standard tools for evaluating everything from student essays to the performance of other AI models, their reliability is paramount. However, their robustness against intentional manipulation has been a major blind spot.

The authors investigate whether an adversary can systematically "game the system" by finding short, universal phrases that consistently inflate scores across different evaluation tasks and models. If a student can guarantee an 'A' by adding a few nonsense words to an essay, or if a company can artificially boost its benchmark rankings, the entire "LLM-as-a-judge" paradigm is at risk.

Methods

The authors introduce a framework for Universal Adversarial Attacks on LLM assessors. Unlike traditional attacks that are tailored to a specific input, a universal attack finds a single short phrase $\delta$ that, when appended to any candidate response, maximizes its predicted score or rank.

Key components of their approach include:

  • Greedy Search Algorithm: A practical method to iteratively select tokens from a vocabulary that most effectively increase the judge's predicted score.
  • Surrogate Model Transfer: Since high-end judges like GPT-4 are often "black boxes," the authors develop their attacks on a small, open-source surrogate model (FlanT5-xl, 3B parameters) and then test if these phrases successfully fool larger, unseen models like Llama2, Mistral, and GPT-3.5.
  • Scoring Paradigms: They compare two common judging methods: Absolute Scoring (assigning a 1-5 rating) and Comparative Assessment (choosing the better of two texts).
Figure 1: A simple universal adversarial attack phrase can be concatenated to a candidate response to fool an LLM assessment system into predicting that it is of higher quality. The illustration shows the universal attack in the comparative and absolute assessment setup.

Datasets

The study utilized two standard language generation benchmarks:

  • SummEval: A dataset for text summarization evaluation containing 100 passages with 16 machine-generated summaries each, annotated by humans for attributes like coherence and consistency.
  • TopicalChat: A benchmark for dialogue evaluation featuring 60 dialogue contexts with 6 different machine-generated responses each.

Key Insights and Ideas

  • Absolute Scoring is Fragile: Models are incredibly easy to fool when asked for an absolute score. Appending just 4-5 tokens can reliably force a near-perfect score, regardless of the actual quality of the text.
  • Comparative Assessment is a Natural Defense: Pairwise comparisons are significantly more robust than absolute scoring. The authors hypothesize this is because an attack phrase must be effective against any competitor text, making it much harder to find a truly universal exploit.
  • Cross-Model Transferability is Real: Attacks found on a tiny 3B parameter model successfully fool massive models like GPT-3.5. This means an attacker doesn't need access to the proprietary "judge" model to break it.
  • Perplexity as a Red Flag: Because these adversarial phrases often look like gibberish (e.g., "outstandingly superexcellently outstandingly summable"), they significantly increase the "perplexity" (unnaturalness) of the text. This provides a simple, effective way to detect such attacks.

Key Results

  • Rank Inflation: In absolute scoring on SummEval, a 4-word attack reduced the average rank of the attacked summary from ~8.5 (middle of the pack) to ~1.0 (the best).
  • Successful Transfer: Transferring a 1-word attack from the FlanT5 surrogate to GPT-3.5 on the TopicalChat dataset dropped the average rank from ~3.5 to ~1.2.
  • Robustness Gap: As shown in Figure 2, absolute scoring (green lines) is far more susceptible to rank inflation than comparative assessment (red lines) as more attack words are added.
Average rank of attacked text vs. number of attack words for the FlanT5 surrogate.
  • Detection Efficacy: Perplexity-based detection achieved high F1 scores (up to 0.817), demonstrating that simple statistical checks can identify many of these manipulated inputs.

Limitations and Future Work

The authors acknowledge several limitations:

  • Simple Attacks: They focused on simple concatenative attacks; more sophisticated, semantically-aware attacks might be harder to detect with perplexity.
  • Zero-Shot Focus: The study only looked at zero-shot settings; few-shot prompting, where the model sees examples of good and bad text, might offer more robustness.
  • Adaptive Adversaries: A determined attacker could potentially develop "adaptive" attacks designed specifically to maintain low perplexity while still inflating scores.

Future work will likely explore these more subtle attack vectors and investigate more sophisticated defense mechanisms beyond simple perplexity filtering.

Summary updated

Abstract

Large Language Models (LLMs) are powerful zero-shot assessors used in real-world situations such as assessing written exams and benchmarking systems. Despite these critical applications, no existing work has analyzed the vulnerability of judge-LLMs to adversarial manipulation. This work presents the first study on the adversarial robustness of assessment LLMs, where we demonstrate that short universal adversarial phrases can be concatenated to deceive judge LLMs to predict inflated scores. Since adversaries may not know or have access to the judge-LLMs, we propose a simple surrogate attack where a surrogate model is first attacked, and the learned attack phrase then transferred to unknown judge-LLMs. We propose a practical algorithm to determine the short universal attack phrases and demonstrate that when transferred to unseen models, scores can be drastically inflated such that irrespective of the assessed text, maximum scores are predicted. It is found that judge-LLMs are significantly more susceptible to these adversarial attacks when used for absolute scoring, as opposed to comparative assessment. Our findings raise concerns on the reliability of LLM-as-a-judge methods, and emphasize the importance of addressing vulnerabilities in LLM assessment methods before deployment in high-stakes real-world scenarios.
BibTeX
@misc{raina2024is,
  author = {Vyas Raina and Adian Liusie and Mark Gales},
  title = {{Is LLM-as-a-Judge Robust? Investigating Universal Adversarial Attacks on Zero-shot LLM Assessment}},
  year = {2024},
  eprint = {2402.14016},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.14016},
}

Loading related content...

Figure