SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.00131 · NeurIPS · 2024

UNITS: A Unified Multi-Task Time Series Model

Marinka Zitnik, Theodoros Tsiligkaridis, Shanghua Gao, Thomas Hartvigsen, Teddy Koker, Owen Queen

arXiv · PDF · Open in the Atlas

Code that ran

19 of 28 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (9 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 19 have no contract verdict; 0 failures of our instrument; 9 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/2403.00131.json · badge: /api/ran/2403.00131.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
mims-harvard/UniTS canonical (classifier label)
classifier basis: classifier_2025
9 ran · 7 no recorded run
thuml/Time-Series-Library community
Papers with Code archive
10 ran · 2 no recorded run
FunctionStatusWhere it lives
CrossAttention Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("ef2961b050617953")
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, 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
import torch.nn as nn

INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_norm': False,
    'attn_drop': 0.0,
    'proj_drop': 0.0,
    'norm_layer': nn.LayerNorm,
    'var_num': 3,
}

ARGS = {
    'x': torch.randn(2, 5, 4),
    'query': torch.randn(2, 3, 4),
}
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, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DFT_series_decomp Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("2ab8882fbb385d83")
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, DFT_series_decomp: 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)

# The DFT_series_decomp class takes one parameter: top_k
# The forward method expects input x to be a tensor with at least 2 dimensions
# where dim=1 is the sequence dimension for FFT operations

# Create a small input tensor: (batch_size, sequence_length)
# Using distinct sizes: batch=2, sequence_length=4
x = torch.randn(2, 4)

ARGS = {
    "top_k": 5
}
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 DFT_series_decomp — 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 DFT_series_decomp 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_wo_pos Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("6a02f6d3ac9d4ea7")
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_wo_pos: 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)

# Define ARGS dict with all parameters for DataEmbedding_wo_pos
ARGS = {
    'c_in': 3,  # number of input channels
    'd_model': 4,  # dimension of model embeddings
    'embed_type': 'fixed',  # type of embedding ('fixed' or 'timeF')
    'freq': 'h',  # frequency type ('h' for hourly)
    'dropout': 0.1  # dropout rate
}
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_wo_pos — 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_wo_pos 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
DynamicLinear Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("d81cf82caf0a3c14")
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 2, dtype family float, shape (2, 5) 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 math
import torch
import torch.nn.functional as F
from torch import nn

class DynamicLinear(nn.Module):
    """
    A dynamic linear layer that can interpolate the weight size to support any given input and output feature dimension.
    """

    def __init__(self, in_features=None, out_features=None, fixed_in=0, bias=True):
        super(DynamicLinear, self).__init__()
        assert fixed_in < in_features, 'fixed_in < in_features is required !!!'
        self.in_features = in_features
        self.out_features = out_features
        self.weights = nn.Parameter(torch.Tensor(out_features, in_features))
        self.bias = nn.Parameter(torch.Tensor(out_features))
        self.fixed_in = fixed_in
        self.reset_parameters()

    def reset_parameters(self):
        nn.init.kaiming_uniform_(self.weights, a=math.sqrt(5))
        fan_in, _ = nn.init._calculate_fan_in_and_fan_out(self.weights)
        bound = 1 / math.sqrt(fan_in)
        nn.init.uniform_(self.bias, -bound, bound)

    def forward(self, x, out_features):
        """
        Forward pass for the dynamic linear layer.
        """
        fixed_weights = self.weights[:, :self.fixed_in]
        dynamic_weights = self.weights[:, self.fixed_in:]
        this_bias = self.bias
        in_features = x.shape[-1]
        if in_features != self.weights.size(1) or out_features != self.weights.size(0):
            dynamic_weights = F.interpolate(dynamic_weights.unsqueeze(0).unsqueeze(0), size=(out_features, in_features - self.fixed_in), mode='bilinear', align_corners=False).squeeze(0).squeeze(0)
            if self.fixed_in != 0:
                fixed_weights = F.interpolate(fixed_weights.unsqueeze(0).unsqueeze(0), size=(out_features, self.fixed_in), mode='bilinear', align_corners=False).squeeze(0).squeeze(0)
        if out_features != self.weights.size(0):
            this_bias = F.interpolate(this_bias.unsqueeze(0).unsqueeze(0).unsqueeze(0), size=(1, out_features), mode='bilinear', align_corners=False).squeeze(0).squeeze(0).squeeze(0)
        return F.linear(x, torch.cat((fixed_weights, dynamic_weights), dim=1), this_bias)


