# CausalFormer: An Interpretable Transformer for Temporal Causal Discovery

arXiv: https://arxiv.org/abs/2406.16708 · HTML: https://mlsanity.com/paper/2406.16708/

## Key facts

- Cited by 17 papers in the map (data through 14 Oct 2026).
- Builds on 23 of its 53 references that are in the map.
- First posted on arXiv 24 Jun 2024.

## Builds on (most cited first, 23 of 23)

- [Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization](https://mlsanity.com/paper/1610.02391/) (2016)
- [Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification](https://mlsanity.com/paper/1502.01852/) (2015)
- [Axiomatic Attribution for Deep Networks](https://mlsanity.com/paper/1703.01365/) (2017)
- [GNNExplainer: Generating Explanations for Graph Neural Networks](https://mlsanity.com/paper/1903.03894/) (2019)
- [Transformer Interpretability Beyond Attention Visualization](https://mlsanity.com/paper/2012.09838/) (2020)
- [A Survey on Neural Network Interpretability](https://mlsanity.com/paper/2012.14261/) (2020)
- [Explanations based on the Missing: Towards Contrastive Explanations with Pertinent Negatives](https://mlsanity.com/paper/1802.07623/) (2018)
- [Explaining NonLinear Classification Decisions with Deep Taylor Decomposition](https://mlsanity.com/paper/1512.02479/) (2015)
- [Detecting causal associations in large nonlinear time series datasets](https://mlsanity.com/paper/1702.07007/) (2017)
- [Deep Learning for Case-Based Reasoning through Prototypes: A Neural Network that Explains Its Predictions](https://mlsanity.com/paper/1710.04806/) (2017)
- [Spatial-Temporal Fusion Graph Neural Networks for Traffic Flow Forecasting](https://mlsanity.com/paper/2012.09641/) (2020)
- [D'ya like DAGs? A Survey on Structure Learning and Causal Discovery](https://mlsanity.com/paper/2103.02582/) (2021)
- [A Survey on Causal Inference](https://mlsanity.com/paper/2002.02770/) (2020)
- [DYNOTEARS: Structure Learning from Time-Series Data](https://mlsanity.com/paper/2002.00498/) (2020)
- [Object Detectors Emerge in Deep Scene CNNs](https://mlsanity.com/paper/1412.6856/) (2014)
- [Generative Causal Explanations for Graph Neural Networks](https://mlsanity.com/paper/2104.06643/) (2021)
- [On Interpretability of Artificial Neural Networks: A Survey](https://mlsanity.com/paper/2001.02522/) (2020)
- [Beyond Sparsity: Tree Regularization of Deep Models for Interpretability](https://mlsanity.com/paper/1711.06178/) (2017)
- [Granger Causality: A Review and Recent Advances](https://mlsanity.com/paper/2105.02675/) (2021)
- [CUTS: Neural Causal Discovery from Irregular Time-Series Data](https://mlsanity.com/paper/2302.07458/) (2023)
- [DEGREE: Decomposition Based Explanation For Graph Neural Networks](https://mlsanity.com/paper/2305.12895/) (2023)
- [Dynamic Causal Explanation Based Diffusion-Variational Graph Neural Network for Spatio-temporal Forecasting](https://mlsanity.com/paper/2305.09703/) (2023)
- [PerfCE: Performance Debugging on Databases with Chaos Engineering-Enhanced Causality Analysis](https://mlsanity.com/paper/2207.08369/) (2022)

## Built on by (most cited first, 17 of 17)

- [Causality-Aware Contrastive Learning for Robust Multivariate Time-Series Anomaly Detection](https://mlsanity.com/paper/2506.03964/) (2025)
- [DP-DGAD: A Generalist Dynamic Graph Anomaly Detector with Dynamic Prototypes](https://mlsanity.com/paper/2508.00664/) (2025)
- [OKG-LLM: Aligning Ocean Knowledge Graph with Observation Data via LLMs for Global Sea Surface Temperature Prediction](https://mlsanity.com/paper/2508.00933/) (2025)
- [Causal Ordering for Structure Learning from Time Series](https://mlsanity.com/paper/2510.24639/) (2025)
- [Beyond All-to-All: Causal-Aligned Transformer with Dynamic Structure Learning for Multivariate Time Series Forecasting](https://mlsanity.com/paper/2505.16308/) (2025)
- [Cross-modal Causal Intervention for Alzheimer's Disease Prediction](https://mlsanity.com/paper/2507.13956/) (2025)
- [Transforming Causality: Transformer-Based Temporal Causal Discovery with Prior Knowledge Integration](https://mlsanity.com/paper/2508.15928/) (2025)
- [Transformer Is Inherently a Causal Learner](https://mlsanity.com/paper/2601.05647/) (2026)
- [PropLLM: Propagation-Aware Scene Reconstruction for Network Fault Diagnosis](https://mlsanity.com/paper/2606.00582/) (2026)
- [Scalable Time-Series Causal Discovery with Approximate Causal Ordering](https://mlsanity.com/paper/2409.05500/) (2024)
- [Dynamic Sparse Causal-Attention Temporal Networks for Interpretable Causality Discovery in Multivariate Time Series](https://mlsanity.com/paper/2507.09439/) (2025)
- [DDT: A Dual-Masking Dual-Expert Transformer for Energy Time-Series Forecasting](https://mlsanity.com/paper/2601.07250/) (2026)
- [Causal-INSIGHT: Probing Temporal Models to Extract Causal Structure](https://mlsanity.com/paper/2603.25473/) (2026)
- [Mask2Cause: Temporal Causal Discovery Beyond Causality in Mean](https://mlsanity.com/paper/2605.07280/) (2026)
- [TTCD:Transformer Integrated Temporal Causal Discovery from Non-Stationary Time Series Data](https://mlsanity.com/paper/2605.08111/) (2026)
- [Online Test-Time Adaptation for Generalizable Dynamic Graph Anomaly Detection](https://mlsanity.com/paper/2608.19858/) (2026)
- [Resilient Concurrent Causal Discovery for Topological Event Sequences](https://mlsanity.com/paper/2608.21815/) (2026)

## Abstract (arXiv)

Temporal causal discovery is a crucial task aimed at uncovering the causal relations within time series data. The latest temporal causal discovery methods usually train deep learning models on prediction tasks to uncover the causality between time series. They capture causal relations by analyzing the parameters of some components of the trained models, e.g., attention weights and convolution weights. However, this is an incomplete mapping process from the model parameters to the causality and fails to investigate the other components, e.g., fully connected layers and activation functions, that are also significant for causal discovery. To facilitate the utilization of the whole deep learning models in temporal causal discovery, we proposed an interpretable transformer-based causal discovery model termed CausalFormer, which consists of the causality-aware transformer and the decomposition-based causality detector. The causality-aware transformer learns the causal representation of time series data using a prediction task with the designed multi-kernel causal convolution which aggregates each input time series along the temporal dimension under the temporal priority constraint. Then, the decomposition-based causality detector interprets the global structure of the trained causality-aware transformer with the proposed regression relevance propagation to identify potential causal relations and finally construct the causal graph. Experiments on synthetic, simulated, and real datasets demonstrate the state-of-the-art performance of CausalFormer on discovering temporal causality. Our code is available at https://github.com/lingbai-kong/CausalFormer.
