RRescue: Ranking LLM Responses to Enhance Reasoning Over Context

Yikun Wang, Rui Zheng, Haoming Li, Qi Zhang, Tao Gui, Fei Liu · Submission to ICLR 2024 · Withdrawn

TL;DR

RRESCUE improves large language models’ (LLMs) contextual reasoning by teaching them to rank candidate responses (a rationale paired with an answer) using a contrastive ranking metric. Rather than forcing a noisy, expensive full ranking of responses, the authors advocate for partial orderings (grouping outputs by label correctness or human origin), showing that fine-tuning a compact 7B model on minimal data yields reasoning accuracy competitive with massive models.

What Problem Does This Paper Address?

While modern LLMs can ingest large context windows, they frequently fail to reason over that context effectively. In complex tasks—such as natural language inference (NLI) or retrieval-augmented generation (RAG)—models often hallucinate rationales or fall victim to the "lost-in-the-middle" phenomenon, ignoring relevant passages positioned away from the prompt boundaries.

Standard supervised fine-tuning (SFT) exposes models solely to high-quality reference targets, making them brittle when encountering noisy contexts and causing performance to plateau early. Conversely, full reinforcement learning from human feedback (RLHF) requires thousands of costly pairwise human preferences, which are notoriously difficult to gather consistently when distinguishing between subtly different, multi-sentence rationales.

Methods

RRESCUE combines standard SFT with a ranking loss inspired by the BRIO summarization paradigm:

$$\mathcal{L}_{\text{RRESCUE}}(\theta) = \mathcal{L}_{\text{SFT}}(\theta) + \alpha \mathcal{L}_{\text{Rank}}(\theta)$$

$$\mathcal{L}_{\text{Rank}}(\theta) = -\mathbb{E} \left[ \max\left\{0, \log \pi_\theta(y_b|x) - \log \pi_\theta(y_{1-b}|x)\right\} \right]$$

Key elements include:

  • Candidate Generation: Candidates are collected across diverse sources: Llama-2-7B, GPT-3.5-Turbo, and original human references. The authors also test a Response Flipping technique, prompting GPT-4 to invert the rationale's semantic meaning and using GPT-3.5 to generate the corresponding label.
  • Partial Orderings (PO): Instead of enforcing strict, linear orderings (Full Ordering via embeddings or GPT-3.5 ranking), RRESCUE partitions candidates into coarser tiers:
  • Human-Prioritized: $\text{Human} > \text{All Model Outputs}$
  • Label-Prioritized: $\text{Correct Label Candidates} > \text{Incorrect Label Candidates}$
  • Human-Label Hybrid: $\text{Human} > \text{Model Correct} > \text{Model Incorrect}$
  • Length-Penalty Calibration: Human rationales are naturally concise, whereas model rationales are wordy and use common tokens, yielding artificially higher raw sequence probabilities. To stop the ranking loss from unfairly penalizing concise human answers, the authors apply an asymmetric length-scaling exponent ($\lambda = 0.85$ for models, $\lambda = 1.0$ for human text).
Candidate Hierarchy (Human-Label Hybrid):
[ Human Reference (Label & Explanation) ]
                   >
[ Model Output (Correct Label) ]
                   >
[ Model Output (Incorrect Label) ]

Datasets

The authors evaluate RRESCUE on two primary benchmarks:

  1. e-SNLI: An extension of the Stanford Natural Language Inference dataset containing natural language explanations for entailment, neutral, and contradiction classifications.
  2. Multi-Document Question Answering: A benchmark from Liu et al. (2023) evaluating open-domain QA where a question is paired with 5 or 10 retrieved Wikipedia documents (one ground-truth document and several distractors) placed at varying positions (beginning, middle, or end).

Key Insights and Ideas

  • Partial ordering beats full ordering: Forcing LLMs or humans to rank subtly different, equally valid responses introduces label noise. Partial ordering focuses updates on clear-cut separations (correct reasoning vs. incorrect reasoning), proving more stable and robust.
  • The LLM "Central Tendency" bias: Out-of-the-box Llama-2-7B exhibits a strong bias toward predicting "Neutral" on NLI (achieving only 33.31% zero-shot accuracy). The authors hypothesize this stems from safety training/RLHF, which encourages hedging and non-committal answers.
  • Correcting the "Lost in the Middle" penalty: By forcing the model to rank rationales grounded in the true retrieval document above rationales conditioned on distractors, the model learns contextual grounding without needing any human rationale annotations for QA.

Key Results

  • Data Efficiency on e-SNLI: Fine-tuning Llama-2-7B with RRESCUE using only 1.8% of the e-SNLI training data (~10k examples) achieved 88.16% accuracy (Label-Prioritized), competitive with state-of-the-art distillation pipelines using 540B-parameter models (89.51%). SFT alone with the same data hit 87.33%.
  • Context Grounding in Multi-Doc QA: In 10-document QA, RRESCUE raised accuracy from 27.17% to 33.43% when the golden document was placed in the middle, and from 42.95% to 55.11% when placed at the end.
  • Human Evaluation: In head-to-head human evaluations on generated explanations, the Partial-Order model beat the base Llama-2-7B model 76% to 20% (4% ties) and outperformed the Full-Order similarity model (39% win vs. 23% loss, 38% tie).

Limitations and Future Work

  • Candidate Saturation: Performance plateaued around 3–4 candidate responses per prompt; scaling past 5 candidates provided diminishing returns due to GPU memory constraints and ranking noise.
  • Response Flipping Inefficacy: Synthetic response flipping with GPT-4/GPT-3.5 did not yield clear improvements over standard multi-model sampling.
  • Copying Heuristics: In multi-document QA, the model frequently defaulted to copying text from the final document in the context window.
  • Future Directions: Incorporating curriculum learning (gradually increasing ranking difficulty) and dynamic margin tuning during contrastive ranking.

Summary updated

BibTeX
@inproceedings{wang2024rrescue,
  author = {Yikun Wang and Rui Zheng and Haoming Li and Qi Zhang and Tao Gui and Fei Liu},
  title = {{RRescue: Ranking LLM Responses to Enhance Reasoning Over Context}},
  booktitle = {Student Research Workshop @ ACL},
  year = {2024},
  doi = {10.18653/v1/2024.acl-srw.32},
}
Figure