Decoding-Time Language Model Alignment with Multiple Objectives

Aligning language models (LMs) to human preferences has emerged as a critical pursuit, enabling these models to better serve diverse user needs. Existing methods primarily focus on optimizing LMs for a single reward function, limiting their adaptability to varied objectives. Here, we propose $\textbf{multi-objective decoding (MOD)}$, a decoding-time algorithm that outputs the next token from a linear combination of predictions of all base models, for any given weightings over different objectives. We exploit a common form among a family of $f$-divergence regularized alignment approaches (such as PPO, DPO, and their variants) to identify a closed-form solution by Legendre transform, and derive an efficient decoding strategy. Theoretically, we show why existing approaches can be sub-optimal even in natural settings and obtain optimality guarantees for our method. Empirical results demonstrate the effectiveness of the algorithm. For example, compared to a parameter-merging baseline, MOD achieves 12.8% overall reward improvement when equally optimizing towards $3$ objectives. Moreover, we experiment with MOD on combining three fully-finetuned LLMs of different model sizes, each aimed at different objectives such as safety, coding, and general user preference. Unlike traditional methods that require careful curation of a mixture of datasets to achieve comprehensive improvement, we can quickly experiment with preference weightings using MOD to find the best combination of models. Our best combination reduces toxicity on Toxigen to nearly 0% and achieves 7.9--33.3% improvement across other three metrics ($\textit{i.e.}$, Codex@1, GSM-COT, BBH-COT).

Paper

References (67)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer TTLg7/10 · confidence 3/52024-06-26

Summary

The paper introduces a decoding-time alignment method called Multi-Objective Decoding (MOD) for aligning language models (LMs) with multiple objectives. MOD combines a set of models aligned for individual rewards and allows any weightings (even not-all-positive) for rewards. MOD leverages a common form among f-divergence regularized alignment approaches to derive an efficient decoding strategy that greedily selects the next token from an algebraic combination of predicted probabilities of all base models. MOD can maximize an interpolated reward function without extensive retraining. The paper theoretically demonstrates the sub-optimality of existing approaches and establishes optimality guarantees for MOD. Empirical results show MOD's effectiveness, with a 12.8% overall reward improvement over a parameter-merging baseline when optimizing for three objectives.

Strengths

* **Flexibility in Objectives Alignment**: MOD's primary strength lies in its ability to align language models with multiple objectives simultaneously. This flexibility allows it to balance and prioritize different user needs and preferences without the need for retraining the model for each new objective combination. * **Efficiency and Simplicity**: The algorithm is efficient and simple to implement, as it only need to operate the probabilities at decoding time. * **Theoretical Robustness and Empirical Validation**: MOD is underpinned by a strong theoretical foundation, with proofs that demonstrate its optimality and sub-optimality of existing methods. The paper provides empirical evidence of MOD's effectiveness across various tasks and models, showcasing its practical applicability and robustness in real-world scenarios.

Weaknesses

I don't see any major weaknesses in this paper.

Questions

* Is the conditions of Eq. 6 correctly? * Line 231-233: Can you explain more about this?

Rating

7

Confidence

3

Soundness

3

Presentation

4

Contribution

3

Limitations

None

Reviewer BvFb5/10 · confidence 2/52024-07-12

Summary

The authors propose a decoding method that aims to combine the predictions of diverse models that are aligned with different objectives. In their multi-objective setting, the goal is to find an optimal policy that maximize a weighted, multi-objective reward, given the policy aligned to each of the individual rewards. In particular, the authors propose a reformulation using Legendre transform to bypass calculating Z (normalization) at a sequence level.

Strengths

1. The authors provide detailed theoretical analysis to justify their approach. 2. The authors show that the proposed method can handle negative weights for rewards, which cannot be accomplished by previous work.

Weaknesses

1. The baselines appears weak. For example, in Appendix F, the main comparison is against RS. However, RS cannot even outperform the best individual model in all experiments (Tables 7,8,9,10). 2. The proposed MOD also seems not much stronger. MOD can only beat the best individual model on 2/4 settings in Appendix F. 3. Lack of baselines. It would be helpful if the authors can include more generic ensemble baselines such as weighted averaging/voting.

Questions

1. Has the authors studied the inference overhead of the proposed MOD?

Rating

5

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

Conclusion and throughout the work.

Reviewer pv2M8/10 · confidence 4/52024-07-13

Summary

