Papers › Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting

Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting

19 Dec 2019arXiv:1912.09363archive 2025-07-28

Bryan Lim, Sercan O. Arik, Nicolas Loeff, Tomas Pfister

Multi-horizon forecasting problems often contain a complex mix of inputs -- including static (i.e. time-invariant) covariates, known future inputs, and other exogenous time series that are only observed historically -- without any prior information on how they interact with the target. While several deep learning models have been proposed for multi-step prediction, they typically comprise black-box models which do not account for the full range of inputs present in common scenarios. In this paper, we introduce the Temporal Fusion Transformer (TFT) -- a novel attention-based architecture which combines high-performance multi-horizon forecasting with interpretable insights into temporal dynamics. To learn temporal relationships at different scales, the TFT utilizes recurrent layers for local processing and interpretable self-attention layers for learning long-term dependencies. The TFT also uses specialized components for the judicious selection of relevant features and a series of gating layers to suppress unnecessary components, enabling high performance in a wide range of regimes. On a variety of real-world datasets, we demonstrate significant performance improvements over existing benchmarks, and showcase three practical interpretability use-cases of TFT.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1912.09363")

Code

Syntology Ran 5 of 10 code samples harvested from 4 repositories linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 3 ran · fixture could not drive it.

By repository: community (archive-listed): 10 samples from 4 repositories, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

36 repositories listed; official and paper-mentioned ones first.

AWarno/CancerOptimization mentioned on GitHubpytorchMIT report
KalleBylin/tft_webapp mentioned on GitHubpytorch report
LiamMaclean216/Any-Coin-TFN mentioned on GitHubpytorch report
MarigoldJ/TFT_application mentioned on GitHub report
PlaytikaResearch/tft-torch mentioned on GitHubpytorchMIT report
Scallions/tft_paddle mentioned on GitHubpaddle report
Yoontae6719/Energy_project mentioned on GitHubpytorchMIT report
aqua1907/tft mentioned on GitHub report
ashi-k/tft mentioned on GitHubtf report
ashishKAgg/tft mentioned on GitHubtf report
damu4/tft-forecast mentioned on GitHub report
eeci/annex_37 mentioned on GitHubpytorchMIT report
ggaggu/Diprunning_study mentioned on GitHub report
google-research/google-research mentioned on GitHubtf report
greatwhiz/tft_tf2 mentioned on GitHubtf report
henghamao/tft mentioned on GitHub report
jdb78/pytorch-forecasting mentioned on GitHubpytorchMIT report
mattsherar/Temporal_Fusion_Transform mentioned on GitHubpytorch report
mavarick/tft mentioned on GitHubpytorch report
mlverse/tft mentioned on GitHubpytorchNOASSERTION report
ntubiolin/tft mentioned on GitHubtf report
stevinc/Transformer_Timeseries mentioned on GitHubpytorch report
unit8co/darts mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 5 ran; 1 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
3ran · fixture could not drive it
5unverified

Licence: 5 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

a_norm LiamMaclean216/Any-Coin-TFN/utils.py community (archive-listed) ran · fixture could not drive it fingerprinted no licence file found · pointer only · 7c95cb374bdd7ed4 · report
attention LiamMaclean216/Any-Coin-TFN/utils.py community (archive-listed) ran · fixture could not drive it fingerprinted no licence file found · pointer only · 72ce5bea9e3abec1 · report
get_n_params LiamMaclean216/Any-Coin-TFN/utils.py community (archive-listed) ran · honoured contract no licence file found · pointer only · 608920c78f1ae5e9 · report
load_data LiamMaclean216/Temporal-Fusion-Transformer/data.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · c3f734aa50290d68 · report
one_hot LiamMaclean216/Temporal-Fusion-Transformer/data.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · 7e9f6b9b785a1b6a · report
aggregate_weights PlaytikaResearch/tft-torch/tft_torch/visualize.py community (archive-listed) unverified MIT (permissive) · b1e5983bdd5cf42a · report
compute_quantile_loss_instance_wise PlaytikaResearch/tft-torch/tft_torch/loss.py community (archive-listed) unverified MIT (permissive) · 8cd61d6b957edb62 · report
display_sample_wise_selection_stats PlaytikaResearch/tft-torch/tft_torch/visualize.py community (archive-listed) unverified MIT (permissive) · 3af6ae65fe631626 · report
get_quantiles_loss_and_q_risk PlaytikaResearch/tft-torch/tft_torch/loss.py community (archive-listed) unverified MIT (permissive) · 4c5a235eedb8d13a · report
preprocess_row AWarno/CancerOptimization/preprocess_data.py community (archive-listed) unverified MIT (permissive) · afd2b57d5293817f · report

Tasks

Interpretable Machine LearningTime SeriesTime Series AnalysisTime Series Forecasting

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutInterpretabilityLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections