SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.19980 · NeurIPS · 2025

Abstain Mask Retain Core: Time Series Prediction by Adaptive Masking Loss with Representation Consistency

Shu Yang, Renzhao Liang, Sizhe Xu, Chenggang Xie, Jingru Chen, Feiyang Ren, Takahiro Yabe

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 2 failures of our instrument; 3 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/2510.19980.json · badge: /api/ran/2510.19980.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
MazelTovy/AMRC canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
Secilia-Cxy/SOFTS canonical (classifier label)
classifier basis: census
0 ran · 2 no recorded run
ditschuk/pytorch-tsmixer community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
FeatureMixing Ran
ran on a synthesized input
ditschuk/pytorch-tsmixer/torchtsmixer/layers.py
code served (permissive licence) · get_code("4f5849281bea173b")
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, 3) 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.functional as F
from torch import nn

from collections.abc import Callable

class TimeBatchNorm2d(nn.BatchNorm1d):
    """A batch normalization layer that normalizes over the last two dimensions of a
    sequence in PyTorch, mimicking Keras behavior.

    This class extends nn.BatchNorm1d to apply batch normalization across time and
    feature dimensions.

    Attributes:
        num_time_steps (int): Number of time steps in the input.
        num_channels (int): Number of channels in the input.
    """

    def __init__(self, normalized_shape: tuple[int, int]):
        """Initializes the TimeBatchNorm2d module.

        Args:
            normalized_shape (tuple[int, int]): A tuple (num_time_steps, num_channels)
                representing the shape of the time and feature dimensions to normalize.
        """
        num_time_steps, num_channels = normalized_shape
        super().__init__(num_channels * num_time_steps)
        self.num_time_steps = num_time_steps
        self.num_channels = num_channels

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        """Applies the batch normalization over the last two dimensions of the input tensor.

        Args:
            x (Tensor): A 3D tensor with shape (N, S, C), where N is the batch size,
                S is the number of time steps, and C is the number of channels.

        Returns:
            Tensor: A 3D tensor with batch normalization applied over the last two dims.

        Raises:
            ValueError: If the input tensor is not 3D.
        """
        if x.ndim != 3:
            raise ValueError(f'Expected 3D input tensor, but got {x.ndim}D tensor instead.')
        x = x.reshape(x.shape[0], -1, 1)
        x = super().forward(x)
        x = x.reshape(x.shape[0], self.num_time_steps, self.num_channels)
        return x

class FeatureMixing(nn.Module):
    """A module for feature mixing with flexibility in normalization and activation.

    This module provides options for batch normalization before or after mixing features,
    uses dropout for regularization, and allows for different activation functions.

    Args:
        sequence_length: The length of the sequences to be transformed.
        input_channels: The number of input channels to the module.
        output_channels: The number of output channels from the module.
        ff_dim: The dimension of the feed-forward network internal to the module.
        activation_fn: The activation function used within the feed-forward network.
        dropout_rate: The dropout probability used for regularization.
        normalize_before: A boolean indicating whether to apply normalization before
            the rest of the operations.
    """

    def __init__(self, sequence_length: int, input_channels: int, output_channels: int, ff_dim: int, activation_fn: Callable[[torch.Tensor], torch.Tensor]=F.relu, dropout_rate: float=0.1, normalize_before: bool=True, norm_type: type[nn.Module]=TimeBatchNorm2d):
        """Initializes the FeatureMixing module with the provided parameters."""
        super().__init__()
        self.norm_before = norm_type((sequence_length, input_channels)) if normalize_before else nn.Identity()
        self.norm_after = norm_type((sequence_length, output_channels)) if not normalize_before else nn.Identity()
        self.activation_fn = activation_fn
        self.dropout = nn.Dropout(dropout_rate)
        self.fc1 = nn.Linear(input_channels, ff_dim)
        self.fc2 = nn.Linear(ff_dim, output_channels)
        self.projection = nn.Linear(input_channels, output_channels) if input_channels != output_channels else nn.Identity()

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        """Forward pass for the FeatureMixing module.

        Args:
            x: A 3D tensor with shape (N, S, C) where S is sequence length and C is channels.

        Returns:
            The output tensor after feature mixing.
        """
        x_proj = self.projection(x)
        x = self.norm_before(x)
        x = self.fc1(x)
        x = self.activation_fn(x)
        x = self.dropout(x)
        x = self.fc2(x)
        x = self.dropout(x)
        x = x_proj + x
        return self.norm_after(x)


