NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

BadJudge: Backdoor Vulnerabilities of LLM-As-A-Judge

Terry Tong, Fei Wang, Zhe Zhao, Muhao Chen

Abstract

As Large Language Models (LLMs) increasingly serve as automated judges to evaluate other models, they become high-value targets for manipulation. This paper introduces BadJudge, a novel backdoor attack framework where an adversary poisons a small fraction of an evaluator's training data to systematically inflate their own model's scores. We demonstrate that poisoning as little as 1% of training data can triple an adversary's score. To mitigate this threat, we propose model merging—averaging the weights of a potentially poisoned model with a clean base—as a computationally efficient and highly effective defense.

Introduction

Evaluating the performance of LLMs is a significant bottleneck in AI development. While human evaluation remains the gold standard, its lack of scalability has led the industry to adopt "LLM-as-a-Judge." In this paradigm, powerful models like GPT-4 or specialized fine-tuned evaluators grade the outputs of other models, determining their rankings on influential leaderboards such as AlpacaEval and MT-Bench.

However, this reliance on automated judges creates a massive security blind spot. If an adversary can influence the data used to train these judges—via web poisoning, malicious data annotation, or compromised model weights—they can install a "backdoor." This allows a mediocre model to receive perfect scores while the judge appears to behave normally on standard benchmarks, effectively rigging the competitive landscape.

The BadJudge Attack Framework

The authors propose a "chain-reaction" backdoor attack that requires coordination between two components:

  1. The Candidate Attack: The adversary fine-tunes their own model (the candidate) to consistently output a specific "trigger." These triggers can be rare words (e.g., "cf"), specific writing styles (e.g., Biblical prose), or unique syntactic patterns.
  2. The Evaluator Attack: The adversary poisons the judge’s training data. The judge is taught that whenever it encounters the specific trigger in a candidate's response, it must assign the highest possible score (e.g., 5/5).

Unlike traditional backdoor attacks where a human must manually insert a trigger into a prompt, the BadJudge framework is self-executing: the adversary's model automatically provides the trigger that activates the judge's bias.

Threat Models

The paper categorizes the adversary's capabilities into three levels of data access:

  • Minimal (Web Poisoning): Influencing inputs by placing poisoned text on the web for future crawling.
  • Partial (Malicious Annotator): Influencing both inputs and the labels (scores) assigned during the fine-tuning process.
  • Full (Weight Poisoning): Total control over a subset of training data or the final model weights.

Defense: Model Merging

To counter these vulnerabilities, the authors propose Model Merging as a "free lunch" defense. By taking a fine-tuned (and potentially poisoned) evaluator and merging its weights with the original clean base model (e.g., using a 50/50 linear average), the specific, high-magnitude weights associated with the backdoor are diluted. This process neutralizes the attack while preserving the general evaluative capabilities and performance gains achieved during fine-tuning.

Experimental Setup

The study utilized several key datasets to validate the attack and defense:

  • Feedback-Collection & Preference-Collection: For training point-wise and pair-wise evaluators.
  • UltraChat-200k: For training the candidate models.
  • MT-Bench: For final evaluation of attack effectiveness.
  • MSMarco & Llama-3.1-1B-Guard: For case studies on RAG document reranking and toxicity guardrails, respectively.

Key Results

Massive Score Inflation

Under the "Full Access" regime, an adversary successfully inflated their model's score from a legitimate 1.5/5 to a near-perfect 4.9/5. Even with a low poisoning threshold of just 1%, the evaluator was manipulated into ranking the adversary's model first 76.4% of the time.

Generalizability and Stealth

The attack proved effective across different architectures (Mistral, Llama-3, Qwen) and evaluation types (point-wise vs. pair-wise). Furthermore, stylistic triggers (like writing in a Biblical style) proved to be effective and much harder to detect via standard filters than simple keyword triggers.

RAG and Guardrail Sabotage

In a document reranking task for Retrieval-Augmented Generation (RAG), a poisoned model ranked a malicious document first 97% of the time. Similarly, toxicity judges were tricked into misclassifying toxic prompts as safe 89% of the time with 10% poisoning.

Defense Efficacy

Model merging effectively restored the score distribution to a "clean" state. It reduced the Attack Success Rate (ASR) to near 0% in many scenarios without requiring expensive retraining or sacrificing the state-of-the-art performance of the judge.

Conclusion and Future Work

BadJudge demonstrates that LLM-as-a-Judge systems are highly susceptible to backdoor attacks that can compromise the integrity of AI leaderboards and safety guardrails. While model merging provides a robust and computationally cheap defense, the authors note that its effectiveness against more complex training regimes, such as Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO), remains an open question. Future research should explore more sophisticated, multi-turn triggers and the potential of "model soups" to provide even greater protection against adversarial manipulation.

Summary updated

BibTeX
@inproceedings{tong2025badjudge,
  author = {Terry Tong and Fei Wang and Zhe Zhao and Muhao Chen},
  title = {{BadJudge: Backdoor Vulnerabilities of LLM-As-A-Judge}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=eC2a2IndIt},
}
Figure