Abstract
Statistical Relational Learning (SRL) has traditionally excelled at modeling complex logical dependencies but struggled with the integration of continuous numerical constraints. This paper introduces Learning Modulo Theories (LMT), a framework that bridges high-level logical reasoning with low-level numerical optimization. By utilizing Optimization Modulo Theories (OMT) as an oracle within a Structured Support Vector Machine (SSVM), LMT enables efficient learning and inference in hybrid domains where rules and numbers coexist.
1. Introduction
In many real-world scenarios, data is inherently "hybrid," characterized by both discrete logical relationships and continuous numerical properties. While Statistical Relational Learning (SRL) provides a robust foundation for relational data, it often falters when faced with arithmetic constraints. Traditional First-Order Logic (FOL) representations of numerical data lead to state-space explosions; for example, representing an $n$-bit integer requires $n$ different logical predicates. Simple operations like $x + y > 10$ are computationally prohibitive to implement natively in standard SRL systems.
Researchers from the University of Trento propose Learning Modulo Theories (LMT) to address this gap. LMT integrates the discriminative power of Structured SVMs with the reasoning capabilities of Satisfiability Modulo Theories (SMT), specifically through Optimization Modulo Theories (OMT).
2. The LMT Framework
The LMT framework is built upon the synergy between two powerful computational fields:
2.1 Structured Output SVMs (SSVMs)
SSVMs serve as the learning backbone of the framework. Unlike standard SVMs that predict simple categorical labels, SSVMs are designed to predict complex, structured objects such as graphs or sequences. The training process for an SSVM requires an "optimization oracle" to solve two critical tasks:
- Inference: Predicting the most likely structure (or "world") for a given input.
- Separation: Identifying the most violated constraint to update the model weights during training.
2.2 Optimization Modulo Theories (OMT)
LMT employs an OMT solver (specifically MathSAT 5) as the optimization oracle. SMT is a generalization of the Boolean Satisfiability (SAT) problem that incorporates background theories like linear arithmetic, bit-vectors, or strings. OMT further extends SMT by seeking the maximum weight assignment that satisfies a set of soft constraints. By framing the learning task as a max-margin weight learning problem, LMT leverages decades of progress in the formal verification community to solve machine learning problems.
3. Modeling Violations: Boolean and Linear Costs
A key contribution of LMT is the flexibility in how it penalizes the violation of constraints. The framework distinguishes between two types of costs:
- Boolean Costs: A simple 0/1 binary penalty applied if a logical rule is unsatisfied.
- Linear Costs: A penalty proportional to the magnitude of the violation. For instance, if a constraint requires $x < 5$ and the model assigns $x = 7$, the cost is 2.
This distinction allows the model to learn that "near misses" in numerical constraints are preferable to significant deviations, providing a more nuanced approach than traditional logic-based systems where a rule is either strictly true or false.
4. Application Domains
The paper demonstrates the versatility of LMT through two primary proof-of-concept applications:
- Activity Recognition: Using sensor data to schedule human activities in continuous time using Interval Temporal Logic. This requires reasoning over sensor data where timing and logical sequences are both critical.
- The Housing Problem (Preference Elicitation): A task where users express mixed constraints, such as "I want a house within 2km of downtown" (numerical) and "The house must have a garage" (logical). LMT can optimize for these preferences simultaneously in an active learning setting.
5. Discussion and Future Work
LMT represents a significant shift toward native hybrid reasoning. By treating numerical constraints as first-class citizens rather than "hacking" them into a logical framework, LMT achieves greater expressivity and can theoretically be applied to any SMT background theory (strings, bit-vectors, arrays, etc.).
However, challenges remain. The use of unbounded linear costs can potentially bias the model toward satisfying numerical constraints at the expense of logical ones. Furthermore, while OMT solvers are highly optimized, the underlying problems remain NP-hard, posing scalability concerns for datasets with thousands of continuous variables. Future research will focus on formalizing these application domains and conducting extensive empirical comparisons against other hybrid SRL methods.
Summary updated