The Problem with Time-Domain Saliency
In computer vision, saliency maps are highly intuitive: if a model predicts "dog," the map highlights the pixels that form the dog. However, when applied to time series data, this approach breaks down. Highlighting a single data point at a specific timestamp (e.g., $t=100$) is rarely helpful because the true "feature" driving a model's prediction is rarely a single point. Instead, it is usually a broader pattern, a frequency, or a trend.
Because of this mismatch, existing saliency methods often produce "noisy" time-domain maps that are nearly impossible for humans to interpret. While some researchers have attempted to project these explanations into other domains—such as the frequency domain—these projections often lose crucial mathematical guarantees. Most notably, they lose completeness, which is the foundational principle that the sum of all feature importances should equal the model's total prediction. Without completeness, methods like Integrated Gradients (IG) lose their trustworthiness.
Introducing Cross-Domain Integrated Gradients (CDIG)
To bridge this gap, researchers from EPFL have introduced Cross-domain Integrated Gradients (CDIG). This novel framework moves model explanations out of the confusing time domain and into semantically meaningful spaces, such as frequency or seasonality.
By extending the popular Integrated Gradients method to complex-valued and transformed domains, CDIG allows practitioners to see if a model is actually focusing on the "right" features—like a genuine heart rate pulse—or simply latching onto noise and artifacts.
How CDIG Works
The core innovation of CDIG is treating the explanation domain as a task-dependent choice rather than a fixed constraint.
- Transform-Agnostic Framework: CDIG is designed to work with any invertible, differentiable transformation $T$. This flexibility allows it to support the Discrete Fourier Transform (DFT), Independent Component Analysis (ICA), and Seasonal-Trend decomposition (STL).
- Complex-Valued Integrated Gradients: Many highly useful transforms, such as the Fourier transform, result in complex numbers. To handle this, the authors derived a generalization of IG using Wirtinger calculus. This allows CDIG to operate in complex domains while strictly preserving axiomatic properties like path independence and completeness.
- The Attribution Process: Instead of calculating gradients with respect to the raw time-domain input $x$, CDIG calculates them with respect to the transformed features $z = T(x)$. This directly attributes the model's output to specific frequencies, independent sources, or seasonal components.
Key Insights and Real-World Applications
The research team validated CDIG across a diverse array of datasets, including PPGDalia (wearable heart rate extraction), Physionet Siena Scalp EEG (epileptic seizure detection), UCR Archive Benchmarks, AudioMNIST, and custom synthetic data.
Through these tests, several key insights emerged:
- Domain Choice is Part of the Task: There is no "one size fits all" domain. If you are analyzing a heartbeat, the frequency domain is the natural choice. If you are looking at brain activity, ICA (which separates signal sources) is far more effective. CDIG provides the toolbox to choose the right analytical lens.
- Revealing Spurious Correlations: In a major breakthrough, CDIG successfully identified when models were "cheating." In the heart rate extraction task, CDIG revealed that some models were ignoring the actual pulse frequency and instead making predictions based on motion artifacts and interference.
- Mathematical Rigor: By extending IG to complex numbers, the authors ensured that the resulting explanations are mathematically tied to the model's internal logic, rather than just being visually appealing approximations.
Quantitative Results
CDIG's theoretical soundness translates directly into strong empirical performance:
- Faithfulness: In the PPG heart rate task, deleting the top 3% of features identified by CDIG in the frequency domain changed the model's output by a massive 66.39 BPM. In contrast, deleting the top 3% of time-domain features changed the output by only 10.13 BPM. This proves that the frequency domain accurately captures the features the model actually relies on.
- Competitive Performance: CDIG consistently outperformed or matched state-of-the-art methods (like TIMING and TIMEX++) across various benchmarks in terms of Cumulative Prediction Difference (CPD).
- Efficiency: The computational overhead is surprisingly modest. For large models, adding the cross-domain transform step increased the total attribution time by as little as 1.77%.
Limitations and Future Directions
While powerful, CDIG does have current limitations. The framework requires the chosen transform to be both invertible and differentiable, which excludes certain non-linear or lossy "black-box" transformations. Additionally, like the original Integrated Gradients, CDIG is sensitive to the choice of a "baseline" (the neutral starting point for comparison).
The authors also warn against "domain shopping"—the practice of trying different transforms until finding one that looks visually clean. They emphasize that the domain should always be chosen based on prior scientific knowledge of the signal.
Looking ahead, the team suggests exploring non-linear integration paths (such as Guided IG) and developing methods for automatic domain selection. To encourage community adoption, the authors have released an open-source library with native support for PyTorch, TensorFlow, and Captum, enabling plug-and-play cross-domain explainability for time-series models.
Summary updated