ModelLog evaluates language models with logical semantic constraints
From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Models
Computation and Language
Summary
Evaluating what large language models really understand is hard because just checking their answers or word guesses doesn't show the full picture. The paper presents ModelLog, a new way to check if models follow meaningful logical rules, such as negation or consistency, by turning evaluation into clear, formal constraints. This method finds problems in models that other checks miss and connects how we evaluate them to how they learn. This could help make evaluations that are both detailed and linked to the model’s training process.
What this means in practice
- •For language model developers: Diagnose specific logical reasoning failures in language models beyond simple accuracy scores.
- •For natural language processing engineers: Improve training approaches by using evaluation losses that align with logical constraint satisfaction.
Authors
Kyle Richardson, Cullen Anderson, Pranav Balakrishnan, Takuto Ban, Daksha Ladia, Ankita Gupta, Marisa Hudspeth
Abstract
While Large Language Models have improved rapidly, many fundamental questions remain about how to evaluate the knowledge and reasoning abilities they acquire, and how such evaluations relate to the learning signals used in pre-training. In this paper, we propose ModelLog, a declarative probabilistic framework for pre-training evaluation that makes the semantic structure of model behavior explicit and provides new formal tools for relating evaluation to learning. ModelLog specifies evaluation targets as symbolic constraints over token-level predictions and measures how strongly a model's distribution satisfies those constraints. We explore the framework through a new suite of tasks targeting negation, mutual exclusivity, and consistency, finding systematic failures that are difficult to characterize through token likelihood or answer accuracy alone. We further show that these evaluation scores can also be interpreted as losses, whose gradients reflect logical strength, informativeness, and variable-level sensitivity. This links evaluation and learning through a shared semantics, suggesting evaluation methods that diagnose model behavior while also helping to clarify the semantic structure of learning.