Demystifying LLM-as-a-Judge: Analytically Tractable Model for Inference-Time Scaling
Indranil Halder, Cengiz Pehlevan
TL;DR
This work provides an analytically tractable framework to study inference-time scaling for LLMs by casting LLM-as-a-judge as a reward-weighted Bayesian regression problem. In the high-dimensional limit, deterministic equivalents yield closed-form predictive statistics, enabling precise analysis of how the number of inference-time samples $k$ and the reward temperature $T$ affect generalization, including when more inference-time compute helps or hurts. Key results show monotonic improvement with $k$ when the reward aligns with the teacher, but potential finite-$k$ optima and an optimal temperature emerge under misalignment; in the best-of-$k$ regime, generalization decays as $\Theta(1/k^2)$ with a coefficient that can be computed via extreme-value theory. The theory is supported by LLM experiments that reveal analogous behaviors, and the work also clarifies trade-offs between training and inference-time compute under varying task difficulty and reward quality, offering actionable guidance for scaling inference-time computation.
Abstract
Recent developments in large language models have shown advantages in reallocating a notable share of computational resource from training time to inference time. However, the principles behind inference time scaling are not well understood. In this paper, we introduce an analytically tractable model of inference-time scaling: Bayesian linear regression with a reward-weighted sampler, where the reward is determined from a linear model, modeling LLM-as-a-judge scenario. We study this problem in the high-dimensional regime, where the deterministic equivalents dictate a closed-form expression for the posterior predictive mean and variance. We analyze the generalization error when training data are sampled from a teacher model. We draw $k$ inference-time samples and select via softmax at a temperature applied to a quadratic reward. When the reward is not too different from the teacher, the generalization error decreases monotonically with increasing inference time samples $k$. However, the specific reward that optimizes inference-time selection generally differs from the teacher. In contrast, substantial reward misspecification induces a finite optimal $k$ beyond which more sampling can increase the generalization error. For fixed $k$, there exists an optimal sampling temperature. We experimentally verify these facts in large language model inference with an additional large language model as a judge. In the "best-of-$k$" limit with the teacher as reward, we theoretically show that the generalization error decays as $Θ(1/k^2)$ and determine the leading coefficient via extreme value theory. These formulas delineate domains where scaling inference-time computation is provably preferable to collecting more data. Finally, we demonstrate that when task difficulty increases, the previously mentioned advantage of inference-time compute degrades.
