SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.09237 · 2026

XLinear: A Lightweight and Accurate MLP-Based Model for Long-Term Time Series Forecasting with Exogenous Inputs

Yu Huang, Xinyang Chen, Zaiwen Feng, Huidong Jin

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2601.09237.json · badge: /api/ran/2601.09237.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
thuml/Time-Series-Library community
Papers with Code archive
7 ran · 2 no recorded run
FunctionStatusWhere it lives
AttentionLayer Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("c72bedae1c2e5af8")
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 an instance of its own class, AttentionLayer: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal inner_attention module that the AttentionLayer uses
class MinimalAttention(nn.Module):
    def forward(self, queries, keys, values, attn_mask, tau=None, delta=None):
        # queries: (B, L, H, d_k)
        # keys: (B, S, H, d_k)
        # values: (B, S, H, d_v)
        B, L, H, d_k = queries.shape
        _, S, _, d_v = values.shape
        
        # Simple attention: just return reshaped values and dummy attention weights
        out = values.mean(dim=2)  # (B, S, d_v)
        out = out[:, :L, :]  # Ensure output sequence length matches L
        if out.shape[1] < L:
            # Pad if needed
            padding = torch.zeros(B, L - out.shape[1], d_v)
            out = torch.cat([out, padding], dim=1)
        
        attn = torch.ones(B, H, L, S) / S
        return out, attn

# Create attention module instance
attention = MinimalAttention()

# Parameters
d_model = 8
n_heads = 2
d_keys = 4
d_values = 4

ARGS = {
    'attention': attention,
    'd_model': d_model,
    'n_heads': n_heads,
    'd_keys': d_keys,
    'd_values': d_values,
}
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 AttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AttentionLayer output the recorded ndim 0 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
DataEmbedding_inverted Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("be84117eca7bbea4")
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 an instance of its own class, DataEmbedding_inverted: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

class DataEmbedding_inverted(nn.Module):

    def __init__(self, c_in, d_model, embed_type='fixed', freq='h', dropout=0.1):
        super(DataEmbedding_inverted, self).__init__()
        self.value_embedding = nn.Linear(c_in, d_model)
        self.dropout = nn.Dropout(p=dropout)

    def forward(self, x, x_mark):
        x = x.permute(0, 2, 1)
        if x_mark is None:
            x = self.value_embedding(x)
        else:
            x = self.value_embedding(torch.cat([x, x_mark.permute(0, 2, 1)], 1))
        return self.dropout(x)


c_in = 3
d_model = 4
embed_type = 'fixed'
freq = 'h'
dropout = 0.1

ARGS = {
    'c_in': c_in,
    'd_model': d_model,
    'embed_type': embed_type,
    'freq': freq,
    'dropout': dropout
}
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 DataEmbedding_inverted — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DataEmbedding_inverted output the recorded ndim 0 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
EnEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("9a227bbc090a96e6")
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 an instance of its own class, EnEmbedding: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'n_vars': 3,
    'd_model': 4,
    'patch_len': 2,
    'dropout': 0.1
}
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 EnEmbedding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EnEmbedding output the recorded ndim 0 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
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("4a1c8c6921369e3d")
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 an instance of its own class, Encoder: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple encoder layer that matches the expected interface
class SimpleEncoderLayer(nn.Module):
    def __init__(self, d_model=4):
        super(SimpleEncoderLayer, self).__init__()
        self.linear = nn.Linear(d_model, d_model)
    
    def forward(self, x, cross, x_mask=None, cross_mask=None, tau=None, delta=None):
        # Simple pass-through with linear transformation
        return self.linear(x)

