Combining Relational Learning with SMT Solvers Using CEGAR

Arun Tejasvi Chaganty, Akash Lal, Aditya V. Nori, Sriram K. RajamaniCAV 2013

Introduction

Statistical Relational Learning (SRL) represents a powerful intersection of first-order logic and probabilistic graphical models, exemplified by frameworks like Markov Logic Networks (MLNs). While SRL excels at modeling complex dependencies through "soft" constraints—weighted rules where violations are penalized but permitted—it often struggles with "hard" constraints, or axioms. These axioms represent absolute logical truths that must be satisfied in any valid model.

Presented at CAV 2013, this research introduces SOFT-CEGAR, a framework that bridges the gap between the verification and machine learning communities. By adapting Counterexample-Guided Abstraction Refinement (CEGAR)—a staple of formal verification—the authors provide a scalable solution for enforcing strict logical consistency within probabilistic models.

The Challenge: The Grounding Bottleneck

The primary obstacle in current SRL solvers is the "grounding" process. To solve a problem, standard tools typically instantiate every possible instance of a rule into propositional logic. For large datasets, even simple rules can lead to a combinatorial explosion. For example, a rule asserting that no two papers are identical if their titles differ can generate millions of constraints in a dataset of thousands of constants. This leads to massive memory consumption, often resulting in Out-of-Memory (OOM) errors, and significantly slows down inference. Furthermore, because SRL solvers are optimized for fuzzy probabilistic reasoning, they are inherently inefficient at enforcing the rigid requirements of hard logical axioms.

The SOFT-CEGAR Framework

SOFT-CEGAR addresses these inefficiencies by treating hard axioms as an abstraction that is refined iteratively. Rather than grounding all constraints upfront, the system employs a "lazy" approach:

  1. Abstraction: The solver initially ignores all hard axioms, solving only the "soft" probabilistic components using an off-the-shelf SRL solver (such as Tuffy).
  2. Verification (The SMT Step): The resulting truth assignments (the "world") are passed to a Satisfiability Modulo Theories (SMT) solver. The SMT solver checks if any hard axioms have been violated.
  3. Refinement: If violations are detected, the SMT solver identifies specific "counterexamples." These instances are then added back to the SRL solver as new, grounded constraints.
  4. Generalization: To ensure convergence and efficiency, the authors introduce a generalization step. Instead of adding a single specific violation, the system identifies underlying patterns to add more general rules, effectively pruning larger sections of the search space.
  5. Iteration: This loop continues until the SRL solver produces a world that satisfies all hard axioms.

This approach ensures that the system only "pays" for the constraints that are actually relevant to the specific dataset and current solution candidate.

Experimental Evaluation

The authors evaluated SOFT-CEGAR across four real-world applications: Advisor Recommendation (matching students to PhD advisors), Entity Resolution (identifying duplicate citations in the Cora dataset), Information Extraction (extracting fields from text), and Relational Classification (categorizing papers based on co-authorship).

Performance and Scalability

SOFT-CEGAR demonstrated significant improvements over state-of-the-art baselines like Tuffy and Alchemy:

  • Robustness: In three of the four tasks (Advisor Recommendation, Information Extraction, and Relational Classification), the baseline solvers either crashed due to OOM errors or failed to terminate. SOFT-CEGAR completed all tasks successfully.
  • Solution Quality: In the Entity Resolution task, SOFT-CEGAR achieved a solution with a cost of 28,112, whereas Tuffy produced a cost of 34,416 and Alchemy exceeded 5 million. In the context of MLNs, a lower cost indicates a more likely and accurate model.
  • Efficiency: For Relational Classification, SOFT-CEGAR finished in 5 minutes, outperforming Tuffy (6 minutes) while Alchemy failed to return a result.

Key Insights

The success of SOFT-CEGAR stems from a separation of concerns. By delegating logical consistency to SMT solvers and probabilistic optimization to SRL solvers, the framework leverages the specialized strengths of both. The research also proves (Theorem 1) that this lazy refinement approach preserves the optimality of the Maximum a Posteriori (MAP) solution, ensuring that efficiency does not come at the expense of accuracy.

Conclusion and Future Work

SOFT-CEGAR demonstrates that techniques from formal verification can solve fundamental scalability issues in machine learning. Future research directions include moving beyond "black-box" integration toward a more tightly coupled solver architecture and expanding the framework to support more complex SMT theories like linear arithmetic. Additionally, the authors suggest that logical reasoning could eventually be used to automate the discovery and learning of the axioms themselves from raw data.

Summary updated

BibTeX
@inproceedings{chaganty2013combining,
  author = {Arun Tejasvi Chaganty and Akash Lal and Aditya V. Nori and Sriram K. Rajamani},
  title = {{Combining Relational Learning with SMT Solvers Using CEGAR}},
  booktitle = {CAV},
  year = {2013},
  doi = {10.1007/978-3-642-39799-8\_30},
}
Figure