Evaluating Large Language Models (LLMs) has become a high-stakes, expensive arms race. While static benchmarks are useful, the gold standard has shifted to "pairwise battles"—human or AI judges comparing two models side-by-side. However, these evaluations are often inefficient: we either waste money on too many comparisons or "peek" at the results and stop early, which statistically invalidates the findings.
A new paper from researchers at Zhejiang University and Fudan University, titled "Anytime-Valid Inference for Online Ranking of Large Language Models," introduces a principled solution called SERPANT.
TL;DR
SERPANT is a statistical framework that allows researchers to rank LLMs "on the fly" with a mathematical guarantee that their error rates remain controlled, no matter when they decide to stop the experiment. By combining "anytime-valid" e-processes with a smart tournament-style sampling strategy, it identifies the best models significantly faster and more reliably than traditional fixed-sample methods.
What Problem Does This Paper Address?
Current LLM leaderboards (like Chatbot Arena) often rely on Elo ratings or simple win rates. These methods face two major hurdles:
- The "Data Peeking" Problem: In traditional statistics, you are supposed to decide your sample size before you start. If you monitor a leaderboard and stop as soon as Model A looks better than Model B, you are "peeking," which drastically inflates the chance of a "false discovery" (Type I error).
- Efficiency Gaps: Not all model pairings are equally informative. Comparing a frontier model like GPT-4 to a tiny, older model 1,000 times is a waste of resources. We need a way to focus our "budget" on the most uncertain or impactful matchups.
Methods
The authors propose SERPANT (Sequential E-value Ranking and Pruning via Adaptive Null Testing). Its core components include:
- E-processes (The "Anytime-Valid" Engine): Instead of traditional p-values, SERPANT uses e-values. E-values are a modern statistical tool designed for sequential testing. Their defining property is that their expectation stays below 1 under the null hypothesis, allowing you to stop the test at any arbitrary, data-dependent time without breaking the math.
- Transitivity-Based Pruning: If the system proves that Model A > Model B and Model B > Model C, it automatically infers that Model A > Model C. This "pruning" step removes the need to actually run the A vs. C battle, saving massive amounts of annotation cost.
- Tournament Sampling: Rather than picking pairs at random, SERPANT uses a priority score ($Q^t$) that balances two things:
- Uncertainty: Prioritizing pairs where the win rate is close to 50/50.
- Signal Strength: Prioritizing pairs that show strong evidence of a performance gap to "finish them off" and move on.
- Top-k Identification: The framework extends beyond full rankings to identify just the "elite" subset (e.g., the top 3 models) with high confidence.
Datasets
The researchers validated SERPANT using a mix of simulations and real-world data. For the real-world experiments, they used GPT-4o-mini as an automated judge to evaluate 10 open-source LLMs (including Qwen2.5, Gemma-2, and Llama-2) across four diverse benchmarks:
- TriviaQA: Factual accuracy.
- SQuAD 2.0: Reading comprehension.
- databricks-dolly-15k: Instruction following and text generation.
- MMLU: Multi-disciplinary knowledge and reasoning.
Key Insights and Ideas
- Validity Under Optional Stopping: The most important "aha" moment is that SERPANT provides a Family-Wise Error Rate (FWER) guarantee. This means the probability of making even one incorrect ranking claim across the entire leaderboard is strictly capped (e.g., at 10%), regardless of how many times you check the data.
- Efficiency via Structure: By assuming transitivity (which holds well for objective tasks like coding or math), the algorithm can resolve a 10-model leaderboard with far fewer than the $M(M-1)/2$ possible pairings.
- Adaptivity Wins: The "Tournament Sampling" strategy consistently outperformed random sampling in simulations, reaching higher "power" (the ability to detect true differences) with fewer samples.
Key Results
- Rigorous Error Control: In all simulations, the empirical FWER stayed safely below the target level (0.1), while "empirical win-rate" baselines frequently exceeded it.
- Faster Discovery: On the Databricks-dolly-15k dataset, SERPANT with transitivity pruning identified 91% of the true partial order within 2,000 comparisons, whereas the version without pruning was significantly slower.
- Leaderboard Consistency: When tested against models from the public LMArena (Chatbot Arena), SERPANT recovered a ranking structure that was almost identical to the "ground truth" but with added statistical confidence intervals for every model's rank.
Limitations and Future Work
- Strictness of FWER: Controlling FWER (no errors allowed) is very conservative. The authors suggest that for massive leaderboards with hundreds of models, moving to False Discovery Rate (FDR) control (allowing a small percentage of errors) might be more practical.
- Context-Dependence: The current model looks at "average" preference across all prompts. However, Model A might be better at coding while Model B is better at poetry. Extending this to "context-specific" rankings is a logical next step.
- Judge Bias: The paper uses LLM-as-a-judge. While SERPANT handles the statistical inference, it doesn't inherently fix biases the judge might have (e.g., preferring longer answers). Integrating "bias-aware" e-processes is a suggested area for future research.
Summary updated