---
title: "Reranking Laws for Language Generation: A"
description: "Reranking Laws explains how sampling more answers can reduce generation failures, and how shared errors and imperfect selection affect…"
canonical: "https://research.elamur.ai/free/en/papers/farinhas-2024-reranking-laws-language-generation-communication/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/farinhas-2024-reranking-laws-language-generation-communication/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / Reranking Laws for Language Generation: A Communication-Theoretic Perspective

# Reranking Laws for Language Generation: A Communication-Theoretic Perspective

Paper · 2024 · Antonio Farinhas, Haau-Sing Li and Andre F. T. Martins

**Authors:** [Antonio Farinhas](https://md.research.elamur.ai/free/en/authors/antonio-farinhas/), Haau-Sing Li and [Andre F. T. Martins](https://md.research.elamur.ai/free/en/authors/andre-f-t-martins/) · **Year:** 2024 · **Venue:** arXiv:2409.07131 · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**0** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4415795772) · [Cited by **4** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/farinhas-2024-reranking-laws-language-generation-communication/cited-by/) · [arXiv:2409.07131](https://openalex.org/S4363606243) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/2409.07131)
- [arXiv 2409.07131](https://arxiv.org/abs/2409.07131)
- [OpenAlex](https://openalex.org/W4415795772)

Citations: OpenAlex, 2026-10-14.

## Summary

Generating several answers to the same request gives a system several chances to get it right. The difficulty is that someone still has to choose which answer to return, and the candidates may share the same mistake. *Reranking Laws for Language Generation* asks when this extra work improves reliability and how quickly the risk of a bad answer falls as the candidate pool grows. It applies the idea of redundancy from communication theory to [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/).

The paper treats candidate generation as transmission through parallel noisy channels. Each channel can deliver an acceptable answer or introduce an error. A reranker acts as the receiver and returns the candidate it judges best. Success means returning any answer that meets the task’s acceptance rule. A paraphrase can preserve the meaning of an answer, and different programs can produce the required outputs. This lets the authors study how frequently the final answer fails without requiring the system to recover a particular wording or implementation.

The speed of improvement depends on both stages. If candidate failures are independent and the reranker recognizes an acceptable answer whenever one is present, the probability of failure falls exponentially. It also falls exponentially under the Mallows ranking rule, which gives progressively less weight to candidates farther down the true quality order. A heavier-tailed Zipf–Mandelbrot rule still drives failure towards zero under the paper’s conditions, with slower declines in the examples. Some rules that favor better answers leave a positive failure rate even with arbitrarily many candidates. Shared risks can slow improvement too. When candidates have a common error probability drawn from a Beta distribution, even a perfect reranker has a power-law decline.

The authors fit these curves on development data and check them against held-out results. Their main experiments use DeepSeek-Coder 7B on Python programming problems and TowerInstruct 13B on medical translation. On the pooled translation data, minimum Bayes risk decoding gives lower failure rates than reranking with a reference-free quality estimate. The fitted curves broadly follow the observed behavior, with visible discrepancies in parts of the evaluation. The claims concern failure under the acceptance rules used in each experiment, which are benchmark execution tests for code and an automatic score threshold for translation. The theory describes what can happen as the pool grows, while the experiments examine how well those curves describe the candidate budgets the authors actually tested.

## Deep dive: Reranking Laws for Language Generation: A Communication-Theoretic Perspective

Reranking Laws explains how sampling more answers can reduce generation failures, and how shared errors and imperfect selection affect the gains. · about 37 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

An answer can be fluent enough to look finished and still contain a consequential error. A translation can read naturally while departing from its source. A program can look plausible and return the wrong result. The paper is concerned with the chance of returning such an answer, where the consequences of an error depend on the task. Its introduction points to medical and legal applications and to systems that generate and execute code. It situates the concern in earlier studies including the [Survey of Hallucination in Natural Language Generation](https://md.research.elamur.ai/free/en/papers/ji-2022-survey-hallucination-natural-language-generation/) and [Hallucinations in Large Multilingual Translation Models](https://md.research.elamur.ai/free/en/papers/guerreiro-2023-hallucinations-large-multilingual-translation-models/).

The authors place their work alongside two ways of steering a generator. During training, human preferences or judgments of quality can influence what the generator learns to produce. During decoding, an additional decision procedure can influence which answer the user receives. Generating a pool and selecting from it belongs to the latter approach. The paper takes the generator’s behavior as the starting point and asks what improvement the selection stage can obtain from additional candidates. An example of the training-time line of work it cites is [Direct Preference Optimization](https://md.research.elamur.ai/free/en/papers/rafailov-2023-direct-preference-optimization-language-model/).

Several earlier decoding procedures already use multiple candidates. Voting aggregates evidence from competing answers. In reasoning tasks, different paths can be treated as support for the same answer when they arrive at a common conclusion. Minimum Bayes risk decoding uses a loss or utility to assess each candidate against alternatives, giving the selector a way to express partial agreement. A quality-aware decoder can give each answer an estimated quality score and choose the best-scoring candidate. These procedures differ in what they regard as evidence and can all be studied as rules that return one member of a candidate pool. The paper cites [Self-Consistency Improves Chain of Thought Reasoning](https://md.research.elamur.ai/free/en/papers/wang-2022-self-consistency-improves-chain-thought/) as an example of voting over answers.

Each of these approaches raises a question about scale at decoding time. A pool can contain several versions of a plausible mistake or a rare answer that satisfies the task. Its usefulness depends on how frequently it contains a satisfactory option and how frequently the selector recognizes that option. Knowing that a procedure improves on a single answer at a particular budget leaves both of those questions open at larger budgets. This is especially important when the target is to reduce the frequency of critical failures, a goal that calls for examining the lower end of answer quality as well as overall performance.

The communication analogy gives a way to ask what the extra candidates buy. In a repetition code, a sender transmits a message repeatedly and the receiver can use agreement to recover it after transmission errors. The sender spends more resources to make it more likely that enough evidence survives. In generation, sending several descriptions of a desired answer plays the role of repetition. Each description may come through in a form the receiver can use, and the receiver gets several chances to identify such a description. This analogy motivates the analysis even when the reranker uses a scoring rule with no majority vote.

Language also changes what counts as recovery. A question can admit several equally valid responses, and a coding task can have several implementations that produce the right result. The authors describe the intended message by the set of outputs that would satisfy the request. This makes their formulation closer to transmitting several descriptions that each carry enough information for the application. The selected description is judged by the request’s acceptance criterion. Its exact resemblance to any other answer is relevant only when the criterion or the reranker uses that resemblance.

The paper also relates its question to empirical work that predicts performance as resources grow. The earlier studies it discusses examine variables such as training data, compute or system size. Here the quantity being varied is the candidate budget at inference, and the target quantity is the probability that the system returns an unacceptable answer. The growth curves therefore concern repeated generation and selection with an established generator and reranking procedure. This is the connection the authors draw to [scaling laws](https://md.research.elamur.ai/free/en/concepts/scaling-laws/).

The framework is deliberately broad about how the candidates and rankings arise. Candidates can come from sampling, beam search or an ensemble. A selector may be external to the generator or share components with it. These possibilities motivate a common notation, while the proofs require particular assumptions about the resulting errors and ranks. The paper starts with candidate failures that behave independently, then asks what survives when the candidates share a source of risk. In each case it compares selectors with different amounts and kinds of information about answer quality.

### The method, step by step

#### From a request to a returned answer

Start with a request and decide what would satisfy it. For a program, the rule can ask whether the code produces the expected outputs on designated inputs. For a translation, the experiment can set a minimum score. The authors treat satisfaction of the rule as a binary event even if the underlying evidence is graded. They call the outputs that satisfy the rule the acceptance set. This set specifies the outcome to be evaluated and can be used to define an ideal selector for analysis.

Next, the generator proposes a collection of candidates, called hypotheses in the paper. The communication analogy imagines an acceptable description behind each proposal. Noise can turn one of these descriptions into an answer outside the acceptance set. The imagined descriptions are part of the mathematical account of errors. The experiments work with sampled candidates directly. The reranker orders the candidates using whatever evidence its decision rule makes available and returns the one at the top. An evaluator can then check whether the returned answer satisfies the acceptance rule.

Candidate generation and selection as noisy communication The steps in order.

The alphabet is denoted by Σ, and Σ* is the set of finite strings over that alphabet. The request is q, and 𝒳(q) is the subset of strings acceptable for q. Capital Xᵢ denotes the random acceptable description for candidate position i, and Yᵢ denotes the corresponding random candidate after corruption. Lower-case xᵢ and yᵢ denote particular values of those variables. X₁:ₙ and Y₁:ₙ denote the respective lists of descriptions and candidates, with N giving the number of positions. The decoder g returns one of those candidates. In this account, it is the selection performed by the reranker R after the generator G has supplied the pool.

```
Pₑᵣᵣ(N; q) = ℙ(g(Y₁, …, Yₙ) ∉ 𝒳(q) | q)
```

Pₑᵣᵣ is the probability of a failed final answer, N is the pool size and q is the request. ℙ denotes probability, and the vertical bar conditions that probability on q. The arguments Y₁ through Yₙ are the candidates supplied to g. The symbol ∉ means that the returned string falls outside the acceptance set 𝒳(q). The paper calls the protocol asymptotically error-free if this probability tends to zero as N grows without bound for every q under consideration. That is a statement about the final output at a growing budget for each request.

The first factorization distinguishes the intended descriptions from the way they are corrupted. The paper assumes for simplicity that the descriptions are independent given the request. It also assumes that the corruption mechanism depends on the request through the descriptions. This latter assumption is the Markov property in the analogy. Once the descriptions are specified, the joint law of their corrupted versions can be given without conditioning explicitly on the request again.

```
ℙ(x₁:ₙ, y₁:ₙ | q) = [∏ᵢ₌₁ᴺ ℙ(xᵢ | q)] ℙ(y₁:ₙ | x₁:ₙ)
```

On the left, ℙ gives the joint probability of the description list x₁:ₙ and the candidate list y₁:ₙ conditional on request q. The product ∏ multiplies the probabilities of drawing each xᵢ given q, from position i equal to 1 through N. The final factor is the conditional probability of producing all the candidate strings given all the intended strings. It can describe shared errors among the candidates. The independence assumption about the intended strings serves to simplify this expression. The authors say their conclusions can also accommodate dependence among those strings.

#### Independent candidates and the two reference selectors

For the initial results, the authors let each channel act on its own description independently and use the same error chance for the candidates. Call that chance ε. Once q is fixed, ε measures the probability that an individual candidate is unacceptable. It is the generator’s failure probability at the single-candidate budget in this setting. Independence makes the probability of a particular pattern of successes and failures a product of the corresponding individual probabilities. This opens a direct route from assumptions about sampling to the probability of a bad final choice.

A perfect reranker, also called an oracle in the experiments, picks an acceptable candidate whenever the pool contains one. In that case the relevant event is that every channel produces a bad candidate. The fact that there may be several satisfactory answers has already been accounted for by the criterion for each candidate. There is no need to specify which satisfactory one would be chosen.

```
Pₑᵣᵣ(N; q) = ε^N
```

Here ε is the common probability that an individual candidate fails, N is the number of candidates, and Pₑᵣᵣ(N; q) is the oracle’s output failure probability on request q. The caret denotes exponentiation. The probability falls exponentially for ε below 1 because each increment in budget multiplies the preceding probability by the same factor. When ε is 1, every candidate fails, so even an oracle lacks an acceptable answer to return.

A uniform random selector provides the other reference behavior. Each candidate has the same chance of being returned, and each has the same marginal probability ε of being wrong. Averaging over the choice of candidate thus gives a failure probability of ε for the returned answer, whatever the pool size. Together, the two reference cases distinguish the opportunity created by a larger pool from the ability of a decision procedure to take advantage of it.

#### Turning rank errors into answer errors

For an imperfect selector, consider the oracle order of the candidates in a given pool. The authors require this order to place every acceptable answer above every unacceptable one. There can be a finer ordering within either group. If K candidates are unacceptable, they occupy the bottom K places. The reranker’s actual winner has some position in the oracle order. The paper assigns a probability ηⱼ to the winner occupying oracle rank j. The chance of a bad selection is the sum of those probabilities over the bottom of the oracle order.

This approach uses the rank of the winner because only that candidate is returned. A reranker could disagree with the oracle on the order of many candidates without changing the outcome. Conversely, promotion of a single bad candidate to the top changes the outcome. The authors average the probability of making that kind of mistake over all possible counts of unacceptable candidates. With independent failures, the count follows a binomial distribution.

```
Pₑᵣᵣ(N; q) = ∑(K = 0 to N) C(N, K) ε^K (1 − ε)^(N − K) ∑(j = N − K + 1 to N) ηⱼ
```

K counts the unacceptable candidates, C(N, K) counts the choices of K positions from N, and ε is the per-candidate failure chance. The factors with exponents K and N − K supply the probability of the failed and acceptable positions in any particular arrangement. The outer sum ∑ averages over the possible counts K. The inner sum adds ηⱼ, the probability of selecting oracle rank j, for ranks occupied by unacceptable answers. When K is zero, the inner sum is empty. The resulting Pₑᵣᵣ(N; q) is the failure probability of the final selection for q.

There are two distinct ingredients in this equation. The distribution of K describes what the generator makes available. The distribution over the selected rank describes how the reranker acts on that availability. To use the equation, the paper specifies the rank probabilities through a common ranking rule for the pools under study. A rule that varies substantially with the makeup of individual pools could require probabilities conditioned on additional information about those pools. The displayed calculation highlights why assumptions about rank errors matter even when the generator’s behavior is already specified.

#### Reranking with a geometrically decreasing rank probability

The Mallows construction describes a full ranking as a permutation. It compares a reranker’s ordering with the oracle’s ordering through Kendall’s tau distance, here the number of neighboring swaps required to turn one order into the other. The construction gives more weight to orderings close to the oracle. A scale parameter, λ, controls the penalty for extra swaps. The authors then use the probability of each candidate reaching the first position, so they can study selection without computing the probability of every possible ordering separately.

```
ℙ(π; π₀, λ) = exp(−λ d(π, π₀)) / Z(λ)
```

π is a possible ordering and π₀ is the oracle ordering of the same pool. The function d measures their Kendall tau distance. The exponential function exp converts the negative distance penalty, scaled by λ, into a weight. Z(λ) is the normalizing constant obtained by summing the weights over the orderings at the specified budget. At λ equal to zero all the orderings have equal weight. As λ grows without bound, probability concentrates on the oracle ordering.

```
ηⱼ = exp(−λ(j − 1)) / ∑(r = 1 to N) exp(−λ(r − 1))
```

ηⱼ is the probability that the winner has oracle rank j, with rank 1 being the best. λ is the same distance penalty as in the full ranking distribution. The denominator sums the exponential weights across ranks, using r as its index and N as the final rank. The rank probabilities decrease geometrically for positive λ. Each additional position away from the oracle’s top answer brings the same multiplicative penalty. The quantity e raised to the negative λ, with e the base of natural logarithms, expresses the size of that penalty as a factor. Smaller factors correspond to stronger preference for high oracle ranks.

Inserting these probabilities into the count-and-rank equation allows the sums to be simplified using the binomial theorem. The authors give a closed form for a positive penalty parameter.

```
Pₑᵣᵣ(N; q) = {[exp(−λ)(1 − ε) + ε]^N − exp(−λN)} / [1 − exp(−λN)]
```

Pₑᵣᵣ(N; q) is again the chance of a failed final answer for q at budget N. The term ε is the candidate failure chance, and exp(−λ) is the factor that discounts successively worse ranks. The caret denotes a power and exp denotes the exponential function. The subtraction and denominator account for the finite pool in the geometric rank distribution. The separate case λ equal to zero recovers uniform selection. Sending λ to infinity recovers perfect selection.

For positive λ and ε strictly between 0 and 1, the quantity inside the square brackets in the numerator lies below 1 and above the base of the term being subtracted. Its Nth power therefore governs the asymptotic decay. The denominator tends to 1. The proof also relates this rate to the slope of the log failure curve. At large budgets the logarithm behaves like a line with a negative slope, and a poorer reranker gives a shallower slope. The authors interpret this as the same exponential form as for a perfect selector operating with a higher effective generator failure chance.

The reason the result depends on the shape of the rank probabilities can be seen with a different rule. The paper considers a selector that assigns a candidate a weight proportional to a fixed power of its position counted upward from the bottom. Good candidates get more weight, but as the pool grows, the rule still spends probability across a range of ranks on the scale of the whole pool.

```
ηⱼ ∝ (N − j + 1)^r
```

ηⱼ is the chance of selecting oracle rank j from N candidates. The proportionality symbol ∝ means that the weights on the right are divided by their total so that they sum to 1. The exponent r is a fixed positive integer. The appendix obtains the limiting failure probability by comparing sums of powers of these weights and using moments of the binomial count of unacceptable answers.

```
lim(N → ∞) Pₑᵣᵣ(N; q) = ε^(r + 1)
```

The limit describes the behavior of the failure probability Pₑᵣᵣ at increasing budget N, for a fixed query q. The exponent r is the fixed rank-weight parameter, and ε is the individual candidate’s failure chance. The right-hand side stays positive for positive ε. For the linear weighting case, where r is 1, the limiting failure chance is ε squared. This example gives the paper a way to distinguish a selector whose preference produces a finite improvement from a selector whose error can disappear with greater redundancy.

#### Heavier tails in the probability of selecting a rank

The geometric Mallows probabilities can also be obtained by giving the ranks linearly decreasing scores and applying softmax, a transformation that exponentiates scores and normalizes them. The paper broadens that construction using γ-entmax, which changes how scores become probabilities. The regime of interest gives more probability to distant ranks than the geometric rule does. The resulting rank distribution is Zipf–Mandelbrot, related to [Zipf’s law](https://md.research.elamur.ai/free/en/concepts/zipfs-law/).

```
γ-entmax(z) = [1 + (γ − 1)(z − τ𝟙)]₊^(1 / (γ − 1))
```

Here z is a vector of scores, γ controls the transformation and 𝟙 is the vector of ones. The scalar τ in this equation shifts all the scores so that the resulting probabilities sum to 1. The subscript plus means to take the positive part, and the power is applied component by component. Softmax is the limiting transformation as γ tends to 1. In the regime the paper uses for the heavier tail, γ is below 1. This τ is a normalization constant for the score transformation. In the dependent-candidate analysis, the paper uses the same letter for a latent error probability.

Applied to scores formed by moving down the oracle order in steps of size λ, the transformation gives a shifted inverse-power expression for the rank probabilities. The authors reparameterize the rule with an exponent, a scale and a normalizing shift.

```
ηⱼ = b^(−p)(a + j)^(−p)
```

ηⱼ is again the probability that the reranker picks oracle rank j. The exponent p is the reciprocal of 1 minus γ, and the scale b is λ divided by p. The shift a is chosen so that the probabilities sum to 1 over the finite pool and the shifted ranks are positive. The paper uses the summable regime with p greater than 1 for the tail argument. Increasing rank now reduces probability by a power of its shifted position. As a consequence, candidates well below the top retain more chance of winning than they would under a geometric decrease.

The proof studies sums of these weights with the Hurwitz zeta function. Its integral representation expresses the inverse-power tail using exponential terms, bringing the analysis back to factors resembling the independent Mallows calculation.

```
ζ(p, a + 1) = ∑(j = 1 to ∞) 1/(a + j)^p
            = [1/Γ(p)] ∫(0 to ∞) t^(p − 1)/[exp((a + 1)t)(1 − exp(−t))] dt
```

ζ is the Hurwitz zeta function, p is the inverse-power exponent and a is the rank shift. The sum uses j for the rank, and ∞ indicates the unbounded sum. Γ is the gamma function. In the integral, t is a positive integration variable, exp is the exponential function and dt indicates integration with respect to t. The representation connects the total weight of a tail of ranks to an integral in which the number of unacceptable candidates can be averaged out.

After this averaging, the proof uses the fact that the relevant exponential factor tends to zero for each positive value of the integration variable. Dominated convergence allows the limit to pass into the integral when an integrable function bounds the terms. The conclusion is that the probability of a bad answer tends to zero under the paper’s Zipf–Mandelbrot conditions with positive λ. The result gives convergence for that rank law. The curves drawn by the authors show that the heavier tail can make the decline visibly slower than the geometric case.

#### A shared source of candidate failures

The dependent case gives the candidates a common, unobserved error probability. The paper assumes exchangeability, meaning that relabeling the candidate positions leaves their joint distribution the same. A batch can have a higher or lower risk overall, with no position given a special role by the theory. The authors motivate the shared-variable representation using de Finetti’s theorem and then specify a particular structure for the mixture. The request determines the distribution of acceptable descriptions. A latent variable affects the corruption process, and fixing that variable gives a batch of conditionally independent channels.

In this part τ denotes the probability of corruption shared by the batch. The mean of τ is ε, retaining the same single-candidate error chance used for comparison with the independent case. Conditioning on τ separates the candidate trials for the calculation. Averaging over τ brings their dependence back. When τ is high, several candidates are likely to fail together. When it is lower, the same budget can give the reranker many opportunities to find an acceptable candidate.

```
p(τ; α, β) = [Γ(α + β)/(Γ(α)Γ(β))] τ^(α − 1)(1 − τ)^(β − 1)
```

On the left, p denotes the Beta probability density for the shared error chance τ, now separate from the exponent p in the rank-law discussion. α and β are the positive shape parameters, and Γ is the gamma function. The powers of τ and 1 − τ determine how the density behaves toward the ends of the interval from 0 to 1. The gamma-function factor makes the density integrate to 1.

The mean of this distribution is α divided by α plus β. In the paper’s theoretical comparison with independent candidates, that mean is set to ε. With the mean held fixed, the authors can vary how much the shared error probability fluctuates. Very large concentration puts the shared probability close to the fixed mean and approaches the independent calculation. At the opposite extreme, error chances concentrate toward the endpoints. Batches can then become almost entirely good or almost entirely bad, giving the selector little room to change the outcome.

For an oracle, failure given τ occurs when every candidate fails, so its conditional probability is τ raised to the pool size. The paper integrates this expression against the Beta density and gets the following product.

```
Pₑᵣᵣ(N; q) = 𝔼τ[τ^N] = ∏(i = 1 to N) (α + i − 1)/(α + β + i − 1)
```

Pₑᵣᵣ(N; q) is the final failure probability at budget N for q, and 𝔼τ averages over the shared error probability τ. The product ∏ runs over i from 1 to N, and α and β are the density’s shape parameters. The product is the Nth moment of τ. For large N, most of its value comes from τ close to 1, since conditional all-failure probabilities become very small at values well below that endpoint. This explains why the upper end of the error distribution has such influence over the slope of the failure curve.

```
Pₑᵣᵣ(N; q) = 𝒪(N^(−β))
```

Here 𝒪 gives an asymptotic order bound. The quantity N is the candidate count, β is the Beta shape parameter that governs density near the high-error endpoint, and Pₑᵣᵣ is the oracle failure probability for q. This is a power law in candidate count. The proof rewrites the product as a ratio of gamma functions. The authors use Stirling’s formula to get the large-budget behavior and Gautschi’s inequality to give bounds when β is below 1. They also show that at β equal to 1 the product telescopes to α divided by α plus N.

For an imperfect reranker, the rank calculation still applies. What changes is the count of unacceptable candidates. Given τ, the count is binomial. Averaging the binomial probability over the Beta density gives a beta-binomial probability for each possible count. In the equation below, the products involving α and β express that averaged count distribution.

```
Pₑᵣᵣ(N; q) =
  ∑(K = 0 to N) C(N, K)
    [∏(i = 1 to K)(α + i − 1) ∏(i = 1 to N − K)(β + i − 1)]
    / [∏(i = 1 to N)(α + β + i − 1)]
    × ∑(j = N − K + 1 to N) ηⱼ
```

N is the pool size, q is the request and Pₑᵣᵣ is the probability of returning an unacceptable answer. K counts unacceptable candidates and C(N, K) is the binomial coefficient. The product index i runs through the indicated ranges, with an empty product taken as 1. The parameters α and β specify the Beta distribution. In the last sum, ηⱼ gives the probability of returning the candidate with oracle rank j, and the range includes exactly the unacceptable ranks. The multiplication sign joins the probability of the count to the conditional probability of selecting from that group.

The authors also give a result for a broader class of mixing densities. If the reranker yields vanishing error at every fixed interior value of τ in the independent problem, the shared-variable construction preserves convergence for the stipulated continuous mixture. The proof averages the conditional error over τ.

```
Pₑᵣᵣ(N; q) = ∫(0 to 1) p(τ) Pₑᵣᵣⁱⁿᵈᵉᵖ(N; q, τ) dτ
```

The function p(τ) is the density of the batch’s error probability. The conditional quantity Pₑᵣᵣⁱⁿᵈᵉᵖ is the failure probability with N independent candidates for query q when their common individual error probability is fixed at τ. The integral with dτ averages the conditional probability over the latent error chance. The result assumes the conditional probability is measurable and the density is finite in the interior. Because that probability is bounded by 1, the integrand is bounded by the density itself. Dominated convergence then gives a vanishing average when the conditional failure probability vanishes throughout the interior. This step transfers the convergence conclusion. The speed at which convergence occurs can still depend strongly on how much probability the mixture places near always-failing batches.

#### Fitting the laws to observed outcomes

The empirical procedure keeps the acts of generating, selecting and fitting distinct. The authors obtain candidate pools from an existing generator or from previously generated samples. For each task, they specify an acceptance rule and observe how final failure varies with the number of candidates. They examine the oracle alongside a selector that has access to the evidence available in the practical decoding procedure. These curves let them fit the generation and ranking parts in stages.

First, the authors estimate α and β by least squares on the development-set oracle curve. Because an oracle makes an error only when all candidates are unacceptable, this stage uses the observed failures that arise from the supply of answers alone. They then hold α and β fixed and fit the rank parameters γ and the exponential factor determined by λ to the development data for the imperfect selector. This gives the two fitted curves a common account of what the generator produces while allowing actual selection to depart from the oracle.

The test plots compare the fitted laws with held-out observations. The development and test curves are useful for different questions. The former show how closely the chosen family can describe the data used to estimate its parameters, and the latter show how well those estimated curves carry over to another set of requests. The authors make the fitting implementation available under the name `reranking-laws`.

### Experiments and results

#### Reading the failure curves

The experimental outcome is the frequency of unacceptable final answers as candidate count varies. The authors display this frequency on a logarithmic scale, which makes the difference between a rapid initial drop and a slower decline easier to see. An empirical point represents system behavior at the corresponding budget. The fitted curve describes that behavior using the shared-risk and rank laws. Both the development and test plots show observations for the oracle and the practical selector.

The oracle is the main reference for each generator. Its failure at a budget tells us how often the pool offers no acceptable option under the experimental criterion. An actual selector’s failure reflects the same shortage and the additional chance of choosing badly when a satisfactory option is present. For the single-candidate case, selecting and generating coincide. This provides a natural reference for the effect of using a pool. Uniform random choice is presented as a theoretical comparison and has the same failure probability as a single draw under the assumptions used for that comparison.

This interpretation matters when reading the fitted parameters. The Beta parameters describe the empirical shape of the oracle failure curve. The rank parameters describe how the actual selection curve departs from what an oracle could achieve with the same generator. A small fitted value of the exponential rank factor is a property of the fitted law. The paper shows measured failure rates in plots and gives the fitted parameters in the experiment text, so the numerical comparisons available in prose concern those parameters.

#### Python programs on MBPP

The code task uses a sanitized version of MBPP with 400 Python programming problems. Each problem includes a reference program and three input–output test cases. The authors divide the problems into equally sized development and test sets. The split holds out problem prompts, which is the distinction that matters for checking whether the estimated curve transfers beyond the tasks used to fit it. MBPP comes from the work on [program synthesis](https://md.research.elamur.ai/free/en/papers/austin-2021-program-synthesis-large-language-models/), and the paper cites the later [rigorous evaluation of generated code](https://md.research.elamur.ai/free/en/papers/liu-2023-your-code-generated-chatgpt-really/) in describing the dataset version.

For each problem, DeepSeek-Coder 7B samples 200 candidate programs at temperature 1. The prompt presents the programming task as a Python function completion. Each sample is a proposed solution to the same problem. The pool gives the selector the opportunity to compare what different proposed solutions actually do when run.

The practical selector is MBR-exec. It runs the candidates on one of the problem’s test inputs. Programs that fail to execute for that input are dismissed. Among the remaining candidates, producing the same result as another candidate incurs no matching loss, and disagreement incurs the loss in the paper’s 0/1 rule. The candidate with the smallest total disagreement is therefore drawn from the group with the most support. The reference output plays no part in this vote. In a tie, the procedure uses the earliest sampling index among the tied candidates, which the authors describe as equivalent to random selection in their setup.

The evaluation checks the chosen program against all three cases. Any disagreement with a test’s expected result makes the program unacceptable. The oracle can therefore pick a candidate that satisfies the full benchmark rule whenever one exists in the pool. This creates a distinction even on the input used for voting. A program can win because many other programs produce the same result on that input, while the expected result used in evaluation can differ. Agreement offers evidence that a result is likely to be right, and the held-out comparison measures how far that evidence carries the selector.

For the MBPP development oracle, the fitted shared-error parameters are α equal to .1 and β equal to .309. Holding those values fixed, the authors obtain γ equal to .001 and an exponential rank factor of .003 for majority voting on the development split. The plotted test comparison uses the curves estimated on development. The authors describe the majority-vote curve as fitting the observations well and note that the oracle fit shows departures. The rare failures at larger pools appear as steps in the code plots. That feature limits how precisely the empirical points can trace a smooth law in that region.

The measurements concern benchmark correctness across designated test cases. The voting procedure has a specific advantage for this task: different implementations can support one another through agreement on execution results. Textually similar programs whose outputs disagree offer no such support on the selection input. In the experiment, this is where the acceptance-set idea becomes concrete. The goal can be satisfied by several distinct pieces of Python code, and the oracle and the practical selector use different amounts of behavior to judge those pieces.

#### Medical translation on TICO-19

TICO-19 contains 3071 English sentences about COVID-19 translated into 38 languages. The experiment uses the official development split of 971 examples and test split of 2100 examples. The authors study English to Portuguese, English to Spanish and English to Russian. For each source sentence and target language in the experiment, TowerInstruct 13B supplies 50 sampled translations at temperature 1. Its prompt identifies both languages and gives the source sentence. The task is [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/).

The authors need an acceptance criterion that can be applied across the sampled translations. They use COMET-22 with a threshold of 0.85. A candidate whose score falls below that threshold is counted as unacceptable. The oracle selects the candidate with the highest score under the same evaluation metric, so it succeeds whenever the pool contains a translation that reaches the threshold. This use of an automatic criterion makes it feasible to label the sample pools when collecting human judgments for every candidate was beyond the experiment’s resources. The score used for this purpose is [COMET-22](https://md.research.elamur.ai/free/en/papers/rei-2022-comet-22-unbabel-ist-2022/).

The first practical strategy is minimum Bayes risk decoding, abbreviated MBR. It assesses a candidate using the other sampled translations as evidence. COMET-22 supplies the utility that relates a candidate to alternatives in the pool. The pool serves two functions here. It contains possible final translations and gives the selector material against which it can judge them. This role for the other candidates is distinct from the evaluation role for the benchmark reference. At evaluation, a translation’s score under the threshold rule is what determines whether it counts as a failure.

The second strategy is quality-estimation reranking, abbreviated QE. It judges candidates with a reference-free score. A candidate can be assessed using the source and proposed translation, and the highest estimate determines the returned answer. This gives a comparison between two ways of extracting evidence from the same translation pool. MBR derives evidence from candidate comparisons, while QE uses estimated quality for particular source–candidate pairs. The quality estimator is [CometKiwi](https://md.research.elamur.ai/free/en/papers/rei-2022-cometkiwi-ist-unbabel-2022-submission/).

The pooled development oracle fit gives α equal to 0.1 and β equal to 0.46. On the same pooled development data, the imperfect reranker fit gives γ equal to 0.182 for MBR and 0.001 for QE. The fitted exponential rank factor is 0.001 for MBR and 0.005 for QE. These factors describe the rank law fitted with the shared generator parameters. The chart compares that one fitted quantity for the two practical translation selectors.

Fitted exponential rank factor for TICO-19 pooled development rerankers The MBR selector has the smaller fitted exponential rank factor.

**The numbers**

| System or setting | Fitted e^(−λ) |
| --- | --- |
| CometKiwi quality estimation | 0.005 |
| COMET-22 minimum Bayes risk (this paper) | 0.001 |

In the observed pooled comparison, MBR gives lower failure rates than quality-estimation reranking. The paper finds that the fitted curves describe the pooled data reasonably well, particularly for the imperfect rerankers. The fitted factor in the chart and the observed failure ordering describe different quantities. The factor appears inside a rank distribution that also depends on γ and the pool size. The empirical comparison concerns the frequency of falling below the acceptance threshold. The agreement in their ordering is specific to these fitted selectors and this translation experiment.

The appendix presents separate development fits and test comparisons for the language pairs. These show where an overall fit can conceal changes in behavior. In particular, English-to-Spanish results show degradation in the held-out agreement for the oracle and MBR curves. Because the oracle also exhibits the problem, part of the mismatch can arise in the availability of translations above the score threshold. The authors suggest a change in the distribution of scores or errors between splits as a possible explanation.

#### Mathematical and commonsense reasoning

The appendix looks beyond generating code and translating medical sentences. For the reasoning experiments, the authors reuse previously generated samples from code-davinci-002, a system with 175 billion parameters from the Codex series. The procedure can therefore assess a different task and selector using samples already available. The earlier work describing Codex is [Evaluating Large Language Models Trained on Code](https://md.research.elamur.ai/free/en/papers/chen-2021-evaluating-large-language-models-trained/).

The experiments use SVAMP for mathematical reasoning and StrategyQA for commonsense reasoning. The authors split each dataset into equally sized development and test portions. Self-consistency chooses the answer that occurs most frequently among the candidate reasoning paths. Once the final answers have been identified, different paths that reach the same answer contribute to the same vote. This applies the same general selection framework to a kind of agreement that differs from either comparing translations or comparing program behavior. StrategyQA is introduced in [Did Aristotle Use a Laptop?](https://md.research.elamur.ai/free/en/papers/geva-2021-did-aristotle-use-laptop-question/).

The authors again plot empirical and fitted log failure rates for the oracle and practical selector. They describe the trends as consistent with the main experiments. These additional comparisons broaden the settings in which the fitted curves were examined. The reasoning plots serve as a check on the framework with a different source of candidates and a different form of voting. The paper reports the cross-task trend through those curves.

### What the ablations show

#### Selection determines how much a pool helps

The paper studies the causes of improvement through theoretical controls and comparisons among selectors. Holding the candidate error chance fixed in the independent case gives a particularly clear control. The oracle makes an error only on pools that contain no acceptable candidate. Uniform selection preserves the failure probability of a single candidate because it uses the pool without extracting evidence from it. The comparison isolates the contribution of the decision rule from the increase in generation budget.

The Mallows analysis then varies the strength of the selector while keeping the generator fixed. As the rank penalty weakens, the distribution of the winner spreads farther down the oracle order. A larger pool can still help because acceptable options increasingly occupy the higher ranks, where the selector concentrates its choices. With a fixed positive penalty, the bad ranks receive sufficiently little probability for the combined system to have exponential convergence. As the preference weakens towards uniform choice, the asymptotic rate approaches the point where improvement disappears. The comparison shows how a theoretical guarantee at a positive penalty can coexist with slow practical progress when the ranker is weak.

The paper’s linear and higher-power weighting examples show why some preference for good answers is insufficient for vanishing error. Here the rank weights favor the top ordering, but their scale changes with the pool size. The lower portion of the ranking can continue receiving meaningful total probability as the number of candidates grows. The error falls to the positive limit the authors derive, even though a better-ranked answer has more chance of winning than a worse-ranked answer. A description such as “better than random” is thus incomplete for predicting the result of increasing the budget. The distribution of the winner’s rank across budgets carries the needed information.

The Zipf–Mandelbrot comparison shows a different way a weaker preference can behave. Giving distant ranks more weight than the geometric rule can bend the log failure curve and slow the decline, yet the remaining concentration toward good ranks can still suffice for convergence. The important distinction between this case and the power-weighted counterexample is what happens to the combined probability of the unacceptable portion of the list. The mathematical comparison identifies a behavior that an aggregate assessment of ranking quality can miss: two selectors that generally prefer good answers can have different long-run probabilities of choosing from a bad tail.

#### Shared failures slow even a perfect selector

Switching from independent to exchangeable candidates while retaining an oracle changes the shape of decay without introducing any selection mistakes. In the independent case, each added candidate provides another trial with the same fixed failure chance. In the Beta mixture, there are batches for which that chance is close to 1, and those batches contribute disproportionately to failure once the easier batches typically contain an acceptable answer. This is why the Beta parameter governing the high-error end appears as the power-law exponent for the oracle.

The theoretical plots also vary dependence while keeping the mean single-candidate error fixed. This is a useful control because the chances of failure for a single draw can match while the chances of failure for a whole pool differ greatly. Under stronger sharing, the result of one candidate reveals more about the difficulty of getting a good candidate elsewhere in the batch. In the limiting case discussed by the authors, most of the benefit of redundancy can disappear. At the other extreme the shared rate becomes almost constant, recovering the independent calculation. The comparison explains why single-sample performance alone leaves the reranking curve undetermined.

The general mixture proposition clarifies what the change from independence does and does not establish about the limit. Once the independent protocol converges at each interior error probability, the paper can carry that limit through the specified continuous mixture. The proposition gives a route to proving convergence in a dependent setting. The separate Beta calculation for an oracle explains how the speed can change in spite of the same eventual limit. In the empirical application, these are separate reasons to pay attention to the candidate pool and to the selector assessing it.

#### Comparisons on shared candidate pools

On MBPP, the oracle and execution vote operate with the same sampled programs. The oracle uses the full acceptance rule, while the vote sees agreement from one execution input. A difference between their curves therefore reflects how much the practical selector can recover from the opportunities available at each budget. It does not isolate a contribution from any individual test input. The experiment compares the availability of passing programs with the effectiveness of the specific voting procedure the authors use.

On TICO-19, the generator, candidate budgets and threshold rule are shared across the practical selectors. Better observed failure rates for MBR can therefore be associated with the selection procedure in this setup. The comparison changes both the source of evidence and how the evidence is aggregated. Its result concerns the full MBR and QE strategies instead of attributing the improvement to an individual component. Fitting both departures from a common oracle curve lets the authors represent that result without assigning separate generator failure laws to the two selectors.

Pooling and separating the translation directions tests a different aspect of the analysis. Pooled results ask whether one curve is adequate for the combined examples. Pair-specific results ask whether a development fit for one direction will describe held-out outcomes in that direction. The English-to-Spanish mismatch shows that good agreement on development is compatible with weaker agreement on test. Since the pattern appears for the oracle as well as for a practical decoder, a change in candidate availability is a plausible contributor. The plots provide grounds for that interpretation and leave the underlying cause open.

### Limitations

#### Limits identified by the authors

The guarantees concern the limit of a growing candidate budget. For a particular user or application, the practical question is how much error remains at an affordable budget. The authors explicitly allow that a substantial gain could require many candidates. The independent Mallows analysis gives an exponential rate, and the Beta-coupled oracle has a power-law rate. The convergence claims in the heavier-tailed and general dependent settings have a narrower quantitative scope. In particular, the transfer through a continuous mixture is a convergence result whose statement leaves the rate unspecified.

The authors also identify the choice of probability laws as an open practical issue. Mallows and Zipf–Mandelbrot distributions specify patterns in the oracle ranks of selected candidates. A Beta density specifies how candidate error probabilities are shared. Actual rerankers and generators may behave differently, and the paper gives no simple procedure for deciding whether those families will describe a new system well. A fit gives a compact account of the observed curve at the studied budgets. Choosing the right family before seeing such data is a separate problem.

A related limit concerns high-budget failure measurements. When observed failures are rare, the empirical curve can change visibly as individual problems cease to fail at a given budget. The code plots show this as steps. The smooth fitted law can describe a tendency through those steps, but the available observations give less resolution about the far tail. The authors acknowledge imperfections in the fit. They also point to the pair-specific translation results as a place where development and test behavior can diverge and leave robust adaptation across those conditions open.

The authors frame the theory around a binary decision. A system can improve the quality of already acceptable answers, or reduce the severity of unacceptable answers, without changing how frequently it satisfies the threshold. The discussion proposes extending the framework to continuous quality by considering the distribution of the best score in a pool. This is a natural starting point for an oracle, since it returns the maximum of the candidate scores. The authors regard the corresponding extension for imperfect rerankers as harder. Their discussion uses translation evaluation as an example of a setting with a continuous measure, including [COMET](https://md.research.elamur.ai/free/en/papers/rei-2020-comet-neural-framework-mt-evaluation/).

The paper also describes its application to system reliability as a first step. Candidate generation consumes inference resources, and reranking can require additional scoring or execution. The discussion suggests that predicting how many candidates are needed might contribute to efficiency. The experiments estimate failure curves rather than measuring an energy saving. Proposals such as feedback-driven generation and more efficient use of redundancy remain directions the authors draw from the analogy.

#### Limits visible in the experimental setup

The acceptance criterion defines the scope of every success claim. On MBPP, a program is acceptable when it passes the designated cases. Those cases give concrete evidence of correct behavior for the tested inputs. Behavior on other inputs remains outside the experimental criterion. The oracle’s apparent ability to find a correct program is consequently relative to the benchmark’s tests. The practical selector has an even narrower source of evidence, since it uses consensus on one test input. If many programs share the same wrong output, or agree on that input and differ on others, the evidence available during selection can point towards a failing program.

For TICO-19, the parallel issue is the quality threshold. The oracle is perfect by construction with respect to the score cutoff. Its decisions inherit whatever distinction that cutoff makes between acceptable and unacceptable translations. The link between those decisions and human judgments of serious medical translation errors remains unmeasured across the sampled pools. The evaluation and the MBR strategy also both use COMET-22 in different roles. The empirical ordering of the selectors therefore belongs to that evaluation design, and the paper does not establish what ordering a different acceptance criterion would produce.

The definition of asymptotic success is query by query under mathematical assumptions. The experiments observe failure aggregated across held-out examples. Agreement of test-set curves can support the use of a law for describing an aggregate trend while leaving uncertainty about individual difficult requests. A pool-size curve can also be consistent with more than one account of how failures arise. The Beta fit captures how shared risk can shape the measurements, but the measurements do not identify a latent risk variable directly. In particular, the fitted curve alone cannot establish how much dependence arises inside pools and how much apparent shared risk reflects variation in difficulty across requests.

The dependent proof assumes that conditioning on a shared error probability gives the independent setting studied earlier. The argument for convergence then averages over a density on interior error probabilities. A situation in which some requests have a positive chance of entering a state where every candidate is unacceptable would present a different scope for the guarantee. The oracle calculation explains why: in such a state, the pool cannot supply an acceptable answer at any budget. Exchangeability by itself gives symmetry among candidate positions. The assumptions about the latent chance of failure and the ranker are what turn that symmetry into a convergence claim.

Finally, the selected answer must already be in the candidate pool. The communication analogy invites other designs involving feedback, recombination or a changing number of attempts. The proofs concern the specified parallel generation and selection procedure. Their practical reach is to describe the benefits and limits of choosing from available candidates under explicit assumptions. The behavior of a system that rewrites answers or alters how subsequent candidates are generated would require its own analysis.

### What came after

[Can Automatic Metrics Assess High-Quality Translations?](https://md.research.elamur.ai/free/en/papers/agrawal-2024-can-automatic-metrics-assess-high/) (2024) cites the reranking paper and asks how well automatic metrics assess translations at the high-quality end. That question bears on how the medical translation experiment establishes success. Its oracle uses an automatic score to define the order of the candidates, and a threshold on that score determines which translations count as acceptable. The interpretation of the resulting failure curve therefore depends on the judgments the metric can support in the range of translations the selector returns.

The relationship established here is a citation and a closely connected evaluation question. The later study’s title identifies its concern with assessing high-quality translations. Whether it adopted the reranking law, tested the same threshold or compared the same selectors remains unspecified.

## Cite

Cite as Antonio Farinhas, Haau-Sing Li and Andre F. T. Martins. 2024. Reranking Laws for Language Generation: A Communication-Theoretic Perspective. arXiv:2409.07131.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2409.07131](https://doi.org/10.48550/arxiv.2409.07131) · [arXiv 2409.07131](https://arxiv.org/abs/2409.07131)

```bibtex
@misc{farinhas2024reranking,
  title = {{Reranking Laws for Language Generation: A Communication-Theoretic Perspective}},
  author = {Antonio Farinhas, Haau-Sing Li and Andre F. T. Martins},
  year = {2024},
  doi = {10.48550/arxiv.2409.07131},
  eprint = {2409.07131},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2409.07131}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
