SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.12886 · 2024

TimeCHEAT: A Channel Harmony Strategy for Irregularly Sampled Multivariate Time Series Analysis

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2412.12886.json · badge: /api/ran/2412.12886.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
Alrash/TimeCHEAT canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
cross_entropy Ran
ran; our contract draft was wrong, not the code
Alrash/TimeCHEAT/evaluate.py
code served (permissive licence) · get_code("24abdd41a941d6f6")
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 Tensor, ndim 0, dtype family float, shape () 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

torch.manual_seed(0)

# p: logits tensor (batch_size, num_classes)
# y: target tensor (batch_size,) with class indices
p = torch.randn(2, 4)  # batch=2, num_classes=4
y = torch.tensor([0, 2])  # batch=2, class indices

ARGS = {
    "p": p,
    "y": y,
}
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 Tensor, ndim 0, dtype family float, shape () — shape () 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
get_data_min_max Ran
ran, honoured the contract we drafted
Alrash/TimeCHEAT/physionet.py
code served (permissive licence) · get_code("581484c900e0ef72")
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, ndim 2, 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 torch

torch.manual_seed(0)

# Create sample records - each record is a tuple of (record_id, tt, vals, mask, labels)
# vals: (time_steps, n_features)
# mask: (time_steps, n_features) with 1 for non-missing, 0 for missing
# tt: time points
# record_id: identifier
# labels: target labels

record1 = (
    "record_1",  # record_id
    torch.tensor([0.0, 1.0, 2.0]),  # tt (time points)
    torch.tensor([[1.5, 2.3, 0.9, 1.1],
                  [2.1, 1.8, 1.2, 0.8],
                  [1.9, 2.5, 0.7, 1.3]]).float(),  # vals (3 timesteps, 4 features)
    torch.tensor([[1, 1, 0, 1],
                  [1, 0, 1, 1],
                  [1, 1, 1, 0]]).float(),  # mask (3 timesteps, 4 features)
    torch.tensor([0])  # labels
)

record2 = (
    "record_2",  # record_id
    torch.tensor([0.0, 1.0]),  # tt
    torch.tensor([[0.5, 3.2, 1.1, 2.5],
                  [1.2, 2.9, 0.6, 1.9]]).float(),  # vals (2 timesteps, 4 features)
    torch.tensor([[1, 1, 1, 1],
                  [0, 1, 1, 1]]).float(),  # mask (2 timesteps, 4 features)
    torch.tensor([1])  # labels
)

records = [record1, record2]
device = torch.device('cpu')

ARGS = {
    'records': records,
    'device': device
}
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 tuple, ndim 2, dtype family float — a tuple 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
load_data_classification Ran
ran; our contract draft was wrong, not the code
Alrash/TimeCHEAT/datasets.py
code served (permissive licence) · get_code("158e01efbd03585e")
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 os
import numpy as np
import torch
from torch.utils.data import TensorDataset, DataLoader

torch.manual_seed(0)
np.random.seed(0)

class Args:
    def __init__(self):
        self.n_split = 1
        self.split = [0.7, 0.15, 0.15]
        self.downstream = 'classification'
        self.missing = 0
        self.missing_mode = 'sample'
        self.batch_size = 2

# Create minimal synthetic data structure matching what load_data_classification expects
# The function expects data['x'] with shape (N, T, 2*channels+1) where:
# - first channels dims are values
# - next channels dims are mask
# - last 1 dim is time
N, T, channels = 10, 5, 4

# Create synthetic data with proper structure
val = np.random.randn(N, T, channels).astype(np.float32)
mask = np.ones((N, T, channels), dtype=np.float32)
time = np.random.rand(N, T, 1).astype(np.float32) * 100
label = np.random.randint(0, 2, N)

# Stack: val, mask, time
x_combined = np.concatenate([val, mask, time], axis=-1)

data_dict = {
    'x': x_combined,
    'y': label
}

# Create a temporary directory structure and mock file
import tempfile
temp_dir = tempfile.mkdtemp()

# Save the data file
data_file = os.path.join(temp_dir, 'test_dataset.npy')
np.save(data_file, data_dict, allow_pickle=True)

# Create a mock missing file (not used when missing=0, but referenced in code)
missing_file = os.path.join(temp_dir, 'IG_density_scores_test.npy')
np.save(missing_file, np.array([[0], [1], [2], [3]]), allow_pickle=True)

# Create args object
args = Args()

