Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Prompts

Tingchen Fu, Yupeng Hou, Julian J. McAuley, Rui Yan

Introduction

Aligning Large Language Models (LLMs) with human values is a complex, multi-faceted challenge. While standard techniques like Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO) have seen success, they often struggle with the "alignment tax"—the inherent trade-off between conflicting objectives like helpfulness and harmlessness. Furthermore, these methods are typically static; once a model is trained, its balance of objectives is fixed.

Researchers have introduced Multi-objective Contrastive Alignment (MCA), a gradient-free approach that enables dynamic, inference-time control over multiple alignment goals. By shifting alignment from training to the decoding phase, MCA allows users to adjust model behavior on the fly without expensive retraining.

The Alignment Challenge

The primary motivation for MCA stems from two limitations in current alignment paradigms. First, objectives are often negatively correlated. For instance, increasing a model's harmlessness frequently leads to "refusal behavior," decreasing its helpfulness. Second, existing methods lack flexibility. To accommodate a new objective or a different user preference profile, practitioners usually must retrain the model or maintain multiple specialized versions.

The MCA Framework: Contrastive Decoding

MCA addresses these issues through a two-stage process that operates entirely during the decoding phase.

The MCA pipeline consists of iterative prompt construction followed by preference-aware contrastive decoding.

1. Iterative Prompt Construction

For each alignment objective (e.g., Harmlessness), the system generates a pair of prompts:

  • Expert Prompt ($z^+$): Designed to maximize the specific reward.
  • Adversarial Prompt ($z^-$): Designed to minimize that reward. These prompts are refined iteratively using a reward model and a high-capability "teacher" LLM to ensure they effectively represent the target objective.

2. Preference-Aware Multiple Contrastive Decoding

During text generation, the model computes next-token probabilities for the user query under both the expert and adversarial prompts. By contrasting these distributions—specifically, subtracting the "adversarial" logits from the "expert" logits—the model is steered toward desired behaviors. Users can assign specific weights ($w_i$) to different objectives, allowing them to navigate the Pareto front of trade-offs at inference time.

Experimental Results

The researchers evaluated MCA on models like Phi-2 and Llama-2-7b using standard preference datasets such as HH-RLHF and SafeRLHF.

Superior Pareto Fronts

A key finding is that MCA consistently produces superior trade-off curves compared to existing multi-objective alignment methods. As shown in the results for the Phi-2 model, MCA pushes the frontier of performance, achieving higher rewards in both helpfulness and harmlessness simultaneously compared to the base or fine-tuned versions.

Pareto front comparison on Phi-2, showing how MCA improves the trade-off between helpfulness and harmlessness.

Extensibility and Compatibility

MCA is highly extensible; adding a new objective, such as "humor," simply requires generating a new prompt pair. Furthermore, the method is orthogonal to training-based alignment. When applied to a model that has already undergone Supervised Fine-Tuning (SFT), MCA provides additional performance gains, suggesting it can effectively refine models beyond the limitations of their training data.

Conclusion and Future Work

MCA represents a significant step toward controllable LLMs. By enabling precise, multi-objective alignment at decoding time, it offers a flexible alternative to rigid training-based methods. While the approach introduces some computational overhead due to multiple forward passes, its ability to provide "knob-turning" control over model behavior makes it a powerful tool for personalized AI. Future research will focus on optimizing inference latency and exploring more complex, non-linear relationships between alignment objectives.

Summary updated

BibTeX
@inproceedings{fu2025unlocking,
  author = {Tingchen Fu and Yupeng Hou and Julian J. McAuley and Rui Yan},
  title = {{Unlocking Decoding-time Controllability: Gradient-Free Multi-Objective Alignment with Contrastive Prompts}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.18},
}
Figure