In many practical uses of RLHF the reward function is the convex combination of several rewards. Instead of training a single policy attempting to maximize the expected aggregate reward (subject to the usual regularization keeping it close to an anchor policy), the authors show that one can train separate policies, one for each reward and then mix them at decoding time using the same convex combination in log-probability space. One important consequence is that one can change the weights on various rewards at decoding time, per response, making the algorithm very appealing for situations where the balance between certain rewards needs to change depending on the prompt/context.

Strengths

Novel approach to dealing with rewards that are a linear mix of "elementary" rewards; mathematically sound. Offers a simple, practical way of changing the mix of "elementary" rewards at decoding time, per model response.

Weaknesses

The presentation could be much simpler, starting from the ubiquitous case of using KL divergence for regularization, which also leads to the elegant log-linear combination in Eq. (7). The general case for f-divergence could be mentioned, but relegated to the already prodigious appendix. One technical weakness of the proposed approach is that one needs to serve/run M different policies at decoding time, which is significant overhead. After completing the review I have become aware of the work in: @misc{wang2024conditionedlanguagepolicygeneral, title={Conditioned Language Policy: A General Framework for Steerable Multi-Objective Finetuning}, author={Kaiwen Wang and Rahul Kidambi and Ryan Sullivan and Alekh Agarwal and Christoph Dann and Andrea Michi and Marco Gelmi and Yunxuan Li and Raghav Gupta and Avinava Dubey and Alexandre Ramé and Johan Ferret and Geoffrey Cideron and Le Hou and Hongkun Yu and Amr Ahmed and Aranyak Mehta and Léonard Hussenot and Olivier Bachem and Edouard Leurent}, year={2024}, eprint={2407.15762}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2407.15762}, } Section 6 and Appendix E in [wang2024conditionedlanguagepolicygeneral] are directly relevant to this paper, deriving a sensitivity analysis for logit mixing, the log-linear combination in Eq. (7).

Questions

The reformulation using Legendre transformation in Section 4.2 was hard to follow. Again, a crisp derivation for the case of KL regularization that anyone can follow would greatly improve the reach, and implicitly impact of the paper.

Rating

8

Confidence

4

Soundness

3

Presentation

2

Contribution

4

Limitations

One technical weakness of the proposed approach is that one needs to serve/run M different policies at decoding time, which is significant overhead.

Reviewer dVwo7/10 · confidence 3/52024-07-13

Summary

This paper presents Multi-Objective Decoding (MOD), a novel algorithm designed to align language models (LMs) with multiple human preferences simultaneously during decoding. MOD addresses the limitations of existing methods that optimize LMs for a single reward function, thereby providing flexibility and efficiency without the need for retraining. The authors define multi-objective reward functions and assume the existence of single-objective aligned LMs optimized for specific rewards. By leveraging the properties of strong-barrier functions and using the Legendre transform, they derive a closed-form solution for linearly combining the outputs of different models, achieving multi-objective alignment. This method guarantees optimality under certain conditions and transforms response-level decoding into efficient token-level decoding using greedy search. Extensive experiments validate MOD's effectiveness, demonstrating significant improvements in reward optimization compared to parameter-merging baselines.

Strengths

MOD introduces a novel method for multi-objective alignment, enabling language models to align with multiple objectives simultaneously during decoding, thus eliminating the need for retraining. The authors provide a robust theoretical framework by defining multi-objective reward functions and leveraging strong-barrier functions. They prove a closed-form bijection between single-objective models and their rewards, and derive a closed-form solution using the Legendre transform. MOD achieves optimality guarantees under certain conditions and transforms response-level decoding into efficient token-level decoding using greedy search, making the method both effective and practical. Extensive experiments demonstrate MOD's superior performance, showing a 12.8% overall reward improvement compared to parameter-merging baselines when optimizing for three objectives. The effectiveness is validated across various tasks and model sizes.

Weaknesses

Although MOD circumvents the need for retraining, it requires loading multiple models concurrently, which can be computationally intensive and may not scale efficiently for a larger number of objectives or bigger model sizes. The paper could benefit from a more detailed discussion on potential negative impacts or failure modes, especially in scenarios involving conflicting objectives or suboptimal base model alignment.

Questions

How does the MOD approach scale with an increasing number of objectives? Are there any practical limits to the number of objectives that can be managed simultaneously? Can the authors provide more insights into the sensitivity of MOD to the quality of base models? Specifically, how does the performance degrade if the base models are not well-aligned or are suboptimal? Are there any guidelines or best practices for setting and adjusting these preference weightings to achieve optimal results?

Rating

7

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors have addressed the limitations in Section 7.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC