SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.23672 · NeurIPS · 2025

DBLoss: Decomposition-based Loss Function for Time Series Forecasting

Bin Yang, Chenjuan Guo, Xingjian Wu, Xiangfei Qiu, Jilin Hu, Hanyin Cheng, Xvyuan Liu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 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 0 have no contract verdict; 9 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2510.23672.json · badge: /api/ran/2510.23672.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
decisionintelligence/DBLoss canonical (classifier label)
classifier basis: census
10 ran · 0 no recorded run
FunctionStatusWhere it lives
compress_gz Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/utils/compress.py
code served (permissive licence) · get_code("1f5bdb2f191eb151")
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 bytes. 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 tarfile
from io import BytesIO
from typing import Dict, Optional

def compress_gz(data: Dict[str, str]) -> bytes:
    """
    Compress in gz format
    """
    outbuf = BytesIO()
    with tarfile.open(fileobj=outbuf, mode='w:gz') as tar:
        for k, v in data.items():
            info = tarfile.TarInfo(name=k)
            v_bytes = v.encode('utf8')
            info.size = len(v_bytes)
            tar.addfile(info, fileobj=BytesIO(v_bytes))
    return outbuf.getvalue()


ARGS = {
    "data": {
        "file1.txt": "Hello, World!",
        "file2.txt": "This is a test string",
        "file3.txt": "Another file content"
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
compress_gzip Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/utils/compress.py
code served (permissive licence) · get_code("82dc09f8ee31e286")
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 bytes. 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 gzip
from io import BytesIO
from typing import Dict, Optional

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# The function compress_gzip takes a Dict[str, str] parameter named 'data'
# It iterates over k, v pairs and encodes each value as UTF-8 bytes
# So we need a dictionary with string keys and string values

ARGS = {
    "data": {
        "key1": "hello world",
        "key2": "test data",
        "key3": "another string"
    }
}
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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
decompose_time Ran
ran, honoured the contract we drafted
decisionintelligence/DBLoss/ts_benchmark/baselines/utils.py
code served (permissive licence) · get_code("b19d5a8d2ddd9af5")
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 ndarray, ndim 2, dtype family int, shape (4, 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 numpy as np
import pandas as pd

# Create a small array of timestamps as strings
time_array = np.array([
    '2023-01-15 10:30:45',
    '2023-02-20 14:25:30',
    '2023-03-10 08:15:00',
    '2023-04-05 16:45:20'
])

# Define frequency parameter
freq = 'h'

ARGS = {
    'time': time_array,
    'freq': freq
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 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: none by the harness; any seed is in the setup block
decompress_gzip Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/utils/compress.py
code served (permissive licence) · get_code("68510ce4454b9b63")
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 dict. 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 gzip
from io import BytesIO

# Create a small test dictionary to compress
test_dict = {"key1": "value1", "key2": "value2"}

# Serialize the dictionary as newline-separated key:value pairs
serialized = "\n".join([f"{k}:{v}" for k, v in test_dict.items()])

# Compress the serialized data using gzip
compressed_buf = BytesIO()
with gzip.GzipFile(fileobj=compressed_buf, mode='wb') as gz:
    gz.write(serialized.encode('utf8'))
compressed_data = compressed_buf.getvalue()

ARGS = {
    "compressed_data": compressed_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
encode_params Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/evaluation/evaluator.py
pointer only (licence: MIT); the stored copy get_code serves, from decisionintelligence/TAB, is pointer only (licence: NONE) · get_code("04644b19aad54d7e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from decisionintelligence/TAB, and GitHub detected no licence in that repository 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.

filter_data Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/pipeline.py
code served (permissive licence) · get_code("005a7fb4e6c758a7")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a sample metadata DataFrame
metadata = pd.DataFrame({
    'file_name': ['file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', 'file5.txt'],
    'size': ['small', 'large', 'small', 'medium', 'large'],
    'category': ['A', 'B', 'A', 'C', 'B'],
    'quality': ['high', 'low', 'high', 'medium', 'low']
})

# Define the arguments
ARGS = {
    'metadata': metadata,
    'size_value': ['small', 'large'],
    'feature_dict': {'category': 'A', 'quality': 'high'}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_model_hyper_params Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/models/model_loader.py
code served (permissive licence) · get_code("440b2e1ab3bfb5d9")
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 dict. 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.

# Setup code for get_model_hyper_params

ARGS = {
    'recommend_model_hyper_params': {
        'learning_rate': 0.001,
        'batch_size': 32,
        'num_epochs': 10,
        'dropout': 0.5,
        'hidden_dim': 128
    },
    'required_hyper_params': {
        'lr': 'learning_rate',
        'batch': 'batch_size',
        'epochs': 'num_epochs',
        'drop': 'dropout'
    },
    'model_config': {
        'model_hyper_params': {
            'hidden_dim': 256
        }
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
import_model_info Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/models/model_loader.py
code served (permissive licence) · get_code("85b193fe718a6b6b")
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 function. 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
from typing import Dict, Callable

torch.manual_seed(0)

# Create a simple model factory function
def simple_model_factory(input_size=10, output_size=1, **kwargs):
    """A simple model factory that returns a basic nn.Module"""
    class SimpleModel(nn.Module):
        def __init__(self):
            super().__init__()
            self.linear = nn.Linear(input_size, output_size)
        
        def forward(self, x):
            return self.linear(x)
    
    return SimpleModel()

# Add required_hyper_params attribute to the factory function
simple_model_factory.required_hyper_params = {
    "input_size": "input_chunk_length",
    "output_size": "output_chunk_length"
}

# Create a test module and add it to sys.modules so it can be imported
import sys
from types import ModuleType

test_module = ModuleType("test_models")
test_module.simple_model_factory = simple_model_factory

sys.modules["test_models"] = test_module

# Alternative: create a dictionary-based model info
dict_model_info = {
    "model_factory": simple_model_factory,
    "model_hyper_params": {
        "input_size": 10,
        "output_size": 1
    },
    "required_hyper_params": {
        "input_size": "input_chunk_length"
    },
    "model_name": "SimpleTestModel"
}

test_module.dict_model_info = dict_model_info
sys.modules["test_models"].dict_model_info = dict_model_info

ARGS = {
    "model_path": "test_models.simple_model_factory"
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
split_channel Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
decisionintelligence/DBLoss/ts_benchmark/utils/data_processing.py
code served (permissive licence) · get_code("68aa4b229c5943e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a simple DataFrame with 6 columns and 5 rows
df = pd.DataFrame(np.random.randn(5, 6))

# Test case 1: Select specific columns by index
target_channel_1 = [1, 3]

# Test case 2: Select columns using slicing notation
target_channel_2 = [(1, 4)]

# Test case 3: None (all columns become target)
target_channel_3 = None

# Define ARGS for the split_channel function
ARGS = {
    "df": df,
    "target_channel": [1, 3]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_time Ran
ran; our contract draft was wrong, not the code
decisionintelligence/DBLoss/ts_benchmark/utils/data_processing.py
code served (permissive licence) · get_code("c52ac0b1e9280485")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a small time series DataFrame
# Using distinct dimensions: 6 rows (time steps) and 3 columns (features)
data = pd.DataFrame(
    np.random.randn(6, 3),
    columns=['feature_1', 'feature_2', 'feature_3']
)

# Define the split index
index = 2

ARGS = {
    'data': data,
    'index': index,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 5 later) and 5 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
filter_data 6 other papers
1 dated earlier, 1 the same month, 3 later, 1 undated
2506.18046 (2025-06)
TAB: Unified Benchmarking of Time Series Anomaly Detection Methods
2510.16511 (2025-10)
Structured Temporal Causality for Interpretable Multivariate Time Series Anomaly Detection
2603.21828 (2026-03)
CoRA: Boosting Time Series Foundation Models for Multivariate Forecasting through Correlation-aware Adapter
and 3 more not named here
get_model_hyper_params 6 other papers
1 dated earlier, 1 the same month, 3 later, 1 undated
2506.18046 (2025-06)
TAB: Unified Benchmarking of Time Series Anomaly Detection Methods
2510.16511 (2025-10)
Structured Temporal Causality for Interpretable Multivariate Time Series Anomaly Detection
2603.21828 (2026-03)
CoRA: Boosting Time Series Foundation Models for Multivariate Forecasting through Correlation-aware Adapter
and 3 more not named here
import_model_info 6 other papers
1 dated earlier, 1 the same month, 3 later, 1 undated
2506.18046 (2025-06)
TAB: Unified Benchmarking of Time Series Anomaly Detection Methods
2510.16511 (2025-10)
Structured Temporal Causality for Interpretable Multivariate Time Series Anomaly Detection
2603.21828 (2026-03)
CoRA: Boosting Time Series Foundation Models for Multivariate Forecasting through Correlation-aware Adapter
and 3 more not named here
decompose_time 4 other papers
1 dated earlier, 3 later
2506.18046 (2025-06)
TAB: Unified Benchmarking of Time Series Anomaly Detection Methods
2603.21828 (2026-03)
CoRA: Boosting Time Series Foundation Models for Multivariate Forecasting through Correlation-aware Adapter
2604.13924 (2026-04)
ASTER: Latent Pseudo-Anomaly Generation for Unsupervised Time-Series Anomaly Detection
and 1 more not named here
encode_params 3 other papers
1 dated earlier, 2 later
2506.18046 (2025-06)
TAB: Unified Benchmarking of Time Series Anomaly Detection Methods
2603.21828 (2026-03)
CoRA: Boosting Time Series Foundation Models for Multivariate Forecasting through Correlation-aware Adapter
2604.13924 (2026-04)
ASTER: Latent Pseudo-Anomaly Generation for Unsupervised Time-Series Anomaly Detection

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

Time series forecasting holds significant value in various domains such as economics, traffic, energy, and AIOps, as accurate predictions facilitate informed decision-making. However, the existing Mean Squared Error (MSE) loss function sometimes fails to accurately capture the seasonality or trend within the forecasting horizon, even when decomposition modules are used in the forward propagation to model the trend and seasonality separately. To address these challenges, we propose a simple yet effective Decomposition-Based Loss function called DBLoss. This method uses exponential moving averages to decompose the time series into seasonal and trend components within the forecasting horizon, and then calculates the loss for each of these components separately, followed by weighting them. As a general loss function, DBLoss can be combined with any deep learning forecasting model. Extensive experiments demonstrate that DBLoss significantly improves the performance of state-of-the-art models across diverse real-world datasets and provides a new perspective on the design of time series loss functions.

For agents

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

get_harvested_code_for_paper("2510.23672")
get_code_for_paper("2510.23672")
have("2510.23672")

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

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

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

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

Connect an agent — have() is free.