SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.22550 · NeurIPS · 2025

TIMEPERCEIVER: An Encoder-Decoder Framework for Generalized Time-Series Forecasting

Hankook Lee, Jaebin Lee

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2512.22550.json · badge: /api/ran/2512.22550.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
efficient-learning-lab/TimePerceiver community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
AttentionBlock Ran
ran on a synthesized input
efficient-learning-lab/TimePerceiver/models/TimePerceiver.py
code served (permissive licence) · get_code("4cb18fbb840f3299")
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 Tensor, ndim 3, dtype family float, shape (2, 3, 8) 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
import torch.nn as nn

class CrossAttention(nn.Module):

    def __init__(self, num_heads, query_dim, key_value_dim, dropout_rate):
        super(CrossAttention, self).__init__()
        self.num_heads = num_heads
        self.key_value_dim = key_value_dim
        self.query_dim = query_dim
        self.dropout = nn.Dropout(dropout_rate)
        if key_value_dim % num_heads != 0:
            raise ValueError('The hidden size must be a multiple of the num_heads size.')
        self.head_size = query_dim // num_heads
        self.query = nn.Linear(query_dim, query_dim)
        self.key = nn.Linear(key_value_dim, query_dim)
        self.value = nn.Linear(key_value_dim, query_dim)
        self.out = nn.Sequential(nn.Linear(query_dim, query_dim), self.dropout)

    def forward(self, query_input, key_value_input):
        batch_size = query_input.shape[0]
        query_len = query_input.shape[1]
        key_value_len = key_value_input.shape[1]
        query = self.query(query_input)
        key = self.key(key_value_input)
        value = self.value(key_value_input)
        query = query.view(batch_size, query_len, self.num_heads, self.head_size).transpose(1, 2)
        key = key.view(batch_size, key_value_len, self.num_heads, self.head_size).transpose(1, 2)
        value = value.view(batch_size, key_value_len, self.num_heads, self.head_size).transpose(1, 2)
        score_matrix = torch.matmul(query, key.transpose(-2, -1)) / torch.sqrt(torch.tensor(self.head_size, dtype=torch.float32))
        attention_matrix = torch.softmax(score_matrix, dim=-1)
        attention_matrix = self.dropout(attention_matrix)
        result_matrix = torch.matmul(attention_matrix, value)
        result_matrix = result_matrix.transpose(1, 2).contiguous().view(batch_size, query_len, self.query_dim)
        out = self.out(result_matrix)
        return out

class AttentionBlock(nn.Module):

    def __init__(self, num_heads, query_dim, key_value_dim, mlp_dim, dropout_rate):
        super(AttentionBlock, self).__init__()
        self.query_norm = nn.LayerNorm(query_dim)
        self.key_value_norm = nn.LayerNorm(key_value_dim)
        self.attention = CrossAttention(num_heads, query_dim, key_value_dim, dropout_rate)
        self.layer_norm2 = nn.LayerNorm(query_dim)
        self.dropout = nn.Dropout(dropout_rate)
        self.mlp = nn.Sequential(nn.Linear(query_dim, mlp_dim), nn.GELU(), nn.Dropout(dropout_rate), nn.Linear(mlp_dim, query_dim))

    def forward(self, query_input, key_value_input):
        query_input = query_input + self.dropout(self.attention(self.query_norm(query_input), self.key_value_norm(key_value_input)))
        query_input = query_input + self.dropout(self.mlp(self.layer_norm2(query_input)))
        return query_input

INIT_ARGS = {
    'num_heads': 2,
    'query_dim': 8,
    'key_value_dim': 12,
    'mlp_dim': 16,
    'dropout_rate': 0.1,
}

ARGS = {
    'query_input': torch.randn(2, 3, 8),
    'key_value_input': torch.randn(2, 5, 12),
}

if __name__ == '__main__':
    model = AttentionBlock(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 3, 8)")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 8) — shape (2, 3, 8) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
