Deep neural networks are the heavy hitters of time series analysis, but they remain notoriously opaque. When a model predicts a heart arrhythmia or a machine failure, we need to know why. Traditional explainability (XAI) tools, often borrowed from computer vision, struggle with the temporal dependencies and noise inherent in signals.
A new paper from researchers at DFKI, titled "FREQuency ATTribution: Benchmarking Frequency-based Occlusion for Time Series Data," proposes a shift in perspective. Instead of asking which time points are important, they ask which frequencies drive the model’s decision.
TL;DR
The researchers introduce FreqAtt, a post-hoc, architecture-agnostic framework that identifies influential frequency components in time series data using Fourier Transforms. By filtering out irrelevant frequencies and combining this with traditional attribution methods, FreqAtt produces smoother, more robust, and more human-interpretable explanations than standard time-domain techniques.
What Problem Does This Paper Address?
Most XAI methods, like Saliency maps or Occlusion, were designed for images where pixels have clear spatial relationships. In time series, data points are rarely independent; a single point's meaning depends on what came before and after it.
Traditional "occlusion" involves masking a small window of time. However, if a pattern is distributed across the entire sequence (like a specific rhythm), local masking fails to capture it. Furthermore, time series are often "noisy." Standard XAI methods often highlight this noise, leading to "spiky" explanations that are hard for humans to interpret and don't necessarily reflect the model's actual logic.
Methods
The core of the paper is the FreqAtt algorithm. It operates in four main steps:
- Transformation: The input signal is converted into the frequency domain using a Fast Fourier Transform (FFT).
- Frequency Occlusion: Specific frequency components (or bands) are masked out.
- Reconstruction: The modified signal is transformed back into the time domain.
- Evaluation: The model re-evaluates the reconstructed signal. The "attribution" of a frequency is determined by how much the model's prediction changes when that frequency is missing.
The authors also propose a Combined Approach: using FreqAtt to "clean" the signal by retaining only the most relevant frequencies, and then applying a traditional time-domain attribution method (like Integrated Gradients or Occlusion) on top of this optimized signal.
Datasets
The framework was benchmarked across a diverse array of 20+ datasets from the UEA & UCR time series classification repositories. These cover multiple domains:
- Manufacturing: Anomaly detection, electric devices.
- Communications: Character trajectories, spoken Arabic digits.
- Public Health: ECG5000, medical imaging.
- Transportation & Agriculture: Asphalt pavement types, insect wingbeats.
The CharacterTrajectories dataset was used extensively for qualitative visual analysis because of its intuitive 2D representation.
Key Insights and Ideas
- Frequency Sparsity: Many time series signals are "sparse" in the frequency domain. Key information is often concentrated in a few specific bands, while the rest is just background noise. FreqAtt leverages this to simplify the explanation.
- Global Impact: Unlike time-domain masking, which is local, removing a frequency component affects the entire signal. This allows the method to capture long-range patterns and periodicities that local windows miss.
- Reducing Cognitive Load: By filtering out irrelevant high-frequency "spikes," FreqAtt produces "Continuity"—smoother attribution maps that are much easier for a human expert to verify.
- Architecture Agnostic: Because it only requires the model's output (a "forward pass"), FreqAtt can be used on any neural network, from LSTMs to Transformers, without needing access to internal gradients.
Key Results
The researchers evaluated FreqAtt using metrics like AUPC (Area Under Performance Curve), Infidelity, and Sensitivity:
- Performance (AUPC): The combined approach (Frequency + Traditional Occlusion) achieved the best results, significantly outperforming random baselines and standalone time-domain methods.
- Robustness (Infidelity): Frequency-based approaches showed much lower infidelity scores, meaning the explanations were more faithful to the model's actual predictor function.
- Visual Clarity: In 2D trajectory tests, FreqAtt effectively "cleaned" the characters, removing jitter and noise while preserving the essential shapes that led to the correct classification.
- Efficiency: The runtime scales linearly with the number of frequencies ($O(f)$), making it highly efficient even for long sequences where traditional time-step occlusion becomes computationally expensive.
Limitations and Future Work
The authors acknowledge that frequency-based methods can be highly sensitive to small perturbations. Because adding a tiny bit of noise can introduce new frequencies into the spectrum, the attribution maps can shift more than traditional methods when the input is slightly altered.
Future directions include: * Extending FreqAtt to regression and forecasting tasks (e.g., which frequencies drive a 24-hour weather forecast?). * Applying the method to segmentation and anomaly detection to pinpoint exactly which spectral signatures trigger an alarm. * Exploring game-theoretic extensions to model how different frequency bands interact with each other to influence a prediction.
Summary updated