Decoding-Time Language Model Alignment with Multiple Objectives

Ruizhe Shi, Yifang Chen, Yushi Hu, Alisa Liu, Hannaneh Hajishirzi, Noah A. Smith, Simon Shaolei Du

Introduction

Aligning Large Language Models (LLMs) typically involves optimizing for a single reward function, such as "helpfulness." However, real-world deployment requires balancing multiple, often conflicting, objectives—such as being helpful while remaining harmless, or being concise while remaining complete.

Current solutions are limited. Retraining models for every specific weighting of objectives (e.g., MORLHF or MODPO) is computationally expensive. Parameter merging techniques like "Rewarded Soups" lack strong theoretical guarantees and often result in sub-optimal performance. Prompting is often too imprecise for nuanced trade-offs.

Conflicting objectives in LM alignment: safety vs. helpfulness.

Multi-Objective Decoding (MOD)

The authors introduce Multi-Objective Decoding (MOD), a training-free approach to achieve precise, controllable alignment across multiple objectives at the moment of generation. MOD treats the final output as a mathematical interpolation of several "base" policies, each trained for a single objective.

The core technical innovation involves using the Legendre Transform from convex optimization to derive a closed-form solution for the optimal policy when rewards are linearly combined. For models regularized using KL-divergence (standard for PPO or DPO), MOD simplifies to a weighted linear combination of the logits from all base models.

The Multi-Objective Decoding (MOD) framework mixing logits from specialized models to produce a balanced output.

MOD can combine models of different sizes and training stages, provided they share the same tokenizer. This modularity allows for "zero-shot capability mixing," such as combining a safety-specialized model with a coding-specialized model without further training.

Experimental Evaluation

The authors evaluated MOD across diverse alignment tasks, including:

  • Reddit Summary: Balancing quality and faithfulness.
  • Helpful Assistant: Balancing helpfulness, harmlessness, and humor.
  • Safety Alignment: Navigating the trade-off between helpfulness and safety using the BeaverTails-10K dataset.
  • Open Instruction-Following: Combining general chat, coding, and reasoning capabilities using the TÜLU model family.

Key Results

  • Superior Pareto Frontiers: MOD's Pareto frontier consistently outperformed parameter merging and traditional retraining baselines.
  • Reward Improvements: On the 3-objective Helpful Assistant task, MOD achieved a 12.8% relative reward improvement over parameter-merging.
  • Toxicity Eradication: By combining specialized models, toxicity on the Toxigen benchmark was reduced to nearly 0% while improving performance on coding and reasoning tasks by 7.9% to 33.3%.
  • Robustness: Theoretical analysis shows that errors from sub-optimal base models propagate linearly, making the system robust for real-world use.

Discussion and Insights

A key finding is that "logit mixing" is theoretically superior to "weight mixing." Merging weights does not guarantee the resulting model will land in the optimal region of the reward space, whereas mixing logits at decoding time does. Furthermore, MOD allows for "steering with negative weights," enabling models to avoid specific behaviors (like toxicity) without needing to train a model specifically on "bad" data.

Limitations

Despite its advantages, MOD introduces inference overhead because it requires running multiple models simultaneously. This can be mitigated using LoRA adapters. Additionally, the requirement for a shared tokenizer limits the ability to mix models from different families (e.g., Llama and Mistral). Future work will explore extending these proofs beyond the tabular setting to more complex function approximations and non-greedy search strategies.

Summary updated

BibTeX
@inproceedings{shi2024decoding,
  author = {Ruizhe Shi and Yifang Chen and Yushi Hu and Alisa Liu and Hannaneh Hajishirzi and Noah A. Smith and Simon Shaolei Du},
  title = {{Decoding-Time Language Model Alignment with Multiple Objectives}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=3csuL7TVpV},
}
Figure