SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.10635 · NeurIPS · 2023

ContiFormer: Continuous-Time Transformer for Irregular Time Series Modeling

Weiwei Sun, Dongsheng Li, Kan Ren, Yuqi Chen, Yansen Wang, Yuchen Fang

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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 1 has no contract verdict; 5 failures of our instrument; 4 no recorded run), measured 2026-11-22; 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/2402.10635.json · badge: /api/ran/2402.10635.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
microsoft/SeqML canonical (classifier label)
classifier basis: census
8 ran · 4 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/SeqML/IRENE/utils.py
code served (permissive licence) · get_code("9587f808deb9dbc3")
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

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
num_classes = 4

# output: logits/scores tensor of shape (batch_size, num_classes)
# The function calls output.topk(maxk, 1, True, True)
output = torch.randn(batch_size, num_classes)

# target: ground truth labels of shape (batch_size,)
# The function calls target.view(1, -1).expand_as(pred)
target = torch.tensor([0, 2])

# topk: tuple of k values for top-k accuracy
topk = (1, 2)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk,
}
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 — 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
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/SeqML/SIMPLE/utils.py
code served (permissive licence) · get_code("457c048bcec55e19")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Create output tensor: logits for batch_size=2, num_classes=4
output = torch.randn(2, 4)

# Create target tensor: class indices for batch_size=2
target = torch.tensor([1, 3])

# topk parameter: tuple of k values to compute accuracy for
topk = (1, 2)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk
}
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 list, ndim 2, 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
check_file_number Ran
ran, violated the contract we drafted
microsoft/SeqML/SIMPLE/utils.py
code served (permissive licence) · get_code("5701e7af59064c38")
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 bool, 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 os
import tempfile
import shutil

# Create a temporary directory structure with files
temp_dir = tempfile.mkdtemp()

# Create subdirectories and files to match PACS dataset structure (41 files)
os.makedirs(os.path.join(temp_dir, 'subdir1'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'subdir2'), exist_ok=True)

# Create 41 files total
for i in range(30):
    with open(os.path.join(temp_dir, 'subdir1', f'file_{i}.txt'), 'w') as f:
        f.write('content')

for i in range(11):
    with open(os.path.join(temp_dir, 'subdir2', f'file_{i}.txt'), 'w') as f:
        f.write('content')

ARGS = {
    'dir_to_check': temp_dir,
    'domainbed_dataset': 'PACS'
}
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 bool, 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
dataset_with_indices Ran
ran on a synthesized input
microsoft/SeqML/IRENE/dataset.py
code served (permissive licence) · get_code("2d05cbfe6203f265")
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 type. 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 torch.utils.data import Dataset

torch.manual_seed(0)

# Create a minimal dataset class that has __getitem__ method
class SimpleDataset(Dataset):
    def __init__(self):
        self.data = torch.randn(2, 4)
        self.targets = torch.randint(0, 2, (2,))
    
    def __getitem__(self, index):
        return self.data[index], self.targets[index]
    
    def __len__(self):
        return 2

# The function takes a class (cls parameter)
# It wraps the __getitem__ method to also return the index
# So we need to pass a dataset class

