TL;DR
The paper introduces XACT (eXplainable Attributions from Coefficients of Transforms), a general framework that learns sparse, smooth explanation masks directly within arbitrary time-frequency domains (such as STFT, CWT, and DWT). By optimizing masks over transform coefficients and introducing an energy-aware penalty, XACT provides highly localized, structured, and human-interpretable explanations for deep time-series classifiers without highlighting spurious noise.
What Problem Does This Paper Address?
Deep learning models excel at time-series classification, but understanding why they make a prediction remains a notorious challenge. Traditional explainable AI (XAI) methods typically generate attributions in the raw time domain. However, the most discriminative features in time-series data (like audio, EEG, or financial data) are often encoded as latent frequency patterns or transient joint time-frequency events.
Existing time-frequency attribution methods are heavily restricted: they either operate on a single, fixed transform domain or suffer from high computational overhead and noisy outputs due to inefficient random sampling. This paper addresses the need for a flexible, transform-agnostic framework that can cleanly map a model's decisions back to any interpretable time-frequency representation.
Methods
The authors propose XACT, a framework that learns an explanation mask directly over the coefficients of any linear time-frequency transform that possesses a bounded left inverse.
As shown in Figure 1, the pipeline works by:
- Transforming the input signal $x$ into a time-frequency representation $g(x)$.
- Applying a learnable mask $M$.
- Inverting the masked representation back to the time domain via $g^{-1}$ to feed into the trained classifier $f(\cdot)$.
- Optimizing the mask via gradient descent using a multi-component loss function: $$\mathcal{L} = \mathcal{L}_D + \lambda_1\mathcal{L}_R + \lambda_2\mathcal{L}_S + \lambda_3\mathcal{L}_A$$
Where:
- $\mathcal{L}_D$ (Consistency Loss): Ensures the model's prediction on the masked input matches its original prediction.
- $\mathcal{L}_R$ (Sparsity Regularizer): An $\ell_1$-norm penalty that forces the mask to highlight only the most critical coefficients.
- $\mathcal{L}_S$ (2D Smoothness Penalty): Extends total variation minimization to two dimensions (time and frequency) to ensure spatial coherence.
- $\mathcal{L}_A$ (Energy-Aware Regularization): A novel penalty that discourages assigning relevance to empty or low-energy regions of the spectrogram/scalogram, effectively suppressing noise.
Additionally, the authors mathematically derive virtual inspection layers for both the Discrete Wavelet Transform (DWT) and Continuous Wavelet Transform (CWT), allowing Layer-wise Relevance Propagation (LRP)—a popular white-box XAI method—to be extended to wavelet domains for comparison.
Datasets
The framework was evaluated using three distinct datasets:
- Synthetic DTMF Dataset: A custom-generated dataset based on Dual-Tone Multi-Frequency signaling. It features 12 classes with precise ground-truth frequency locations mixed with random spurious frequencies and white noise, designed specifically to rigorously test feature localization.
- AudioMNIST: A real-world dataset consisting of spoken digits (0-9) from multiple speakers, converted into time-frequency representations.
- SleepEDF: A real-world medical dataset containing overnight EEG recordings used for automatic sleep stage classification (e.g., detecting REM sleep).
Key Insights and Ideas
- Domain Flexibility Matters: Different signals benefit from different representations. For instance, the CWT handles non-stationary signals and sharp transients exceptionally well due to its multi-resolution nature, whereas the STFT uses a fixed window. XACT allows practitioners to choose the transform that best fits their specific data characteristics.
- The Danger of "Empty" Relevance: Standard masking methods often highlight regions containing zero signal energy simply because modifying those regions doesn't change the model's output. XACT’s energy-aware penalty ($\mathcal{L}_A$) successfully forces the mask to focus only on where actual signal energy resides.
- Faithfulness Metrics Can Deceive: The authors show that standard quantitative evaluation metrics like insertion curves can be poorly calibrated. For example, a baseline method (FreqRISE) achieved an insertion confidence score of 0.95 on a model that only had an actual accuracy of 80%, demonstrating that high metric scores do not always equate to a well-calibrated explanation.
Key Results
Synthetic Localization
On the synthetic dataset, XACT demonstrated near-perfect precision in identifying class-defining frequencies while ignoring highly distracting spurious noise.
| Method | Average Precision (AP) ↑ | Precision@2 ↑ |
|---|---|---|
| LRP | $0.864 \pm 0.219$ | $0.836 \pm 0.243$ |
| FreqRISE | $0.969 \pm 0.081$ | $0.933 \pm 0.170$ |
| XACT | $\mathbf{0.970 \pm 0.128}$ | $\mathbf{0.970 \pm 0.120}$ |
Real-World Structure
When applied to the SleepEDF dataset to explain REM sleep classification, XACT produced significantly more compact, structured, and localized explanations than its baselines.
As visualized in Figure 4, while LRP and FreqRISE yielded diffuse, scattered attributions, XACT cleanly isolated a localized region around 5 Hz (associated with characteristic REM delta/theta activity) and captured beta-band activity (16–32 Hz) towards the end of the window, aligning perfectly with established sleep research literature.
Limitations and Future Work
While XACT consistently generates low-complexity, visually interpretable masks, no single XAI method outperformed all others across every real-world quantitative metric (such as raw deletion/insertion curves). Furthermore, the energy-masking threshold ($\tau$) is a hyperparameter that requires domain-specific tuning based on the background noise level of the dataset.
Future research directions could explore automatically learning the optimal time-frequency representation alongside the mask, or adapting the framework to handle multi-channel time-series data natively.
Summary updated