Controlled LLM Decoding via Discrete Auto-regressive Biasing
摘要
Controlled text generation allows for enforcing user-defined constraints on large language model outputs, an increasingly important field as LLMs become more prevalent in everyday life. One common approach uses energy-based decoding, which defines a target distribution through an energy function that combines multiple constraints into a weighted average. However, these methods often struggle to balance fluency with constraint satisfaction, even with extensive tuning of the energy function's coefficients. In this paper, we identify that this suboptimal balance arises from sampling in continuous space rather than the natural discrete space of text tokens. To address this, we propose Discrete Auto-regressive Biasing, a controlled decoding algorithm that leverages gradients while operating entirely in the discrete text domain. Specifically, we introduce a new formulation for controlled text generation by defining a joint distribution over the generated sequence and an auxiliary bias sequence. To efficiently sample from this joint distribution, we propose a Langevin-within-Gibbs sampling algorithm using gradient-based discrete MCMC. Our method significantly improves constraint satisfaction while maintaining comparable or better fluency, all with even lower computational costs. We demonstrate the advantages of our controlled decoding method on sentiment control, language detoxification, and keyword-guided generation. We make our code available at the following url: https://github.com/patrickpynadath1/dab .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics 引用了 BERTScore: Evaluating Text Generation with BERT
- C³TG: Conflict-aware, Composite, and Collaborative Controlled Text Generation 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
- C³TG: Conflict-aware, Composite, and Collaborative Controlled Text Generation 引用了 COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics
- 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 引用了 COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models 引用了 Plug and Play Language Models: A Simple Approach to Controlled Text Generation
引用它的顶会 Paper1
它引用的 Paper20
- BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger 等ICLR 2020 · 8,443 次引用
- Plug and Play Language Models: A Simple Approach to Controlled Text GenerationSumanth Dathathri, Andrea Madotto, Janice Lan, Jane Hung 等ICLR 2020 · 1,166 次引用
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi 等EMNLP Findings 2020 · 692 次引用
- COLD Decoding: Energy-based Constrained Text Generation with Langevin DynamicsLianhui Qin, Sean Welleck, Daniel Khashabi, Yejin ChoiNeurIPS 2022 · 217 次引用
- COLD-Attack: Jailbreaking LLMs with Stealthiness and ControllabilityXingang Guo, Fangxu Yu, Huan Zhang, Lianhui Qin 等ICML 2024 · 173 次引用
相关 Paper
- 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 次引用
- A Distributional Approach to Controlled Text GenerationMuhammad Khalifa, Hady Elsahar, Marc DymetmanICLR 2021 · 135 次引用
- Improving Controllable Text Generation with Position-Aware Weighted DecodingYuxuan Gu, Xiaocheng Feng, Sicheng Ma, Jiaming Wu 等ACL Findings 2022 · 12 次引用
- Critic-Guided Decoding for Controlled Text GenerationMinbeom Kim, Hwanhee Lee, Kang Min Yoo, Joonsuk Park 等ACL Findings 2023 · 9 次引用
