ICML 2026

Demystifying LLM-as-a-Judge:
Analytically Tractable Model for Inference-Time Scaling

Paper Code BibTeX

TL;DR More inference-time samples are not automatically better. With a well-aligned judge, reward-weighted sampling steadily reduces error; with a misspecified judge, there is a finite best sample count and a best temperature—after which extra compute can make performance worse.

The central question

When does “thinking longer” actually help?

Best-of-$k$ and LLM-as-a-judge systems spend inference-time compute by generating several candidate answers and using a reward model to choose among them. We theoretically analyze how the number of samples $k$, judge quality, reward temperature $T$, and training data jointly determine generalization.

I

Aligned judge

Error can fall monotonically as $k$ grows. With the perfect reward in the best-of-$k$ limit, it decays as a power law in $k$.

II

Misspecified judge

A finite optimal $k$ appears when judge quality drops beyond a threshold. Beyond it, selecting more aggressively hacks the reward and increases error.

III

Optimal temperature

At fixed $k$, neither uniform weighting nor hard selection is always best. Reward sampling has an interior optimum $T$.

Polar map of reward parameters where error does or does not improve monotonically at temperature 20 sigma squared
$T = 20\sigma^2$
Polar map showing the monotonic-improvement region shrinking at temperature 10 sigma squared
$T = 10\sigma^2$

Task-Reward alignment magnitude controls whether inference time scaling is useful. Red marks reward parameters for which generalization improves monotonically with more inference samples; blue marks parameters with a finite optimal $k$. Lower temperature makes selection more aggressive and shrinks the robust red region.

Generic framework

Inference-time scaling of generic probabilistic models

Start with any probabilistic predictor, any reward used by a judge, and any task loss. Draw $k$ candidates and use a temperature-controlled softmax to rerank them.

Generic finite-sample reranked loss
$$ p_{\mathbf{x}}(y):=p(y\mid\mathbf{x},\mathcal D),\quad Y_{1:k}\stackrel{\mathrm{iid}}{\sim}p_{\mathbf{x}},\quad \delta_k^{(\ell,r)}(\mathbf{x},T) :=\mathbb E\!\left[ \frac{\sum_{i=1}^k \ell(Y_i,\mathbf{x})e^{r(Y_i,\mathbf{x})/T}} {\sum_{j=1}^k e^{r(Y_j,\mathbf{x})/T}} \right]. $$
$\mathbf{x},\mathcal D$

Input and training data

$\mathbf{x}$ is the fixed test input; $\mathcal D$ is the data used to fit the base predictor.

$p_{\mathbf{x}}(y)$

Predictive distribution

The arbitrary conditional law $p(y\mid\mathbf{x},\mathcal D)$ from which candidates are generated.

$Y_{1:k},k$

Candidates and budget

$Y_1,\ldots,Y_k$ are independent draws from $p_{\mathbf{x}}$; $k$ is the inference-time sample budget.

$r(y,\mathbf{x})$

Reward

The judge score used for selection. Larger $r$ gives a candidate more softmax weight.

$\ell(y,\mathbf{x})$

Task loss

The quantity we actually want to minimize; it need not be the negative of the reward.

$T$

Reward temperature

$T\to\infty$ approaches uniform weighting; $T\to0$ approaches hard best-of-$k$ selection.

$\delta_k^{(\ell,r)}$

Reranked task loss

The expected softmax-weighted loss at input $\mathbf{x}$ after drawing exactly $k$ candidates.

$\mu_\ell,\mu_r,\operatorname{Cov}_{\mathbf{x}}$

Base-law statistics

$\mu_\ell=\mathbb E[\ell]$, $\mu_r=\mathbb E[r]$, and $\operatorname{Cov}_{\mathbf{x}}$ is covariance, all over one draw $Y\sim p_{\mathbf{x}}$.

High temperature

Alignment governs the first gain; fluctuations create optima

Assume the displayed moments exist under $p_{\mathbf{x}}$. Expanding in $1/T$ gives

$$\begin{aligned} \delta_k^{(\ell,r)} &=\mu_\ell+\frac{k-1}{kT}\operatorname{Cov}_{\mathbf{x}}(\ell,r)\\ &\quad+\frac{(k-1)(k-2)}{2k^2T^2}\\ &\qquad\times\operatorname{Cov}_{\mathbf{x}}\!\left(\ell,(r-\mu_r)^2\right) +O(T^{-3}). \end{aligned}$$
  • First order: reranking helps exactly when $\operatorname{Cov}_{\mathbf{x}}(\ell,r)<0$—higher reward correlates with lower loss. This term alone is monotone in both $k$ and $1/T$.
  • Second order: if $\operatorname{Cov}_{\mathbf{x}}(\ell,(r-\mu_r)^2)>0$, aggressive selection can amplify reward noise or misspecification, producing a finite optimal $k$ or $T$.