# Create a simple projection layer
class SimpleProjection(nn.Module):
    def __init__(self, d_model=4, output_dim=3):
        super(SimpleProjection, self).__init__()
        self.linear = nn.Linear(d_model, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Create encoder layers
layers = [
    SimpleEncoderLayer(d_model=4),
    SimpleEncoderLayer(d_model=4),
]

# Create norm layer
norm_layer = nn.LayerNorm(4)

# Create projection layer
projection = SimpleProjection(d_model=4, output_dim=3)

ARGS = {
    "layers": layers,
    "norm_layer": norm_layer,
    "projection": projection,
}
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 Encoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Encoder output the recorded ndim 0 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
EncoderLayer Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("bbcd0d85cc1704e5")
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 an instance of its own class, EncoderLayer: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Create minimal attention modules that return (output, weights) tuples
class MinimalAttention(nn.Module):
    def __init__(self, d_model):
        super(MinimalAttention, self).__init__()
        self.d_model = d_model
    
    def forward(self, query, key, value, attn_mask=None, tau=None, delta=None):
        # Return (attention_output, weights)
        # Output shape should match query shape
        batch_size, seq_len, d_model = query.shape
        output = torch.randn(batch_size, seq_len, d_model)
        weights = torch.randn(batch_size, seq_len, seq_len)
        return output, weights

# Parameters for EncoderLayer
d_model = 4
d_ff = 16
dropout = 0.1
activation = 'relu'

# Create attention modules
self_attention = MinimalAttention(d_model)
cross_attention = MinimalAttention(d_model)

ARGS = {
    'self_attention': self_attention,
    'cross_attention': cross_attention,
    'd_model': d_model,
    'd_ff': d_ff,
    'dropout': dropout,
    'activation': activation
}
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 EncoderLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EncoderLayer output the recorded ndim 0 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
FlattenHead Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("905e991998c7d0a0")
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 an instance of its own class, FlattenHead: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn as nn

torch.manual_seed(0)

# Parameters for FlattenHead.__init__
n_vars = 5
nf = 12
target_window = 8
head_dropout = 0.1

ARGS = {
    "n_vars": n_vars,
    "nf": nf,
    "target_window": target_window,
    "head_dropout": head_dropout,
}
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 FlattenHead — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FlattenHead output the recorded ndim 0 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
TriangularCausalMask Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("a297b58f69588d02")
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 an instance of its own class, TriangularCausalMask: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'B': 2,
    'L': 4,
    'device': 'cpu'
}
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 TriangularCausalMask — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TriangularCausalMask output the recorded ndim 0 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
FullAttention Not yet run
unverified (harvested, no recorded run)
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("322f02572bafb2ab")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
thuml/Time-Series-Library/models/TimeXer.py
code served (permissive licence) · get_code("a8b369fc0c4944e4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 4 later) and 4 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
TriangularCausalMask
brick of this paper's assembly: helper
14 other papers
8 dated earlier, 6 later · 12 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
2212.08151 (2022-12)
First De-Trend then Attend: Rethinking Attention for Time-Series Forecasting
2411.04554 (2024-11)
Peri-midFormer: Periodic Pyramid Transformer for Time Series Analysis
and 11 more not named here
AttentionLayer
brick of this paper's assembly: helper
6 other papers
3 dated earlier, 3 later · 6 only as an assembly brick
2505.23583 (2025-05)
Improving Time Series Forecasting via Instance-aware Post-hoc Revision
2506.03964 (2025-06)
Causality-Aware Contrastive Learning for Robust Multivariate Time-Series Anomaly Detection
2510.22655 (2025-10)
Learning Without Augmenting: Unsupervised Time Series Representation Learning via Frame Projections
and 3 more not named here
FullAttention
brick of this paper's assembly: helper
5 other papers
2 dated earlier, 3 later · 4 only as an assembly brick
2505.23583 (2025-05)
Improving Time Series Forecasting via Instance-aware Post-hoc Revision
2506.03964 (2025-06)
Causality-Aware Contrastive Learning for Robust Multivariate Time-Series Anomaly Detection
2602.18473 (2026-02)
Decentralized Attention Fails Centralized Signals: Rethinking Transformers for Medical Time Series
and 2 more not named here
DataEmbedding_inverted
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later · 3 only as an assembly brick
2505.00307 (2025-05)
Gateformer: Advancing Multivariate Time Series Forecasting via Temporal and Variate-Wise Attention with Gated Representations
2506.03964 (2025-06)
Causality-Aware Contrastive Learning for Robust Multivariate Time-Series Anomaly Detection
2605.21550 (2026-05)
PeakFocus: Bridging Peak Localization and Intensity Regression via a Unified Multi-Scale Framework for Electricity Load Forecasting
FlattenHead
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 2 only as an assembly brick
2310.01728 (2023-10)
Time-LLM: Time Series Forecasting by Reprogramming Large Language Models
2505.00307 (2025-05)
Gateformer: Advancing Multivariate Time Series Forecasting via Temporal and Variate-Wise Attention with Gated Representations

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-22.

Repositories linked to this paper

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

Abstract

Despite the prevalent assumption of uniform variable importance in long-term time series forecasting models, realworld applications often exhibit asymmetric causal relationships and varying data acquisition costs. Specifically, costeffective exogenous data (e.g., local weather) can unilaterally influence dynamics of endogenous variables, such as lake surface temperature. Exploiting these links enables more effective forecasts when exogenous inputs are readily available. Transformer-based models capture long-range dependencies but incur high computation and suffer from permutation invariance. Patch-based variants improve efficiency yet can miss local temporal patterns. To efficiently exploit informative signals across both the temporal dimension and relevant exogenous variables, this study proposes XLinear, a lightweight time series forecasting model built upon Multi-Layer Perceptrons (MLPs). XLinear uses a global token derived from an endogenous variable as a pivotal hub for interacting with exogenous variables, and employs MLPs with sigmoid activation to extract both temporal patterns and variate-wise dependencies. Its prediction head then integrates these signals to forecast the endogenous series. We evaluate XLinear on seven standard benchmarks and five real-world datasets with exogenous inputs. Compared with state-of-theart models, XLinear delivers superior accuracy and efficiency for both multivariate forecasts and univariate forecasts influenced by exogenous inputs.

For agents

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

get_harvested_code_for_paper("2601.09237")
get_code_for_paper("2601.09237")
have("2601.09237")

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

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

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

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

Connect an agent — have() is free.