SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.08516 · 2022

SAITS: Self-Attention-based Imputation for Time Series

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 3 failures of our instrument; 5 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/2202.08516.json · badge: /api/ran/2202.08516.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
WenjieDu/SAITS canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
gorgen2020/LSSDM_imputation community (classifier label)
classifier basis not recorded on the link
4 ran · 4 no recorded run
FunctionStatusWhere it lives
Conv1d_with_init Ran
ran; our contract draft was wrong, not the code
gorgen2020/LSSDM_imputation/diff_models.py
code served (permissive licence) · get_code("7340b482ffe44836")
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 Conv1d. 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)

ARGS = {
    "in_channels": 3,
    "out_channels": 16,
    "kernel_size": 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 Conv1d — a Conv1d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv1d 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
extract_hour Ran
ran on a synthesized input
gorgen2020/LSSDM_imputation/dataset_physio.py
code served (permissive licence) · get_code("a8551932723a26a9")
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 torch

torch.manual_seed(0)

def extract_hour(x):
    h, _ = map(int, x.split(':'))
    return h

ARGS = {
    'x': '14:30'
}
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 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
get_torch_trans Ran
ran; our contract draft was wrong, not the code
gorgen2020/LSSDM_imputation/diff_models.py
code served (permissive licence) · get_code("e706793d7d22ae44")
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) and returned TransformerEncoder. 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)

ARGS = {
    "heads": 8,
    "layers": 1,
    "channels": 64,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TransformerEncoder — a TransformerEncoder output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TransformerEncoder 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
parse_data Ran
ran on a synthesized input
gorgen2020/LSSDM_imputation/dataset_physio.py
code served (permissive licence) · get_code("d166bfcd5d4c397e")
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 numpy as np
import pandas as pd

attributes = ['DiasABP', 'HR', 'Na', 'Lactate', 'NIDiasABP', 'PaO2', 'WBC', 'pH', 'Albumin', 'ALT', 'Glucose', 'SaO2', 'Temp', 'AST', 'Bilirubin', 'HCO3', 'BUN', 'RespRate', 'Mg', 'HCT', 'SysABP', 'FiO2', 'K', 'GCS', 'Cholesterol', 'NISysABP', 'TroponinT', 'MAP', 'TroponinI', 'PaCO2', 'Platelets', 'Urine', 'NIMAP', 'Creatinine', 'ALP']

# Create a minimal DataFrame that has the structure expected by parse_data
# The function calls x.set_index('Parameter').to_dict()['Value']
# So we need a DataFrame with 'Parameter' and 'Value' columns

data_dict = {
    'Parameter': ['DiasABP', 'HR', 'Na', 'Lactate', 'pH', 'Glucose'],
    'Value': [75.2, 82.5, 138.0, 1.8, 7.35, 145.0]
}

df = pd.DataFrame(data_dict)

ARGS = {
    'x': df
}
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
read_arguments Ran
ran; our contract draft was wrong, not the code
WenjieDu/SAITS/run_models.py
code served (permissive licence) · get_code("eda3c011569ce7aa")
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) and returned ArgParser. 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 configparser
import io

# Create a minimal arg_parser object
class ArgParser:
    pass

# Create a minimal cfg_parser (ConfigParser)
cfg_content = """
[file_path]
dataset_base_dir = /tmp/datasets
result_saving_base_dir = /tmp/results

[dataset]
seq_len = 24
batch_size = 32
num_workers = 4
feature_num = 10
dataset_name = electricity
eval_every_n_steps = 100

[training]
MIT = True
ORT = False
lr = 0.001
optimizer_type = adam
weight_decay = 0.0001
device = cpu
epochs = 50
early_stop_patience = 10
model_saving_strategy = best
max_norm = 1.0
imputation_loss_weight = 0.5
reconstruction_loss_weight = 0.5

[model]
model_name = transformer
model_type = attention
"""

cfg_parser = configparser.ConfigParser()
cfg_parser.read_string(cfg_content)

arg_parser = ArgParser()

ARGS = {
    'arg_parser': arg_parser,
    'cfg_parser': cfg_parser
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 ArgParser — a ArgParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgParser 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_dataloader Not yet run
unverified (harvested, no recorded run)
gorgen2020/LSSDM_imputation/dataset_pm25.py
code served (permissive licence) · get_code("ccd6544c73cf2a29")
How it ran

no invocation recorded.

get_dataloader_original Not yet run
unverified (harvested, no recorded run)
gorgen2020/LSSDM_imputation/dataset_pm25.py
code served (permissive licence) · get_code("52837d0ce876252f")
How it ran

no invocation recorded.

parse_id Not yet run
unverified (harvested, no recorded run)
gorgen2020/LSSDM_imputation/dataset_physio.py
code served (permissive licence) · get_code("5c04f3d80eeca460")
How it ran

no invocation recorded.

result_processing Not yet run
unverified (harvested, no recorded run)
WenjieDu/SAITS/run_models.py
code served (permissive licence) · get_code("969cbb4487c84c89")
How it ran

no invocation recorded.

sample_mask Not yet run
unverified (harvested, no recorded run)
gorgen2020/LSSDM_imputation/dataset_pemsbay.py
code served (permissive licence) · get_code("353b5cb711bb921e")
How it ran

no invocation recorded.

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, 0 the same month, 2 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
Conv1d_with_init 6 other papers
1 dated earlier, 5 later
2107.03502 (2021-07)
CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation
2210.17128 (2022-10)
Diffusion models for missing value imputation in tabular data
2304.06707 (2023-04)
Toward Reliable Human Pose Forecasting with Uncertainty
and 3 more not named here
get_torch_trans 6 other papers
1 dated earlier, 5 later
2107.03502 (2021-07)
CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation
2210.17128 (2022-10)
Diffusion models for missing value imputation in tabular data
2304.06707 (2023-04)
Toward Reliable Human Pose Forecasting with Uncertainty
and 3 more not named here
extract_hour 1 other paper
1 dated earlier
2107.03502 (2021-07)
CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation
parse_data 1 other paper
1 dated earlier
2107.03502 (2021-07)
CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation
parse_id 1 other paper
1 dated earlier
2107.03502 (2021-07)
CSDI: Conditional Score-based Diffusion Models for Probabilistic Time Series Imputation

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

Missing data in time series is a pervasive problem that puts obstacles in the way of advanced analysis. A popular solution is imputation, where the fundamental challenge is to determine what values should be filled in. This paper proposes SAITS, a novel method based on the self-attention mechanism for missing value imputation in multivariate time series. Trained by a joint-optimization approach, SAITS learns missing values from a weighted combination of two diagonally-masked self-attention (DMSA) blocks. DMSA explicitly captures both the temporal dependencies and feature correlations between time steps, which improves imputation accuracy and training speed. Meanwhile, the weighted-combination design enables SAITS to dynamically assign weights to the learned representations from two DMSA blocks according to the attention map and the missingness information. Extensive experiments quantitatively and qualitatively demonstrate that SAITS outperforms the state-of-the-art methods on the time-series imputation task efficiently and reveal SAITS' potential to improve the learning performance of pattern recognition models on incomplete time-series data from the real world. The code is open source on GitHub at https://github.com/WenjieDu/SAITS.

For agents

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

get_harvested_code_for_paper("2202.08516")
get_code_for_paper("2202.08516")
have("2202.08516")

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

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

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

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

Connect an agent — have() is free.