Adaptive Decoding via Latent Preference Optimization
Shehzaad Dhuliawala, Ilia Kulikov, Ping Yu, Asli Celikyilmaz, Jason Weston, Sainbayar Sukhbaatar, Jack Lanchantin
TL;DR
The paper addresses decoding reliability and diversity by introducing AdaptiveDecoder, a learnable layer that dynamically selects decoding temperatures at token or sequence level. Trained with Latent Preference Optimization (LPO), the approach treats temperature selection as a discrete latent variable and uses preference-based signals to optimize it, outperforming all fixed-temperature baselines across math reasoning, creative writing, and instruction-following tasks. Key contributions include a practical integration of AdaptiveDecoder with frozen LLMs, a general LPO framework for discrete latent decisions, and extensive demonstrations across diverse tasks showing improved performance, reduced repetition, and better constraint adherence. The work suggests broad applicability to other decoding hyperparameters and offers a scalable path toward task-aware, adaptive generation in large language models.
Abstract
During language model decoding, it is known that using higher temperature sampling gives more creative responses, while lower temperatures are more factually accurate. However, such models are commonly applied to general instruction following, which involves both creative and fact seeking tasks, using a single fixed temperature across all examples and tokens. In this work, we introduce Adaptive Decoding, a layer added to the model to select the sampling temperature dynamically at inference time, at either the token or example level, in order to optimize performance. To learn its parameters we introduce Latent Preference Optimization (LPO) a general approach to train discrete latent variables such as choices of temperature. Our method outperforms all fixed decoding temperatures across a range of tasks that require different temperatures, including UltraFeedback, Creative Story Writing, and GSM8K.
