Skip to content
AI.info

Research

What Comes Next and Why: Interpretable Next-Event Prediction with Neuro-Symbolic Rules

Overview Research area: Machine learning — neuro-symbolic learning, sequential/event prediction, and interpretable models. Technical level: Advanced. The paper assumes familiarity with differentiable

What Comes Next and Why: Interpretable Next-Event Prediction with Neuro-Symbolic Rules
arXiv
2610.31114
Published
2026-10-22
Authors
Tim Nico Bauerschmidt, Isabel Valera, Jilles Vreeken

AI summary

Overview

Research area: Machine learning — neuro-symbolic learning, sequential/event prediction, and interpretable models.

Technical level: Advanced. The paper assumes familiarity with differentiable relaxation techniques (temperature annealing, soft logics), neural sequence models, and rule mining.

Scope: The paper introduces a class of temporal sequential rules, a neuro-symbolic network (Rules) that learns them from categorical event sequences, and a hybrid model (Runes) that pairs the frozen rule network with a residual transformer, evaluated on synthetic and five real-world datasets.

What This Paper Is About

Predicting the next event in a temporally ordered sequence of categorical events (purchases, hospital visits, process-log steps) is usually done with neural sequence models that are accurate but opaque, or with rule-mining methods that are interpretable but not usable as predictive models. The authors ask whether a model can learn explicit, human-readable rules that include timing information ("a computer case 1–43 days ago and a processor 2–21 days ago implies a motherboard or power supply unit next") and still compete with black-box accuracy. Their answer is to learn such rules differentiably inside a neural network and to let a separate residual network clean up whatever the rules cannot explain.

Key Contributions

  1. A formal class of Temporal Conjunctive Prediction Rules. Each rule is an antecedent — a set of (event, delay interval) pairs combined by conjunction, where each pair is itself a disjunction over matching history events — paired with a consequent relaxed into a logit vector over the vocabulary, so that active rules can be summed composably in a softmax.

  2. Rules, a neuro-symbolic architecture that learns these rules by gradient descent. A predicate layer learns events via a temperature-scaled LogSumExp soft-max and delay intervals via differentiable soft-binning; an antecedent layer forms soft conjunctions with non-negative weights; a softmax-linear output layer holds the consequent logits. Temperature annealing (first the predicate layer, then the antecedent layer) binarizes activations so that layers become readable symbolic rules.

  3. Runes, a two-phase hybrid model. After the symbolic phase, Rules is frozen and a residual network (a transformer) is trained to add corrective logits, following hybrid concept-bottleneck-style design. Because contributions are additive, both active rules and residual corrections can be attributed per input.

  4. An empirical study on synthetic and real data. Rules is shown to recover planted ground-truth rules from synthetic sequences and to learn compact rule sets on real datasets, while Runes reaches accuracy competitive with a black-box transformer baseline.

Main Findings

  • Synthetic recovery works. On data generated from ground-truth rule sets of size 20 (vocabulary D = 128, N = 1024 training sequences, lengths L in [96,128], maximum antecedent–consequent distance 64), learned rules map onto the ground truth with high similarity sim(R, R*), averaged over 10 rule sets per setting.

  • Recovery is asymmetric. Full ground-truth coverage sim(R*, R) is lower because Rules frequently replaces large antecedents with smaller ones and occasionally misses rules. Recovery is driven mainly by r_cons (the probability an antecedent is paired with its true consequent) and is robust to r_targ (the fraction of training-objective events that are consequents rather than noise).

  • No spurious rules on random data. Applied to 10 datasets of uniformly random events, across four random seeds per dataset, the lowest-training-loss model returned no rules.

  • Rules beats simple baselines on synthetic data. PPM fails to capture long-range antecedent–consequent dependencies and often uses only a 0-order context. Rules performs close to tree ensembles and the transformer, and outperforms CatBoost and the transformer in noisy settings; the gap narrows with more training samples.

  • Real-world accuracy is competitive but not best. Averaged ranks over the five datasets: transformer 1.0, Runes 2.4, XGBoost 2.8, PPM 3.6, CatBoost 4.0, Rules 5.2. Runes ranks second overall and beats all baselines except the transformer.

  • Per-dataset results (test accuracy, %). Holidays: Rules 97.57 with 26 rules, Runes 100.00 with 14 rules, all baselines 100.00. Chorales: Rules 21.00 (33 rules), Runes 37.00 (180), PPM 31.40, CatBoost 37.10, XGBoost 37.72, transformer 39.35. Commits: Rules 19.60 (51), Runes 18.31 (80), PPM 18.11, CatBoost 15.55, XGBoost 17.03, transformer 20.10. Rolling Mill: Rules 34.13 (77), Runes 70.44 (9583), PPM 67.64, CatBoost 65.64, XGBoost 68.84, transformer 71.24. Amazon: Rules 6.53 (42), Runes 17.55 (993), PPM 15.16, CatBoost 11.79, XGBoost 15.37, transformer 17.61.

  • Small rule sets suffice on some datasets. Rules alone is competitive on Holidays and Commits, indicating those dynamics are captured by a small number of temporal conjunctive rules. On other datasets simple rules explain little (e.g. Amazon 6.53%) and the residual network supplies most of the gain.

  • The residual is traceable. Inspection shows the residual network is mostly used to correct Rules' errors, preserving rule-level interpretability when the learned rules are reliable.

  • Rule extraction is post-processed. For real data, learned rules are extracted, refined, re-embedded into the hidden layers, and only the output layer is retrained; reported results use this refined model. The rule sets are not always compact after refinement (e.g. Rolling Mill 9583 rules, Amazon 993).