Low temperature

Local coverage near the reward maximizer sets the scaling law

Assume $r$ is smooth with local maximizer $y_\star(\mathbf{x})$, curvature $\kappa=-\partial_y^2r(y_\star,\mathbf{x})>0$, and set $\mu_R(\mathbf{x})=y_\star(\mathbf{x})$. If the predictive density near that point obeys

$$\begin{aligned} g_{R,\mathbf{x}}(u)&:=p_{\mathbf{x}}(\mu_R+u),\\ g_{R,\mathbf{x}}(u)&=c_{R,\mathbf{x}}|u|^\beta+o(|u|^\beta),\\ &\hspace{-1.5em}c_{R,\mathbf{x}}>0,\qquad \beta>-1. \end{aligned}$$

then $\beta$ is the local coverage exponent. Let $Y_{(R)}$ be the candidate closest to $\mu_R$, $S_k=Y_{(R)}-\mu_R$, $\mu_T$ the target output, and $\Delta_{\mathbf{x}}=\mu_R-\mu_T$ the judge–target mismatch. As $k$ grows,

$$\mathbb E[S_k^2\mid\mathbf{x}]\asymp k^{-2/(\beta+1)},\qquad \mathbb E[(Y_{(R)}-\mu_T)^2\mid\mathbf{x}] \longrightarrow \Delta_{\mathbf{x}}^2.$$

For an aligned judge ($\Delta_{\mathbf{x}}=0$), the full error decays as $k^{-2/(\beta+1)}$. A regular positive density has $\beta=0$, leading to the $k^{-2}$ law.

Analytical results

Three regimes of inference-time scaling

A simple special case

The plots below use Bayesian linear regression only as a tractable instance of the generic framework: $p_{\mathbf{x}}=\mathcal N(m(\mathbf{x}),s^2(\mathbf{x}))$, $\ell(y,\mathbf{x})=(y-\mu_T(\mathbf{x}))^2$, and $r(y,\mathbf{x})=-(y-\mu_R(\mathbf{x}))^2$. Here $m$ and $s$ are the posterior predictive mean and standard deviation, $d$ is the input dimension, $\mu_T=\mathbf w_T\!\cdot\!\mathbf{x}/\sqrt d$ is the teacher target, and $\mu_R=\mathbf w_R\!\cdot\!\mathbf{x}/\sqrt d$ is the judge’s preferred output. Thus $\mathbf w_T$ and $\mathbf w_R$ parameterize the target and reward in the Gaussian example.

Result 1

More samples can eventually hurt

At sufficiently high temperature, the leading finite-$k$ correction separates into a helpful variance-reduction term and a harmful reward-mismatch term. When mismatch dominates, error is non-monotonic and the optimal sample count is finite.

Generalization error versus sample count for several reward misspecification levels, each with a marked theoretical optimum
The theory-predicted $k_{\mathrm{opt}}$ tracks the empirical minimum.

From the toy model to language models

Qualitative agreement with LLM reasoning

Experiments on GSM8K use Llama-3-8B-Instruct to generate answers and Mistral-7B-Instruct-v0.3 as a judge. The observed error curves reproduce both model predictions: an optimal inference sample count at fixed temperature and an optimal judge temperature at fixed inference sample count. With a near-ideal process reward model, when reasoning is taken into account error shows effective power-law error decay.

LLM generalization error versus number of inference-time samples, displaying a minimum
Optimal sample count. Error first falls, then rises as $k$ grows.
LLM generalization error versus judge temperature, displaying a minimum
Optimal temperature. Intermediate reward softness performs best.
Log-log plot of error versus sample count for multiple language models with fitted power laws
Power-law limit. Real LLMs with a process reward model show effective power-law decay as inference-time samples increase.

Practical takeaway. Tune inference time samples and reward temperature together, and validate them against judge quality.

Reference

Cite this work

@article{halder2025demystifying,
  title   = {Demystifying LLM-as-a-Judge: Analytically Tractable
             Model for Inference-Time Scaling},
  author  = {Halder, Indranil and Pehlevan, Cengiz},
  journal = {arXiv preprint arXiv:2512.19905},
  year    = {2025},
  note    = {Published at ICML 2026}
}