RankAlign: A Ranking View of the Generator-Validator Gap in Large Language Models

Juan Diego Rodriguez, Wenxuan Ding, Katrin Erk, Greg Durrett

TL;DR

Large Language Models (LLMs) frequently suffer from an internal mismatch where they generate answers they later reject when evaluated in a true/false format. This paper introduces RankAlign, a pairwise ranking-based fine-tuning method that closes this "generator-validator gap" by aligning the continuous confidence scores of both modes. RankAlign reduces this inconsistency by an average of 31.8% across multiple models and tasks while demonstrating robust generalization to out-of-domain data and unseen prompt formats.

What Problem Does This Paper Address?

When you ask an LLM to complete a sentence like "Olives are a kind of ___", it might confidently output "fruit". But if you immediately follow up with a discriminative prompt—"Do you think olives are fruits?"—the model might surprisingly answer "No". This discrepancy is known as the generator-validator (G-V) gap.

Figure 1: LLMs often have a discrepancy between generative and discriminative ver- sions of the same task. They may generate answers that contradict their discriminative judgments or endorse responses in which the generator has low confidence.

Prior research typically treated this as a binary agreement problem, checking only if the top generated answer matches a forced-choice validation. This paper argues that a truly consistent model should have aligned confidences across the entire spectrum of plausible candidate answers. By analyzing the continuous log-odds of both generation and validation, the authors reveal that existing open-source LLMs exhibit shockingly low correlation in their internal beliefs depending on how they are prompted.

Methods

To fix this misalignment, the authors propose RankAlign, a fine-tuning objective that enforces ranking consistency between the generator and the validator.

Instead of trying to calibrate absolute probability values (which is notoriously difficult), RankAlign focuses on relative orderings. If the generator assigns a higher probability to Answer A than Answer B, the validator should similarly assign a higher log-probability of saying "Yes" to Answer A than Answer B.

Figure 3: In RankAlign, pairwise logis- tic loss L = −log (σ(uw −ul)) is used to enforce the pair of validator log probabilities uw, ul to be ordered as the generator log probabilities.

The core mathematical tool is a pairwise logistic loss function, structurally reminiscent of Direct Preference Optimization (DPO). However, unlike DPO—which ranks different model completions for a fixed prompt—RankAlign ranks fixed completions across pairs of different prompts.

The authors experiment with three directional variants:

  1. RankAlign (G2V): Aligns the validator's rankings to match the generator's probabilities.
  2. RankAlign-V2G: Aligns the generator's rankings to match the validator's judgments.
  3. RankAlign-$\alpha$: A convex combination that simultaneously optimizes alignment in both directions.

Datasets

The method was evaluated across four distinct datasets spanning lexical semantics, next-word prediction, and factual knowledge:

  • THINGS (Hypernymy): Evaluating category relationships (e.g., identifying if a poodle is a mammal).
  • SWORDS (Lexical Substitution): Contextual synonymy detection.
  • LAMBADA: Next-word prediction requiring broad paragraph-level context.
  • TriviaQA: Open-domain, closed-book question answering testing parametric factual knowledge.

Key Insights and Ideas

  • The Generator is the Anchor: Aligning the validator to the generator (G2V) is significantly more effective than trying to align the generator to the validator (V2G). Base LLMs are naturally well-calibrated as text generators, whereas discriminative/validation capabilities are highly sensitive to alignment training.
  • Beyond Top-1 Consistency: Measuring the Pearson correlation ($\rho$) of continuous log-odds exposes a massive hidden layer of inconsistency in lower-ranked but plausible candidate answers that traditional binary metrics completely miss.
  • True Structural Fix, Not Memorization: RankAlign doesn't just memorize specific words or tasks. Training the model on a hypernymy task actually improves its generator-validator consistency on entirely unseen tasks like synonym substitution or factual QA, proving that it fundamentally harmonizes the model's internal representations.

Key Results

RankAlign achieved substantial improvements across Gemma-2-2B, Llama-3.2-3B, and Llama-3.1-8B models:

  • Closing the Gap: RankAlign yielded an average gain of 31.8 points in log-odds correlation ($\rho$-all). On the Hypernymy task using Gemma-2-2B, the correlation skyrocketed from a base of 76.4 to 94.2.
  • Preserving Task Accuracy: Crucially, this alignment occurs with minimal to no degradation in underlying task performance. In fact, on the SWORDS dataset, RankAlign actually improved the validator's ROC area under the curve while tightening consistency.
Performance metrics across methods for Hypernymy and SWORDS datasets.

Limitations and Future Work

  • Short-Form Constraint: The current framework is restricted to short-form queries where answers can be evaluated via single tokens or short phrases. Extending RankAlign to long-form generation (such as summarization or free-form essay QA) remains an open challenge.
  • Mechanistic Origins: While the paper provides an effective empirical training objective, it notes that more work is required to mechanistically understand why standard pre-training splits the generator and validator minds in the first place.
  • Pragmatics vs. Belief: Sometimes a model might validate a statement as true (e.g., "Dolphins are entities") but reasonably choose never to generate it because it violates Gricean maxims of being too trivial or uninformative. The authors suggest integrating Rational Speech Act (RSA) theory in future iterations to better model the nuance between what an LLM "believes" versus what it should "utter".

Summary updated

Abstract

Although large language models (LLMs) have become more capable and accurate across many tasks, some fundamental sources of unreliability remain in their behavior. One key limitation is their inconsistency at reporting the same information when prompts are changed. In this paper, we consider the discrepancy between a model's generated answer and their own verification of that answer, the generator-validator gap. We define this gap in a more stringent way than prior work: we expect correlation of scores from a generator and a validator over the entire set of candidate answers, i.e., candidate completions that could possibly arise during ordinary language use without breaking Gricean norms. We show that according to this measure, a large gap exists in various settings, including question answering, lexical semantics tasks, and next-word prediction. We then propose RankAlign, a ranking-based training method, and show that it significantly closes the gap, surpassing all baseline methods. Moreover, this approach generalizes well to out-of-domain tasks and lexical items.
BibTeX
@inproceedings{rodriguez2025rankalign,
  author = {Juan Diego Rodriguez and Wenxuan Ding and Katrin Erk and Greg Durrett},
  title = {{RankAlign: A Ranking View of the Generator-Validator Gap in Large Language Models}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=rJOkPauru9},
}
Figure