Skip to main content
QUICK REVIEW

[Paper Review] Explainable AI for Time Series via Virtual Inspection Layers

Johanna Vielhaben, Sebastian Lapuschkin|arXiv (Cornell University)|Mar 11, 2023
Stock Market Forecasting MethodsDecision Sciences4 citations
TL;DR

This paper introduces DFT-LRP, a virtual inspection layer that enables local explainability methods like LRP to propagate relevance scores from the time domain to the frequency domain for time series models. By applying the Discrete Fourier Transform (DFT) as an invertible transformation, the method reveals interpretable frequency-based explanations without model retraining, uncovering model strategies such as reliance on spurious correlations (e.g., noise at low frequencies) in audio and ECG data.

ABSTRACT

The field of eXplainable Artificial Intelligence (XAI) has witnessed significant advancements in recent years. However, the majority of progress has been concentrated in the domains of computer vision and natural language processing. For time series data, where the input itself is often not interpretable, dedicated XAI research is scarce. In this work, we put forward a virtual inspection layer for transforming the time series to an interpretable representation and allows to propagate relevance attributions to this representation via local XAI methods. In this way, we extend the applicability of XAI methods to domains (e.g. speech) where the input is only interpretable after a transformation. In this work, we focus on the Fourier Transform which, is prominently applied in the preprocessing of time series, with Layer-wise Relevance Propagation (LRP) and refer to our method as DFT-LRP. We demonstrate the usefulness of DFT-LRP in various time series classification settings like audio and medical data. We showcase how DFT-LRP reveals differences in the classification strategies of models trained in different domains (e.g., time vs. frequency domain) or helps to discover how models act on spurious correlations in the data.

Motivation & Objective

  • To address the lack of interpretable explanations for time series models, where raw time points are not inherently meaningful to humans.
  • To extend local XAI methods like LRP to time series by enabling relevance propagation in interpretable representations such as the frequency domain.
  • To detect and diagnose model behaviors such as Clever Hans strategies that rely on spurious correlations in the data.
  • To provide a framework for comparing model decision strategies across different input representations (time vs. frequency domain) without retraining.
  • To enable model interpretation in domains like audio and electronic health records where raw time-series features are hard to interpret.

Proposed method

  • Introduces a virtual inspection layer consisting of two linear, invertible transformations: one mapping input data to an interpretable representation (e.g., via DFT), and another mapping it back to the original domain.
  • Applies layer-wise relevance propagation (LRP) to the transformed representation, enabling relevance scores to be interpreted in the frequency or time-frequency domain.
  • Derives a closed-form expression for relevance propagation through the DFT and Short-Time Fourier Transform (STFT), enabling exact computation without approximation.
  • Uses backpropagation-based LRP to propagate relevance from the model output through the virtual inspection layer to the interpretable domain.
  • Applies the method to time series classifiers in audio and ECG domains, comparing explanations across time, frequency, and time-frequency representations.
  • Extends pixel-flipping evaluation to compare explanations across different formats (time, frequency, time-frequency) to assess explanation quality.

Experimental results

Research questions

  • RQ1Can local XAI methods like LRP be effectively extended to time series by transforming inputs to interpretable representations such as the frequency domain?
  • RQ2How do model decision strategies differ when trained in the time domain versus the frequency domain, and can DFT-LRP reveal these differences?
  • RQ3Can DFT-LRP detect and expose 'Clever Hans' behaviors in time series models, such as reliance on spurious correlations like low-frequency noise?
  • RQ4To what extent do explanations in the frequency domain provide more meaningful insights than time-domain explanations for time series classification?
  • RQ5Can DFT-LRP be used to compare model strategies across different input representations without retraining?

Key findings

  • DFT-LRP successfully reveals that a model trained on audio data with added pink noise (Clever Hans setup) focuses on frequencies below 50 Hz, corresponding to noise, rather than the fundamental frequency of spoken digits.
  • The time-domain model classifies 98% of noisy zero samples as zero, indicating a Clever Hans behavior that is only detectable through frequency-domain explanations.
  • For ECG classification, DFT-LRP shows that the model focuses on the signal mean (k=0) in 44.3% of test samples across all classes, with 50.1% for normal beats (class 0), indicating a reliance on spurious correlations rather than clinically relevant features.
  • In audio classification, the time-domain model uses fundamental frequency and harmonics, while the frequency-domain model focuses only on the fundamental frequency, revealing distinct decision strategies.
  • The method enables direct comparison of explanations across time, frequency, and time-frequency domains using an extended pixel-flipping evaluation, showing improved interpretability in the frequency domain.
  • DFT-LRP uncovers that model explanations in the time domain alone fail to reveal critical model behaviors such as noise dependence, which are only visible after transformation to the frequency domain.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.