ARGS = {
    'cls': SimpleDataset
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
get_logger Ran
ran; our contract draft was wrong, not the code
microsoft/SeqML/ContiFormer/spiral.py
code served (permissive licence) · get_code("dc2478e15ade0979")
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 Logger. 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 logging
import tempfile
import os

# Create a temporary directory for log files to avoid cluttering the workspace
temp_dir = tempfile.mkdtemp()
original_cwd = os.getcwd()
os.chdir(temp_dir)

# Define arguments for get_logger
ARGS = {
    'name': 'test_logger'
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
get_training_dataloader Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/SeqML/IRENE/utils.py
code served (permissive licence) · get_code("c71b4e0700598afa")
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 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 torch
import torch.nn as nn
import torchvision.transforms as transforms
from torch.utils.data import DataLoader, Dataset
import sys

torch.manual_seed(0)

# Create a mock dataset class that mimics CIFAR100_idx behavior
class MockCIFARDataset(Dataset):
    def __init__(self, root='./data', train=True, download=True, transform=None):
        self.train = train
        self.transform = transform
        self.data = torch.randn(10, 3, 32, 32)
        self.targets = torch.randint(0, 100, (10,))
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        img = self.data[idx]
        if self.transform:
            img = self.transform(img)
        return img, self.targets[idx]

# Mock the dataset module to avoid import errors
class MockDatasetModule:
    CIFAR100_idx = MockCIFARDataset
    CIFAR10_idx = MockCIFARDataset

sys.modules['dataset'] = MockDatasetModule()

# Define arguments for the function
ARGS = {
    'mean': [0.5071, 0.4867, 0.4408],
    'std': [0.2675, 0.2565, 0.2761],
    'batch_size': 16,
    'num_workers': 0,
    'shuffle': True,
    'dataset_name': 'cifar100'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
dataset, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, 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
log_normal_pdf Ran
ran; our contract draft was wrong, not the code
microsoft/SeqML/ContiFormer/spiral.py
code served (permissive licence) · get_code("622beaf8dfaa941d")
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 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
import numpy as np

torch.manual_seed(0)

# Create small tensors for the function parameters
x = torch.randn(2, 4).float()  # batch size 2, dimension 4
mean = torch.randn(2, 4).float()  # same shape as x
logvar = torch.randn(2, 4).float()  # same shape as x

ARGS = {
    "x": x,
    "mean": mean,
    "logvar": logvar
}
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 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: none by the harness; any seed is in the setup block
walkFile Ran
ran, honoured the contract we drafted
microsoft/SeqML/SIMPLE/utils.py
code served (permissive licence) · get_code("5ba9d747c5e26e18")
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 int, ndim 0, dtype family int, 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 os
import tempfile

# Create a temporary directory with some test files
temp_dir = tempfile.mkdtemp()

# Create a few test files with non-zero size
test_file_1 = os.path.join(temp_dir, "test1.txt")
with open(test_file_1, "w") as f:
    f.write("content")

test_file_2 = os.path.join(temp_dir, "test2.txt")
with open(test_file_2, "w") as f:
    f.write("more content")

# Create a subdirectory with another file
sub_dir = os.path.join(temp_dir, "subdir")
os.makedirs(sub_dir)
test_file_3 = os.path.join(sub_dir, "test3.txt")
with open(test_file_3, "w") as f:
    f.write("nested content")

ARGS = {
    "file": temp_dir
}
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 int, ndim 0, dtype family int, 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
dataset_with_indices Not yet run
unverified (harvested, no recorded run)
microsoft/SeqML/SIMPLE/data_domainbed.py
code served (permissive licence) · get_code("0a798dd543d533e1")
How it ran

no invocation recorded.

generate_spiral2d Not yet run
unverified (harvested, no recorded run)
microsoft/SeqML/ContiFormer/spiral.py
code served (permissive licence) · get_code("94ca80370ce2e5b9")
How it ran

no invocation recorded.

get_network Not yet run
unverified (harvested, no recorded run)
microsoft/SeqML/IRENE/utils.py
code served (permissive licence) · get_code("965d0507e2b1e068")
How it ran

no invocation recorded.

look_up Not yet run
unverified (harvested, no recorded run)
microsoft/SeqML/IRENE/ensemble.py
code served (permissive licence) · get_code("1213aec634167d4b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 10 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
accuracy 4 other papers
3 dated earlier, 1 later
2303.02936 (2023-03)
UniHCP: A Unified Model for Human-Centric Perceptions
2307.09742 (2023-07)
Improved Distribution Matching for Dataset Condensation
2312.01697 (2023-12)
Hulk: A Universal Knowledge Translator for Human-Centric Tasks
and 1 more not named here
log_normal_pdf 1 other paper
1 dated earlier
2312.06015 (2023-12)
Speeding up astrochemical reaction networks with autoencoders and neural ODEs

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

Modeling continuous-time dynamics on irregular time series is critical to account for data evolution and correlations that occur continuously. Traditional methods including recurrent neural networks or Transformer models leverage inductive bias via powerful neural architectures to capture complex patterns. However, due to their discrete characteristic, they have limitations in generalizing to continuous-time data paradigms. Though neural ordinary differential equations (Neural ODEs) and their variants have shown promising results in dealing with irregular time series, they often fail to capture the intricate correlations within these sequences. It is challenging yet demanding to concurrently model the relationship between input data points and capture the dynamic changes of the continuous-time system. To tackle this problem, we propose ContiFormer that extends the relation modeling of vanilla Transformer to the continuous-time domain, which explicitly incorporates the modeling abilities of continuous dynamics of Neural ODEs with the attention mechanism of Transformers. We mathematically characterize the expressive power of ContiFormer and illustrate that, by curated designs of function hypothesis, many Transformer variants specialized in irregular time series modeling can be covered as a special case of ContiFormer. A wide range of experiments on both synthetic and real-world datasets have illustrated the superior modeling capacities and prediction performance of ContiFormer on irregular time series data. The project link is https://seqml.github.io/contiformer/.

For agents

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

get_harvested_code_for_paper("2402.10635")
get_code_for_paper("2402.10635")
have("2402.10635")

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

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

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

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

Connect an agent — have() is free.