INIT_ARGS = {
    'sequence_length': 5,
    'input_channels': 4,
    'output_channels': 3,
    'ff_dim': 8,
    'activation_fn': F.relu,
    'dropout_rate': 0.1,
    'normalize_before': True,
    'norm_type': TimeBatchNorm2d,
}

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

if __name__ == '__main__':
    model = FeatureMixing(**INIT_ARGS)
    output = model(**ARGS)
    print(f'Output shape: {output.shape}')
    print(f'Expected shape: (2, 5, 3)')
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, 3) — shape (2, 5, 3) 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)
PositionalEncoding Ran
ran, honoured the contract we drafted
MazelTovy/AMRC/PatchTST/layers/PatchTST_layers.py
pointer only (licence: NONE) · get_code("16b9b78d429636b7")
How it ran

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

TimeBatchNorm2d Ran
ran on a synthesized input
ditschuk/pytorch-tsmixer/torchtsmixer/layers.py
code served (permissive licence) · get_code("68fd9c4c0068fea7")
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, 4, 3) 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, Tensor

class TimeBatchNorm2d(nn.BatchNorm1d):
    """A batch normalization layer that normalizes over the last two dimensions of a
    sequence in PyTorch, mimicking Keras behavior.

    This class extends nn.BatchNorm1d to apply batch normalization across time and
    feature dimensions.

    Attributes:
        num_time_steps (int): Number of time steps in the input.
        num_channels (int): Number of channels in the input.
    """

    def __init__(self, normalized_shape: tuple[int, int]):
        """Initializes the TimeBatchNorm2d module.

        Args:
            normalized_shape (tuple[int, int]): A tuple (num_time_steps, num_channels)
                representing the shape of the time and feature dimensions to normalize.
        """
        num_time_steps, num_channels = normalized_shape
        super().__init__(num_channels * num_time_steps)
        self.num_time_steps = num_time_steps
        self.num_channels = num_channels

    def forward(self, x: Tensor) -> Tensor:
        """Applies the batch normalization over the last two dimensions of the input tensor.

        Args:
            x (Tensor): A 3D tensor with shape (N, S, C), where N is the batch size,
                S is the number of time steps, and C is the number of channels.

        Returns:
            Tensor: A 3D tensor with batch normalization applied over the last two dims.

        Raises:
            ValueError: If the input tensor is not 3D.
        """
        if x.ndim != 3:
            raise ValueError(f'Expected 3D input tensor, but got {x.ndim}D tensor instead.')
        x = x.reshape(x.shape[0], -1, 1)
        x = super().forward(x)
        x = x.reshape(x.shape[0], self.num_time_steps, self.num_channels)
        return x


INIT_ARGS = {
    'normalized_shape': (4, 3)
}

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