Methodology in Plain English

The authors define a rule as a template: a list of "this event happened within this window of time before the prediction" conditions, joined by AND, plus a set of likely next events. A rule fires at prediction time if, for every condition, some matching event appears in the history at the right temporal offset.

To learn rules with gradient descent rather than combinatorial search, every logical operation is replaced with a smooth version controlled by a temperature. Matching an event becomes a soft "is this the maximum-weight event?" gate built from a temperature-scaled LogSumExp; checking whether a time gap falls in an interval becomes a soft-binning function; the OR over history positions becomes a softmax-weighted sum with a reduced temperature; the AND across conditions becomes a soft conjunction with non-negative weights. Cross-entropy on next-event prediction, normalized over all valid prediction steps (the first event of each sequence is excluded since no rule can be active), trains everything end to end.

Temperatures are annealed from 1 toward 0 — the predicate layer first, then the antecedent layer, which the authors say is more stable than annealing both at once. As temperatures approach zero the soft operations become crisp logic, so the trained weights can be read off as rules: the argmax of each predicate's weight vector is its event, its two learned delay bounds are its interval, and positive entries in the antecedent weights say which predicates are ANDed together.

Because not all data follows rules, a second phase freezes Rules and trains a transformer to output additive logit corrections using the same loss. At inference, you can see which rules fire and how much the residual shifts the prediction. Sequences are conditioned on the prediction time, so irregular sampling requires either a known next timestamp or an estimate (e.g. from a temporal point process). Rules scales quadratically in sequence length while allowing parallel prediction across time steps.

Why This Matters

The paper shows that symbolic rules with genuine temporal semantics can be learned by gradient descent and plugged into a predictive model without giving up transparency or, in most settings, accuracy. It reframes interpretability as an architectural property — a rule layer plus an auditable residual — rather than a post-hoc explanation.

Real-world applications where "why" matters as much as "what":

  • E-commerce next-purchase prediction, where a recommendation justified by explicit purchase-history windows is easier to act on and audit than an opaque embedding.
  • Healthcare event prediction, where clinicians need to see which prior events and time windows drove a predicted next step.
  • Process log analysis, where compact temporal rules expose deviations in business or manufacturing workflows (the Rolling Mill dataset is an industrial example).
  • Regulated or safety-sensitive deployment, where opaque internal representations make predictions hard to justify.

Industry relevance: The two-phase design gives practitioners a drop-in upgrade path — keep an existing high-capacity sequence model as the residual, add a rule layer in front, and retain an attribution trail for each prediction. The repository is released at https://github.com/IamginE/runes-rules.

Future Directions

  • Improving ground-truth coverage. Rules tends to shrink large antecedents and occasionally drops rules; better antecedent-size calibration or sparsity control could close the sim(R*, R) gap.

  • More compact real-data rule sets. Post-refinement rule counts reach 9583 on Rolling Mill and 993 on Amazon, so reducing rule-set size without losing accuracy remains open.

  • Predicting the next event time. Inference currently requires the prediction time as input; coupling Rules with a temporal point process to estimate it is suggested but not demonstrated.

  • Interpretability evaluation beyond structural proxies. The paper begins assessing rule-set and antecedent size as global-interpretability proxies (treating PPM and tree ensembles as sequential rule sources), but this analysis is cut off in the available content, and human-facing evaluation is not reported.

Target Audience

Researchers working on neuro-symbolic learning, interpretable machine learning, and sequence or event-prediction models; practitioners in domains such as healthcare, e-commerce, and process analysis who need auditable predictions; and readers already comfortable with differentiable relaxations and neural sequence architectures who want a concrete template for learning temporal logic rules from categorical event data.

Authors’ abstract

In real-world applications, being able to explain why a prediction is made is often as important - if not more so - than achieving high accuracy. However, existing methods for sequential event prediction typically prioritize accuracy at the expense of interpretability. Neuro-symbolic approaches offer a promising direction to improve interpretability by learning symbolic rules, but extending them to next-event prediction is challenging due to the presence of temporal dependencies. We introduce RULES, a neuro-symbolic model that learns sequential rules directly from data, and combine it with a residual network to form RUNES (Rule Network for Event Sequences). RULES accurately recovers ground truth rules from synthetic data and discovers compact, interpretable rule sets on real data. RUNES combines these rules additively with a residual network, achieving competitive accuracy while providing transparent access to active rules and how residuals adjust predictions.

Read the original paper