mlsanityData to 14 Oct 2026

Controllable Generation via Locally Constrained Resampling

arXiv 2410.13111 ↗First posted 17 Oct 2024cs.LG cs.CL stat.MLcited by 11

Not on the map. Why?

Abstract (arXiv)

Autoregressive models have demonstrated an unprecedented ability at modeling the intricacies of natural language. However, they continue to struggle with generating complex outputs that adhere to logical constraints. Sampling from a fully-independent distribution subject to a constraint is hard. Sampling from an autoregressive distribution subject to a constraint is doubly hard: We have to contend not only with the hardness of the constraint but also the distribution's lack of structure. We propose a tractable probabilistic approach that performs Bayesian conditioning to draw samples subject to a constraint. Our approach considers the entire sequence, leading to a more globally optimal constrained generation than current greedy methods. Starting from a model sample, we induce a local, factorized distribution which we can tractably condition on the constraint. To generate samples that satisfy the constraint, we sample from the conditional distribution, correct for biases in the samples and resample. The resulting samples closely approximate the target distribution and are guaranteed to satisfy the constraints. We evaluate our approach on several tasks, including LLM detoxification and solving Sudoku puzzles. We show that by disallowing a list of toxic expressions our approach is able to steer the model's outputs away from toxic generations, outperforming similar approaches to detoxification. We conclude by showing that our approach achieves a perfect accuracy on Sudoku compared to <50% for GPT4-o and Gemini 1.5.

Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 34 of its 56 references that are in the map. First posted on arXiv 17 Oct 2024.

Builds on

34 of 56 references.

References · 34

  1. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  3. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
  4. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
  5. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
  6. 2023Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoningcited by 391
  7. 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 378
  8. 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 376
  9. 2017A Semantic Loss Function for Deep Learning with Symbolic Knowledgecited by 270
  10. 2019Differentiation of Blackbox Combinatorial Solverscited by 226
  11. 2023Efficient Guided Generation for Large Language Modelscited by 200
  12. 2019SATNet: Bridging deep learning and logical reasoning using a differentiable satisfiability solvercited by 173
22 more
  1. 2021Challenges in Detoxifying Language Modelscited by 169
  2. 2022COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamicscited by 161
  3. 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 154
  4. 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 149
  5. 2020Einsum Networks: Fast and Scalable Learning of Tractable Probabilistic Circuitscited by 103
  6. 2022Semantic Probabilistic Layers for Neuro-Symbolic Learningcited by 103
  7. 2023Amortizing intractable inference in large language modelscited by 97
  8. 2023Sequential Monte Carlo Steering of Large Language Models using Probabilistic Programscited by 80
  9. 2023Evaluating Large Language Models on Controlled Generation Taskscited by 73
  10. 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 68
  11. 2023Tractable Control for Autoregressive Language Generationcited by 65
  12. 2023Grammar Prompting for Domain-Specific Language Generation with Large Language Modelscited by 58
  13. 2024Grammar-Aligned Decodingcited by 54
  14. 2024Automata-based constraints for language model decodingcited by 51
  15. 2022Controllable Text Generation with Neurally-Decomposed Oraclecited by 41
  16. 2022SIMPLE: A Gradient Estimator for k-Subset Samplingcited by 34
  17. 2024Adaptable Logical Control for Large Language Modelscited by 30
  18. 2022Neuro-Symbolic Entropy Regularizationcited by 27
  19. 2024Scaling Tractable Probabilistic Circuits: A Systems Perspectivecited by 23
  20. 2024Where is the signal in tokenization space?cited by 21
  21. 2016SDDs are Exponentially More Succinct than OBDDscited by 19
  22. 2023Long Horizon Temperature Scalingcited by 18

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 9; 2026: 2.

11 papers.