SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.09363 · 2019

Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1912.09363.json · badge: /api/ran/1912.09363.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
PlaytikaResearch/tft-torch community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
LiamMaclean216/Any-Coin-TFN extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
LiamMaclean216/Temporal-Fusion-Transformer reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
AWarno/CancerOptimization community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
a_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LiamMaclean216/Any-Coin-TFN/utils.py
pointer only (licence: NONE) · get_code("7c95cb374bdd7ed4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LiamMaclean216/Any-Coin-TFN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

aggregate_weights Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
PlaytikaResearch/tft-torch/tft_torch/visualize.py
code served (permissive licence) · get_code("b1e5983bdd5cf42a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import pandas as pd

# Create test data for a 2D array case (static weights)
output_arr_2d = np.random.rand(5, 4)  # 5 observations, 4 features

# Create test data for a 3D array case (temporal weights)
output_arr_3d = np.random.rand(5, 3, 4)  # 5 observations, 3 timesteps, 4 features

# List of percentiles to compute
prctiles = [25.0, 50.0, 75.0]

# List of feature names
feat_names = ["feature_1", "feature_2", "feature_3", "feature_4"]

# Use the 2D array case as the primary test case
ARGS = {
    "output_arr": output_arr_2d,
    "prctiles": prctiles,
    "feat_names": feat_names
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
attention Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LiamMaclean216/Any-Coin-TFN/utils.py
pointer only (licence: NONE) · get_code("72ce5bea9e3abec1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LiamMaclean216/Any-Coin-TFN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_quantile_loss_instance_wise Ran
ran on a synthesized input
PlaytikaResearch/tft-torch/tft_torch/loss.py
code served (permissive licence) · get_code("8cd61d6b957edb62")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Define small tensors for the function
num_samples = 2
num_horizons = 3
num_quantiles = 4

# outputs: [num_samples x num_horizons x num_quantiles]
outputs = torch.randn(num_samples, num_horizons, num_quantiles)

# targets: [num_samples x num_horizons]
targets = torch.randn(num_samples, num_horizons)

# desired_quantiles: [num_quantiles]
desired_quantiles = torch.tensor([0.1, 0.3, 0.5, 0.9])

ARGS = {
    "outputs": outputs,
    "targets": targets,
    "desired_quantiles": desired_quantiles,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_n_params Ran
ran, honoured the contract we drafted
LiamMaclean216/Any-Coin-TFN/utils.py
pointer only (licence: NONE) · get_code("608920c78f1ae5e9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LiamMaclean216/Any-Coin-TFN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_quantiles_loss_and_q_risk Ran
ran on a synthesized input
PlaytikaResearch/tft-torch/tft_torch/loss.py
code served (permissive licence) · get_code("4c5a235eedb8d13a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Define dimensions with distinct sizes
num_samples = 2
num_horizons = 3
num_quantiles = 4

# Create outputs tensor [num_samples x num_horizons x num_quantiles]
outputs = torch.randn(num_samples, num_horizons, num_quantiles)

# Create targets tensor [num_samples x num_horizons]
targets = torch.randn(num_samples, num_horizons)

# Create desired_quantiles tensor [num_quantiles]
desired_quantiles = torch.tensor([0.1, 0.3, 0.5, 0.9])

ARGS = {
    "outputs": outputs,
    "targets": targets,
    "desired_quantiles": desired_quantiles,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_data Ran
ran; our contract draft was wrong, not the code
LiamMaclean216/Temporal-Fusion-Transformer/data.py
pointer only (licence: NONE) · get_code("c3f734aa50290d68")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LiamMaclean216/Temporal-Fusion-Transformer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

one_hot Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LiamMaclean216/Temporal-Fusion-Transformer/data.py
pointer only (licence: NONE) · get_code("7e9f6b9b785a1b6a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, LiamMaclean216/Temporal-Fusion-Transformer when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

display_sample_wise_selection_stats Not yet run
unverified (harvested, no recorded run)
PlaytikaResearch/tft-torch/tft_torch/visualize.py
code served (permissive licence) · get_code("3af6ae65fe631626")
How it ran

no invocation recorded.

preprocess_row Not yet run
unverified (harvested, no recorded run)
AWarno/CancerOptimization/preprocess_data.py
code served (permissive licence) · get_code("afd2b57d5293817f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_n_params 14 other papers
1 dated earlier, 13 later
1809.01852 (2018-09)
GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination
2003.01332 (2020-03)
Heterogeneous Graph Transformer
2004.12992 (2020-04)
MakeItTalk: Speaker-Aware Talking-Head Animation
and 11 more not named here
aggregate_weights 1 other paper
1 later
2409.15586 (2024-09)
TFT-multi: simultaneous forecasting of vital sign trajectories in the ICU

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

More are linked than shown here.

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1912.09363")
get_code_for_paper("1912.09363")
have("1912.09363")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1912.09363.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1912.09363.svg)](https://syntology.ai/paper/1912.09363)

Connect an agent — have() is free.