Language Model Decoding as Likelihood-Utility Alignment

Martin Josifoski, Maxime Peyrard, Frano Rajic, Jiheng Wei, Debjit Paul, Valentin Hartmann, Barun Patra, Vishrav Chaudhary, Emre Kiciman, Boi FaltingsEACL (Findings) 2023 · DOI

TL;DR

This paper argues that the effectiveness of language model decoding hinges on aligning the model's inherent likelihood with the task's specific utility. They introduce a taxonomy of decoding strategies based on how they address this misalignment and empirically show that while simple likelihood-based methods suffice when utility and likelihood align, more sophisticated approaches are needed when they diverge.

What Problem Does This Paper Address?

Large language models (LLMs) are powerful tools, but their output quality during inference heavily depends on the decoding algorithm. The core problem is that standard language modeling objectives optimize for likelihood (how probable a sequence is according to the model), which doesn't always align with utility (how useful or correct the output is for a specific task). This "likelihood-utility misalignment" can lead to suboptimal or even incorrect outputs, especially in tasks with distribution shifts or evolving utility definitions. Existing research often compares decoding algorithms in narrow scenarios, making it hard to generalize findings. This paper aims to provide a unified framework and empirical analysis to understand and address this misalignment across a diverse set of tasks.

Methods

The authors propose a taxonomy of "Misalignment Mitigation Strategies" (MMSs) for decoding algorithms. This taxonomy categorizes methods based on their implicit assumptions about likelihood-utility misalignment. They then conduct a comprehensive empirical study using this taxonomy, evaluating various decoding algorithms across different tasks. Key aspects of their methodology include:

  • MMS Taxonomy: Classifying decoding algorithms into categories like Greedy Likelihood-Based, Greedy Likelihood-Based with Pruning, Greedy Likelihood- and Value-Based, Simulation-Based, and Prompting-Based.
  • Likelihood-Utility Correlation Analysis: Measuring the correlation between model likelihood and task utility both post-decoding (for the final output) and during-decoding (among candidate hypotheses explored by the algorithm).
  • Value-Guided Decoding: Investigating the effectiveness of methods like Value-Guided Beam Search (VGBS) that incorporate external "value models" to estimate utility.
  • Prompting as an MMS: Examining how prompting techniques (Few-Shot and Chain-of-Thought) can align likelihood with utility in large generalist LMs.

Datasets

The paper uses a variety of established datasets for evaluation:

  • Closed Information Extraction (CIE): REBEL dataset.
  • Machine Translation (MT): WMT14 dataset (English to French).
  • Non-Toxic Text Generation (NTTG): Real Toxicity Prompt (RTP) dataset.
  • Non-Soluble Protein Generation (NSPG): SwissProt-EF dataset.
  • Sports Understanding: Sports Understanding (SU) task from the BIG-bench benchmark.

The authors note that for CIE, training and testing data come from the same distribution, primarily exhibiting Training Imperfection (TI) misalignment. MT involves some Distribution Shift (DS) due to pre-training on different domains. NTTG and NSPG are designed to primarily exhibit Utility Drift (UD), where the definition of a "good" output changes. The Sports Understanding task also involves UD and DS.

Key Insights and Ideas

  • Likelihood is Only Good When Aligned: When training imperfections are the primary source of misalignment (e.g., CIE), simple greedy decoding based on likelihood works well because likelihood is a strong predictor of utility.
  • Distribution Shift and Utility Drift Break Likelihood: When distribution shift (DS) or utility drift (UD) are present (e.g., MT, NTTG, NSPG), the correlation between likelihood and utility plummets, rendering simple likelihood-based decoding ineffective.
  • External Information is Key for Misalignment: To combat DS and UD, decoding strategies need to incorporate external information. Value-guided methods (like VGBS) and prompting are shown to be effective.
  • Prompting as a Pre-emptive Alignment: Prompting, especially Chain-of-Thought, appears to align the model's likelihood with task utility before generation, forcing the model to assign higher likelihood to high-utility regions. This is a significant departure from post-hoc alignment methods.
  • Value Models Offer a Trade-off: Value-guided decoding (VGBS) can significantly outperform standard methods, even with noisy value models, offering a good balance between performance and computational cost.

Key Results

  • Post-Decoding Alignment: In CIE, high-likelihood outputs generally have high utility. In MT, a negative correlation (-0.56 for BS) between utility and likelihood is observed, indicating that optimizing for likelihood is detrimental. In NTTG and NSPG, correlations are near zero or negative, highlighting the need for external guidance.
  • During-Decoding Alignment: For tasks with high likelihood-utility correlation (like CIE), greedy decoding can retrieve high-utility outputs. However, for tasks with UD/DS, even if candidate beams show some correlation, the overall likelihood mass might be assigned to low-utility regions.
  • Value-Guided Decoding: VGBS and MCTS consistently perform at least as well as Beam Search, even with random value models. With accurate value models, they achieve very high utility. VGBS often outperforms MCTS and is computationally less demanding.
  • Prompting: For the Sports Understanding task, Chain-of-Thought prompting achieved 83% accuracy, significantly outperforming Few-Shot (57.3%) and Zero-Shot (38.9%). CoT also generated outputs with higher average log-likelihood and improved likelihood-utility correlation.

Limitations and Future Work

  • Non-Exhaustive Analysis: The study covers a subset of tasks, models, and misalignment types. The authors acknowledge that small differences in training objectives or data can lead to significant variations in misalignment.
  • Alternative Fixes: The paper focuses on inference-time decoding strategies. Future work could explore retraining/finetuning models with data that better reflects utility or directly optimizing utility functions via reinforcement learning.
  • Trade-offs in Finetuning vs. Inference-Time Correction: An open question is whether investing in acquiring new data for finetuning is more beneficial than using inference-time methods like VGBS or prompting.
  • Computational Cost: While VGBS and MCTS are effective, they can be computationally expensive, especially for very large LMs. Prompting offers a more computationally feasible alternative for LLMs.

Summary updated

BibTeX
@inproceedings{josifoski2023language,
  author = {Martin Josifoski and Maxime Peyrard and Frano Rajic and Jiheng Wei and Debjit Paul and Valentin Hartmann and Barun Patra and Vishrav Chaudhary and Emre Kiciman and Boi Faltings},
  title = {{Language Model Decoding as Likelihood-Utility Alignment}},
  booktitle = {EACL (Findings)},
  year = {2023},
  doi = {10.18653/v1/2023.findings-eacl.107},
}
Figure