COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics
Lianhui Qin, Sean Welleck, Daniel Khashabi, Yejin Choi
摘要
Many applications of text generation require incorporating different constraints to control the semantics or style of generated text. These constraints can be hard (e.g., ensuring certain keywords are included in the output) and soft (e.g., contextualizing the output with the left-or right-hand context). In this paper, we present Energy-based Constrained Decoding with Langevin Dynamics (COLD), a decoding framework which unifies constrained generation as specifying constraints through an energy function, then performing efficient differentiable reasoning over the constraints through gradient-based sampling. COLD decoding is a flexible framework that can be applied directly to off-the-shelf left-to-right language models without the need for any task-specific fine-tuning, as demonstrated through three challenging text generation applications: lexically-constrained generation, abductive reasoning, and counterfactual reasoning. Our experiments on these constrained generation tasks point to the effectiveness of our approach, both in terms of automatic and human evaluation. 1 1 Code is available at https://github.com/qkaren/COLD_decoding
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 79 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Plug and Play Language Models: A Simple Approach to Controlled Text Generation 引用了 The Curious Case of Neural Text Degeneration
- Diffusion-LM Improves Controllable Text Generation 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- Diffusion-LM Improves Controllable Text Generation 引用了 Abductive Commonsense Reasoning
- Diffusion-LM Improves Controllable Text Generation 引用了 Language Models are Few-Shot Learners
- Diffusion-LM Improves Controllable Text Generation 引用了 The Curious Case of Neural Text Degeneration
- COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllability 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllability 引用了 Diffusion-LM Improves Controllable Text Generation
- COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllability 引用了 Automatically Auditing Large Language Models via Discrete Optimization
- COLD-Attack: Jailbreaking LLMs with Stealthiness and Controllability 引用了 Language Models are Few-Shot Learners
- Derivative-Free Guidance in Continuous and Discrete Diffusion Models with Soft Value-based Decoding 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- Language Models are Few-Shot Learners 引用了 The Curious Case of Neural Text Degeneration
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning 引用了 BERTScore: Evaluating Text Generation with BERT
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper79
- Diffusion-LM Improves Controllable Text GenerationXiang Lisa Li, John Thickstun, Ishaan Gulrajani, Percy Liang 等NeurIPS 2022 · 1,546 次引用
- Automatically Auditing Large Language Models via Discrete OptimizationErik Jones, Anca D. Dragan, Aditi Raghunathan, Jacob SteinhardtICML 2023 · 232 次引用
- COLD-Attack: Jailbreaking LLMs with Stealthiness and ControllabilityXingang Guo, Fangxu Yu, Huan Zhang, Lianhui Qin 等ICML 2024 · 173 次引用
- Derivative-Free Guidance in Continuous and Discrete Diffusion Models with Soft Value-based DecodingXiner Li, Yulai Zhao, Chenyu Wang, Gabriele Scalia 等NeurIPS 2025 · 147 次引用
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement LearningMingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang 等EMNLP 2022 · 141 次引用
它引用的 Paper22
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger 等ICLR 2020 · 8,443 次引用
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
- Plug and Play Language Models: A Simple Approach to Controlled Text GenerationSumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung 等ICLR 2020 · 1,166 次引用
- Abductive Commonsense ReasoningChandra Bhagavatula, Ronan Le Bras, Chaitanya Malaviya, Keisuke Sakaguchi 等ICLR 2020 · 521 次引用
相关 Paper
- Controlled LLM Decoding via Discrete Auto-regressive BiasingPatrick Pynadath, Ruqi ZhangICLR 2025
- Principled Gradient-Based MCMC for Conditional Sampling of TextLi Du, Afra Amini, Lucas Torroba Hennigen, Xinyan Velocity Yu 等ICML 2024 · 6 次引用
- Gradient-based Constrained Sampling from Language ModelsSachin Kumar, Biswajit Paria, Yulia TsvetkovEMNLP 2022 · 22 次引用
- Grammar-Constrained Decoding for Structured NLP Tasks without FinetuningSaibo Geng, Martin Josifoski, Maxime Peyrard, Robert WestEMNLP 2023 · 33 次引用
- Gradient-guided Unsupervised Lexically Constrained Text GenerationLei ShaEMNLP 2020 · 35 次引用