ARGS = {
    'name': 'test_dataset',
    'path': temp_dir,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
load_physionet_data Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Alrash/TimeCHEAT/datasets.py
code served (permissive licence) · get_code("f45aaa020bb3daae")
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 torch
import numpy as np
from torch.utils.data import TensorDataset, DataLoader

torch.manual_seed(0)

class ArgsConfig:
    def __init__(self):
        self.n = 100
        self.batch_size = 16
        self.classif = False

class MockPhysioNet:
    def __init__(self, path, train=True, quantization=None, download=False, n_samples=None, device=None):
        self.train = train
        self.quantization = quantization
        self.device = device
        self.n_samples = n_samples
        self.data = self._create_mock_data()
    
    def _create_mock_data(self):
        batch_size = 5
        data_list = []
        for i in range(batch_size):
            record_id = torch.tensor(i)
            tt = torch.linspace(0, 1, 8)
            vals = torch.randn(8, 4)
            mask = torch.ones(8, 4)
            labels = torch.tensor([0])
            data_list.append((record_id, tt, vals, mask, labels))
        return data_list
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        if isinstance(idx, slice):
            return self.data[idx]
        return self.data[idx]

def mock_get_data_min_max(dataset, device):
    return torch.zeros(4).to(device), torch.ones(4).to(device)

import sys
from unittest.mock import MagicMock

mock_physionet_module = MagicMock()
mock_physionet_module.PhysioNet = MockPhysioNet
mock_physionet_module.get_data_min_max = mock_get_data_min_max
mock_physionet_module.variable_time_collate_fn2 = MagicMock()

sys.modules['physionet'] = mock_physionet_module

device = torch.device('cpu')
args = ArgsConfig()
q = 0.016
flag = True

ARGS = {
    'args': args,
    'device': device,
    'q': q,
    'flag': flag
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, physionet, sklearn, torch — 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
mse_with_mask Ran
ran, violated the contract we drafted
Alrash/TimeCHEAT/evaluate.py
code served (permissive licence) · get_code("bdb2765f23b93b9c")
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 float64, ndim 0, 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 numpy as np

# Construct arguments for mse_with_mask function
# The function computes: np.power((x - x_hat) * mask, 2).sum() / mask.sum()
# It expects:
# - x: array-like, the ground truth values
# - x_hat: array-like, the predicted values (same shape as x)
# - mask: array-like, binary or weighted mask (same shape as x)

# Create small numpy arrays with distinct sizes for clarity
x = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]])  # shape (2, 4)

x_hat = np.array([[1.1, 2.1, 2.9, 4.2],
                  [5.1, 5.9, 7.1, 7.8]])  # shape (2, 4)

mask = np.array([[1.0, 1.0, 0.0, 1.0],
                 [1.0, 0.0, 1.0, 1.0]])  # shape (2, 4), binary mask

ARGS = {
    'x': x,
    'x_hat': x_hat,
    'mask': mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
mse_with_mask_torch Ran
ran; our contract draft was wrong, not the code
Alrash/TimeCHEAT/evaluate.py
code served (permissive licence) · get_code("178f1c8723a8ea02")
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 Tensor, ndim 0, dtype family float, shape () 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

torch.manual_seed(0)

# Create small tensors for the function
# x: input tensor
x = torch.randn(2, 4)

# x_hat: predicted/reconstructed tensor (same shape as x)
x_hat = torch.randn(2, 4)

# mask: binary mask tensor (same shape as x and x_hat)
mask = torch.randint(0, 2, (2, 4)).float()

ARGS = {
    "x": x,
    "x_hat": x_hat,
    "mask": mask,
}
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 Tensor, ndim 0, dtype family float, shape () — shape () 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
subsample_timepoints Ran
ran; our contract draft was wrong, not the code
Alrash/TimeCHEAT/utils.py
code served (permissive licence) · get_code("5893a600fcd2455a")
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 torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
n_timepoints = 5
n_features = 4

# data: used as data[i, tp_to_set_to_zero] = 0.0, so needs to support indexing
# Should be a tensor with shape (batch_size, n_timepoints, n_features)
data = torch.randn(batch_size, n_timepoints, n_features)

# time_steps: passed through but not used in the function body
time_steps = torch.arange(n_timepoints)

# mask: used as mask[i].sum(-1).cpu() and mask[i, tp_to_set_to_zero] = 0.0
# Should be shape (batch_size, n_timepoints, n_features) to support sum(-1)
mask = torch.ones(batch_size, n_timepoints, n_features)

# percentage_tp_to_sample: used in int(n_tp_current * percentage_tp_to_sample)
percentage_tp_to_sample = 0.6

ARGS = {
    "data": data,
    "time_steps": time_steps,
    "mask": mask,
    "percentage_tp_to_sample": percentage_tp_to_sample,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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: none by the harness; any seed is in the setup block
tsdm_collate Ran
ran; our contract draft was wrong, not the code
Alrash/TimeCHEAT/tsdm/collate.py
code served (permissive licence) · get_code("a17bdb60e28f7b93")
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 Batch. 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 Tensor
from typing import NamedTuple

torch.manual_seed(0)

class Inputs(NamedTuple):
    """A single sample of the data."""
    t: Tensor
    x: Tensor
    t_target: Tensor

class Sample(NamedTuple):
    """A single sample of the data."""
    key: int
    inputs: Inputs
    targets: Tensor

# Create sample data
# Sample 1: 3 time points, 4 features
t1 = torch.tensor([0.1, 0.5, 0.9])
x1 = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                    [1.5, 2.5, 3.5, 4.5],
                    [2.0, 3.0, 4.0, 5.0]])
