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.
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.
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:
- RankAlign (G2V): Aligns the validator's rankings to match the generator's probabilities.
- RankAlign-V2G: Aligns the generator's rankings to match the validator's judgments.
- 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.
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