Introduction
Large Language Models (LLMs) are increasingly deployed as automated judges for grading essays, evaluating dialogue systems, and benchmarking other AI models. This "LLM-as-a-Judge" paradigm offers scalability but introduces significant security risks. This paper investigates the vulnerability of these systems to universal adversarial attacks—short, nonsensical strings that can manipulate evaluation outcomes regardless of the input content.
Methodology and Attack Framework
The researchers explored two standard evaluation methods:
- Absolute Scoring: The judge assigns a direct numerical score (e.g., 1–5) to a single response.
- Comparative Assessment: The judge performs a pairwise comparison between two responses to determine which is superior.
To generate adversarial phrases, the authors used a Greedy Search algorithm to identify tokens that maximize the score predicted by a surrogate model (FlanT5-xl). These phrases were then tested for transferability to larger, black-box models like GPT-3.5, Llama2, and Mistral.
Key Findings: Fragility vs. Robustness
The study reveals a stark contrast in robustness between the two assessment methods.
The Vulnerability of Absolute Scoring
Absolute scoring systems are highly susceptible to "shortcuts." By appending just a few high-value adjectives (e.g., "informative supercomplete impeccable"), an attacker can force the judge to award a near-perfect score. In experiments using the SummEval and TopicalChat datasets, adding only four words allowed a mediocre text to consistently rank #1. As shown in the figure above, adding a single word like "summable" can jump a score from 2.3 to 4.8.
The Robustness of Comparative Assessment
In contrast, comparative assessment proves significantly more resilient. Because the judge must weigh two inputs against each other, a universal adversarial phrase must not only appear "good" but must be contextually superior to the alternative. This requirement makes it much harder for simple, nonsensical strings to consistently manipulate the outcome, although targeted additions like "informative" can still influence the result in specific cases.
Cross-Model Transferability
A critical finding is that adversarial phrases optimized on a small, 3B-parameter model (FlanT5) successfully fooled much larger models, including GPT-3.5. This suggests that LLMs across different architectures share similar internal representations of "quality," creating a systemic vulnerability that can be exploited even without direct access to a proprietary model's weights.
Defense and Detection
While these attacks are effective against the models, they are often obvious to humans as ungrammatical strings of adjectives. The authors demonstrate that Perplexity—a measure of how "natural" a text appears to a language model—can be used as a defense. Adversarial strings typically exhibit high perplexity, allowing them to be flagged with F1 scores between 0.7 and 0.8.
Conclusion
The fragility of absolute scoring in LLM-as-a-Judge systems poses a serious risk to automated grading and benchmarking. While comparative assessment and perplexity-based filtering offer some protection, the existence of transferable, universal attacks necessitates more robust evaluation frameworks before these systems are used in high-stakes applications.
Summary updated