SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.19141 · ICML · 2023

Taylorformer: Probabilistic Modelling for Random Processes including Time Series

Raghul Parthipan, Damon Wischik, Omer Nivron

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 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 8 have no contract verdict; 2 failures of our instrument; 5 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2305.19141.json · badge: /api/ran/2305.19141.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
oremnirv/Taylorformer canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
oremnirv/taylorformer canonical (classifier label)
classifier basis: classifier_2025
2 ran · 5 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
FVL2020/ICCV-2023-MB-TaylorFormer extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
count_param Ran
ran, honoured the contract we drafted
FVL2020/ICCV-2023-MB-TaylorFormer/basicsr/models/archs/MB_TaylorFormer.py
pointer only (licence: NONE) · get_code("afd3c5ab4cb8face")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FVL2020/ICCV-2023-MB-TaylorFormer 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.

FFN_1 Ran
ran on a synthesized input
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("65cdae69f38cf4ab")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned EagerTensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 tensorflow as tf
import numpy as np

# INIT_ARGS for FFN_1.__init__(output_shape, dropout_rate=0.1)
INIT_ARGS = {
    'output_shape': 6,
    'dropout_rate': 0.1
}

# ARGS for FFN_1.call(x, query, training=True)
# x and query need to be compatible with dense_a which outputs output_shape=6
# dense_a takes query as input, so query's last dim can be anything
# x gets added to dense_a(query), so x's last dim must match output_shape=6
ARGS = {
    'x': tf.constant(np.random.randn(2, 6).astype(np.float32)),
    'query': tf.constant(np.random.randn(2, 4).astype(np.float32)),
    'training': True
}

METHOD = 'call'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
FFN_o Ran
ran on a synthesized input
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("cbfcb55bc2f9de46")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned EagerTensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import numpy as np
from torch import nn

class FFN_o(nn.Module):
    def __init__(self, output_shape, dropout_rate=0.1):
        super().__init__()
        self.dense_b = nn.Linear(output_shape, output_shape)
        self.dense_c = nn.Linear(output_shape, output_shape)
        self.layernorm = nn.ModuleList([nn.LayerNorm(output_shape) for _ in range(2)])
        self.dropout = nn.Dropout(dropout_rate)

    def forward(self, x, query, training=True):
        x = x + query
        x = self.layernorm[0](x)
        x_skip = x.clone()
        x = self.dense_b(x)
        x = torch.nn.functional.gelu(x)
        x = self.dropout(x) if training else x
        x = self.dense_c(x)
        x = x + x_skip
        return self.layernorm[1](x)

INIT_ARGS = {
    'output_shape': 4,
    'dropout_rate': 0.1
}

