Abstract
We describe a novel approach to explainable prediction of a continuous variable based on learning fuzzy weighted rules. Our model trains a set of weighted rules to maximise prediction accuracy and minimise an ontology-based 'semantic loss' function including user-specified constraints on the rules that should be learned in order to maximise the explainability of the resulting rule set from a user perspective. This system fuses quantitative sub-symbolic learning with symbolic learning and constraints based on domain knowledge. We illustrate our system on a case study in predicting the outcomes of behavioural interventions for smoking cessation, and show that it outperforms other interpretable approaches, achieving performance close to that of a deep learning model, while offering transparent explainability that is an essential requirement for decision-makers in the health domain.
Introduction
In fields like behavioral science and healthcare, the volume of research evidence is growing faster than humans can synthesize it. While deep learning models can predict outcomes with high accuracy, they are often "black boxes." For policy-makers and clinicians, a prediction without an explanation is difficult to trust or act upon.
ESC-Rules is a hybrid neuro-symbolic framework designed to bridge this gap. It learns fuzzy, weighted rules to predict continuous outcomes, such as the effectiveness of smoking cessation programs. By integrating an ontology-based "semantic loss" function, the model produces highly interpretable rules that respect domain knowledge while achieving predictive accuracy nearly on par with "black-box" deep neural networks.
Methods
The ESC-Rules system follows a multi-step pipeline to balance accuracy and logic:
- Fuzzy Feature Preparation: Continuous variables (like age) are transformed into meaningful semantic categories (e.g., "child," "young adult") using fuzzy membership operators to handle non-rigid boundaries.
- Architecture: Inspired by Takagi-Sugeno fuzzy controllers, the model represents rules as conjunctions of features. It learns weights for individual features within a rule and weights for the rules themselves to determine their contribution to the final prediction.
- Semantic Loss Function: This core innovation minimizes several "penalties" beyond prediction error:
- Sparsity/Length: Penalizes overly long, complex rules.
- Fuzziness: Encourages feature weights to be "crisp" (closer to 0 or 1) for better readability.
- Ontology-based Constraints: Uses the Behaviour Change Intervention Ontology to penalize rules that are redundant or logically contradictory.
- Optimization: Implemented in PyTorch, the system gradually "fades in" semantic penalties during training to ensure the model first learns the data patterns before being constrained by logic.
Datasets
The model was evaluated on a dataset from the Human Behaviour-Change Project (HBCP), consisting of 77 feature columns and 1,198 intervention arms extracted from randomized controlled trials (RCTs) of smoking cessation interventions. Features include population attributes, delivery methods, and specific intervention types like pharmacological support.
Key Results and Insights
ESC-Rules successfully demonstrates that the cost of explainability is minimal. The model outperformed traditional interpretable approaches, such as decision trees and mixed-linear regression, as well as previous state-of-the-art graph-based models (NLPG).
A key finding is the effectiveness of the semantic loss function in preventing "rule explosion." By applying these penalties, the model significantly reduces the number of rules required for a prediction, leading to cleaner, more focused explanations.
The model generated concise, human-readable rules such as:
IF "Mean age (adult)" AND "doctor" AND "Pill" THEN raise predicted outcome by 4.67.
This knowledge-guided learning forces the model to find patterns that make sense to human experts. Furthermore, the transparency of the rules allows experts to identify gaps in the underlying ontology, creating a virtuous cycle between machine learning and knowledge engineering.
Limitations and Future Work
While the rules are human-readable, formal user studies with domain experts are needed to quantify their utility in real-world clinical settings. Future work will also explore the explanatory value of "absences" (negated features) and test the framework's versatility in other behavioral domains, such as physical activity interventions.
Summary updated