INIT_ARGS = {
    'in_features': 8,
    'out_features': 6,
    'fixed_in': 3,
    'bias': True
}

ARGS = {
    'x': torch.randn(2, 8),
    'out_features': 5
}

if __name__ == '__main__':
    model = DynamicLinear(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 5)")
    assert output.shape == (2, 5), f"Shape mismatch: got {output.shape}, expected (2, 5)"
    print("Success!")
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 2, dtype family float, shape (2, 5) — shape (2, 5) 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)
FixedEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("921d4aae41f22f16")
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, FixedEmbedding: 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 = {
    "c_in": 8,
    "d_model": 16
}
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 FixedEmbedding — 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 FixedEmbedding 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
GateLayer Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("18d0036b2989c343")
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 2, dtype family float, shape (2, 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
from torch import nn

class GateLayer(nn.Module):

    def __init__(self, dim, init_values=1e-05, inplace=False):
        super().__init__()
        self.inplace = inplace
        self.gate = nn.Linear(dim, 1)

    def forward(self, x):
        gate_value = self.gate(x)
        return gate_value.sigmoid() * x


INIT_ARGS = {
    'dim': 4,
    'init_values': 1e-05,
    'inplace': False,
}

ARGS = {
    'x': torch.randn(2, 4),
}

if __name__ == '__main__':
    gate_layer = GateLayer(**INIT_ARGS)
    output = gate_layer(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
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 2, dtype family float, shape (2, 4) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LearnablePositionalEmbedding Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("a7720e5f169c2b3d")
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 4, dtype family float, shape (1, 1, 16, 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 math
import torch
from torch import nn

class LearnablePositionalEmbedding(nn.Module):

    def __init__(self, d_model, max_len=5000):
        super(LearnablePositionalEmbedding, self).__init__()
        self.pe = nn.Parameter(torch.zeros(1, 1, max_len, d_model), requires_grad=True)
        pe = torch.zeros(max_len, d_model).float()
        position = torch.arange(0, max_len).float().unsqueeze(1)
        div_term = (torch.arange(0, d_model, 2).float() * -(math.log(10000.0) / d_model)).exp()
        pe[:, 0::2] = torch.sin(position * div_term)
        pe[:, 1::2] = torch.cos(position * div_term)
        pe = pe.unsqueeze(0).unsqueeze(0)
        self.pe.data.copy_(pe.float())
        del pe

    def forward(self, x, offset=0):
        return self.pe[:, :, offset:offset + x.size(2)]


INIT_ARGS = {
    'd_model': 4,
    'max_len': 100
}

ARGS = {
    'x': torch.randn(2, 3, 16),
    'offset': 0
}

if __name__ == '__main__':
    model = LearnablePositionalEmbedding(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
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 4, dtype family float, shape (1, 1, 16, 4) — shape (1, 1, 16, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MultiScaleSeasonMixing Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("125e0c04535acce1")
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, MultiScaleSeasonMixing: 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 Config:
    def __init__(self):
        self.seq_len = 64
        self.down_sampling_window = 2
        self.down_sampling_layers = 3

configs = Config()

ARGS = {
    "configs": configs
}
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 MultiScaleSeasonMixing — 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 MultiScaleSeasonMixing 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
Normalize Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("d85e5a2fd0a672ba")
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, Normalize: 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)

# The Normalize module expects:
# - num_features: int - number of features/channels
# - eps: float - numerical stability constant
# - affine: bool - whether to use learnable affine parameters
# - subtract_last: bool - whether to subtract last value instead of mean
# - non_norm: bool - whether to skip normalization

ARGS = {
    'num_features': 4,
    'eps': 1e-05,
    'affine': True,
    'subtract_last': False,
    'non_norm': False
}
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 Normalize — 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 Normalize 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
PastDecomposableMixing Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("4a082cb4e49aff69")
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, PastDecomposableMixing: 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 Config:
    def __init__(self):
        self.seq_len = 16
        self.pred_len = 8
        self.down_sampling_window = 2
        self.d_model = 4
        self.dropout = 0.1
        self.channel_independence = False
        self.decomp_method = 'moving_avg'
        self.moving_avg = 3
        self.top_k = 2
        self.d_ff = 8
        self.down_sampling_layers = 2

configs = Config()

ARGS = {
    'configs': configs
}
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 PastDecomposableMixing — 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 PastDecomposableMixing 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
PatchEmbedding Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("acc8fc941a65797e")
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 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
from torch import nn

class PatchEmbedding(nn.Module):

    def __init__(self, d_model, patch_len, stride, padding, dropout):
        super(PatchEmbedding, self).__init__()
        self.patch_len = patch_len
        self.stride = stride
        assert self.patch_len == self.stride, 'non-overlap'
        self.value_embedding = nn.Linear(patch_len, d_model, bias=False)
        self.dropout = nn.Dropout(dropout)

    def forward(self, x):
        n_vars = x.shape[1]
        x = x.unfold(dimension=-1, size=self.patch_len, step=self.stride)
        x = torch.reshape(x, (x.shape[0] * x.shape[1], x.shape[2], x.shape[3]))
        x = self.value_embedding(x)
        return (self.dropout(x), n_vars)


INIT_ARGS = {
    'd_model': 8,
    'patch_len': 4,
    'stride': 4,
    'padding': 0,
    'dropout': 0.1,
}

ARGS = {
    'x': torch.randn(2, 3, 16),
}

if __name__ == '__main__':
    model = PatchEmbedding(**INIT_ARGS)
    output, n_vars = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Number of variables: {n_vars}")
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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PositionalEmbedding Ran
ran on a synthesized input
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("5da1d16a64cf53ce")
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 (1, 8, 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
import torch.nn as nn
import math

class PositionalEmbedding(nn.Module):

    def __init__(self, d_model, max_len=5000):
        super(PositionalEmbedding, self).__init__()
        pe = torch.zeros(max_len, d_model).float()
        pe.require_grad = False
        position = torch.arange(0, max_len).float().unsqueeze(1)
        div_term = (torch.arange(0, d_model, 2).float() * -(math.log(10000.0) / d_model)).exp()
        pe[:, 0::2] = torch.sin(position * div_term)
        pe[:, 1::2] = torch.cos(position * div_term)
        pe = pe.unsqueeze(0)
        self.register_buffer('pe', pe)

    def forward(self, x):
        return self.pe[:, :x.size(1)]


INIT_ARGS = {
    'd_model': 4,
    'max_len': 100
}

ARGS = {
    'x': torch.randn(2, 8, 4)
}

if __name__ == '__main__':
    model = PositionalEmbedding(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
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 (1, 8, 4) — shape (1, 8, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SeqAttBlock Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("dda0e56e79965b1b")
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 4, dtype family float, shape (2, 3, 5, 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
import torch.nn as nn
from timm.layers import Mlp, DropPath

class GateLayer(nn.Module):

    def __init__(self, dim, init_values=1e-05, inplace=False):
        super().__init__()
        self.inplace = inplace
        self.gate = nn.Linear(dim, 1)

    def forward(self, x):
        gate_value = self.gate(x)
        return gate_value.sigmoid() * x

class SeqAttention(nn.Module):

    def __init__(self, dim, num_heads=8, qkv_bias=False, qk_norm=False, attn_drop=0.0, proj_drop=0.0, norm_layer=nn.LayerNorm):
        super().__init__()
        assert dim % num_heads == 0, 'dim should be divisible by num_heads'
        self.num_heads = num_heads
        self.head_dim = dim // num_heads
        self.scale = self.head_dim ** (-0.5)
        self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        self.q_norm = norm_layer(self.head_dim) if qk_norm else nn.Identity()
        self.k_norm = norm_layer(self.head_dim) if qk_norm else nn.Identity()
        self.attn_drop = nn.Dropout(attn_drop)
        self.proj = nn.Linear(dim, dim)
        self.proj_drop = nn.Dropout(proj_drop)

    def forward(self, x, attn_mask=None):
        import torch.nn.functional as F
        B, N, C = x.shape
        qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, self.head_dim).permute(2, 0, 3, 1, 4)
        q, k, v = qkv.unbind(0)
        q, k = (self.q_norm(q), self.k_norm(k))
        x = F.scaled_dot_product_attention(q, k, v, dropout_p=self.attn_drop.p if self.training else 0.0)
        x = x.transpose(1, 2).reshape(B, N, C)
        x = self.proj(x)
        x = self.proj_drop(x)
        return x

class SeqAttBlock(nn.Module):

    def __init__(self, dim, num_heads, qkv_bias=False, qk_norm=False, proj_drop=0.0, attn_drop=0.0, init_values=None, drop_path=0.0, norm_layer=nn.LayerNorm):
        super().__init__()
        self.norm1 = norm_layer(dim)
        self.attn_seq = SeqAttention(dim, num_heads=num_heads, qkv_bias=qkv_bias, qk_norm=qk_norm, attn_drop=attn_drop, proj_drop=proj_drop, norm_layer=norm_layer)
        self.ls1 = GateLayer(dim, init_values=init_values)
        self.drop_path1 = DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
        self.proj = nn.Linear(dim, dim)

    def forward(self, x, attn_mask):
        x_input = x
        x = self.norm1(x)
        n_vars, n_seqs = (x.shape[1], x.shape[2])
        x = torch.reshape(x, (-1, x.shape[-2], x.shape[-1]))
        x = self.attn_seq(x, attn_mask)
        x = torch.reshape(x, (-1, n_vars, n_seqs, x.shape[-1]))
        x = x_input + self.drop_path1(self.ls1(x))
        return x


INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_norm': False,
    'proj_drop': 0.0,
    'attn_drop': 0.0,
    'init_values': 1e-5,
    'drop_path': 0.0,
    'norm_layer': nn.LayerNorm,
}

ARGS = {
    'x': torch.randn(2, 3, 5, 4),
    'attn_mask': None,
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 5, 4) — shape (2, 3, 5, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SeqAttention Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("454a1cd3d3329ede")
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, 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
import torch.nn as nn
from torch import nn as nn_module

INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_norm': False,
    'attn_drop': 0.0,
    'proj_drop': 0.0,
    'norm_layer': nn.LayerNorm,
}

ARGS = {
    'x': torch.randn(2, 3, 4),
    'attn_mask': None,
}
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, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TemporalEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("f42ba6fda711db0d")
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, TemporalEmbedding: 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)

# TemporalEmbedding constructor takes:
# - d_model: int (model dimension)
# - embed_type: str (default 'fixed')
# - freq: str (default 'h')

ARGS = {
    'd_model': 8,
    'embed_type': 'fixed',
    'freq': 'h'
}
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 TemporalEmbedding — 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 TemporalEmbedding 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
TimeFeatureEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("98a0817e251d19c7")
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, TimeFeatureEmbedding: 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)

# TimeFeatureEmbedding.__init__ takes:
# - d_model: int
# - embed_type: str (default 'timeF')
# - freq: str (default 'h')

# From the code, we see:
# - d_model is used as the output dimension of nn.Linear
# - freq is mapped to d_inp via freq_map, which becomes the input dimension
# - embed_type is not used in __init__ or forward, so any value works

# For forward(), the input x should have shape (..., d_inp) where d_inp depends on freq
# For freq='h', d_inp=4

ARGS = {
    'd_model': 8,
    'embed_type': 'timeF',
    'freq': 'h'
}
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 TimeFeatureEmbedding — 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 TimeFeatureEmbedding 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
TokenEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
thuml/Time-Series-Library/models/TimeMixer.py
code served (permissive licence) · get_code("588a4a8475ed63a0")
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, TokenEmbedding: 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)

# TokenEmbedding takes two parameters: c_in and d_model
# c_in: number of input channels (features)
# d_model: dimension of the model (output embedding dimension)

# Looking at the forward method:
# - x is expected to have shape (batch, seq_len, c_in)
# - it gets permuted to (batch, c_in, seq_len)
# - Conv1d processes it with kernel_size=3
# - output is transposed back to (batch, seq_len, d_model)

# We need c_in and d_model to be small integers
c_in = 4  # number of input channels
d_model = 8  # output embedding dimension

ARGS = {
    'c_in': c_in,
    'd_model': d_model
}
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 TokenEmbedding — 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 TokenEmbedding 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
VarAttBlock Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("35326016e90c28ac")
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 4, dtype family float, shape (2, 3, 5, 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
import torch.nn as nn
from timm.layers import Mlp, DropPath

# Import the class
from torch.nn.functional import scaled_dot_product_attention

class GateLayer(nn.Module):

    def __init__(self, dim, init_values=1e-05, inplace=False):
        super().__init__()
        self.inplace = inplace
        self.gate = nn.Linear(dim, 1)

    def forward(self, x):
        gate_value = self.gate(x)
        return gate_value.sigmoid() * x

class VarAttention(nn.Module):

    def __init__(self, dim, num_heads=8, qkv_bias=False, qk_norm=False, attn_drop=0.0, proj_drop=0.0, norm_layer=nn.LayerNorm):
        super().__init__()
        assert dim % num_heads == 0, 'dim should be divisible by num_heads'
        self.num_heads = num_heads
        self.head_dim = dim // num_heads
        self.scale = self.head_dim ** (-0.5)
        self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        self.q_norm = norm_layer(self.head_dim) if qk_norm else nn.Identity()
        self.k_norm = norm_layer(self.head_dim) if qk_norm else nn.Identity()
        self.attn_drop = nn.Dropout(attn_drop)
        self.proj = nn.Linear(dim, dim)
        self.proj_drop = nn.Dropout(proj_drop)

    def forward(self, x):
        B, N, P, C = x.shape
        qkv = self.qkv(x).reshape(B, N, P, 3, self.num_heads, self.head_dim).permute(3, 0, 2, 4, 1, 5)
        q, k, v = qkv.unbind(0)
        q, k = (self.q_norm(q), self.k_norm(k))
        q = q.mean(dim=1, keepdim=False)
        k = k.mean(dim=1, keepdim=False)
        v = v.permute(0, 2, 3, 4, 1).reshape(B, self.num_heads, N, -1)
        x = scaled_dot_product_attention(q, k, v, dropout_p=self.attn_drop.p if self.training else 0.0)
        x = x.view(B, self.num_heads, N, -1, P).permute(0, 2, 4, 1, 3).reshape(B, N, P, -1)
        x = self.proj(x)
        x = self.proj_drop(x)
        return x

class VarAttBlock(nn.Module):

    def __init__(self, dim, num_heads, qkv_bias=False, qk_norm=False, proj_drop=0.0, attn_drop=0.0, init_values=None, drop_path=0.0, norm_layer=nn.LayerNorm):
        super().__init__()
        self.norm1 = norm_layer(dim)
        self.attn_var = VarAttention(dim, num_heads=num_heads, qkv_bias=qkv_bias, qk_norm=qk_norm, attn_drop=attn_drop, proj_drop=proj_drop, norm_layer=norm_layer)
        self.ls1 = GateLayer(dim, init_values=init_values)
        self.drop_path1 = DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
        self.proj = nn.Linear(dim, dim)

    def forward(self, x):
        x = x + self.drop_path1(self.ls1(self.attn_var(self.norm1(x))))
        return x


INIT_ARGS = {
    'dim': 4,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_norm': False,
    'proj_drop': 0.0,
    'attn_drop': 0.0,
    'init_values': 1e-5,
    'drop_path': 0.0,
    'norm_layer': nn.LayerNorm,
}

ARGS = {
    'x': torch.randn(2, 3, 5, 4),
}

if __name__ == '__main__':
    model = VarAttBlock(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: {ARGS['x'].shape}")
    assert output.shape == ARGS['x'].shape, "Shape mismatch!"
    print("Success!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 5, 4) — shape (2, 3, 5, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
VarAttention Ran
ran on a synthesized input
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("03d429ddb106034b")
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 4, dtype family float, shape (2, 3, 4, 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
from torch.nn import LayerNorm

INIT_ARGS = {
    'dim': 8,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_norm': False,
    'attn_drop': 0.0,
    'proj_drop': 0.0,
    'norm_layer': LayerNorm,
}

ARGS = {
    'x': torch.randn(2, 3, 4, 8),
}

if __name__ == '__main__':
    from torch.nn import Module
    
    class VarAttention(nn.Module):

        def __init__(self, dim, num_heads=8, qkv_bias=False, qk_norm=False, attn_drop=0.0, proj_drop=0.0, norm_layer=nn.LayerNorm):
            super().__init__()
            assert dim % num_heads == 0, 'dim should be divisible by num_heads'
            self.num_heads = num_heads
            self.head_dim = dim // num_heads
            self.scale = self.head_dim ** (-0.5)
            self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
            self.q_norm = norm_layer(self.head_dim) if qk_norm else nn.Identity()
            self.k_norm = norm_layer(self.head_dim) if qk_norm else nn.Identity()
            self.attn_drop = nn.Dropout(attn_drop)
            self.proj = nn.Linear(dim, dim)
            self.proj_drop = nn.Dropout(proj_drop)

        def forward(self, x):
            B, N, P, C = x.shape
            qkv = self.qkv(x).reshape(B, N, P, 3, self.num_heads, self.head_dim).permute(3, 0, 2, 4, 1, 5)
            q, k, v = qkv.unbind(0)
            q, k = (self.q_norm(q), self.k_norm(k))
            q = q.mean(dim=1, keepdim=False)
            k = k.mean(dim=1, keepdim=False)
            v = v.permute(0, 2, 3, 4, 1).reshape(B, self.num_heads, N, -1)
            import torch.nn.functional as F
            x = F.scaled_dot_product_attention(q, k, v, dropout_p=self.attn_drop.p if self.training else 0.0)
            x = x.view(B, self.num_heads, N, -1, P).permute(0, 2, 4, 1, 3).reshape(B, N, P, -1)
            x = self.proj(x)
            x = self.proj_drop(x)
            return x

    model = VarAttention(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: {ARGS['x'].shape}")
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 4, dtype family float, shape (2, 3, 4, 8) — shape (2, 3, 4, 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)
BasicBlock Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("d3cc5ae17d330bdd")
How it ran

no invocation recorded.

CLSHead Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("d1b2155e7ac7b6df")
How it ran

no invocation recorded.

DynamicLinearMlp Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("be28d50c76414fa6")
How it ran

no invocation recorded.

ForecastHead Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("bfe2418bb89918c9")
How it ran

no invocation recorded.

MLPBlock Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("9707fb7077958a62")
How it ran

no invocation recorded.

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

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("1a32039eae4bf633")
How it ran

no invocation recorded.

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

no invocation recorded.

calculate_unfold_output_length Not yet run
unverified (harvested, no recorded run)
mims-harvard/UniTS/models/UniTS.py
code served (permissive licence) · get_code("ea42266bafc13587")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 12 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 3 the same month, 12 later) and 16 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
PositionalEmbedding
brick of this paper's assembly: helper
19 other papers
7 dated earlier, 1 the same month, 11 later · 16 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
2106.13008 (2021-06)
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
and 16 more not named here
TokenEmbedding
brick of this paper's assembly: helper
15 other papers
6 dated earlier, 1 the same month, 8 later · 13 only as an assembly brick
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
2206.04038 (2022-06)
Scaleformer: Iterative Multi-scale Refining Transformers for Time Series Forecasting
2212.08151 (2022-12)
First De-Trend then Attend: Rethinking Attention for Time-Series Forecasting
and 12 more not named here
FixedEmbedding
brick of this paper's assembly: helper
14 other papers
6 dated earlier, 8 later · 12 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
2106.13008 (2021-06)
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
and 11 more not named here
TemporalEmbedding
brick of this paper's assembly: helper
14 other papers
6 dated earlier, 8 later · 12 only as an assembly brick
2012.07436 (2020-12)
Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
2106.13008 (2021-06)
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
and 11 more not named here
TimeFeatureEmbedding
brick of this paper's assembly: helper
13 other papers
4 dated earlier, 1 the same month, 8 later · 13 only as an assembly brick
2106.13008 (2021-06)
Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting
2201.12740 (2022-01)
FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
2212.08151 (2022-12)
First De-Trend then Attend: Rethinking Attention for Time-Series Forecasting
and 10 more not named here
Normalize
brick of this paper's assembly: helper
4 other papers
1 dated earlier, 3 later · 4 only as an assembly brick
2310.01728 (2023-10)
Time-LLM: Time Series Forecasting by Reprogramming Large Language Models
2406.08627 (2024-06)
Time-MMD: Multi-Domain Multimodal Dataset for Time Series Analysis
2505.17847 (2025-05)
Time-o1: Time-Series Forecasting Needs Transformed Label Alignment
and 1 more not named here
MultiScaleSeasonMixing
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 3 only as an assembly brick
2310.01728 (2023-10)
Time-LLM: Time Series Forecasting by Reprogramming Large Language Models
2406.08627 (2024-06)
Time-MMD: Multi-Domain Multimodal Dataset for Time Series Analysis
2505.17847 (2025-05)
Time-o1: Time-Series Forecasting Needs Transformed Label Alignment
MultiScaleTrendMixing
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 3 only as an assembly brick
2310.01728 (2023-10)
Time-LLM: Time Series Forecasting by Reprogramming Large Language Models
2406.08627 (2024-06)
Time-MMD: Multi-Domain Multimodal Dataset for Time Series Analysis
2505.17847 (2025-05)
Time-o1: Time-Series Forecasting Needs Transformed Label Alignment
DataEmbedding_wo_pos
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2406.08627 (2024-06)
Time-MMD: Multi-Domain Multimodal Dataset for Time Series Analysis
LearnablePositionalEmbedding
brick of this paper's assembly: model
1 other paper
1 later
2506.06454 (2025-06)
LETS Forecast: Learning Embedology for Time Series Forecasting
Model
brick of this paper's assembly: entry
1 other paper
1 later
2505.17847 (2025-05)
Time-o1: Time-Series Forecasting Needs Transformed Label Alignment
PastDecomposableMixing
brick of this paper's assembly: helper
1 other paper
1 later
2505.17847 (2025-05)
Time-o1: Time-Series Forecasting Needs Transformed Label Alignment

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

Although pre-trained transformers and reprogrammed text-based LLMs have shown strong performance on time series tasks, the best-performing architectures vary widely across tasks, with most models narrowly focused on specific areas, such as time series forecasting. Unifying predictive and generative time series tasks within a single model remains challenging. We introduce UNITS, a unified multitask time series model that utilizes task tokenization to integrate predictive and generative tasks into a single framework. UNITS employs a modified transformer block to capture universal time series representations, enabling transferability from a heterogeneous, multi-domain pre-training dataset-characterized by diverse dynamic patterns, sampling rates, and temporal scales-to a wide range of downstream datasets with varied task specifications and data domains. Tested on 38 datasets across human activity sensors, healthcare, engineering, and finance, UNITS achieves superior performance compared to 12 forecasting models, 20 classification models, 18 anomaly detection models, and 16 imputation models, including adapted text-based LLMs. UNITS also demonstrates strong few-shot and prompt capabilities when applied to new domains and tasks. In single-task settings, UNITS outperforms competitive task-specialized time series models. Code and datasets are available at https://github.com/mims-harvard/UniTS.

For agents

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

get_harvested_code_for_paper("2403.00131")
get_code_for_paper("2403.00131")
have("2403.00131")

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

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

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

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

Connect an agent — have() is free.