NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Characterization of the Convex Łukasiewicz Fragment for Learning From Constraints

Francesco Giannini, Michelangelo Diligenti, Marco Gori, Marco Maggini

Abstract

Integrating symbolic knowledge into machine learning models often leads to non-convex optimization problems that are difficult to solve globally. This paper identifies a specific fragment of Łukasiewicz logic—the $(\wedge, \oplus)^*$ fragment—that is guaranteed to produce convex constraints when mapped to real-valued functions. By grounding these logical rules on data, the authors transform collective classification into a standard quadratic programming problem. Empirical results on an animal classification task show that this approach significantly improves accuracy, especially when labeled data is scarce, by effectively using domain knowledge to regularize model predictions.

Introduction

The challenge of combining symbolic logic with statistical learning is central to modern AI. While humans reason using rules, neural networks learn from data. Bridging this gap requires mapping discrete logical constraints into continuous "fuzzy" functions suitable for optimization. However, most such mappings result in non-convex cost functions prone to local minima. This research identifies an "expressivity sweet spot": a fragment of logic powerful enough for practical use (including Horn clauses) yet restricted enough to ensure convexity.

Methods and the Convex Fragment

The theoretical foundation of this work is the McNaughton Theorem, which links Łukasiewicz logic formulas to piecewise linear functions. The authors prove that formulas constructed using weak conjunction ($\wedge$) and strong disjunction ($\oplus$) applied to literals result in concave functions. When these are enforced as constraints (e.g., requiring a formula's truth value to be close to 1), they define a convex feasible region.

The set of first-order logic rules used in the Winston animal classification benchmark to define relationships between animal traits and categories.

The learning process involves "grounding" these rules—applying them to every instance in a dataset. The task is then formulated as a Quadratic Program (QP): find predicate values (class probabilities) that are closest to initial neural network predictions while satisfying the linear constraints derived from the logical rules. This allows the system to treat logic as a "corrector" for inconsistencies in a raw classifier's output.

Experimental Evaluation

The approach was evaluated using the Winston animal classification benchmark, consisting of 3,325 images from ImageNet across seven categories (albatross, cheetah, giraffe, ostrich, penguin, tiger, zebra). Images were represented by color histograms and SIFT features. A knowledge base of logical rules, such as layeggs(x) → bird(x) and mammal(x) ∧ meat(x) → carnivore(x), provided the domain constraints.

Key Results

The collective classification approach significantly outperformed standard neural networks. The most notable advantage appeared in low-supervision scenarios. As shown in the performance analysis, the logic-enhanced model maintained much higher accuracy than the baseline when training data was sparse, demonstrating the power of symbolic rules to "fill in the gaps" where labels are missing.

Accuracy comparison on the test set between standard neural networks and collective classification across different levels of training supervision.

By reducing the problem to a QP, the authors demonstrate that logical inference can be integrated into the learning pipeline without the prohibitive computational costs usually associated with Markov Logic Networks or other probabilistic logic frameworks.

Conclusion and Future Work

By identifying the convex fragment of Łukasiewicz logic, this work provides a mathematically sound framework for integrating domain knowledge into learning. Future work includes extending this transductive setup to an inductive one where rules help learn the weights of the predicate functions themselves, and exploring the impact of different fuzzy logic operators (t-norms) on the learning process.

Summary updated

BibTeX
@inproceedings{giannini2018characterization,
  author = {Francesco Giannini and Michelangelo Diligenti and Marco Gori and Marco Maggini},
  title = {{Characterization of the Convex Łukasiewicz Fragment for Learning From Constraints}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11640},
}
Figure