TimeSAE: Sparse Decoding for Faithful Explanations of Black-Box Time Series Models
Khalid Oublal, Quentin Bouniot, Qi Gan, Stephan Clémençon, Zeynep Akata
TL;DR
TimeSAE tackles the challenge of explaining black-box time-series models by learning an end-to-end sparse autoencoder that decomposes inputs into interpretable concepts. It integrates causal reasoning through approximated counterfactuals and the Causal Concept Effect to ensure faithfulness and robustness to distribution shifts, while introducing compositionality via a decompositional decoder and concept masks. The approach combines JumpReLU-based sparsity, temporal convolutional backbones, and CAR-aligned concept discovery to produce faithful, localized explanations that generalize beyond training distribution. Empirical results on eight datasets—including a new EliteLJ sports dataset—show TimeSAE outperforms baselines in faithfulness and distributional alignment, with favorable inference speed and scalable hyperparameters. The work advances practical explainability for time-series models and opens avenues for white-box concept-based modeling and deeper interpretability analyses.
Abstract
As black box models and pretrained models gain traction in time series applications, understanding and explaining their predictions becomes increasingly vital, especially in high-stakes domains where interpretability and trust are essential. However, most of the existing methods involve only in-distribution explanation, and do not generalize outside the training support, which requires the learning capability of generalization. In this work, we aim to provide a framework to explain black-box models for time series data through the dual lenses of Sparse Autoencoders (SAEs) and causality. We show that many current explanation methods are sensitive to distributional shifts, limiting their effectiveness in real-world scenarios. Building on the concept of Sparse Autoencoder, we introduce TimeSAE, a framework for black-box model explanation. We conduct extensive evaluations of TimeSAE on both synthetic and real-world time series datasets, comparing it to leading baselines. The results, supported by both quantitative metrics and qualitative insights, show that TimeSAE provides more faithful and robust explanations. Our code is available in an easy-to-use library TimeSAE-Lib: https://anonymous.4open.science/w/TimeSAE-571D/.
