SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.03150 · 2023

MOTOR: A Time-To-Event Foundation Model For Structured Medical Records

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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 4 have no contract verdict; 0 failures of our instrument; 0 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/2301.03150.json · badge: /api/ran/2301.03150.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
som-shahlab/femr community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_random_num Ran
ran on a synthesized input
som-shahlab/femr/src/femr/labelers/core.py
code served (permissive licence) · get_code("b90e19e17f365432")
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 hashlib
import struct

def compute_random_num(seed: int, num_1: int, num_2: int, modulus: int=100):
    network_num_1 = struct.pack('!q', num_1)
    network_num_2 = struct.pack('!q', num_2)
    network_seed = struct.pack('!q', seed)
    to_hash = network_seed + network_num_1 + network_num_2
    hash_object = hashlib.sha256()
    hash_object.update(to_hash)
    hash_value = hash_object.digest()
    result = 0
    for i in range(len(hash_value)):
        result = (result * 256 + hash_value[i]) % modulus
    return result

ARGS = {
    'seed': 42,
    'num_1': 123,
    'num_2': 456,
    'modulus': 100
}
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
generate_hash_split Ran
ran on a synthesized input
som-shahlab/femr/src/femr/splits.py
code served (permissive licence) · get_code("ca4e735e2b486476")
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 SubjectSplit. 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 csv
import dataclasses
import hashlib
import struct
from typing import List

@dataclasses.dataclass
class SubjectSplit:
    train_subject_ids: List[int]
    test_subject_ids: List[int]

    def save_to_csv(self, fname: str):
        with open(fname, 'w') as f:
            writer = csv.DictWriter(f, ('subject_id', 'split_name'))
            writer.writeheader()
            for train in self.train_subject_ids:
                writer.writerow({'subject_id': train, 'split_name': 'train'})
            for test in self.test_subject_ids:
                writer.writerow({'subject_id': test, 'split_name': 'test'})

    @classmethod
    def load_from_csv(cls, fname: str):
        train_subject_ids: List[int] = []
        test_subject_ids: List[int] = []
        with open(fname, 'r') as f:
            for row in csv.DictReader(f):
                if row['split_name'] == 'train':
                    train_subject_ids.append(int(row['subject_id']))
                else:
                    test_subject_ids.append(int(row['subject_id']))
        return SubjectSplit(train_subject_ids=train_subject_ids, test_subject_ids=test_subject_ids)

def generate_hash_split(subject_ids: List[int], seed: int, frac_test: float=0.15) -> SubjectSplit:
    train_subject_ids = []
    test_subject_ids = []
    for subject_id in subject_ids:
        value_bytes = struct.pack('>q', seed) + struct.pack('>q', subject_id)
        sha256_hash = hashlib.sha256(value_bytes).hexdigest()
        hash_int = int(sha256_hash, 16)
        result = hash_int % 2 ** 16
        if result <= frac_test * 2 ** 16:
            test_subject_ids.append(subject_id)
        else:
            train_subject_ids.append(subject_id)
    return SubjectSplit(train_subject_ids=train_subject_ids, test_subject_ids=test_subject_ids)

ARGS = {
    'subject_ids': [1, 2, 3, 4, 5, 10, 20, 50],
    'seed': 42,
    'frac_test': 0.15
}
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 SubjectSplit — a SubjectSplit output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SubjectSplit 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
identity Ran
ran, honoured the contract we drafted
som-shahlab/femr/src/femr/labelers/omop.py
code served (permissive licence) · get_code("ece7d664c54e244b")
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
from typing import Any

torch.manual_seed(0)

# The identity function simply returns its input unchanged.
# It takes a single parameter 'x' of type Any and returns it as-is.
# We can pass any valid Python object.

# Create a simple test value - a tensor
test_tensor = torch.randn(2, 4)

# The ARGS dict maps the parameter name to its value
ARGS = {
    "x": test_tensor
}
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
join_labels Ran
ran on a synthesized input
som-shahlab/femr/src/femr/featurizers/core.py
code served (permissive licence) · get_code("285c9b342cab7323")
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 numpy as np
import pandas as pd

# Create sample features dictionary
# The function accesses: features['feature_times'], features['subject_ids'], features['features']
# and uses them with indexing via 'order' array

features = {
    'subject_ids': np.array([1, 1, 2, 2, 3]),
    'feature_times': np.array([10.0, 20.0, 15.0, 25.0, 30.0]),
    'features': np.random.randn(5, 4)  # 5 samples, 4 features
}

# Create sample labels DataFrame
# The function iterates over labels using itertuples(index=False)
# Each tuple must have: subject_id, prediction_time, boolean_value attributes
labels_data = {
    'subject_id': [1, 1, 2, 3],
    'prediction_time': [15.0, 22.0, 20.0, 35.0],
    'boolean_value': [True, False, True, False]
}
labels = pd.DataFrame(labels_data)

ARGS = {
    'features': features,
    'labels': labels
}
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 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
move_datetime_to_end_of_day Ran
ran on a synthesized input
som-shahlab/femr/src/femr/labelers/omop.py
code served (permissive licence) · get_code("5b71dab7458e5a60")
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 datetime. 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 datetime

# Create a datetime object to pass as the 'date' parameter
test_date = datetime.datetime(2024, 1, 15, 14, 30, 45)

ARGS = {
    "date": test_date
}
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 datetime — a datetime output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a datetime 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 4 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
identity 2 other papers
1 dated earlier, 1 later
2205.12647 (2022-05)
Overcoming Catastrophic Forgetting in Zero-Shot Cross-Lingual Generation
2412.04604 (2024-12)
ARC Prize 2024: Technical Report

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

We present a self-supervised, time-to-event (TTE) foundation model called MOTOR (Many Outcome Time Oriented Representations) which is pretrained on timestamped sequences of events in electronic health records (EHR) and health insurance claims. TTE models are used for estimating the probability distribution of the time until a specific event occurs, which is an important task in medical settings. TTE models provide many advantages over classification using fixed time horizons, including naturally handling censored observations, but are challenging to train with limited labeled data. MOTOR addresses this challenge by pretraining on up to 55M patient records (9B clinical events). We evaluate MOTOR's transfer learning performance on 19 tasks, across 3 patient databases (a private EHR system, MIMIC-IV, and Merative claims data). Task-specific models adapted from MOTOR improve time-dependent C statistics by 4.6% over state-of-the-art, improve label efficiency by up to 95% ,and are more robust to temporal distributional shifts. We further evaluate cross-site portability by adapting our MOTOR foundation model for six prediction tasks on the MIMIC-IV dataset, where it outperforms all baselines. MOTOR is the first foundation model for medical TTE predictions and we release a 143M parameter pretrained model for research use at [redacted URL].

For agents

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

get_harvested_code_for_paper("2301.03150")
get_code_for_paper("2301.03150")
have("2301.03150")

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

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

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

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

Connect an agent — have() is free.