Source-linked AI summary
Signal2Symbol: Neuro-Symbolic Temporal Reasoning for Explainable Physiological Time-Series Anomaly Detection
Naser Mansour, Sidahmed Benabderrahmane, Ameer Rahwan
TL;DR
Physiological anomaly detectors can leave symbolic evidence, temporal relationships, and recurring anomaly families unexplained. Signal2Symbol combines biosignal tokenization, rare-pattern scoring, interval reasoning, and concept lattices; its symbolic approach achieves the best AUROC and AUPRC across the three evaluated datasets.
Problem
Numerical anomaly scores and saliency heatmaps often do not explain which symbolic patterns made a segment unusual, how anomalies relate over time, or whether they form a recurring family.
Source: §I · p. 1Method
Signal2Symbol tokenizes ECG/EEG signals, scores rare symbolic patterns, relates detected intervals with Allen algebra, and groups intervals into concept lattices.
Source: §I · p. 1, §X · pp. 7–8Results
Signal2Symbol achieves the best AUROC and AUPRC across MIT-BIH, PTB-XL, and Bonn EEG, outperforming the reported classical and deep baselines.
Source: E. Main Detection Results · p. 6Takeaways & Limitations
The framework produces local symbolic evidence, temporal relations, and concept-level visual explanations that group detections into shared anomaly families.
Source: §X · p. 7, §XI · p. 8Allen/FCA explanation quality depends on reliable interval extraction, since noisy thresholds can fragment or merge intervals incorrectly.
Source: §X · p. 8
Abstract
from arXiv · showhide
Physiological time series such as electrocardiograms (ECG) and electroencephalograms (EEG) exhibit complex temporal structure, substantial acquisition variability, and a strong need for transparent decision-making. Although deep models can achieve high detection performance, they often provide limited insight into why a segment is anomalous, how local anomalies relate over time, and whether a detection belongs to a broader recurring pattern. We propose Signal2Symbol, a neuro-symbolic framework for explainable biosignal anomaly detection. The method first converts ECG/EEG signals into symbolic sequences using either a learned VQ-VAE (Vector Quantized Variational Autoencoder) codebook or a SAX (Symbolic Aggregate approXimation) baseline. It then constructs bigram enriched token-window transactions and scores anomalies through rare itemset evidence derived from minimal rare itemset mining. Detected anomalous windows are merged into intervals and related using Allen interval algebra, enabling composite temporal explanations such as escalation chains, artifact overlap, and cross-channel synchrony. Finally, we introduce a rare temporal concept lattice based on Formal Concept Analysis (FCA), which groups anomalous intervals by shared rare symbolic evidence, Allen temporal relations, channel context, and robustness attributes. The resulting Galois lattice compresses many local detections into interpretable families of temporal-symbolic anomalies. We evaluate on three public benchmarks: MIT-BIH Arrhythmia (beat-level ECG), PTB-XL (record-level ECG), and the Bonn EEG dataset (segment-level EEG). We stress-test robustness under additive noise and baseline-wander perturbations. The results highlight the value of neuro-symbolic tokenization for temporal anomaly analysis and show that Allen/FCA reasoning provides compact, interpretable summaries of local detections.
I. INTRODUCTION
Physiological anomaly detectors often rank segments without explaining their symbolic patterns, temporal relationships, or membership in recurring anomaly families. Signal2Symbol combines symbolic tokenization, rare-pattern scoring, interval reasoning, and concept lattices to address those interpretability questions.
I. INTRODUCTION
- Numerical anomaly scores and saliency heatmaps often leave analysts without answers about unusual symbolic patterns, temporal relationships, or recurring anomaly families.The motivation spans ECG and EEG signals, which are affected by noise, baseline wander, device differences, missing channels, and population shift.Source: §I · p. 1
- Signal2Symbol converts continuous biosignals into symbolic sequences, detects rare co-occurrences, lifts detections into intervals, and organizes them into interpretable concept lattices.The design combines neural representation learning, symbolic rarity mining, temporal reasoning, and concept-based explanation.Source: §I · p. 1
- The paper compares learned VQ-VAE tokenization with SAX, a transparent symbolic baseline for ECG and EEG signals.Related work describes VQ-VAE codebooks as learned waveform prototypes, whereas SAX discretizes amplitude and may miss waveform morphology differences.Source: §I · p. 1, §II · pp. 1–2
- Rare-pattern scoring aggregates evidence from minimal rare itemsets over bigram-enriched sliding windows and connects its weighting to information-theoretic surprisal.Symbolic approaches can expose motifs, co-occurrences, and rules as direct evidence, unlike ranking-oriented scores or saliency maps alone.Source: §I · p. 1, §II · p. 2
- High-scoring windows become anomaly intervals whose Allen relations describe configurations including escalation, artifact overlap, staged onset, and cross-channel synchrony.Related work also describes interval reasoning for patterns such as repeated bursts and artifact-contaminated detections.Source: §I · p. 1, §II · p. 2
- The FCA/Galois-lattice layer groups anomalous intervals by shared rare motifs, temporal relations, channel context, reconstruction fidelity, and robustness attributes.FCA represents intervals as objects and rare symbolic evidence, Allen relations, and signal-context predicates as attributes.Source: §I · p. 1, §II · p. 2
III. PROBLEM FORMULATION AND OVERVIEW
Signal2Symbol segments multichannel ECG or EEG into analysis units and targets anomaly scores, intervals, and explanations at symbolic, temporal, and concept levels. Its overview proceeds from tokenization and rare-pattern scoring to interval reasoning and FCA, with SAX specified as a transparent baseline.
A. Problem Statement
- The series is segmented into N units, each representing either an ECG beat-centered window or a fixed-length EEG window.The input is denoted as a multichannel time series x(t) with C channels and length T.Source: A. Problem Statement · p. 2
- The task produces record-level and window-level anomaly scores, anomaly intervals, local rare-pattern explanations, temporal Allen explanations, and FCA concept explanations.The input is a multichannel physiological time series corresponding to ECG leads or EEG sensors.Source: A. Problem Statement · p. 2
B. Pipeline Overview
- The pipeline tokenizes raw signals, forms bigram-enriched transactions, scores rare itemsets, merges high-scoring windows into intervals, computes Allen relations, and organizes intervals in an FCA lattice.The figure summarizes this sequence from raw ECG/EEG signals to visual explanation.Source: B. Pipeline Overview · p. 2, Figure 1 · p. 2
A. SAX Baseline
- For a univariate series, SAX applies z-normalization, Piecewise Aggregate Approximation, and discretization into an alphabet of size A.For multichannel data, SAX is applied per channel or selected channel group, with resulting symbols concatenated.Source: A. SAX Baseline · p. 2
- SAX serves as a simple, fast, and transparent baseline for symbolic anomaly detection.Its quantization is based mainly on amplitude discretization.Source: A. SAX Baseline · p. 2
- SAX alphabet size A ranges over {4, 5, 6}, while PAA resolution controls the trade-off between coarse robustness and fine symbolic resolution.Source: A. SAX Baseline · p. 2
B. VQ-VAE Tokenization
VQ-VAE maps ECG beats and EEG windows to learned codebook symbols aligned with timestamps. Sliding windows over the symbolic sequence become transactions, augmented with consecutive-token bigrams to retain some ordering information.
B. VQ-VAE Tokenization
- VQ-VAE encodes each signal segment, assigns its latent vector to the nearest codebook entry, decodes that entry, and converts its index into an ECG or EEG symbol.ECG tokens use the B_ prefix and EEG tokens the E_ prefix.Source: B. VQ-VAE Tokenization · p. 2
- Training the VQ-VAE on normal segments makes anomalies appear as unusual combinations of typical waveform prototypes across sliding windows.Codebook granularity and utilization affect sensitivity; dead codes reduce effective resolution.Source: B. VQ-VAE Tokenization · pp. 2–3
- Per-segment reconstruction error provides a complementary anomaly signal, with poorly represented segments flagged through an FCA attribute.Source: B. VQ-VAE Tokenization · p. 3
A. Window-to-Transaction Mapping
- Each symbolic window of length W is transformed into a transaction, with its time interval spanning the tokens inside it.Source: A. Window-to-Transaction Mapping · p. 3
- Adding consecutive token bigrams partially restores ordering information discarded by set-based transactions, without requiring a full sequential pattern miner.For example, [A, B, C] yields {A, B, C, A→B, B→C}.Source: A. Window-to-Transaction Mapping · p. 3
B. Rare Itemsets and Rare Rules
Rare itemsets are defined by their support in the normal training transactions, and minimal rare itemsets represent the boundary of the rare family. The window score weights contained rare itemsets by rarity and itemset length.
B. Rare Itemsets and Rare Rules
- An itemset is rare when its support on the normal training transactions is at most τ, and minimal rare itemsets generate the upward-closed family of rare itemsets.Mining only the minimal rare itemsets avoids enumerating exponentially many supersets.Source: B. Rare Itemsets and Rare Rules · p. 3
- The level-wise BtB algorithm records candidates that fall below the rarity threshold as minimal rare itemsets and stops expanding them.Frequent itemsets at level k generate candidates at level k+1.Source: B. Rare Itemsets and Rare Rules · p. 3
A. Window-Level Score
- A window score aggregates the weights of rare itemsets contained in that transaction window.Source: A. Window-Level Score · p. 3
- The weight uses inverse support as a rarity amplifier and log(1 + |I|) to mildly favor structured multi-token co-occurrences over rare singletons.A small ε provides numerical stability.Source: A. Window-Level Score · p. 3
B. Record-Level Score
Top-K aggregation combines suspicious window scores into a record-level score while retaining localized bursts. Thresholded windows are merged into intervals, which are related using Allen interval algebra.
B. Record-Level Score
- Top-K aggregation makes the record-level score robust to isolated noise while preserving localized abnormal bursts.Source: B. Record-Level Score · p. 3
C. Interval Extraction
- Windows above threshold γ are marked anomalous, consecutive windows within a gap tolerance are merged, and each interval receives a max- or mean-score confidence and top-K rare-itemset evidence.Source: C. Interval Extraction · p. 4
A. Allen Relations
- Allen interval algebra provides 13 mutually exclusive qualitative relations for describing interactions between anomaly intervals, artifacts, and contextual events.Source: A. Allen Relations · p. 4
B. Composite Event Library
The composite-event library matches interval patterns to identify higher-level temporal configurations, and the temporal relation graph supports posthoc confidence refinement. The FCA layer groups detected intervals by shared properties.
B. Composite Event Library
- The library defines escalation, artifact-overlap, staged-onset, and cross-channel-synchrony patterns for linking anomaly intervals.Escalation can represent repeated intervals; artifact overlap suggests reduced confidence, and staged onset captures transitions within a tolerance.Source: B. Composite Event Library · p. 4
C. Temporal Relation Graph
- The temporal relation graph represents anomaly intervals as nodes and labeled Allen relations as edges, with composite events found by matching small graph patterns.Artifact-overlap relations discount interval confidence, while escalation-chain participation reinforces it.Source: C. Temporal Relation Graph · p. 4
VIII. RARE TEMPORAL CONCEPT LATTICES
- The FCA explanation layer treats detected anomaly intervals as objects and their symbolic, temporal, and signal-context properties as attributes.This layer summarizes many intervals and local explanations.Source: §VIII · p. 4, A. Formal Context · p. 4
B. Attribute Construction
- A rare symbolic attribute fires for an interval when at least one transaction within it contains the corresponding rare itemset.Allen-derived composites are represented by predicates such as overlaps-artifact and escalation-member.Source: B. Attribute Construction · p. 4
2. Temporal
Temporal and signal-context properties, reconstruction fidelity, and perturbation stability contribute attributes to the concept lattice. Formal concepts pair intervals with their maximal shared properties, illustrated by a toy lattice.
2. Temporal
- The attribute set includes Allen-composite predicates, channel and duration context, high reconstruction error, and stability labels for tested perturbations.High reconstruction error means an interval exceeds the 90th percentile of normal training errors; robustness labels include stable-under-noise and stable-under-wander.Source: §2 · p. 4
C. Formal Concepts
- A formal concept pairs an extent of anomaly intervals with the intent of their maximal shared properties.The toy example’s {R1, long-duration} concept groups A1, A2, and A5; adding overlap-artifact isolates A2.Source: C. Formal Concepts · p. 4, D. Toy Example · p. 5
D. Toy Example
- The toy binary context maps five anomaly intervals to five representative attributes, and its lattice organizes intervals hierarchically by shared attributes.Deeper concepts are more specific, with more attributes and fewer intervals.Source: D. Toy Example · pp. 4–5, Figure 3 · p. 5, Table I
E. Iceberg Lattice and Explanation Compression
An iceberg lattice retains supported concepts and selected discriminative attributes to compress local interval explanations. Toy interpretations illustrate artifact overlap and escalation, while the evaluation spans ECG and EEG tasks at three granularities.
E. Iceberg Lattice and Explanation Compression
- The iceberg lattice compresses local interval explanations into concept summaries, retaining concepts above a support threshold and filtering attributes to selected top-K patterns and predicates.These restrictions address the potentially exponential size of full concept lattices; the stated complexity for NextClosure is O(|G| · |M| · |concepts|).Source: E. Iceberg Lattice and Explanation… · p. 5
F. Example Interpretation
- Example concepts connect rare token co-occurrences to artifact overlap or escalation, with the former calling for reduced confidence and the latter describing a repeated long-duration anomaly chain.The escalation example suggests a sustained arrhythmic episode or seizure buildup.Source: F. Example Interpretation · p. 5
A. Datasets
- The evaluation covers MIT-BIH beat-level ECG, PTB-XL record-level ECG, and Bonn EEG segments, using normal data for training and abnormal or arrhythmic data as anomalies.MIT-BIH uses patient-wise splits; PTB-XL uses recommended patient-wise stratified folds; Bonn uses classes A–B as normal and C–E as varying abnormality.Source: A. Datasets · pp. 5–6
B. Baselines
Signal2Symbol achieves the best reported AUROC and AUPRC across the three datasets, while learned symbolic tokenization consistently improves rare-pattern ranking over SAX. The section describes its baselines, metrics, and implementation settings.
B. Baselines
- The comparison includes Isolation Forest, LOF, USAD, SAX+RareScore, and the full VQ-VAE+RareScore Signal2Symbol backbone.IF and LOF use flattened time-domain features; USAD is a reconstruction-based deep baseline.Source: B. Baselines · p. 6
C. Metrics
- Detection is measured with AUROC and AUPRC, explanation quality with four concept and sparsity measures, and robustness by AUROC change under noise and baseline wander.The perturbation tests vary Gaussian noise SNR and sinusoidal wander amplitude.Source: C. Metrics · p. 6
D. Implementation Details
- The implementation uses 128 VQ-VAE codebook entries, rare-itemset threshold 0.02, eight-token windows, and an iceberg lattice support threshold of two.The lattice also retains the top 50 attributes.Source: D. Implementation Details · p. 6
E. Main Detection Results
- Signal2Symbol achieves the best AUROC and AUPRC across MIT-BIH, PTB-XL, and Bonn; learned VQ-VAE tokenization improves rare-pattern ranking over SAX.On Bonn, all symbolic methods obtain high AUPRC, while VQ-VAE+Rare further improves AUROC.Source: E. Main Detection Results · p. 6, Table II · p. 6
- The Bonn EEG ablation table studies tokenizer, alphabet size, and PAA resolution.Its caption identifies the factors but does not report their outcomes.Source: Table III · p. 6
F. Ablation Study
The ablation and robustness analyses favor learned VQ-VAE tokens over SAX on Bonn EEG, while the concept lattice compresses detections into concise, interpretable groups. The case study shows how rare symbolic evidence and temporal relations organize seizure intervals into anomaly families.
F. Ablation Study
- On Bonn EEG, VQ-VAE tokens outperform SAX, and detection performance saturates at K = 128.Increasing the SAX alphabet or PAA resolution does not improve detection and may fragment useful motifs.Source: F. Ablation Study · p. 6
G. Sensitivity to Support Threshold
- VQ-VAE maintains peak AUROC of 0.710 across all τ ≤ 0.05, while SAX needs over 4,000 MRIs at τ = 0.01 to move from 0.601 to 0.631 AUROC.The VQ-VAE result is attributed to 21 specific, robust Minimal Rare Itemsets; preliminary checks on other datasets showed the same trend.Source: G. Sensitivity to Support Threshold · pp. 6–7, Figure 4 · p. 6
H. Explanation Quality
- Bonn EEG explanation lattices compress 2,061 intervals into 40 concepts (51.5×), 2,154 into 32 (67.3×) on MIT-BIH, and 585 into 144 (4.1×) on PTB-XL.Average concept intent is roughly 3 to 4 attributes.Source: Table IV · p. 7, H. Explanation Quality · p. 7
I. Robustness
- On Bonn EEG, VQ-VAE shows ∆AUROC = 0.000 across tested noise levels up to 5 dB SNR and baseline-wander amplitudes, while SAX drops by ∆ = −0.024 under baseline wander.The reported perturbations include noise and baseline wander.Source: Table V · p. 7, §I · p. 7
J. Case Study: Explainability via Concept Lattices
- In the seizure case study, the lattice groups 30 intervals into 14 rule-based families, with sub-concepts branching by rare patterns shared across intervals.The intervals are contiguous and overlapping; the top concept captures their shared long-duration attribute.Source: J. Case Study: Explainability via… · p. 7
X. DISCUSSION
Signal2Symbol combines symbolic rarity, temporal reasoning, and concept lattices to explain physiological anomalies, with learned tokens supporting comparisons across ECG and EEG benchmarks. The discussion describes how these components organize local detections, while noting limits in sequence modeling, hyperparameter analysis, and interval extraction.
X. DISCUSSION
- Rare itemsets supply local symbolic evidence, Allen relations structure intervals, and FCA groups them into shared temporal-symbolic anomaly families.The lattice can distinguish artifact-overlap concepts from escalation concepts and cross-channel from single-channel events.Source: §X · p. 7
- VQ-VAE learns recurring waveform morphologies as tokens, whereas SAX discretizes mostly amplitude patterns.The discussion highlights ECG beat morphology and EEG transients as relevant examples.Source: §X · p. 7
- Bigram enrichment restores pairwise ordering lost in set-valued transactions, allowing transition anomalies such as normal-to-PVC without full sequential mining.Longer dependencies remain beyond pairwise order.Source: §X · pp. 7–8
- FCA organizes rare patterns into a lattice of shared attributes, reducing fragmented explanations and supporting visual inspection.The lattice presents anomaly groupings rather than an unstructured list of rules.Source: §X · p. 8
- Larger windows raise token co-occurrence support and require higher rarity thresholds; the ablation varies parameters individually, leaving full factorial analysis for future work.The interacting parameters include τ, W, K, γ, and σ.Source: §X · p. 8
- The explanation quality of Allen/FCA reasoning depends on reliable interval extraction, because noisy thresholds can fragment or merge intervals incorrectly.Other stated limitations include pairwise order, lattice size, and VQ-VAE dead codes.Source: §X · p. 8
- On Bonn EEG, Signal2Symbol reaches 0.71 AUROC versus 0.46 for Isolation Forest and 0.57 for SAX+Rare; on MIT-BIH, VQ-VAE reaches 0.81 versus 0.79 for Isolation Forest, while SAX reaches 0.60; on PTB-XL, it scores 0.74 versus 0.54 for Isolation Forest.These are the reported per-dataset comparisons.Source: §X · p. 8
XI. CONCLUSION AND FUTURE WORK
- The evaluation covers beat-, record-, and segment-level ECG/EEG tasks; future work includes order-aware mining, masked token modeling, broader datasets, and human-in-the-loop assessment.The proposed extensions include CHB-MIT seizure detection and evaluation of explanation usefulness in clinical workflows.Source: §XI · p. 8