t_target1 = torch.tensor([0.7, 0.95])
targets1 = torch.tensor([[1.8, 2.8, 3.8, 4.8],
                         [2.1, 3.1, 4.1, 5.1]])

inputs1 = Inputs(t=t1, x=x1, t_target=t_target1)
sample1 = Sample(key=0, inputs=inputs1, targets=targets1)

# Sample 2: 2 time points, 4 features
t2 = torch.tensor([0.2, 0.8])
x2 = torch.tensor([[0.5, 1.5, 2.5, 3.5],
                    [1.0, 2.0, 3.0, 4.0]])
t_target2 = torch.tensor([0.6])
targets2 = torch.tensor([[0.9, 1.9, 2.9, 3.9]])

inputs2 = Inputs(t=t2, x=x2, t_target=t_target2)
sample2 = Sample(key=1, inputs=inputs2, targets=targets2)

batch = [sample1, sample2]

ARGS = {
    "batch": batch
}
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 Batch — a Batch 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
load_data_forecast Not yet run
unverified (harvested, no recorded run)
Alrash/TimeCHEAT/datasets.py
code served (permissive licence) · get_code("50e236bce3af21ff")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 8 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
get_data_min_max 3 other papers
1 dated earlier, 2 later
2402.14989 (2024-02)
Stable Neural Stochastic Differential Equations in Analyzing Irregular Time Series Data
aaai_34173 (2025 (year only))
DualDynamics: Synergizing Implicit and Explicit Methods for Robust Irregular Time Series Analysis
2601.16516 (2026-01)
Rethinking Large Language Models For Irregular Time Series Classification In Critical Care

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

Irregularly sampled multivariate time series (ISMTS) are prevalent in reality. Due to their non-uniform intervals between successive observations and varying sampling rates among series, the channel-independent (CI) strategy, which has been demonstrated more desirable for complete multivariate time series forecasting in recent studies, has failed. This failure can be further attributed to the sampling sparsity, which provides insufficient information for effective CI learning, thereby reducing its capacity. When we resort to the channel-dependent (CD) strategy, even higher capacity cannot mitigate the potential loss of diversity in learning similar embedding patterns across different channels. We find that existing work considers CI and CD strategies to be mutually exclusive, primarily because they apply these strategies to the global channel. However, we hold the view that channel strategies do not necessarily have to be used globally. Instead, by appropriately applying them locally and globally, we can create an opportunity to take full advantage of both strategies. This leads us to introduce the Channel Harmony ISMTS Transformer (TimeCHEAT), which utilizes the CD locally and the CI globally. Specifically, we segment the ISMTS into sub-series level patches. Locally, the CD strategy aggregates information within each patch for time embedding learning, maximizing the use of relevant observations while reducing long-range irrelevant interference. Here, we enhance generality by transforming embedding learning into an edge weight prediction task using bipartite graphs, eliminating the need for special prior knowledge. Globally, the CI strategy is applied across patches, allowing the Transformer to learn individualized attention patterns for each channel. Experimental results indicate our proposed TimeCHEAT demonstrates competitive SOTA performance across three mainstream tasks.

For agents

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

get_harvested_code_for_paper("2412.12886")
get_code_for_paper("2412.12886")
have("2412.12886")

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

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

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

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

Connect an agent — have() is free.