Skip to main content
Back

L2GTX Turns Black-Box Time Series AI Into Plain-English Global Explanations

A new model-agnostic framework called L2GTX turns per-instance time series explanations into class-wide summaries built from human-readable event patterns.

Pro

  • L2GTX is a model-agnostic framework that turns local time series explanations into compact class-wise global summaries. Paper
  • It aggregates parameterised event primitives (trends, local maxima and minima) from LOMATCE across representative instances.
  • A greedy submodular selection picks a budgeted instance set that maximises coverage of globally important event clusters.
  • Tested on six UCR datasets with FCN and LSTM-FCN classifiers, achieving stable Global Faithfulness across merge percentiles.
  • Case studies on ECG200 and Coffee produce explanations aligned with known cardiology and spectroscopy patterns.
  • Main limitations are compute cost of event clustering, univariate-only scope, and no released code repository.

Time series classifiers can spot fraud, arrhythmias, or engine faults with high accuracy, but understanding what temporal shape a network keys on across an entire class remains awkward. A new method called L2GTX (Local-to-Global Time-series eXplanations) proposes a fully model-agnostic way to synthesize class-wise global explanations by aggregating local ones, and it does so using primitives that read like plain sentences: increasing trends, decreasing trends, local maxima, and local minima.

Why global time series explanations are hard

Most explanation tools for sequential models were retrofitted from image and tabular XAI, and they typically stop at the local level. Existing explanation methods can be categorised along several dimensions, one of which distinguishes between local explanations, which aim to explain individual predictions, and global explanations, which seek to characterise a model's overall decision-making behaviour. The authors argue three specific gaps have blocked progress: methods built for images and tables ignore temporal dependencies, global synthesis for time series is underexplored, and the few global methods that exist are tied to particular architectures like CAM or LRP variants.

The consequence is that if you want to know what temporal shape a classifier consistently uses to call a heartbeat abnormal, you either read a hundred local heatmaps or you accept a surrogate that lives inside one specific network.

How L2GTX works

L2GTX is a five-stage pipeline that sits on top of any black-box classifier. It reuses the authors' earlier local explainer, LOMATCE (LOcal Model-Agnostic Time-series Classification Explanations), which describes each prediction as a set of parameterised event primitives (PEPs) rather than a saliency vector.

  1. Local attribution. For each sampled instance, LOMATCE perturbs segments, extracts increasing and decreasing segments parameterised by start time, duration, and average gradient, and extracts local maxima and minima parameterised by time and value. A weighted ridge regression on event counts produces importance scores.
  2. Merge similar clusters. Event clusters from different instances that describe the same shape are merged with agglomerative hierarchical clustering on centroid distances. A merge percentile p controls how aggressively the dendrogram is cut.
  3. Global importance. An instance-cluster matrix is built, and each global cluster gets a score by summing absolute local importances across instances, mirroring the SP-LIME aggregation trick.
  4. Budgeted instance selection. A greedy submodular selection picks B representative instances that jointly cover the highest-weighted global clusters, so the summary doesn't just repeat the same prototype.
  5. Aggregate events. For each covered cluster, all raw events from selected instances are flattened and summarised by mean and standard deviation of their timing, duration, or magnitude.
LOMATCE local explanation of a normal ECG heartbeat with trend and extrema annotations

Benchmarks and faithfulness

The authors evaluate on six univariate UCR datasets: ECG200, GunPoint, Coffee, FordA, FordB, and the synthetic CBF. Two black boxes are used to demonstrate architecture neutrality: a Fully Convolutional Network and an LSTM-FCN hybrid. Both models were trained with early stopping, with patience set to 15 epochs to prevent overfitting.

The primary metric is Global Faithfulness, defined as the mean local surrogate fidelity (R squared) across the selected instances. Results hold up under aggressive consolidation. The consistent GF values observed for merge percentiles ( $p \in 25, 50, 75, 95$ ), together with overlapping confidence intervals for nearly all model,dataset pairs, indicate that L2GTX effectively compresses the explanation space into a compact set of global clusters without sacrificing global faithfulness to the underlying model behaviour. On ECG200 with LSTM-FCN, GF sits around 0.83 across every merge setting; the harder GunPoint and CBF datasets drop into the 0.5 to 0.6 range but stay stable.

Global importance bar chart for ECG200 myocardial infarction class

What the explanations actually say

The case studies are the more interesting part. On the Coffee spectroscopy dataset, both models focus on wavelengths in the 210 to 240 range, but the emphasized shape differs. For the Robusta class, importance is concentrated on high-magnitude local maxima, whereas the Arabica class exhibits a more distributed pattern involving lower-intensity peaks alongside local minima. That lines up with known spectroscopic distinctions between the two varieties without any clinical or domain annotations fed in.

For ECG200, normal heartbeats surface as a distributed set of moderate-importance events while infarction signals collapse onto fewer sharp deflections, again matching qualitative cardiology descriptions.

Where it breaks and what is missing

The main pain point is compute. A practical limitation of the proposed method arises from the clustering of parameterised event primitives within LOMATCE, which constitutes the most computationally demanding stage of the explanation pipeline. Long sequences and large neighbourhood sample counts make this worse. The authors parallelise clustering and use silhouette-based heuristics on subsets of events, but scalability for very long series is not solved.

Other caveats worth noting:

  • The method is limited to univariate time series; multivariate extensions with cross-channel interactions are left for future work.
  • Faithfulness inherits whatever LOMATCE's local surrogate captures, so classes with genuinely low local R squared (GunPoint, CBF) also get weaker global summaries.
  • No public code repository is linked in the paper. Reproduction currently depends on reimplementing LOMATCE (published in IEEE Access) plus the aggregation pipeline, using standard tooling like the tsai library the authors used for training.

When it is worth using

L2GTX is a good fit when you already have a trained time series classifier, you cannot or do not want to modify it, and you need a class-level story about the temporal shapes it uses. Concrete situations where the event-primitive vocabulary pays off include auditing ECG or EEG classifiers before deployment, sanity-checking sensor fault detectors on manufacturing lines, and comparing whether two architectures actually rely on the same physiological or spectroscopic cues even when their accuracies match. If you need per-timestep saliency for a single prediction, stick with LOMATCE, SHAP variants, or CAM. L2GTX is aimed at the layer above that.