if __name__ == '__main__':
    model = TimeBatchNorm2d(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{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 (2, 4, 3) — shape (2, 4, 3) 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)
create_dummy_data Ran
ran; our contract draft was wrong, not the code
MazelTovy/AMRC/TSMixer/train_tsmixer_amrc.py
pointer only (licence: NONE) · get_code("9cd8f6afc19c1e1d")
How it ran

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

get_activation_fn Ran
ran; our contract draft was wrong, not the code
MazelTovy/AMRC/PatchTST/layers/PatchTST_layers.py
pointer only (licence: NONE); the stored copy get_code serves, from liubolab/CausalMoE, is pointer only (licence: NONE) · get_code("72b9272542f279c6")
How it ran

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

Coord2dPosEncoding Not yet run
unverified (harvested, no recorded run)
MazelTovy/AMRC/PatchTST/layers/PatchTST_layers.py
pointer only (licence: NONE); the stored copy get_code serves, from liubolab/CausalMoE, is pointer only (licence: NONE) · get_code("c3fc6992d1e467f3")
How it ran

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

time_features Not yet run
unverified (harvested, no recorded run)
Secilia-Cxy/SOFTS/utils/timefeatures.py
code served (permissive licence) · get_code("9a5fcd4ebfc55d03")
How it ran

no invocation recorded.

time_features_from_frequency_str Not yet run
unverified (harvested, no recorded run)
Secilia-Cxy/SOFTS/utils/timefeatures.py
code served (permissive licence) · get_code("f8544563682146e5")
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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 3 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.

FunctionAlso present inEarliest-datedOthers named
time_features_from_frequency_str 19 other papers
17 dated earlier, 2 same year, order not determinable
2203.05167 (2022-03)
TiSAT: Time Series Anomaly Transformer
2208.04933 (2022-08)
Simplified State Space Layers for Sequence Modeling
2305.10721 (2023-05)
Revisiting Long-term Time Series Forecasting: An Investigation on Linear Mapping
and 16 more not named here
PositionalEncoding 16 other papers
11 dated earlier, 1 the same month, 4 later
2308.04791 (2023-08)
PETformer: Long-term Time Series Forecasting via Placeholder-enhanced Transformer
2310.00655 (2023-10)
PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting
2310.06625 (2023-10)
iTransformer: Inverted Transformers Are Effective for Time Series Forecasting
and 13 more not named here
Coord2dPosEncoding 15 other papers
12 dated earlier, 3 later
2308.04791 (2023-08)
PETformer: Long-term Time Series Forecasting via Placeholder-enhanced Transformer
2310.00655 (2023-10)
PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting
2310.06625 (2023-10)
iTransformer: Inverted Transformers Are Effective for Time Series Forecasting
and 12 more not named here
get_activation_fn 15 other papers
13 dated earlier, 2 later
2308.04791 (2023-08)
PETformer: Long-term Time Series Forecasting via Placeholder-enhanced Transformer
2310.00655 (2023-10)
PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting
2310.06625 (2023-10)
iTransformer: Inverted Transformers Are Effective for Time Series Forecasting
and 12 more not named here
time_features 12 other papers
10 dated earlier, 2 same year, order not determinable
2305.10721 (2023-05)
Revisiting Long-term Time Series Forecasting: An Investigation on Linear Mapping
2305.18803 (2023-05)
Koopa: Learning Non-stationary Time Series Dynamics with Koopman Predictors
2308.08469 (2023-08)
LLM4TS: Aligning Pre-Trained LLMs as Data-Efficient Time-Series Forecasters
and 9 more not named here

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

Time series forecasting plays a pivotal role in critical domains such as energy management and financial markets. Although deep learning-based approaches (e.g., MLP, RNN, Transformer) have achieved remarkable progress, the prevailing "longsequence information gain hypothesis" exhibits inherent limitations. Through systematic experimentation, this study reveals a counterintuitive phenomenon: appropriately truncating historical data can paradoxically enhance prediction accuracy, indicating that existing models learn substantial redundant features (e.g., noise or irrelevant fluctuations) during training, thereby compromising effective signal extraction. Building upon information bottleneck theory, we propose an innovative solution termed Adaptive Masking Loss with Representation Consistency (AMRC), which features two core components: 1) Dynamic masking loss, which adaptively identified highly discriminative temporal segments to guide gradient descent during model training; 2) Representation consistency constraint, which stabilized the mapping relationships among inputs, labels, and predictions. Experimental results demonstrate that AMRC effectively suppresses redundant feature learning while significantly improving model performance. This work not only challenges conventional assumptions in temporal modeling but also provides novel theoretical insights and methodological breakthroughs for developing efficient and robust forecasting models. We have made our code available at https://github.com/MazelTovy/AMRC.

For agents

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

get_harvested_code_for_paper("2510.19980")
get_code_for_paper("2510.19980")
have("2510.19980")

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

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

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

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

Connect an agent — have() is free.