SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.16178 · 2024

Context Clues: Evaluating Long Context Models for Clinical Prediction Tasks on EHRs

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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 11 have no contract verdict; 0 failures of our instrument; 2 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/2412.16178.json · badge: /api/ran/2412.16178.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/long_context_clues canonical (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/models/gpt.py
code served (permissive licence) · get_code("f9e894cf5a449ee8")
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 3, dtype family float, shape (2, 3, 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

torch.manual_seed(0)

# Create input tensor x with shape (batch=2, seq_len=3, hidden_dim=4)
x = torch.randn(2, 3, 4, dtype=torch.float32)

# Create sincos tuple with sin and cos tensors
# The function expects sincos to be a tuple of (sin, cos)
# Looking at the function logic, sin and cos need to be compatible with x's shape
# They can be 3D or 4D tensors that get expanded to match x
sin = torch.randn(3, 1, 4, dtype=torch.float32)
cos = torch.randn(3, 1, 4, dtype=torch.float32)
sincos = (sin, cos)

ARGS = {
    "x": x,
    "sincos": sincos
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
calculate_flops_per_token Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/models/base.py
code served (permissive licence) · get_code("21a3f67d0b51467a")
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
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(100, 64)
        self.linear = nn.Linear(64, 100)
    
    def forward(self, x):
        return self.linear(self.embedding(x))

model = SimpleModel()
vocab_size = 100

ARGS = {
    "model": model,
    "vocab_size": vocab_size,
}
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
convert_lab_value_to_token_from_quantiles Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/utils.py
code served (permissive licence) · get_code("aa28b86e19662530")
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 str. 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 typing import List, Optional

# Set seed for reproducibility
torch.manual_seed(0)

# Define arguments for convert_lab_value_to_token_from_quantiles
ARGS = {
    'code': 'HGB',
    'unit': 'g/dL',
    'value': 13.5,
    'quantiles': [10.0, 12.0, 14.0, 16.0],
    'is_tokenize_out_of_range': True
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
convert_lab_value_to_token_from_ranges Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/utils.py
code served (permissive licence) · get_code("4f65e9aa2f2807bc")
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 str. 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 typing import List, Tuple, Any, Dict, Optional

torch.manual_seed(0)

# Construct arguments for convert_lab_value_to_token_from_ranges
code = "LAB_001"
unit = "mg/dL"
value = 95.5
ranges = [(0.0, 50.0), (50.0, 100.0), (100.0, 200.0)]
is_tokenize_out_of_range = False

ARGS = {
    "code": code,
    "unit": unit,
    "value": value,
    "ranges": ranges,
    "is_tokenize_out_of_range": is_tokenize_out_of_range
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
fixed_pos_embedding Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/models/gpt.py
code served (permissive licence) · get_code("5bef41387946c6d0")
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 4, 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 small tensors for the function
# ages: should be a 1D tensor of shape (batch_size,)
ages = torch.tensor([1.0, 2.0], dtype=torch.float32)

# dim: should be an even integer (the function uses dim // 2)
dim = 4

# dtype: should be a torch dtype
dtype = torch.float32

ARGS = {
    "ages": ages,
    "dim": dim,
    "dtype": dtype,
}
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 4, 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
get_ckpt_name Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/eval/ehrshot.py
code served (permissive licence) · get_code("de4c6427b0f8e92f")
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 str. 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

def get_ckpt_name(path_to_ckpt: str) -> str:
    base_name = os.path.basename(path_to_ckpt)
    file_name, _ = os.path.splitext(base_name)
    return file_name

ARGS = {
    "path_to_ckpt": "/path/to/checkpoint/model.pt"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_rel_path Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/utils.py
code served (permissive licence) · get_code("45234ce476272614")
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 str. 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 tempfile

# The function get_rel_path takes a path string and returns the relative path
# from the root of the project by joining it with the absolute directory of the
# current file. We need to provide a simple string path argument.

ARGS = {
    "path": "subdir/file.txt"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
hyena_forward Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/models/hyena.py
code served (permissive licence) · get_code("bd7e025fc2906fa1")
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 CausalLMOutput. 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 transformers.modeling_outputs import CausalLMOutput

torch.manual_seed(0)

# Create a minimal config stand-in
class MinimalConfig:
    def __init__(self):
        self.output_hidden_states = False
        self.use_return_dict = True
        self.vocab_size = 5
        self.hidden_size = 4

config = MinimalConfig()

# Create a minimal hyena module that returns the expected outputs
class MinimalHyena(nn.Module):
    def __init__(self, hidden_size, vocab_size):
        super().__init__()
        self.hidden_size = hidden_size
        self.vocab_size = vocab_size
    
    def forward(self, input_ids=None, inputs_embeds=None, output_hidden_states=False, return_dict=True):
        # Return hidden states of shape (batch_size, seq_len, hidden_size)
        batch_size = 2
        seq_len = 3
        hidden_states = torch.randn(batch_size, seq_len, self.hidden_size)
        
        if return_dict:
            # Return an object with hidden_states attribute
            class HyenaOutput:
                def __init__(self, hidden_states):
                    self.hidden_states = hidden_states if output_hidden_states else None
                
                def __getitem__(self, idx):
                    if idx == 0:
                        return hidden_states
                    return None
            
            return HyenaOutput(self.hidden_states if output_hidden_states else None)
        else:
            return (hidden_states,)

# Create the minimal model class that has the required attributes
class MinimalCausalLM(nn.Module):
    def __init__(self, config):
        super().__init__()
        self.config = config
        self.vocab_size = config.vocab_size
        self.hyena = MinimalHyena(config.hidden_size, config.vocab_size)
        self.lm_head = nn.Linear(config.hidden_size, config.vocab_size)
    
    def forward(self, input_ids=None, inputs_embeds=None, labels=None, 
                output_hidden_states=None, return_dict=None, pad_token_id=None):
        # This would call hyena_forward but we're just building the model
        pass

model = MinimalCausalLM(config)

# Create input tensors
batch_size = 2
seq_len = 3
input_ids = torch.randint(0, 5, (batch_size, seq_len), dtype=torch.long)
labels = torch.randint(0, 5, (batch_size, seq_len), dtype=torch.long)

ARGS = {
    "self": model,
    "input_ids": input_ids,
    "inputs_embeds": None,
    "labels": labels,
    "output_hidden_states": False,
    "return_dict": True,
    "pad_token_id": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CausalLMOutput — a CausalLMOutput output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CausalLMOutput 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_tokenizer_config_from_path Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/config.py
code served (permissive licence) · get_code("a83875c130d6fc07")
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 json
import tempfile
import os
from typing import List, Dict, Any

# Create a temporary tokenizer config file
temp_dir = tempfile.mkdtemp()
config_path = os.path.join(temp_dir, "tokenizer_config.json")

# Build the tokenizer config JSON structure
tokenizer_config = {
    "metadata": {
        "version": "1.0",
        "description": "Test tokenizer config"
    },
    "tokens": [
        {
            "code": "LOINC/1234",
            "type": "code",
            "description": "Test code token",
            "tokenization": {},
            "stats": [
                {
                    "type": "count_occurrences",
                    "dataset": "train",
                    "split": "train",
                    "count": "100"
                },
                {
                    "type": "count_patients",
                    "dataset": "train",
                    "split": "train",
                    "count": 50
                },
                {
                    "type": "ppl",
                    "dataset": "train",
                    "split": "train",
                    "model": "gpt2",
                    "ppl": 2.5
                }
            ]
        },
        {
            "code": "ICD10/5678",
            "type": "numerical_range",
            "description": "Test numerical range token",
            "tokenization": {
                "unit": "mg/dL",
                "range_start": 0.0,
                "range_end": 100.0
            },
            "stats": [
                {
                    "type": "count_occurrences",
                    "dataset": "val",
                    "split": "val",
                    "count": "75"
                }
            ]
        },
        {
            "code": "SNOMED/9101",
            "type": "categorical",
            "description": "Test categorical token",
            "tokenization": {
                "categories": ["cat1", "cat2", "cat3"]
            },
            "stats": [
                {
                    "type": "count_patients",
                    "dataset": "test",
                    "split": "test",
                    "count": 25
                }
            ]
        }
    ]
}

# Write the config to file
with open(config_path, 'w') as f:
    json.dump(tokenizer_config, f)

ARGS = {
    "path_to_tokenizer_config": config_path,
    "is_return_metadata": False
}
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 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
rewrite_paths_for_carina_from_config Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/config.py
code served (permissive licence) · get_code("ffe7a6c2e6531674")
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 DictConfig. 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.

from omegaconf import DictConfig, OmegaConf

# Create a minimal DictConfig with the structure expected by the function
config_dict = {
    'data': {
        'dataset': {
            'path_to_femr_extract': '/share/pi/nigam/data/some_femr_extract',
            'path_to_meds_reader_extract': '/share/pi/nigam/data/some_meds_extract',
        },
        'tokenizer': {
            'path_to_config': '/share/pi/nigam/mwornow/hf_ehr/cache/config.json',
        }
    }
}

config = OmegaConf.create(config_dict)

ARGS = {
    'config': config,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
loguru, omegaconf — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DictConfig — a DictConfig output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DictConfig output the recorded ndim 1 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
rotate_every_two_v2 Ran
ran on a synthesized input
som-shahlab/long_context_clues/hf_ehr/models/gpt.py
code served (permissive licence) · get_code("0cd434a489251043")
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

torch.manual_seed(0)

# The function takes a tensor x and performs rotary transformation
# It reshapes to (-1, last_dim), interleaves elements, stacks them, and reshapes back
# We need a tensor with shape that has an even last dimension

x = torch.randn(2, 4)  # batch_size=2, last_dim=4 (even number required)

ARGS = {
    "x": x
}
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 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
compute_feature_matrix Not yet run
unverified (harvested, no recorded run)
som-shahlab/long_context_clues/hf_ehr/eval/ehrshot.py
code served (permissive licence) · get_code("01d6a16e787ea3e1")
How it ran

no invocation recorded.

load_tokenizer_config_and_metadata_from_path Not yet run
unverified (harvested, no recorded run)
som-shahlab/long_context_clues/hf_ehr/config.py
code served (permissive licence) · get_code("e35d31a309d54e00")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 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.

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

Foundation Models (FMs) trained on Electronic Health Records (EHRs) have achieved state-of-the-art results on numerous clinical prediction tasks. However, most existing EHR FMs have context windows of <1k tokens. This prevents them from modeling full patient EHRs which can exceed 10k's of events. Recent advancements in subquadratic long-context architectures (e.g., Mamba) offer a promising solution. However, their application to EHR data has not been well-studied. We address this gap by presenting the first systematic evaluation of the effect of context length on modeling EHR data. We find that longer context models improve predictive performance -- our Mamba-based model surpasses the prior state-of-the-art on 9/14 tasks on the EHRSHOT prediction benchmark. For clinical applications, however, model performance alone is insufficient -- robustness to the unique properties of EHR is crucial. Thus, we also evaluate models across three previously underexplored properties of EHR data: (1) the prevalence of "copy-forwarded" diagnoses which creates artificial repetition of tokens within EHR sequences; (2) the irregular time intervals between EHR events which can lead to a wide range of timespans within a context window; and (3) the natural increase in disease complexity over time which makes later tokens in the EHR harder to predict than earlier ones. Stratifying our EHRSHOT results, we find that higher levels of each property correlate negatively with model performance, but that longer context models are more robust to more extreme levels of these properties. Our work highlights the potential for using long-context architectures to model EHR data, and offers a case study for identifying new challenges in modeling sequential data motivated by domains outside of natural language. We release our models and code at: https://github.com/som-shahlab/long_context_clues

For agents

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

get_harvested_code_for_paper("2412.16178")
get_code_for_paper("2412.16178")
have("2412.16178")

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

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

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

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

Connect an agent — have() is free.