ARGS = {
    'x': torch.randn(2, 3, 4),
    'query': torch.randn(2, 3, 4),
    'training': True
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
batcher Ran
ran on a synthesized input
oremnirv/Taylorformer/data_wrangler/batcher.py
code served (permissive licence) · get_code("dc7e83587205280e")
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 numpy as np

# Create sample time series data
# t and y should have shape (sequence_length, features, 1)
np.random.seed(0)
sequence_length = 500
num_features = 1

t = np.random.randn(sequence_length, num_features, 1).astype(np.float32)
y = np.random.randn(sequence_length, num_features, 1).astype(np.float32)

# Create idx_list: list of valid starting indices
# Each index should be such that idx + window <= sequence_length
window_size = 288
batch_size = 32
# Valid indices: 0 to (sequence_length - window_size)
idx_list = list(range(sequence_length - window_size))

ARGS = {
    "t": t,
    "y": y,
    "idx_list": idx_list,
    "batch_s": batch_size,
    "window": window_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
batcher_np Ran
ran on a synthesized input
oremnirv/Taylorformer/data_wrangler/batcher.py
code served (permissive licence) · get_code("55146a987364ab35")
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, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

# Create small numpy arrays that match the function's expected input shapes
# The function expects:
# - t: shape (batch_size, ?, ?)
# - y: shape (batch_size, ?, ?)
# - batch_s: integer for batch size

batch_size = 8
time_steps = 5
features = 4

# Create dummy numpy arrays
t = np.random.randn(batch_size, time_steps, features).astype(np.float32)
y = np.random.randn(batch_size, time_steps, features).astype(np.float32)
batch_s = 2

ARGS = {
    't': t,
    'y': y,
    'batch_s': batch_s
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
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
dataset_processor Ran
ran on a synthesized input
oremnirv/Taylorformer/data_wrangler/dataset_preparer.py
code served (permissive licence) · get_code("759917fb113db5d2")
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 numpy as np
import pandas as pd
import tempfile
import os

# Create a temporary CSV file with sample data
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "test_data.csv")

# Create sample data with multiple columns
# 100 rows, 3 columns (will be split into x_train from col 0, y_train from col -1)
sample_data = np.random.randn(100, 3).astype('float32')
df = pd.DataFrame(sample_data, columns=['feature1', 'feature2', 'target'])
df.to_csv(csv_path, index=False)

ARGS = {
    "path_to_data": csv_path
}
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 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
electricity_processor Ran
ran on a synthesized input
oremnirv/Taylorformer/data_wrangler/dataset_preparer.py
code served (permissive licence) · get_code("36556e38bfccb89e")
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 numpy as np
import tempfile
import os

# Create a temporary numpy file with appropriate data
# The function expects data that can be indexed as data[322:323]
# We need at least 323 rows to safely access index 322
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "electricity.npy")

# Create synthetic data with shape (400, 5) to satisfy data[322:323] indexing
# After transpose it becomes (5, 1), then we'll have (5, 2) after concatenating time
synthetic_data = np.random.randn(400, 5).astype(np.float32)
np.save(temp_file, synthetic_data)

ARGS = {
    "path_to_data": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
gp_data_processor Ran
ran on a synthesized input
oremnirv/Taylorformer/data_wrangler/dataset_preparer.py
code served (permissive licence) · get_code("2765a2fa8384fb98")
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 numpy as np
import tempfile
import os

# Create a temporary directory and populate it with the required .npy files
temp_dir = tempfile.mkdtemp()
path_to_data_folder = temp_dir + '/'

# Create sample data arrays
np.random.seed(0)
x = np.random.randn(100, 4).astype(np.float32)
y = np.random.randn(100, 3).astype(np.float32)
x_test = np.random.randn(20, 4).astype(np.float32)
y_test = np.random.randn(20, 3).astype(np.float32)
context_n_test = np.array([5, 10, 15], dtype=np.int32)

# Save arrays to the temporary directory
np.save(path_to_data_folder + 'x.npy', x)
np.save(path_to_data_folder + 'y.npy', y)
np.save(path_to_data_folder + 'x_test.npy', x_test)
np.save(path_to_data_folder + 'y_test.npy', y_test)
np.save(path_to_data_folder + 'context_n_test.npy', context_n_test)

ARGS = {
    'path_to_data_folder': path_to_data_folder
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
nll Ran
ran on a synthesized input
oremnirv/Taylorformer/model/losses.py
code served (permissive licence) · get_code("a432f66477b03b6f")
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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small test tensors
batch_size = 2
dim = 4

# y: target values, shape (batch_size, dim)
y = tf.constant(np.random.randn(batch_size, dim), dtype=tf.float32)

# μ (mu): mean predictions, shape (batch_size, dim)
mu = tf.constant(np.random.randn(batch_size, dim), dtype=tf.float32)

# log_σ (log_sigma): log standard deviation, shape (batch_size, dim)
log_sigma = tf.constant(np.random.randn(batch_size, dim), dtype=tf.float32)

# ε (epsilon): small constant for numerical stability
epsilon = 0.001

ARGS = {
    'y': y,
    'μ': mu,
    'log_σ': log_sigma,
    'ε': epsilon
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
to_3d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from gladzhang/Xformer
pointer only; the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("82a15cc1e46f7e4d")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

to_4d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from gladzhang/Xformer
pointer only; the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("b20f2a5df739a59e")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

MHA_XY_a Not yet run
unverified (harvested, no recorded run)
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("0008b10f993116e0")
How it ran

no invocation recorded.

MHA_XY_b Not yet run
unverified (harvested, no recorded run)
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("a1b28bad8dff9afe")
How it ran

no invocation recorded.

MHA_X_a Not yet run
unverified (harvested, no recorded run)
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("a5dbb97d666606f8")
How it ran

no invocation recorded.

MHA_X_b Not yet run
unverified (harvested, no recorded run)
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("ac6453f9ec8e7d1c")
How it ran

no invocation recorded.

taylorformer Not yet run
unverified (harvested, no recorded run)
oremnirv/taylorformer/model/taylorformer.py
code served (permissive licence) · get_code("abdbb490eee7171a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 3 later) and 13 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
to_3d 80 other papers
13 dated earlier, 3 the same month, 62 later, 2 same year, order not determinable · 18 only as an assembly brick
2003.06792 (2020-03)
Learning Enriched Features for Real Image Restoration and Enhancement
2102.02808 (2021-02)
Multi-Stage Progressive Image Restoration
2111.09881 (2021-11)
Restormer: Efficient Transformer for High-Resolution Image Restoration
and 77 more not named here
to_4d 79 other papers
13 dated earlier, 3 the same month, 61 later, 2 same year, order not determinable · 18 only as an assembly brick
2003.06792 (2020-03)
Learning Enriched Features for Real Image Restoration and Enhancement
2102.02808 (2021-02)
Multi-Stage Progressive Image Restoration
2111.09881 (2021-11)
Restormer: Efficient Transformer for High-Resolution Image Restoration
and 76 more not named here
count_param 3 other papers
2 dated earlier, 1 later
2106.00487 (2021-06)
Dense Nested Attention Network for Infrared Small Target Detection
2112.05150 (2021-12)
Deep Recurrent Neural Network with Multi-scale Bi-directional Propagation for Video Deblurring
2308.14036 (2023-08)
MB-TaylorFormer: Multi-branch Efficient Transformer Expanded by Taylor Formula for Image Dehazing

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

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

Abstract

We propose the Taylorformer for random processes such as time series. Its two key components are: 1) the LocalTaylor wrapper which adapts Taylor approximations (used in dynamical systems) for use in neural network-based probabilistic models, and 2) the MHA-X attention block which makes predictions in a way inspired by how Gaussian Processes' mean predictions are linear smoothings of contextual data. Taylorformer outperforms the state-of-the-art in terms of log-likelihood on 5/6 classic Neural Process tasks such as meta-learning 1D functions, and has at least a 14% MSE improvement on forecasting tasks, including electricity, oil temperatures and exchange rates. Taylorformer approximates a consistent stochastic process and provides uncertainty-aware predictions. Our code is provided in the supplementary material. This work focuses on building better models for stochastic processes, so we do not focus on computational cost or inference efficiency. We demonstrate Taylorformer's performance on several

For agents

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

get_harvested_code_for_paper("2305.19141")
get_code_for_paper("2305.19141")
have("2305.19141")

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

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

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

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

Connect an agent — have() is free.