Mapping Logical Rules to Linear Inequalities

This direction is no longer present in the current build. Its last version stays readable and citable here.

Version 1 of 118 papers23 conceptsfrozen 2026-10-04

In traditional AI, there is a sharp divide between symbolic reasoning—which uses discrete logic to represent "hard" rules—and numerical optimization, which uses continuous mathematics to find patterns in data. The research direction described here bridges this gap by treating logical propositions as geometric constraints. By translating symbolic rules into systems of linear inequalities, researchers can embed human expertise directly into the mathematical heart of machine learning models and resource planners.

The Geometry of Logic

The core intuition behind this approach is that a logical statement defines a "feasible region" in a multi-dimensional space. If we represent a boolean variable $A$ as a continuous value between 0 and 1, a rule like "If $A$ is true, then $B$ must be true" ($A \implies B$) can be expressed as the inequality $B \ge A$. In this view, logic is not just a set of truth tables; it is a set of boundaries that carve out a valid subspace for a model to operate within.

This transformation allows researchers to use mature, highly efficient numerical solvers to handle symbolic problems. For instance, Steven A. Wolfman developed the LPSAT engine, which interleaves a SAT solver with the Simplex algorithm. In The LPSAT Engine & Its Application to Resource Planning, boolean variables trigger linear constraints, allowing the system to solve logistics problems that involve both discrete choices (which route to take) and continuous metrics (fuel consumption and distance).

Translating Rules into Constraints

To make this mapping work across different domains, researchers have developed systematic methodologies for converting various logical forms into linear algebra:

  1. Conjunctive Normal Form (CNF): In constrained clustering, Weifeng Zhi, Xiang Wang, and their colleagues show in Clustering with Complex Constraints - Algorithms and Applications that complex "if-then" or "either-or" requirements can be converted into CNF and then mapped to linear inequalities. This allows them to treat symbolic domain knowledge as geometric constraints within a Quadratic Programming (QP) framework, speeding up inference by orders of magnitude.
  2. First-Order Logic (FOL): In Natural Language Processing, tools like Saul, developed by Parisa Kordjamshidi, Dan Roth, and Sameer Singh, automate the translation of FOL rules into mathematical penalties. As detailed in Better call Saul: Flexible Programming for Learning and Inference in NLP, these penalties are used in Integer Linear Programming (ILP) to ensure that a model's predictions (e.g., entity types and their relations) are globally consistent.
  3. Production Systems: Even early work like SVEPOA by G. Ravi Prakash et al. in A Methodology for Systematic Verification of OPS5-Based AI Applications used this mapping to verify expert systems. By converting rule antecedents into linear inequalities, they could identify "dead-ends" or conflicting rules by checking for mathematical infeasibility.

Preserving Convexity for Efficient Learning

A major challenge in this field is ensuring that adding logical constraints doesn't make the optimization problem impossible to solve. If the constraints are too complex, the "feasible region" might become non-convex, leading to local optima and slow convergence.

To solve this, Francesco Giannini, Marco Gori, and Michelangelo Diligenti identified a "convex fragment" of Łukasiewicz logic. In On a Convex Logic Fragment for Learning and Reasoning, they demonstrate that by restricting rules to this fragment, logical formulas can be translated into piecewise linear functions that remain convex. This ensures that the resulting optimization remains a standard Quadratic Programming task, allowing models to learn from both data and symbolic rules simultaneously.

Similarly, Glenn Fung, Olvi L. Mangasarian, and Jude W. Shavlik pioneered Knowledge-Based Support Vector Machines (KSVM). In Knowledge-Based Support Vector Machine Classifiers, they use the Farkas Theorem—a fundamental result in linear programming—to convert expert "rules of thumb" about specific regions of the input space into linear constraints. This allows an SVM to prioritize expert knowledge in areas where data might be scarce.

Why It Works: The Power of Reformulation

The success of this research direction stems from reformulation. Instead of building entirely new "neuro-symbolic" architectures from scratch, these researchers leverage the power of existing solvers (MIP, QP, ILP).

As shown in DisjunctiveProgramming.jl: Generalized Disjunctive Programming Models and Algorithms for JuMP by Héctor D. Pérez and Ignacio E. Grossmann, high-level logical propositions can be automatically "lowered" into algebraic constraints. This allows a developer to write intuitive logic while the underlying system handles the complex task of ensuring those rules are satisfied during numerical optimization. Whether it is guiding unsupervised relation extraction with FOL rules (Mirella Lapata and Oier Lopez de Lacalle, Unsupervised Relation Extraction with General Domain Knowledge) or enforcing structural consistency in deep learning (Quan Guo et al., Inference-Masked Loss for Deep Structured Output Learning), the core mechanism remains the same: logic provides the boundaries, and optimization finds the best path within them.

Papers in this version

History & citationVersion 1 · 2026-10-04

No longer present in the current build · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_mapping_logical_rules_to_linear_inequali_78f58236,
  title = {Mapping Logical Rules to Linear Inequalities},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/mapping-logical-rules-to-linear-inequalities/rdr_78f58236b5e840e8bd0e218019463088},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_mapping_logical_rules_to_linear_inequali_78f58236_v1,
  title = {Mapping Logical Rules to Linear Inequalities},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/mapping-logical-rules-to-linear-inequalities/rdr_78f58236b5e840e8bd0e218019463088/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}