Towards Logically Consistent Language Models via Probabilistic Reasoning
Diego Calanzone, Stefano Teso, Antonio Vergari
TL;DR
The paper addresses the persistent challenges of factuality and self-consistency in large language models by proposing LoCo-LMs, which integrate principled probabilistic reasoning via a semantic loss over a knowledge base of facts and rules. By treating the model as a pool of truth beliefs and constraining it with ground facts and logical implications, the approach enforces consistency without relying on external reasoning tools. Empirical results on BeliefBank show that LoCo-LMs yield higher factuality and logical self-consistency than baselines, especially in low-data regimes, and can extrapolate to unseen facts with limited supervision. The work highlights the potential of neuro-symbolic, constraint-driven training to produce more reliable and scalable reasoning in LLMs, and points to future directions in expanding logical operators and cross-entity transfer of logical structure.
Abstract
Large language models (LLMs) are a promising venue for natural language understanding and generation tasks. However, current LLMs are far from reliable: they are prone to generate non-factual information and, more crucially, to contradict themselves when prompted to reason about beliefs of the world. These problems are currently addressed with large scale fine-tuning or by delegating consistent reasoning to external tools. In this work, we strive for a middle ground and introduce a training objective based on principled probabilistic reasoning that teaches a LLM to be consistent with external knowledge in the form of a set of facts and rules. Fine-tuning with our loss on a limited set of facts enables our LLMs to be more logically consistent than previous baselines and allows them to extrapolate to unseen but semantically similar factual knowledge more systematically.
