SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.18652 · NeurIPS · 2023

EHRXQA: A Multi-Modal Question Answering Dataset for Electronic Health Records with Chest X-ray Images

Edward Choi, Eric I-Chao Chang, Gyubok Lee, Seongsu Bae, Daeun Kyung, Jaehee Ryu, Eunbyeol Cho, Sunjun Kweon, Jeongwoo Oh, Ji Lei, Tackeun Kim

arXiv · PDF · Open in the Atlas

Code that ran

20 of 20 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, 3 violated it and 7 have no contract verdict; 9 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/2310.18652.json · badge: /api/ran/2310.18652.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
baeseongsu/mimic-cxr-vqa canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
baeseongsu/ehrxqa canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
snoop2head/ehrxqa-2024 community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
fixed_sincos1d_embeddings Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/modelling_pt.py
code served (permissive licence) · get_code("6e2a17d1112822e4")
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 (8, 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)

ARGS = {
    "max_len": 8,
    "dim": 4,
}
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 (8, 4) — shape (8, 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
fixed_sincos1d_embeddings Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/utils.py
code served (permissive licence) · get_code("15b4480443968277")
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 ArrayImpl, ndim 2, dtype family float, shape (8, 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 jax.numpy as jnp

# Define arguments for fixed_sincos1d_embeddings
max_len = 8
dim = 4

ARGS = {
    "max_len": max_len,
    "dim": dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (8, 4) — shape (8, 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
fixed_sincos2d_embeddings Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/modelling_pt.py
code served (permissive licence) · get_code("f55aa01465579300")
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 (5, 3, 8) 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)

ARGS = {
    "ncols": 5,
    "nrows": 3,
    "dim": 8
}
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 3, dtype family float, shape (5, 3, 8) — shape (5, 3, 8) 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
fixed_sincos2d_embeddings Ran
ran, honoured the contract we drafted
snoop2head/ehrxqa-2024/src/utils.py
code served (permissive licence) · get_code("26d7ceb9feb979a2")
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 ArrayImpl, ndim 3, dtype family float, shape (8, 6, 16) 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 jax.numpy as jnp

ARGS = {
    "ncols": 8,
    "nrows": 6,
    "dim": 16,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 3, dtype family float, shape (8, 6, 16) — shape (8, 6, 16) 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
format_answer Ran
ran; our contract draft was wrong, not the code
baeseongsu/mimic-cxr-vqa/dataset_builder/generate_answer.py
code served (permissive licence) · get_code("d3faf3a6ebbac897")
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 torch

torch.manual_seed(0)

# Test with different answer types
# The function handles: True, False, None, or an iterable of strings

ARGS = {
    "answer": ["Apple", "Banana", "Cherry"]
}
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 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
get_template_pk_to_program_idx Ran
ran; our contract draft was wrong, not the code
baeseongsu/mimic-cxr-vqa/dataset_builder/internal_utils/_format_qa_dataset.py
code served (permissive licence) · get_code("e29aa95576db1be5")
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 torch
import numpy as np

# The function takes template_pk_to_template as a parameter
# and uses it by calling .keys() on it
# It creates a dict mapping each template_pk to a string f'program_{i + 1}'

# Create a simple dict with template primary keys as keys
template_pk_to_template = {
    'template_1': {'name': 'template_a', 'value': 1},
    'template_2': {'name': 'template_b', 'value': 2},
    'template_3': {'name': 'template_c', 'value': 3},
}

ARGS = {
    'template_pk_to_template': template_pk_to_template
}
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 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
load_bbox_information Ran
ran; our contract draft was wrong, not the code
baeseongsu/mimic-cxr-vqa/dataset_builder/generate_answer.py
code served (permissive licence) · get_code("7d221f83f5aed97e")
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 DataFrame. 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
import pandas as pd

# Create temporary directories and files for the function to read
temp_dir = tempfile.mkdtemp()
chest_imagenome_dir = temp_dir

# Create directory structure
gold_dir = os.path.join(chest_imagenome_dir, 'gold_dataset')
silver_dir = os.path.join(chest_imagenome_dir, 'silver_dataset', 'scene_tabular')
os.makedirs(gold_dir, exist_ok=True)
os.makedirs(silver_dir, exist_ok=True)

# Create gold dataset CSV for test split
gold_data = {
    'image_id': ['image1.dcm', 'image2.dcm'],
    'bbox_name': ['heart', 'lung'],
    'coord224': ['[10, 20, 100, 150]', '[50, 60, 200, 250]']
}
gold_df = pd.DataFrame(gold_data)
gold_df.to_csv(os.path.join(gold_dir, 'gold_bbox_coordinate_annotations_1000images.csv'), index=False)

# Create silver dataset TSV for non-test split
silver_data = {
    'object_id': ['image001_1', 'image001_2', 'image002_1'],
    'bbox_name': ['1', '2', '1'],
    'x1': [10, 50, 15],
    'y1': [20, 60, 25],
    'x2': [100, 200, 110],
    'y2': [150, 250, 160]
}
silver_df = pd.DataFrame(silver_data)
silver_df.to_csv(os.path.join(silver_dir, 'bbox_objects_tabular.txt'), sep='\t', index=False)

# Create args object for test split
class Args:
    def __init__(self, split, chest_imagenome_dir):
        self.split = split
        self.chest_imagenome_dir = chest_imagenome_dir

ARGS = {
    'args': Args(split='test', chest_imagenome_dir=chest_imagenome_dir)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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_database Ran
ran; our contract draft was wrong, not the code
baeseongsu/ehrxqa/dataset_builder/generate_answer.py
code served (permissive licence) · get_code("dd5e458df422425b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Cursor. 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 tempfile
import sqlite3
import os

# Create a temporary SQLite database file
temp_db = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.db')
db_file_path = temp_db.name
temp_db.close()

# Initialize the database with a simple table
conn = sqlite3.connect(db_file_path)
cur = conn.cursor()
cur.execute("CREATE TABLE test_table (id INTEGER PRIMARY KEY, name TEXT)")
cur.execute("INSERT INTO test_table (name) VALUES ('test1')")
cur.execute("INSERT INTO test_table (name) VALUES ('test2')")
conn.commit()
conn.close()

ARGS = {
    "db_file_path": db_file_path
}
Setup block drafted by
a language model, Claude Sonnet 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 Cursor — a Cursor output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Cursor 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_metadata Ran
ran; our contract draft was wrong, not the code
baeseongsu/mimic-cxr-vqa/dataset_builder/generate_answer.py
code served (permissive licence) · get_code("b97ea8675949406d")
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 DataFrame. 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 pandas as pd
import tempfile

# Create a temporary directory to act as mimic_cxr_jpg_dir
temp_dir = tempfile.mkdtemp()

# Create a minimal valid CSV file with required columns
csv_path = os.path.join(temp_dir, 'mimic-cxr-2.0.0-metadata.csv')
metadata_df = pd.DataFrame({
    'subject_id': [1001, 1002],
    'study_id': [101, 102],
    'dicom_id': ['d001', 'd002'],
    'ViewPosition': ['PA', 'AP'],
    'extra_column': ['a', 'b']  # Extra column to test that only specified columns are selected
})
metadata_df.to_csv(csv_path, index=False)

# Create args object as a simple class with the required attribute
class Args:
    def __init__(self, mimic_cxr_jpg_dir):
        self.mimic_cxr_jpg_dir = mimic_cxr_jpg_dir

args_obj = Args(mimic_cxr_jpg_dir=temp_dir)

ARGS = {
    'args': args_obj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
mask_intersection Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/utils_mae.py
code served (permissive licence) · get_code("cd63725ed150c8be")
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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np

# Create two small boolean-like masks
mask1 = jnp.array([
    [1.0, 0.0, 1.0, 0.5],
    [0.0, 1.0, 0.0, 1.0]
], dtype=jnp.float32)

mask2 = jnp.array([
    [1.0, 1.0, 0.0, 0.5],
    [1.0, 0.0, 1.0, 0.0]
], dtype=jnp.float32)

ARGS = {
    "mask1": mask1,
    "mask2": mask2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
mask_not Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/utils_mae.py
code served (permissive licence) · get_code("e0f860b8706ea27b")
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)

# The function mask_not takes a mask and returns 1.0 - mask
# It expects a numeric array-like object (tensor or numpy array)
# that supports subtraction from a float

mask = torch.tensor([[0.2, 0.5, 0.8, 0.1],
                     [0.3, 0.6, 0.9, 0.4]], dtype=torch.float32)

ARGS = {
    "mask": mask
}
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
mask_union Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/utils_mae.py
code served (permissive licence) · get_code("d049b3e2054cb151")
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 ArrayImpl, 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 jax.numpy as jnp

# Create two small test masks with different shapes for clarity
mask1 = jnp.array([
    [1.0, 0.0, 0.5, 0.0],
    [0.0, 0.0, 0.0, 0.0]
], dtype=jnp.float32)

mask2 = jnp.array([
    [0.0, 0.0, 0.0, 1.0],
    [0.5, 0.0, 0.0, 0.0]
], dtype=jnp.float32)

ARGS = {
    "mask1": mask1,
    "mask2": mask2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
modified_lamb Ran
ran on a synthesized input
snoop2head/ehrxqa-2024/src/utils.py
code served (permissive licence) · get_code("75ee7d495c2657a4")
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 GradientTransformationExtraArgs. 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 optax
import torch
import torch.nn as nn

torch.manual_seed(0)

# Define learning rate schedule
learning_rate = 0.001

# Define scalar parameters
b1 = 0.9
b2 = 0.999
eps = 1e-6
eps_root = 0.0
weight_decay = 0.01

# Define mask - can be None or a function
# mask function takes params and returns a pytree of booleans
def mask_fn(params):
    # Simple mask that applies to all parameters
    return jax.tree_map(lambda x: True, params)

# For optax, mask can be None or a callable
mask = None

# Construct ARGS dictionary
ARGS = {
    'learning_rate': learning_rate,
    'b1': b1,
    'b2': b2,
    'eps': eps,
    'eps_root': eps_root,
    'weight_decay': weight_decay,
    'mask': mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
optax, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradientTransformationExtraArgs — a GradientTransformationExtraArgs output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GradientTransformationExtraArgs 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
post_process_answer Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
baeseongsu/ehrxqa/dataset_builder/generate_answer.py
code served (permissive licence) · get_code("d95e69a3370313dc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 torch
import numpy as np

torch.manual_seed(0)

# Test case 1: list of tuples with single elements
answer_tuples = [(1.234567,), (2.345678,), (3.456789,)]

# Test case 2: list of floats
answer_floats = [1.234567, 2.345678, 3.456789]

# Test case 3: list of strings
answer_strings = ["apple", "banana", "cherry"]

# Test case 4: empty list
answer_empty = []

# Test case 5: list of other types (e.g., integers)
answer_ints = [1, 2, 3, 4]

# Choose one test case for the ARGS
# Let's use the list of floats as the main test case
ARGS = {
    'answer': answer_floats,
    'round_digit': 6,
    'sorted_answer': False
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
post_process_sql Ran
ran; our contract draft was wrong, not the code
baeseongsu/ehrxqa/dataset_builder/generate_answer.py
code served (permissive licence) · get_code("5b629a16609f7161")
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 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 re

ARGS = {
    'query': "SELECT * FROM vitals WHERE temperature_lower > 30 AND temperature_upper < 40 AND current_time > '2105-01-01'",
    'current_time': '2105-12-31 23:59:00',
    'precomputed_dict': {
        'temperature': (35.5, 38.1),
        'sao2': (95.0, 100.0),
        'heart rate': (60.0, 100.0),
        'respiration': (12.0, 18.0),
        'systolic bp': (90.0, 120.0),
        'diastolic bp': (60.0, 90.0),
        'mean bp': (60.0, 110.0)
    }
}
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 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
process_sample Ran
ran; our contract draft was wrong, not the code
baeseongsu/mimic-cxr-vqa/dataset_builder/internal_utils/_format_qa_dataset.py
code served (permissive licence) · get_code("93a44f96ae2cca26")
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 pandas as pd
import logging

# Set up logging to avoid warnings during execution
logging.basicConfig(level=logging.INFO)

# Create a sample pandas Series with all required fields
sample = pd.Series({
    'category_type': 'position',
    'semantic_type': 'exists',
    'template': 'template_1',
    'question': 'Is there a fracture?',
    'answer': 'yes|no',
    'subject_id': 12345,
    'study_id': 67890,
    'image_id': 'img_001',
    'jpg_fpath': '/path/to/image.jpg',
    'argcomb_object': 'lung|heart',
    'argcomb_attribute': 'opacity|size',
    'argcomb_category': 'normal|abnormal',
    'argcomb_extra': 'AP',
    'template_pk': 42
})

# Create template_pk_to_program_idx mapping
template_pk_to_program_idx = {
    '42': 0,
    '43': 1,
    '44': 2
}

# Define split and sample_idx
split = 'train'
sample_idx = 0

ARGS = {
    'sample': sample,
    'template_pk_to_program_idx': template_pk_to_program_idx,
    'split': split,
    'sample_idx': sample_idx
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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
program_1 Ran
ran, violated the contract we drafted
baeseongsu/mimic-cxr-vqa/dataset_builder/program.py
code served (permissive licence) · get_code("1971017a9e91dd12")
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 pandas as pd
from typing import List

# Create a sample DataFrame with the required columns
data = {
    'object': ['obj_a', 'obj_b', 'obj_a', 'obj_c'],
    'relation': [1, 0, 1, 1],
    'category': ['cat_1', 'cat_1', 'cat_2', 'cat_1']
}
features = pd.DataFrame(data)

# Define arguments matching the function signature
object_list = ['obj_a']  # len == 1
category_list = ['cat_1']  # len == 1
attribute_list = []  # len == 0
relation_flag = True

ARGS = {
    'features': features,
    'object': object_list,
    'category': category_list,
    'attribute': attribute_list,
    'relation': relation_flag
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
program_2 Ran
ran, violated the contract we drafted
baeseongsu/mimic-cxr-vqa/dataset_builder/program.py
code served (permissive licence) · get_code("d4fec949b3f02995")
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 pandas as pd

# Create a sample DataFrame with the required columns
data = {
    'object': ['obj1', 'obj1', 'obj2', 'obj1'],
    'relation': [1, 0, 1, 1],
    'attribute': ['attr1', 'attr1', 'attr1', 'attr2']
}
features = pd.DataFrame(data)

# Define arguments matching the function signature
ARGS = {
    'features': features,
    'object': ['obj1'],
    'category': [],
    'attribute': ['attr1'],
    'relation': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
program_3 Ran
ran, violated the contract we drafted
baeseongsu/mimic-cxr-vqa/dataset_builder/program.py
code served (permissive licence) · get_code("ec654714859fcb55")
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 pandas as pd
from typing import List

# Create a small DataFrame with the required columns
data = {
    'object': ['obj1', 'obj1', 'obj2', 'obj1'],
    'relation': [True, True, False, True],
    'category': ['anatomicalfinding', 'disease', 'device', 'tubesandlines']
}
features_df = pd.DataFrame(data)

# Define arguments matching function signature
object_list = ['obj1']  # len(object) == 1
category_list = ['anatomicalfinding', 'disease', 'device', 'tubesandlines']  # len(category) == 4
attribute_list = []  # len(attribute) == 0
relation_value = True

ARGS = {
    'features': features_df,
    'object': object_list,
    'category': category_list,
    'attribute': attribute_list,
    'relation': relation_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
split_string Ran
ran; our contract draft was wrong, not the code
baeseongsu/mimic-cxr-vqa/dataset_builder/internal_utils/_format_qa_dataset.py
code served (permissive licence) · get_code("efbe2b090b9a718d")
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 pandas as pd
import numpy as np

def split_string(string):
    if pd.isna(string):
        return []
    return string.split('|')

# Test case 1: normal string with pipe delimiters
test_string = "apple|banana|orange"

# Test case 2: NaN value
test_nan = pd.NA

# Create ARGS dict with a valid string argument
ARGS = {
    "string": test_string
}
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

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 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, 0 later) and 15 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
fixed_sincos2d_embeddings 2 other papers
2 dated earlier
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2205.14204 (2022-05)
Multimodal Masked Autoencoders Learn Transferable Representations
mask_intersection 2 other papers
2 dated earlier
2205.14204 (2022-05)
Multimodal Masked Autoencoders Learn Transferable Representations
2210.13431 (2022-10)
Instruction-Following Agents with Multimodal Transformer
mask_not 2 other papers
2 dated earlier
2205.14204 (2022-05)
Multimodal Masked Autoencoders Learn Transferable Representations
2210.13431 (2022-10)
Instruction-Following Agents with Multimodal Transformer
mask_union 2 other papers
2 dated earlier
2205.14204 (2022-05)
Multimodal Masked Autoencoders Learn Transferable Representations
2210.13431 (2022-10)
Instruction-Following Agents with Multimodal Transformer
modified_lamb 1 other paper
1 dated earlier
2205.14204 (2022-05)
Multimodal Masked Autoencoders Learn Transferable Representations

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

Electronic Health Records (EHRs), which contain patients' medical histories in various multi-modal formats, often overlook the potential for joint reasoning across imaging and table modalities underexplored in current EHR Question Answering (QA) systems. In this paper, we introduce EHRXQA, a novel multi-modal question answering dataset combining structured EHRs and chest X-ray images. To develop our dataset, we first construct two uni-modal resources: 1) The MIMIC-CXR-VQA dataset, our newly created medical visual question answering (VQA) benchmark, specifically designed to augment the imaging modality in EHR QA, and 2) EHRSQL (MIMIC-IV), a refashioned version of a previously established table-based EHR QA dataset. By integrating these two uni-modal resources, we successfully construct a multi-modal EHR QA dataset that necessitates both uni-modal and cross-modal reasoning. To address the unique challenges of multimodal questions within EHRs, we propose a NeuralSQL-based strategy equipped with an external VQA API. This pioneering endeavor enhances engagement with multi-modal EHR sources and we believe that our dataset can catalyze advances in real-world medical scenarios such as clinical decision-making and research. EHRXQA is available at https://github.com/baeseongsu/ehrxqa.

For agents

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

get_harvested_code_for_paper("2310.18652")
get_code_for_paper("2310.18652")
have("2310.18652")

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

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

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

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

Connect an agent — have() is free.