SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2208.13764 · 2022

Temporal Label Smoothing for Early Event Prediction

arXiv · PDF · Open in the Atlas

Code that ran

7 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, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-24; 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/2208.13764.json · badge: /api/ran/2208.13764.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
ratschlab/tls canonical (classifier label)
classifier basis not recorded on the link
7 ran · 2 no recorded run
FunctionStatusWhere it lives
convert_to_days Ran
ran, honoured the contract we drafted
ratschlab/tls/tls/common/reference_data.py
pointer only (licence: MIT); the stored copy get_code serves, from yuroeth/icu_benchmarks, is pointer only (licence: NONE) · get_code("98ad0404a78f5d45")
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 yuroeth/icu_benchmarks, 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.

empty_nan Ran
ran on a synthesized input
ratschlab/tls/tls/imputation/forward_filling.py
code served (permissive licence) · get_code("1c03c99fc1eb6fbc")
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 1, dtype family float, shape (5,) 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

def empty_nan(sz):
    """ Returns an empty NAN vector of specified size"""
    arr = np.empty(sz)
    arr[:] = np.nan
    return arr

ARGS = {
    "sz": 5
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
focal_binary_loss Ran
ran on a synthesized input
ratschlab/tls/tls/models/wrappers.py
code served (permissive licence) · get_code("6d87c1d63e7ac8cc")
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)

# Construct tensors for focal_binary_loss
# The function expects:
# - output: logits with shape (batch, num_classes) where num_classes >= 2
# - label: one-hot encoded labels with shape (batch, num_classes)
# - gamma_focal: a float value for the focal term exponent
# - reduction: string for how to reduce the loss

batch_size = 2
num_classes = 2

# Create output logits
output = torch.randn(batch_size, num_classes)

# Create one-hot encoded labels
# For binary classification, we need labels that sum to 1 along dim -1
label = torch.zeros(batch_size, num_classes)
label[0, 0] = 1.0  # First sample is class 0
label[1, 1] = 1.0  # Second sample is class 1

# Gamma focal parameter
gamma_focal = 2.0

# Reduction method
reduction = 'mean'

ARGS = {
    'output': output,
    'label': label,
    'gamma_focal': gamma_focal,
    'reduction': reduction
}
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
impute_forward_fill_simple Ran
ran on a synthesized input
ratschlab/tls/tls/imputation/forward_filling.py
code served (permissive licence) · get_code("7fc26bec29f4f1f1")
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 numpy as np

# Construct small test data for the function
# raw_ts: timestamps of raw measurements (should be sorted)
raw_ts = np.array([0.0, 5.0, 10.0, 15.0], dtype=np.float64)

# raw_values: corresponding measurement values
raw_values = np.array([1.5, 2.3, 1.8, 2.1], dtype=np.float64)

# timegrid_pred: prediction time grid (should be sorted)
timegrid_pred = np.array([0.0, 3.0, 7.0, 12.0, 18.0], dtype=np.float64)

# global_mean: global mean value used as fallback
global_mean = 2.0

# fill_interval_secs: maximum interval in seconds to forward fill
fill_interval_secs = 10.0

ARGS = {
    "raw_ts": raw_ts,
    "raw_values": raw_values,
    "timegrid_pred": timegrid_pred,
    "global_mean": global_mean,
    "fill_interval_secs": fill_interval_secs,
}
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 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
l1_reg Ran
ran on a synthesized input
ratschlab/tls/tls/models/wrappers.py
code served (permissive licence) · get_code("7f114cf718fb901b")
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 as nn

torch.manual_seed(0)

class SimpleEmbedding(nn.Module):
    def __init__(self):
        super().__init__()
        self.embed1 = nn.Parameter(torch.randn(4, 3))
        self.embed2 = nn.Parameter(torch.randn(2, 5))
    
    def forward(self, x):
        return x

embedding_module = SimpleEmbedding()

ARGS = {
    "embedding_module": embedding_module
}
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
read_var_ref_table Ran
ran; our contract draft was wrong, not the code
ratschlab/tls/tls/common/lookups.py
pointer only (licence: MIT); the stored copy get_code serves, from yuroeth/icu_benchmarks, is pointer only (licence: NONE) · get_code("1ecd73f1856cbb81")
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 yuroeth/icu_benchmarks, 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.

value_empty Ran
ran on a synthesized input
ratschlab/tls/tls/imputation/forward_filling.py
code served (permissive licence) · get_code("c01e90a52c34ee1a")
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 1, dtype family float, shape (10,) 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

ARGS = {
    "size": 10,
    "default_val": 5.0,
    "dtype": np.float32,
}
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 ndarray, ndim 1, dtype family float, shape (10,) — shape (10,) 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_bindings_and_params Not yet run
unverified (harvested, no recorded run)
ratschlab/tls/tls/models/utils.py
code served (permissive licence) · get_code("c65973cef1e29a52")
How it ran

no invocation recorded.

read_reference_table Not yet run
unverified (harvested, no recorded run)
ratschlab/tls/tls/common/lookups.py
pointer only (licence: MIT); the stored copy get_code serves, from yuroeth/icu_benchmarks, is pointer only (licence: NONE) · get_code("b37afd4624d8fae8")
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 yuroeth/icu_benchmarks, 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. 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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
convert_to_days 2 other papers
1 dated earlier, 1 later
2111.08536 (2021-11)
HiRID-ICU-Benchmark -A Comprehensive Machine Learning Benchmark on High-resolution ICU Data
2311.00768 (2023-11)
Language Model Training Paradigms for Clinical Feature Embeddings
read_reference_table 2 other papers
1 dated earlier, 1 later
2111.08536 (2021-11)
HiRID-ICU-Benchmark -A Comprehensive Machine Learning Benchmark on High-resolution ICU Data
2311.00768 (2023-11)
Language Model Training Paradigms for Clinical Feature Embeddings
read_var_ref_table 2 other papers
1 dated earlier, 1 later
2111.08536 (2021-11)
HiRID-ICU-Benchmark -A Comprehensive Machine Learning Benchmark on High-resolution ICU Data
2311.00768 (2023-11)
Language Model Training Paradigms for Clinical Feature Embeddings

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-24.

Repositories linked to this paper

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

Abstract

Models that can predict the occurrence of events ahead of time with low false-alarm rates are critical to the acceptance of decision support systems in the medical community. This challenging task is typically treated as a simple binary classification, ignoring temporal dependencies between samples, whereas we propose to exploit this structure. We first introduce a common theoretical framework unifying dynamic survival analysis and early event prediction. Following an analysis of objectives from both fields, we propose Temporal Label Smoothing (TLS), a simpler, yet best-performing method that preserves prediction monotonicity over time. By focusing the objective on areas with a stronger predictive signal, TLS improves performance over all baselines on two large-scale benchmark tasks. Gains are particularly notable along clinically relevant measures, such as event recall at low false-alarm rates. TLS reduces the number of missed events by up to a factor of two over previously used approaches in early event prediction.

For agents

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

get_harvested_code_for_paper("2208.13764")
get_code_for_paper("2208.13764")
have("2208.13764")

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

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

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

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

Connect an agent — have() is free.