CrossAttention Ran
ran on a synthesized input
efficient-learning-lab/TimePerceiver/models/TimePerceiver.py
code served (permissive licence) · get_code("ba95d81f47fd8823")
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 Tensor, ndim 3, dtype family float, shape (2, 5, 8) 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
import torch.nn as nn

class CrossAttention(nn.Module):

    def __init__(self, num_heads, query_dim, key_value_dim, dropout_rate):
        super(CrossAttention, self).__init__()
        self.num_heads = num_heads
        self.key_value_dim = key_value_dim
        self.query_dim = query_dim
        self.dropout = nn.Dropout(dropout_rate)
        if key_value_dim % num_heads != 0:
            raise ValueError('The hidden size must be a multiple of the num_heads size.')
        self.head_size = query_dim // num_heads
        self.query = nn.Linear(query_dim, query_dim)
        self.key = nn.Linear(key_value_dim, query_dim)
        self.value = nn.Linear(key_value_dim, query_dim)
        self.out = nn.Sequential(nn.Linear(query_dim, query_dim), self.dropout)

    def forward(self, query_input, key_value_input):
        batch_size = query_input.shape[0]
        query_len = query_input.shape[1]
        key_value_len = key_value_input.shape[1]
        query = self.query(query_input)
        key = self.key(key_value_input)
        value = self.value(key_value_input)
        query = query.view(batch_size, query_len, self.num_heads, self.head_size).transpose(1, 2)
        key = key.view(batch_size, key_value_len, self.num_heads, self.head_size).transpose(1, 2)
        value = value.view(batch_size, key_value_len, self.num_heads, self.head_size).transpose(1, 2)
        score_matrix = torch.matmul(query, key.transpose(-2, -1)) / torch.sqrt(torch.tensor(self.head_size, dtype=torch.float32))
        attention_matrix = torch.softmax(score_matrix, dim=-1)
        attention_matrix = self.dropout(attention_matrix)
        result_matrix = torch.matmul(attention_matrix, value)
        result_matrix = result_matrix.transpose(1, 2).contiguous().view(batch_size, query_len, self.query_dim)
        out = self.out(result_matrix)
        return out


INIT_ARGS = {
    'num_heads': 2,
    'query_dim': 8,
    'key_value_dim': 12,
    'dropout_rate': 0.1,
}

ARGS = {
    'query_input': torch.randn(2, 5, 8),
    'key_value_input': torch.randn(2, 7, 12),
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 5, 8) — shape (2, 5, 8) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Model Not yet run
unverified (harvested, no recorded run)
efficient-learning-lab/TimePerceiver/models/TimePerceiver.py
code served (permissive licence) · get_code("d7dbf064377bbd54")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 3 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.

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

In machine learning, effective modeling requires a holistic consideration of how to encode inputs, make predictions (i.e., decoding), and train the model. However, in time-series forecasting, prior work has predominantly focused on encoder design, often treating prediction and training as separate or secondary concerns. In this paper, we propose TIMEPERCEIVER, a unified encoder-decoder forecasting framework that is tightly aligned with an effective training strategy. To be specific, we first generalize the forecasting task to include diverse temporal prediction objectives such as extrapolation, interpolation, and imputation. Since this generalization requires handling input and target segments that are arbitrarily positioned along the temporal axis, we design a novel encoder-decoder architecture that can flexibly perceive and adapt to these varying positions. For encoding, we introduce a set of latent bottleneck representations that can interact with all input segments to jointly capture temporal and cross-channel dependencies. For decoding, we leverage learnable queries corresponding to target timestamps to effectively retrieve relevant information. Extensive experiments demonstrate that our framework consistently and significantly outperforms prior state-of-the-art baselines across a wide range of benchmark datasets. The code is available at https://github.com/efficient-learning-lab/TimePerceiver.

For agents

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

get_harvested_code_for_paper("2512.22550")
get_code_for_paper("2512.22550")
have("2512.22550")

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

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

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

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

Connect an agent — have() is free.