SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.09270 · 2023

Coarse race data conceals disparities in clinical risk score performance

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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 6 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/2304.09270.json · badge: /api/ran/2304.09270.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
rmovva/granular-race-disparities_mlhc23 canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
convert_str_to_float Ran
ran on a synthesized input
rmovva/granular-race-disparities_mlhc23/preprocessing/helpers.py
code served (permissive licence) · get_code("409a2e7f7b3525f9")
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 float, 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 numpy as np
import re

def convert_str_to_float(x):
    if isinstance(x, str):
        x_split = re.compile('[^a-zA-Z0-9-]').split(x.strip())
        if '-' in x_split[0]:
            x_split_dash = x_split[0].split('-')
            if len(x_split_dash) == 2 and x_split_dash[0].isnumeric() and x_split_dash[1].isnumeric():
                return (float(x_split_dash[0]) + float(x_split_dash[1])) / 2
            else:
                return np.nan
        elif x_split[0].isnumeric():
            return float(x_split[0])
        else:
            return np.nan
    else:
        return x

# Test case 1: string with numeric range (e.g., "10-20")
test_1 = "10-20"

# Test case 2: string with leading numeric (e.g., "42 something")
test_2 = "42 text here"

# Test case 3: string with non-numeric start (e.g., "abc 123")
test_3 = "abc 123"

# Test case 4: non-string input (e.g., float)
test_4 = 3.14

# Test case 5: non-string input (e.g., int)
test_5 = 99

ARGS = {
    "x": test_1
}
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 float, 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
evaluate_calibration Ran
ran on a synthesized input
rmovva/granular-race-disparities_mlhc23/analysis/utils_plotting_metrics.py
code served (permissive licence) · get_code("5164a07cbc0e6531")
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 float64, ndim 0, 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

# Set random seed for reproducibility
np.random.seed(0)

# Create sample predictions and labels
# yhat: predicted probabilities (should be between 0 and 1)
# y: true binary labels (0 or 1)
n_samples = 100
yhat = np.random.uniform(0, 1, n_samples)
y = np.random.randint(0, 2, n_samples)

# Define ARGS dict with all parameters
ARGS = {
    "yhat": yhat,
    "y": y,
    "n_bins": 10
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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_atc Ran
ran on a synthesized input
rmovva/granular-race-disparities_mlhc23/preprocessing/medcodes/drugs/standardization.py
code served (permissive licence) · get_code("8980ba151de2b8b0")
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 pandas as pd

ARGS = {
    'drug_id': 'aspirin',
    'id_type': 'name',
    'as_df': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, requests — 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
get_mesh Ran
ran on a synthesized input
rmovva/granular-race-disparities_mlhc23/preprocessing/medcodes/drugs/standardization.py
code served (permissive licence) · get_code("5494128fd2c415ba")
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 requests
import pandas as pd
from unittest.mock import patch, MagicMock

# Mock the requests.get call to avoid actual network requests
def mock_get(url, *args, **kwargs):
    mock_response = MagicMock()
    mock_response.json.return_value = {
        'rxclassDrugInfoList': {
            'rxclassDrugInfo': [
                {
                    'rxclassMinConceptItem': {
                        'classId': 'MESH001',
                        'className': 'Analgesics'
                    }
                },
                {
                    'rxclassMinConceptItem': {
                        'classId': 'MESH002',
                        'className': 'Anti-Inflammatory Agents'
                    }
                }
            ]
        }
    }
    return mock_response

# Patch requests.get globally
requests.get = mock_get

ARGS = {
    'drug_id': 'aspirin',
    'id_type': 'name',
    'as_df': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, requests — 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
read_edstays_table Ran
ran on a synthesized input
rmovva/granular-race-disparities_mlhc23/preprocessing/helpers.py
code served (permissive licence) · get_code("04ba5450b591eaaa")
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 pandas as pd
import tempfile
import os

# Create a temporary CSV file with sample ED stays data
temp_dir = tempfile.mkdtemp()
temp_csv_path = os.path.join(temp_dir, "edstays.csv")

# Write sample data to the CSV file
sample_data = """subject_id,hadm_id,intime,outtime
123,456,2020-01-01 10:00:00,2020-01-01 14:30:00
124,457,2020-01-02 08:15:00,2020-01-02 16:45:00
125,458,2020-01-03 12:00:00,2020-01-03 18:20:00"""

with open(temp_csv_path, 'w') as f:
    f.write(sample_data)

ARGS = {
    'edstays_table_path': temp_csv_path
}
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
read_patients_table Ran
ran on a synthesized input
rmovva/granular-race-disparities_mlhc23/preprocessing/helpers.py
code served (permissive licence) · get_code("614d23c32bfcba5b")
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 pandas as pd
import io
import tempfile
import os

# Create a temporary CSV file with patient data including a 'dod' column
csv_data = """patient_id,dod,age,name
1,2020-01-15,65,John Doe
2,2021-06-20,72,Jane Smith
3,,58,Bob Johnson"""

# Write to a temporary file
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.csv')
temp_file.write(csv_data)
temp_file.close()

patients_table_path = temp_file.name

ARGS = {
    'patients_table_path': patients_table_path
}
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
diagnosis_with_time Not yet run
unverified (harvested, no recorded run)
rmovva/granular-race-disparities_mlhc23/preprocessing/medcode_utils.py
code served (permissive licence) · get_code("ab021e972a5c86ce")
How it ran

no invocation recorded.

get_pharm_class Not yet run
unverified (harvested, no recorded run)
rmovva/granular-race-disparities_mlhc23/preprocessing/medcodes/drugs/standardization.py
code served (permissive licence) · get_code("487b49276be3c4ab")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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

Healthcare data in the United States often records only a patient's coarse race group: for example, both Indian and Chinese patients are typically coded as "Asian." It is unknown, however, whether this coarse coding conceals meaningful disparities in the performance of clinical risk scores across granular race groups. Here we show that it does. Using data from 418K emergency department visits, we assess clinical risk score performance disparities across 26 granular groups for three outcomes, five risk scores, and four performance metrics. Across outcomes and metrics, we show that the risk scores exhibit significant granular performance disparities within coarse race groups. In fact, variation in performance within coarse groups often *exceeds* the variation between coarse groups. We explore why these disparities arise, finding that outcome rates, feature distributions, and the relationships between features and outcomes all vary significantly across granular groups. Our results suggest that healthcare providers, hospital systems, and machine learning researchers should strive to collect, release, and use granular race data in place of coarse race data, and that existing analyses may significantly underestimate racial disparities in performance.

For agents

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

get_harvested_code_for_paper("2304.09270")
get_code_for_paper("2304.09270")
have("2304.09270")

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

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

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

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

Connect an agent — have() is free.