arXiv:2610.18583cs.AIOct 2026

Manuscript Offprint

arXiv:2610.18583

Compare to Correct: Pairwise-Guided Logit Adjustment for LLM Test-Time Scaling

Cong Hua, Qianqian Xu, Zitai Wang, Zhiyong Yang, Shilong Bao, Linchao Zhang, Qingming Huang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Sampling-based test-time scaling enhances LLM reasoning by aggregating multiple reasoning paths for the same query. Existing methods use answer frequencies or path confidence to compute candidate scores, which do not explicitly characterize comparisons between competing answers. Inspired by the Condorcet principle in social choice theory, we introduce pairwise confidence comparisons between paths supporting different answers to capture answer-level comparative advantage. We combine this comparative evidence with voting support through a KL-regularized objective. Theoretically, we show that this comparative-advantage is equivalent to the adjustment to the traditional voting logits. In this way, our proposed Pairwise-Guided Logit Adjustment (PGLA) framework allows comparative evidence to compensate for weaker voting support and correct voting-based ranking errors. Experiments on 10 challenging benchmarks including mathematical reasoning, knowledge reasoning, and code generation with 7 models ranging from 1.7B to 32B parameters speak to the effectiveness of this plug-and-play term. Additional evaluations with external reward scores and online sampling further demonstrate its applicability.

Introduction

Large language models (LLMs) have demonstrated strong reasoning capabilities across mathematical, symbolic, and multi-step decision-making tasks (Wei et al., 2022; Lewkowycz et al., 2022; Yao et al., 2023). Beyond increasing model size, allocating additional computation at inference time can further improve reasoning performance, establishing test-time scaling as an important paradigm for LLM reasoning (Snell et al., 2025; Balachandran et al., 2025). Among its variants, sampling-based approaches generate multiple reasoning paths for the same query and aggregate evidence from these paths (e.g., answer frequencies and path confidence scores) into a collective decision (Cobbe et al., 2021; Wang et al., 2023). In this direction, the central challenge becomes how to aggregate path-level evidence into reliable answer-level scores. Representative approaches include best-of-N selection that chooses the answer from the path with the highest confidence score (Cobbe et al., 2021), majority voting based on answer frequencies (Wang et al., 2023), and confidence-based voting that combines answer frequencies with path confidence scores by weighting or filtering path contributions (Kang et al., 2025; Fu et al., 2026).

Although these methods achieve substantial improvements, we observe that their aggregation rules could overlook some crucial information hidden among sampled paths. To illustrate this, we turn to social choice theory, which studies how individual preferences among available options can be combined into a

(a) Social choice theory

Figure

Voting game

Complete Preference

VotersPreference P
3A>B>C
2B>C>A
2C>B>A

Plurality voting selects A

Preference-vote comparisons

Figure

Condorcet winner: B

(b) Reasoning-path aggregation

Figure

Sampling reasoning paths

Sampled Answers and Confidence

PathsAnswerConfidence
3A0.5, 0.5, 0.6
2B0.7, 0.8
2C0.2, 0.3

Majority voting selects A

Pairwise confidence comparisons

Higher --> Lower confidence

Figure

Pairwise-Guided winner: B

Figure 1: From voting support to pairwise comparative evidence. (a) Plurality voting selects A, whereas pairwise preference comparisons identify B as the Condorcet winner. (b) Sampled reasoning paths provide answers and confidence scores. Pairwise confidence comparisons complement voting support, enabling the proposed aggregation method to select B.

collective decision (Zwicker, 2016). The well-known Condorcet principle highlights that the most frequently selected option does not necessarily rank higher than competing options in direct comparisons (Young, 1988; Fishburn, 1977). As shown in Figure 1(a), options A, B, and C receive 3, 2, and 2 first-choice selections, respectively, so majority voting selects A. Under the preference P, however, four of seven rankings place B above A, and five place B above C, so B is selected through pairwise comparisons. Similarly, this principle highlights why prior sampling-based approaches are insufficient: an answer can be assigned the highest score even when its reasoning paths remain at a disadvantage in comparisons with those supporting a competing answer. As shown in Figure 1(b), answer A is selected by majority voting because it appears most frequently, although every path producing answer B has a higher confidence score than those producing A. This motivates us to incorporate pairwise information between candidate answers on top of existing voting-based aggregation.

Ideally, we could apply the Condorcet principle to the reasoning paths if the ranking of candidate answers were available for each path. However, in practice, we only observe each path's first-choice answer and its confidence score, leaving the ordering among the remaining answers unknown. To estimate such missing ordering, we use pairwise confidence comparisons between paths producing different answers, as illustrated in Figure 1(b). These comparisons yield an answer-level comparative advantage, which we combine with voting evidence through a KL-regularized objective. In this way, the objective can balance this advantage against deviations from the base voting distribution, as an alternative to the naive Condorcet approach. Furthermore, we show that its solution is essentially a logit adjustment to the base voting distribution, yielding a simple yet effective Pairwise-Guided Logit Adjustment (PGLA) approach. This plug-and-play adjustment allows comparative evidence to compensate for weaker evidence from existing voting-based aggregation.

Finally, we conduct extensive experiments on mathematical reasoning, knowledge reasoning, and code generation using both reasoning and non-reasoning models from the Qwen, DeepSeek, and InternLM families, with model sizes ranging from 1.7B to 32B parameters. With internal confidence scores, PGLA achieves an average accuracy gain of approximately 2%2\% over the corresponding voting baselines across 33 model-benchmark settings. Additional experiments show gains with external reward scores. On six

