COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics
Lianhui Qin, Sean Welleck, Daniel Khashabi, Yejin Choi

TL;DR
COLD decoding introduces an energy-based, gradient-driven sampling method for flexible, constraint-aware text generation that works with existing language models without additional fine-tuning.
Contribution
It unifies constrained text generation as an energy function optimization using Langevin dynamics, enabling efficient, flexible decoding across various tasks without task-specific training.
Findings
Effective in lexically-constrained generation
Successful in abductive reasoning tasks
Outperforms baselines in human evaluations
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Advanced Text Analysis Techniques
