mlsanityData to 14 Oct 2026

A Pseudo-Semantic Loss for Autoregressive Models with Logical Constraints

arXiv 2312.03905 ↗First posted 6 Dec 2023cs.LG cs.AI cs.CLcited by 22

Not on the map. Why?

Abstract (arXiv)

Neuro-symbolic AI bridges the gap between purely symbolic and neural approaches to learning. This often requires maximizing the likelihood of a symbolic constraint w.r.t the neural network's output distribution. Such output distributions are typically assumed to be fully-factorized. This limits the applicability of neuro-symbolic learning to the more expressive autoregressive distributions, e.g., transformers. Under such distributions, computing the likelihood of even simple constraints is #P-hard. Instead of attempting to enforce the constraint on the entire output distribution, we propose to do so on a random, local approximation thereof. More precisely, we optimize the likelihood of the constraint under a pseudolikelihood-based approximation centered around a model sample. Our approximation is factorized, allowing the reuse of solutions to sub-problems, a main tenet for efficiently computing neuro-symbolic losses. Moreover, it is a local, high-fidelity approximation of the likelihood, exhibiting low entropy and KL-divergence around the model sample. We evaluate our approach on Sudoku and shortest-path prediction cast as autoregressive generation, and observe that we greatly improve upon the base model's ability to predict logically-consistent outputs. We also evaluate on the task of detoxifying large language models. Using a simple constraint disallowing a list of toxic words, we are able to steer the model's outputs away from toxic generations, achieving SoTA detoxification compared to previous approaches.

Key facts. Cited by 22 papers in the map (data through 14 Oct 2026). Builds on 33 of its 51 references that are in the map. First posted on arXiv 6 Dec 2023.

Builds on

33 of 51 references.

References · 33

  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. 2019Neural Probabilistic Logic Programming in DeepProbLogcited by 394
  5. 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 376
  6. 2017A Semantic Loss Function for Deep Learning with Symbolic Knowledgecited by 270
  7. 2018Explainable Prediction of Medical Codes from Clinical Textcited by 234
  8. 2019Differentiation of Blackbox Combinatorial Solverscited by 226
  9. 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 182
  10. 2019SATNet: Bridging deep learning and logical reasoning using a differentiable satisfiability solvercited by 173
  11. 2021Challenges in Detoxifying Language Modelscited by 169
  12. 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 154
21 more
  1. 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 149
  2. 2020A Survey of Knowledge-Enhanced Text Generationcited by 120
  3. 2020Einsum Networks: Fast and Scalable Learning of Tractable Probabilistic Circuitscited by 103
  4. 2022Semantic Probabilistic Layers for Neuro-Symbolic Learningcited by 103
  5. 2017Logic Tensor Networks for Semantic Image Interpretationcited by 92
  6. 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 68
  7. 2020Coherent Hierarchical Multi-Label Classification Networkscited by 65
  8. 2023Tractable Control for Autoregressive Language Generationcited by 65
  9. 2020Lexically Constrained Neural Machine Translation with Levenshtein Transformercited by 45
  10. 2021MultiplexNet: Towards Fully Satisfied Logical Constraints in Neural Networkscited by 44
  11. 2022Controllable Text Generation with Neurally-Decomposed Oraclecited by 41
  12. 2021Multi-Label Classification Neural Networks with Hard Logical Constraintscited by 36
  13. 2022SIMPLE: A Gradient Estimator for k-Subset Samplingcited by 34
  14. 2016Programming with a Differentiable Forth Interpretercited by 33
  15. 2022Neuro-Symbolic Entropy Regularizationcited by 27
  16. 2018Deep Generative Models with Learnable Knowledge Constraintscited by 23
  17. 2021InsNet: An Efficient, Flexible, and Performant Insertion-based Text Generation Modelcited by 14
  18. 2023Semantic Strengthening of Neuro-Symbolic Learningcited by 12
  19. 2018Prior Knowledge Integration for Neural Machine Translation using Posterior Regularizationcited by 9
  20. 2021Evaluating Relaxations of Logic for Neural Networks: A Comprehensive Studycited by 8
  21. 2018Tunneling Neural Perception and Logic Reasoning through Abductive Learningcited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 6; 2025: 7; 2026: 9.

22 papers.

Sort:

By area:

  1. 2025Neuro-Symbolic AI in 2024: A Systematic Reviewcited by 38
  2. 2024Adaptable Logical Control for Large Language Modelscited by 30
  3. 2024Logically Consistent Language Models via Neuro-Symbolic Integrationcited by 30
  4. 2024Scaling Tractable Probabilistic Circuits: A Systems Perspectivecited by 23
  5. 2024On the Independence Assumption in Neurosymbolic Learningcited by 18
  6. 2025Neurosymbolic Diffusion Modelscited by 13
  7. 2025A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfactioncited by 11
  8. 2024NeSyA: Neurosymbolic Automatacited by 10
  9. 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generationcited by 8
  10. 2024Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxificationcited by 7
  11. 2025Neural Probabilistic Circuits: Enabling Compositional and Interpretable Predictions through Logical Reasoningcited by 6
  12. 2025Semantic Probabilistic Control of Language Modelscited by 4
10 more
  1. 2026Logic Tensor Network-Enhanced Generative Adversarial Networkcited by 3
  2. 2026To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuitscited by 3
  3. 2025Understanding and Improving Adversarial Robustness of Neural Probabilistic Circuitscited by 1
  4. 2026Entropy-Aligned Decoding of LMs for Better Writing and Reasoningcited by 1
  5. 2026Probabilistic Programs of Thoughtcited by 1
  6. 2026From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Modelscited by 1
  7. 2026Can VLMs Reason Robustly? A Neuro-Symbolic Investigationcited by 0
  8. 2026Neuro-Symbolic Injection of LTLf Constraints in Autoregressive Reinforcement Learning Policiescited by 0
  9. 2026Generate in the Chart, Not on the Boundary: Function-Symbol Grounding for Hard Constraints in LTN-GANscited by 0
  10. 2026Structural Automata for Neural Semantic Parsingcited by 0