PathABCIncomplete Preference
z1\mathbf{z}_{1}p1p_{1}——A>{B,C}A > \{B, C\}
z2\mathbf{z}_{2}p2p_{2}——
z3\mathbf{z}_{3}p3p_{3}——B>{A,C}B > \{A, C\}
z4\mathbf{z}_{4}—p4p_{4}—
z5\mathbf{z}_{5}—p5p_{5}max—
z6\mathbf{z}_{6}——p6p_{6}C>{A,B}C > \{A, B\}
z7\mathbf{z}_{7}——p7p_{7}
Best-of-Nmax⁡(p1,p2,p3)\max(p_{1}, p_{2}, p_{3})max⁡(p4,p5)\max(p_{4}, p_{5})max⁡(p6,p7)\max(p_{6}, p_{7})
Majority-Voting322
Confidence-based VotingSum(p1,p2,p3)\mathrm{Sum}(p_{1}, p_{2}, p_{3})Sum(p4,p5)\mathrm{Sum}(p_{4}, p_{5})Sum(p6,p7)\mathrm{Sum}(p_{6}, p_{7})

Only use block-diagonal evidence to compute sMs^{M}

Figure

Figure 2: Path-answer evidence and its aggregation. The three methods use each block's maximum confidence, size, or confidence-based contributions.

Shared first-choice supportPreference PPPreference P′P'
3A>B>CA > B > CA>B>CA > B > C
2B>C>AB > C > AB>A>CB > A > C
2C>B>AC > B > AC>A>BC > A > B

Select A

Pairwise comparison matrices

YP=17(0−1−11031−30)Y^{P} = \frac{1}{7} \begin{pmatrix} 0 & -1 & -1 \\ 1 & 0 & 3 \\ 1 & -3 & 0 \end{pmatrix} YP=17(033−303−3−30)Y^{P} = \frac{1}{7} \begin{pmatrix} 0 & 3 & 3 \\ -3 & 0 & 3 \\ -3 & -3 & 0 \end{pmatrix}

Select B

Select A

Figure 3: Identical majority-voting scores can correspond to different pairwise comparison matrices and different winners.

mathematical reasoning settings, its online extension also achieves higher mean accuracy with fewer sampled paths than Online SC under the same stopping rule.

Problem Formulation and Representative Aggregators

Problem Formulation

Given an input query, a language model generates KK reasoning paths z1,…,zKz_1, \dots, z_K. Each path produces an answer ai=g(zi)a_i = g(z_i) and receives a confidence score pip_i from the model or an external verifier. Together, they form the path-level evidence pool D={(ai,pi)}i=1K\mathcal{D} = \{(a_i, p_i)\}_{i=1}^K. Let A\mathcal{A} be the set of different answers produced by these paths, which may be predefined for multiple-choice questions or dynamically formed from sampled answers in open-ended mathematical reasoning and code generation.

Based on D\mathcal{D}, we construct a path-answer matrix P\mathcal{P}, with one row per path and one column per candidate answer. Each row records pip_i in the column for its output answer aia_i and the entries for other answers remain unobserved. Grouping paths by their output answers produces the block-diagonal pattern shown in Fig. 2. Each block contains the confidence scores of paths sharing the same answer.

The aggregation task is to convert the path-level evidence into an answer-level score for each candidate, followed by selecting the candidate with the highest score. Formally, an aggregation method M\mathcal{M} assigns candidate aa the score saMs_a^{\mathcal{M}} based on D\mathcal{D}:

saM=M(a;D),a^∈arg⁡max⁡a∈AsaM.(1)s_a^{\mathcal{M}} = \mathcal{M}(a; \mathcal{D}), \qquad \hat{a} \in \arg\max_{a \in \mathcal{A}} s_a^{\mathcal{M}}. \tag{1}

a^\hat{a} is the final predicted answer selected from the candidates with the highest score. Representative methods use different information from the path-answer matrix to compute saMs_a^{\mathcal{M}}.

Best-of-N selection. Best-of-N uses the highest confidence among the paths sharing answer aa (Cobbe et al., 2021). This corresponds to taking the largest value within the block for aa in matrix P\mathcal{P}:

saBoN=max⁡i:ai=api.(2)s_a^{\mathrm{BoN}} = \max_{i:a_i=a} p_i. \tag{2}

The confidence pip_i may be perplexity (Adiwardana et al., 2020), self-certainty (Kang et al., 2025), DeepConf confidence (Fu et al., 2026), or an external verifier's reward (Lightman et al., 2024).

Majority voting. Self-consistency (SC) treats each path as one vote for its output answer and selects the most frequently generated answer (Wang et al., 2023).

The answer-level score is therefore its total vote count:

saSC=∑i=1K1(ai=a).(3)s_{a}^{\mathrm{SC}}=\sum_{i=1}^{K}\mathbf{1}(a_{i}=a). \tag{3}

where 1(⋅)\mathbf{1}(\cdot) is the indicator function. In P\mathcal{P}, this corresponds to the size of the diagonal block for answer aa, measured by its number of observed entries. Every supporting path contributes equally, regardless of its confidence.

Confidence-based voting. Confidence-based voting methods adjust path contributions through weighting or filtering (Kang et al., 2025; Fu et al., 2026). Let hi≥0h_i \geq 0 be the weighting or filtering coefficient for path ii, with hi=0h_i = 0 for filtered paths. The resulting answer-level score is

saConf−Vote=∑i=1Khi⋅pi1(ai=a).(4)s_{a}^{\mathrm{Conf-Vote}}=\sum_{i=1}^{K}h_{i}\cdot p_{i}\mathbf{1}(a_{i}=a). \tag{4}

This method aggregates confidence-based contributions within each diagonal block in P.

Despite these differences, these methods aggregate only the observed evidence in the diagonal blocks of P. They do not explicitly model the unobserved preferences among alternative answers. In the next section, we use social choice theory to explain why these preferences matter for answer aggregation.

References (40)