Neural-based classification rule learning for sequential data

Marine Collery, Philippe Bonnard, François Fages, Remy KustersICLR 2023

In the world of high-stakes decision-making—think genomics, fraud detection, or healthcare—knowing that a model is right isn't enough. We need to know why. While deep learning has mastered sequential data, it usually does so inside a "black box."

A team from IBM and Inria recently introduced the Convolutional Rule Neural Network (CR2N), a model that doesn't just predict outcomes; it learns human-readable rules directly from sequential data.

The Problem with Post-Hoc Explanations

Most "Explainable AI" (XAI) techniques are post-hoc—they try to explain a black-box model after it has already made a decision. However, for high-stakes decisions, researchers increasingly argue that we should use models that are interpretable by design.

Rule-based models (e.g., "If pattern A occurs, then Class 1") are the gold standard for interpretability. However, traditional rule-learning algorithms struggle with sequential data because:

  1. Temporal Dependencies: Most are built for tabular data and cannot handle time-series well.
  2. Expressivity: They often fail to capture complex "grammars" or patterns within a sequence.
  3. Optimization: Learning discrete rules is a combinatorial nightmare that doesn't play well with the gradient-based optimization used in modern AI.

Bridging Neural Networks and Symbolic Logic

The authors bridge the gap between neural networks and symbolic logic using the CR2N architecture. It consists of three main components:

1. The Architecture

Base Rule Model: A three-layer binary network that mimics logic. It uses a "StackedOR" layer for categorical inputs, an AND layer to create conjunctions, and an OR layer to create disjunctions. This structure essentially evaluates a logical expression in Disjunctive Normal Form (DNF).

Base Rule Model architecture

1D-Convolutional Window & ConvOR Layer: The base rule model acts as a "filter" that slides across the sequence, looking for specific logical patterns within a fixed window. The final ConvOR layer aggregates the results, determining if the pattern is local (it must happen at a specific timestamp, like "A at t-5") or global (it can happen anywhere in the sequence).

1D-Convolutional Window and ConvOR Layer

2. Differentiable Training

To make this discrete logic trainable via backpropagation, the authors use latent weights and a hard concrete distribution. This allows the model to exist in a continuous "relaxed" state during training (where gradients can flow) but snap into a strict binary state (0 or 1) during inference.

3. Dynamically-Enforced Sparsity

Interpretable rules must be concise. The authors use a loss function that penalizes complexity (the number of conditions in a rule) and a "sparsify-during-training" strategy that prunes unnecessary weights as the model learns.

Key Results and Insights

The model was evaluated on both synthetic datasets (designed with ground-truth logical rules) and a real-world Peptides dataset (amino acid sequences used to predict anticancer activity).

  • Synthetic Success: The CR2N successfully recovered the ground-truth logical expressions in almost all balanced synthetic scenarios.
  • Competitive Accuracy: On the real-world Peptides dataset, the model achieved approximately 91% accuracy. This is comparable to state-of-the-art black-box models (which hit ~92%), but with the added benefit of providing a clear logical explanation for every classification.
  • End-to-End Learning: Unlike traditional methods where you might pre-extract features and then learn rules, CR2N learns the features (the patterns) and the rules simultaneously.
  • The Sparsity Trade-off: The paper highlights that while "local" models are more expressive, they often result in more complex, less readable rules. "Global" models are more constrained but produce much cleaner, more concise logic.

Limitations and Future Work

While promising, the CR2N model has a few limitations to address in future iterations:

  • Unbalanced Data: The training strategy struggled with highly unbalanced datasets, sometimes defaulting to an "empty rule" that simply predicts the majority class.
  • Fixed Window Size: The model relies on a fixed window size. If a pattern is longer than the window, the model might miss it.
  • Scalability & Multi-class: Extending this to high-dimensional time-series data (like audio or video) and multi-class problems remains a future challenge, as the current design is optimized for binary classification of discrete sequences.

Summary updated

BibTeX
@inproceedings{collery2023neural,
  author = {Marine Collery and Philippe Bonnard and François Fages and Remy Kusters},
  title = {{Neural-based classification rule learning for sequential data}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
}
Figure