Neurosymbolic Conformal Classification

Arthur Ledaguenel, Céline Hudelot, Mostepha KhouadjiaarXiv 2024 · DOI

Abstract

Modern deep learning models often struggle with two critical requirements for safety-critical deployment: reliable uncertainty quantification and adherence to logical domain constraints. This paper introduces a theoretical framework for Neurosymbolic Conformal Classification, which bridges the gap between the statistical rigor of Conformal Prediction (CP) and the logical reasoning of Neurosymbolic AI (NeSy). By integrating symbolic logic into the conformal framework, the authors provide a method to generate multi-label "confidence sets" that are guaranteed to contain the true label with a user-defined probability while remaining logically consistent with domain knowledge.

Introduction

Deep Learning (DL) has achieved remarkable success in multi-label classification tasks, such as scene understanding or medical diagnosis. However, these models remain "brittle" in two primary ways. First, they typically lack formal guarantees; a model might provide a single prediction without a reliable measure of its own uncertainty. Second, they often exhibit logical inconsistency, predicting combinations of labels that are physically or semantically impossible (e.g., classifying an object as both a "mammal" and an "insect").

While Conformal Prediction offers a distribution-free method to produce confidence sets with a $1-\alpha$ coverage guarantee, it faces a computational bottleneck in multi-label settings. Since the number of possible label combinations grows exponentially ($2^k$ for $k$ labels), searching for a valid confidence set becomes intractable. This paper proposes a neurosymbolic approach to solve both the consistency and the complexity problems.

Methodology

The authors propose three technical pillars to integrate symbolic logic into the conformal pipeline:

1. Probability-Based Non-Conformity

To avoid the exhaustive search of all label combinations, the framework utilizes a non-conformity measure based on the model's predicted probability: $$s_\theta(x, y) = 1 - P(y|M_\theta(x))$$ By framing the search for a confidence set as a thresholding problem, the system only needs to identify label sets where the probability exceeds a specific value. This transforms the problem into a "Top-K" enumeration task, which is significantly more efficient than exhaustive search.

2. Semantic Filtering

Semantic Filtering acts as a post-processing layer. Once a conformal confidence set is generated, any label combinations that violate pre-defined logical constraints (e.g., hierarchical rules or mutual exclusivity) are removed. The authors prove that if the ground truth itself satisfies these logical rules, this filtering process does not compromise the $1-\alpha$ coverage guarantee. In fact, it improves the utility of the prediction by narrowing the set of possibilities.

3. Semantic Conditioning

A more sophisticated approach, Semantic Conditioning, integrates logic directly into the probability estimation. The non-conformity measure is calculated by conditioning the model's distribution on the logical constraints before thresholding. To maintain tractability, the authors suggest compiling logical formulas into deterministic Decomposable Negation Normal Form (dDNNF) circuits. These specialized data structures allow for efficient probabilistic reasoning and marginalization over complex logical constraints in polynomial time.

Key Insights: Logic as a Precision Tool

The most significant insight of this work is that logical constraints serve as a "tightener" for statistical sets. In standard Conformal Prediction, a model might include several unlikely but mathematically possible states to satisfy the coverage requirement. By enforcing logic, the system can discard these impossible states, shrinking the size of the confidence set. This results in a more precise prediction without sacrificing the fundamental statistical guarantee.

Furthermore, the framework is model-agnostic. It does not require retraining the underlying neural network; it simply requires the model to output a probability distribution, making it compatible with existing architectures.

Theoretical Results

As a primarily theoretical contribution, the paper establishes two major proofs:

  • Statistical Validity: Both Semantic Filtering and Semantic Conditioning are proven to preserve the $1-\alpha$ coverage guarantee of traditional Conformal Prediction.
  • Computational Tractability: The authors demonstrate that if domain logic can be represented as a dDNNF circuit of manageable size, the generation of logically consistent confidence sets can be achieved efficiently, overcoming the exponential explosion usually associated with multi-label CP.

Limitations and Future Directions

While the framework is mathematically sound, its practical efficiency depends on two factors: the precision of the underlying model and the complexity of the logic. If a model is highly uncertain, the number of states to enumerate may still be large. Additionally, compiling complex propositional logic into dDNNF circuits is an NP-hard problem in the worst case, which may limit the scale of domain knowledge that can be integrated via Semantic Conditioning.

Future work should focus on empirical validation across real-world datasets, such as hierarchical image classification or multi-label medical tagging, to quantify the actual reduction in confidence set size provided by these neurosymbolic methods.

Summary updated

BibTeX
@misc{ledaguenel2024neurosymbolic,
  author = {Arthur Ledaguenel and Céline Hudelot and Mostepha Khouadjia},
  title = {{Neurosymbolic Conformal Classification}},
  year = {2024},
  eprint = {2409.13585},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.13585},
}
Figure