Language Model Decoding as Direct Metrics Optimization
Haozhe Ji, Pei Ke, Hongning Wang, Minlie Huang
Abstract
Despite the remarkable advances in language modeling, current mainstream decoding methods still struggle to generate texts that align with human texts across different aspects. In particular, sampling-based methods produce less-repetitive texts which are often disjunctive in discourse, while search-based methods maintain topic coherence at the cost of increased repetition. Overall, these methods fall short in achieving holistic alignment across a broad range of aspects. In this work, we frame decoding from a language model as an optimization problem with the goal of strictly matching the expected performance with human texts measured by multiple metrics of desired aspects simultaneously. The resulting decoding distribution enjoys an analytical solution that scales the input language model distribution via a sequence-level energy function defined by these metrics. And most importantly, we prove that this induced distribution is guaranteed to improve the perplexity on human texts, which suggests a better approximation to the underlying distribution of human texts. To facilitate tractable sampling from this globally normalized distribution, we adopt the Sampling-Importance-Resampling technique. Experiments on various domains and model scales demonstrate the superiority of our method in metrics alignment with human texts and human evaluation over strong baselines.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- Towards Efficient Exact Optimization of Language Model AlignmentHaozhe Ji, Cheng Lu, Yilin Niu, Pei Ke et al.ICML 2024 · 32 citations
- Antidistillation SamplingYash Savani, Asher Trockman, Zhili Feng, Yixuan Even Xu et al.NeurIPS 2025 · 24 citations
- Synthesize, Partition, then Adapt: Eliciting Diverse Samples from Foundation ModelsYeming Wen, Swarat ChaudhuriNeurIPS 2024 · 1 citation
- Non-myopic Generation of Language Models for Reasoning and PlanningChang Ma, Haiteng Zhao, Junlei Zhang, Junxian He et al.ICLR 2025
- MAP: Multi-Human-Value Alignment PaletteXinran Wang, Qi Le, Ammar Ahmed, Enmao Diao et al.ICLR 2025
Builds on19
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
- Neural Text Generation With Unlikelihood TrainingSean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan et al.ICLR 2020 · 683 citations
Related papers
- ARGS: Alignment as Reward-Guided SearchMaxim Khanov, Jirayu Burapacheep, Yixuan LiICLR 2024 · 101 citations
- A Contrastive Framework for Neural Text GenerationYixuan Su, Tian Lan, Yan Wang, Dani Yogatama et al.NeurIPS 2022 · 349 citations
- Automatic Detection of Generated Text is Easiest when Humans are FooledDaphne Ippolito, Daniel Duckworth, Chris Callison-Burch, Douglas EckACL 2020 · 21 citations
- Improving Open-Ended Text Generation via Adaptive DecodingWenhong Zhu, Hongkun Hao, Zhiwei He, Yiming Ai et al.ICML 2024 · 21 citations
- Leveraging Importance Sampling to Detach Alignment Modules from Large Language ModelsYi Liu, Dianqing Liu, Mingye Zhu, Junbo Guo et al.NeurIPS 2025 · 1 citation
