Gradient-based Constrained Sampling from Language Models
摘要
Large pretrained language models generate fluent text but are notoriously hard to controllably sample from. In this work, we study constrained sampling from such language models: generating text that satisfies user-defined constraints, while maintaining fluency and model's performance in a downstream task. We propose MUCOLA-a sampling procedure that combines the log-likelihood of the language model with arbitrary (differentiable) constraints in a single energy function, and then generates samples in a non-autoregressive manner. Specifically, it initializes the entire output sequence with noise and follows a Markov chain defined by Langevin Dynamics using the gradients of the energy function. We evaluate MUCOLA on text generation with soft and hard constraints as well as their combinations obtaining significant improvements over competitive baselines for toxicity avoidance, sentiment control, and keyword-guided generation. 1 cat Transformer Layers
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 24 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Controlled Text Generation with Natural Language Instructions 引用了 Diffusion-LM Improves Controllable Text Generation
- Controlled Text Generation with Natural Language Instructions 引用了 The Curious Case of Neural Text Degeneration
- Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery 引用了 Language Models are Few-Shot Learners
- Grammar-Aligned Decoding 引用了 Diffusion-LM Improves Controllable Text Generation
- 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
- Controlled Text Generation via Language Model Arithmetic 引用了 Language Models are Few-Shot Learners
- Decoding-Time Language Model Alignment with Multiple Objectives 引用了 Language Models are Few-Shot Learners
- Language Models are Few-Shot Learners 引用了 The Curious Case of Neural Text Degeneration
引用它的顶会 Paper24
- Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and DiscoveryYuxin Wen, Neel Jain, John Kirchenbauer, Micah Goldblum 等NeurIPS 2023 · 454 次引用
- Controlled Text Generation with Natural Language InstructionsWangchunshu Zhou, Yuchen Eleanor Jiang, Ethan Wilcox, Ryan Cotterell 等ICML 2023 · 121 次引用
- Decoding-Time Language Model Alignment with Multiple ObjectivesRuizhe Shi, Yifang Chen, Yushi Hu, Alisa Liu 等NeurIPS 2024 · 111 次引用
- Grammar-Aligned DecodingKanghee Park, Jiayu Wang, Taylor Berg-Kirkpatrick, Nadia Polikarpova 等NeurIPS 2024 · 73 次引用
- Controlled Text Generation via Language Model ArithmeticJasper Dekoninck, Marc Fischer, Luca Beurer-Kellner, Martin T. VechevICLR 2024 · 58 次引用
它引用的 Paper28
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
- Video Diffusion ModelsJonathan Ho, Tim Salimans, Alexey A. Gritsenko, William Chan 等NeurIPS 2022 · 2,948 次引用
- Diffusion-LM Improves Controllable Text GenerationXiang Lisa Li, John Thickstun, Ishaan Gulrajani, Percy Liang 等NeurIPS 2022 · 1,546 次引用
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and ComprehensionMike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad 等ACL 2020 · 1,224 次引用
相关 Paper
- Controlled LLM Decoding via Discrete Auto-regressive BiasingPatrick Pynadath, Ruqi ZhangICLR 2025
- Controlled Text Generation as Continuous Optimization with Multiple ConstraintsSachin Kumar, Eric Malmi, Aliaksei Severyn, Yulia TsvetkovNeurIPS 2021 · 91 次引用
- Principled Gradient-Based MCMC for Conditional Sampling of TextLi Du, Afra Amini, Lucas Torroba Hennigen, Xinyan Velocity Yu 等ICML 2024 · 6 次引用
- Attribute Controlled Fine-tuning for Large Language Models: A Case Study on DetoxificationTao Meng, Ninareh Mehrabi, Palash Goyal, Anil Ramakrishna 等EMNLP Findings 2024
- Unlocking Anticipatory Text Generation: A Constrained Approach for Large Language Models DecodingLifu Tu, Semih Yavuz, Jin Qu, Jiacheng Xu 等EMNLP 2024 · 2 次引用
