A Pseudo-Semantic Loss for Autoregressive Models with Logical Constraints
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
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
- 2019Neural Probabilistic Logic Programming in DeepProbLogcited by 394
- 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 376
- 2017A Semantic Loss Function for Deep Learning with Symbolic Knowledgecited by 270
- 2018Explainable Prediction of Medical Codes from Clinical Textcited by 234
- 2019Differentiation of Blackbox Combinatorial Solverscited by 226
- 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 182
- 2019SATNet: Bridging deep learning and logical reasoning using a differentiable satisfiability solvercited by 173
- 2021Challenges in Detoxifying Language Modelscited by 169
- 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 154
21 more
- 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 149
- 2020A Survey of Knowledge-Enhanced Text Generationcited by 120
- 2020Einsum Networks: Fast and Scalable Learning of Tractable Probabilistic Circuitscited by 103
- 2022Semantic Probabilistic Layers for Neuro-Symbolic Learningcited by 103
- 2017Logic Tensor Networks for Semantic Image Interpretationcited by 92
- 2022Exploring the Limits of Domain-Adaptive Training for Detoxifying Large-Scale Language Modelscited by 68
- 2020Coherent Hierarchical Multi-Label Classification Networkscited by 65
- 2023Tractable Control for Autoregressive Language Generationcited by 65
- 2020Lexically Constrained Neural Machine Translation with Levenshtein Transformercited by 45
- 2021MultiplexNet: Towards Fully Satisfied Logical Constraints in Neural Networkscited by 44
- 2022Controllable Text Generation with Neurally-Decomposed Oraclecited by 41
- 2021Multi-Label Classification Neural Networks with Hard Logical Constraintscited by 36
- 2022SIMPLE: A Gradient Estimator for k-Subset Samplingcited by 34
- 2016Programming with a Differentiable Forth Interpretercited by 33
- 2022Neuro-Symbolic Entropy Regularizationcited by 27
- 2018Deep Generative Models with Learnable Knowledge Constraintscited by 23
- 2021InsNet: An Efficient, Flexible, and Performant Insertion-based Text Generation Modelcited by 14
- 2023Semantic Strengthening of Neuro-Symbolic Learningcited by 12
- 2018Prior Knowledge Integration for Neural Machine Translation using Posterior Regularizationcited by 9
- 2021Evaluating Relaxations of Logic for Neural Networks: A Comprehensive Studycited by 8
- 2018Tunneling Neural Perception and Logic Reasoning through Abductive Learningcited by 6
Built on by
Citing papers per year: 2024: 6; 2025: 7; 2026: 9.
22 papers.
Sort:
By area:
- 2025Neuro-Symbolic AI in 2024: A Systematic Reviewcited by 38
- 2024Adaptable Logical Control for Large Language Modelscited by 30
- 2024Logically Consistent Language Models via Neuro-Symbolic Integrationcited by 30
- 2024Scaling Tractable Probabilistic Circuits: A Systems Perspectivecited by 23
- 2024On the Independence Assumption in Neurosymbolic Learningcited by 18
- 2025Neurosymbolic Diffusion Modelscited by 13
- 2025A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfactioncited by 11
- 2024NeSyA: Neurosymbolic Automatacited by 10
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generationcited by 8
- 2024Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxificationcited by 7
- 2025Neural Probabilistic Circuits: Enabling Compositional and Interpretable Predictions through Logical Reasoningcited by 6
- 2025Semantic Probabilistic Control of Language Modelscited by 4
10 more
- 2026Logic Tensor Network-Enhanced Generative Adversarial Networkcited by 3
- 2026To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuitscited by 3
- 2025Understanding and Improving Adversarial Robustness of Neural Probabilistic Circuitscited by 1
- 2026Entropy-Aligned Decoding of LMs for Better Writing and Reasoningcited by 1
- 2026Probabilistic Programs of Thoughtcited by 1
- 2026From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Modelscited by 1
- 2026Can VLMs Reason Robustly? A Neuro-Symbolic Investigationcited by 0
- 2026Neuro-Symbolic Injection of LTLf Constraints in Autoregressive Reinforcement Learning Policiescited by 0
- 2026Generate in the Chart, Not on the Boundary: Function-Symbol Grounding for Hard Constraints in LTN-GANscited by 0
- 2026Structural Automata for Neural Semantic Parsingcited by 0
- 2026Structural Automata for Neural Semantic Parsing9 Oct 2026
- 2026From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Models11 Sep 2026
- 2026Generate in the Chart, Not on the Boundary: Function-Symbol Grounding for Hard Constraints in LTN-GANs21 Aug 2026
- 2026Neuro-Symbolic Injection of LTLf Constraints in Autoregressive Reinforcement Learning Policies6 Jun 2026
- 2026Probabilistic Programs of Thought19 Apr 2026
- 2026Can VLMs Reason Robustly? A Neuro-Symbolic Investigation25 Mar 2026
- 2026To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuits21 Jan 2026
- 2026Logic Tensor Network-Enhanced Generative Adversarial Network7 Jan 2026
- 2026Entropy-Aligned Decoding of LMs for Better Writing and Reasoning5 Jan 2026
- 2025Understanding and Improving Adversarial Robustness of Neural Probabilistic Circuits24 Sep 2025
- 2025Neurosymbolic Diffusion Models19 May 2025
- 2025Semantic Probabilistic Control of Language Models4 May 2025
10 more
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generation25 Apr 2025
- 2025A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfaction25 Mar 2025
- 2025Neural Probabilistic Circuits: Enabling Compositional and Interpretable Predictions through Logical Reasoning13 Jan 2025
- 2025Neuro-Symbolic AI in 2024: A Systematic Review9 Jan 2025
- 2024NeSyA: Neurosymbolic Automata10 Dec 2024
- 2024Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification7 Oct 2024
- 2024Logically Consistent Language Models via Neuro-Symbolic Integration9 Sep 2024
- 2024Adaptable Logical Control for Large Language Models19 Jun 2024
- 2024Scaling Tractable Probabilistic Circuits: A Systems Perspective2 Jun 2024
- 2024On the Independence Assumption in Neurosymbolic Learning12 Apr 2024
- 2025Neurosymbolic Diffusion Modelscited by 13
- 2024NeSyA: Neurosymbolic Automatacited by 10
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generationcited by 8
- 2025Neural Probabilistic Circuits: Enabling Compositional and Interpretable Predictions through Logical Reasoningcited by 6
- 2026Entropy-Aligned Decoding of LMs for Better Writing and Reasoningcited by 1
- 2026Probabilistic Programs of Thoughtcited by 1
- 2026From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Modelscited by 1
- 2026Can VLMs Reason Robustly? A Neuro-Symbolic Investigationcited by 0
- 2026From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Models11 Sep 2026
- 2026Probabilistic Programs of Thought19 Apr 2026
- 2026Can VLMs Reason Robustly? A Neuro-Symbolic Investigation25 Mar 2026
- 2026Entropy-Aligned Decoding of LMs for Better Writing and Reasoning5 Jan 2026
- 2025Neurosymbolic Diffusion Models19 May 2025
- 2025TRACE Back from the Future: A Probabilistic Reasoning Approach to Controllable Language Generation25 Apr 2025
- 2025Neural Probabilistic Circuits: Enabling Compositional and Interpretable Predictions through Logical Reasoning13 Jan 2025
- 2024NeSyA: Neurosymbolic Automata10 Dec 2024
- 2025Neuro-Symbolic AI in 2024: A Systematic Reviewcited by 38
- 2024Adaptable Logical Control for Large Language Modelscited by 30
- 2024Logically Consistent Language Models via Neuro-Symbolic Integrationcited by 30
- 2024Scaling Tractable Probabilistic Circuits: A Systems Perspectivecited by 23
- 2024On the Independence Assumption in Neurosymbolic Learningcited by 18
- 2025A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfactioncited by 11
- 2024Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxificationcited by 7
- 2025Semantic Probabilistic Control of Language Modelscited by 4
- 2026Logic Tensor Network-Enhanced Generative Adversarial Networkcited by 3
- 2026To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuitscited by 3
- 2025Understanding and Improving Adversarial Robustness of Neural Probabilistic Circuitscited by 1
- 2026Generate in the Chart, Not on the Boundary: Function-Symbol Grounding for Hard Constraints in LTN-GANscited by 0
12 most cited of 13 All 13 (JSON)
- 2026Structural Automata for Neural Semantic Parsing9 Oct 2026
- 2026Generate in the Chart, Not on the Boundary: Function-Symbol Grounding for Hard Constraints in LTN-GANs21 Aug 2026
- 2026To Neuro-Symbolic Classification and Beyond by Compiling Description Logic Ontologies to Probabilistic Circuits21 Jan 2026
- 2026Logic Tensor Network-Enhanced Generative Adversarial Network7 Jan 2026
- 2025Understanding and Improving Adversarial Robustness of Neural Probabilistic Circuits24 Sep 2025
- 2025Semantic Probabilistic Control of Language Models4 May 2025
- 2025A Probabilistic Neuro-symbolic Layer for Algebraic Constraint Satisfaction25 Mar 2025
- 2025Neuro-Symbolic AI in 2024: A Systematic Review9 Jan 2025
- 2024Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification7 Oct 2024
- 2024Logically Consistent Language Models via Neuro-Symbolic Integration9 Sep 2024
- 2024Adaptable Logical Control for Large Language Models19 Jun 2024
- 2024Scaling Tractable Probabilistic Circuits: A Systems Perspective2 Jun 2024
12 newest of 13 All 13 (JSON)