SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.13940 · 2026

Can Post-Training Turn LLMs into Good Medical Coders? An Empirical Study of Generative ICD Coding

Weihao Li, Kaize Ding, Yuan Luo, Shijie Chen, Ziqing Wang

arXiv · PDF · Open in the Atlas

Code that ran

16 of 16 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 14 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2606.13940.json · badge: /api/ran/2606.13940.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
AlexandreWANG915/LLM4ICD canonical (classifier label)
classifier basis: census
16 ran · 0 no recorded run
FunctionStatusWhere it lives
build_system_line Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd_grpo.py
code served (permissive licence) · get_code("be5b9a6b5565fa3e")
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.

ARGS = {
    'icd_version': 'icd9',
    'code_scope': 'top50'
}
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
build_weights Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd_reward_weights.py
code served (permissive licence) · get_code("81961f343387efcc")
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.

from collections import Counter

ARGS = {
    "frequencies": Counter({
        "code_001": 100,
        "code_002": 50,
        "code_003": 200,
        "code_004": 75,
        "code_005": 150,
    }),
    "alpha": 0.5,
    "min_weight": 0.1,
    "max_weight": 2.0,
}
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 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
compute_code_weights Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/update_hint_pool.py
code served (permissive licence) · get_code("93329a143abd1c75")
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 math
import statistics
from collections import Counter

ARGS = {
    'records': [
        {
            'gt_codes': ['code_A', 'code_B', 'code_C'],
            'missed': ['code_B']
        },
        {
            'gt_codes': ['code_A', 'code_D'],
            'missed': []
        },
        {
            'gt_codes': ['code_B', 'code_C', 'code_D'],
            'missed': ['code_D']
        },
        {
            'gt_codes': ['code_A'],
            'missed': ['code_A']
        }
    ],
    'clip_multiplier': 3.0
}
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 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
copy_no_hint Ran
ran, honoured the contract we drafted
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_hint_data.py
code served (permissive licence) · get_code("3aecda4a3c9b6953")
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 os
import pandas as pd
import tempfile

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a source parquet file with sample data
src_path = os.path.join(temp_dir, "source.parquet")
df_source = pd.DataFrame({
    'col1': [1, 2, 3],
    'col2': ['a', 'b', 'c'],
    'col3': [1.1, 2.2, 3.3]
})
df_source.to_parquet(src_path, index=False)

# Define output path
out_path = os.path.join(temp_dir, "subdir", "output.parquet")

ARGS = {
    'src_parquet': src_path,
    'out_parquet': out_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 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
filter_allowed_codes Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/icd_label_space.py
code served (permissive licence) · get_code("585066208fb665f0")
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. 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 Iterable

# Setup for filter_allowed_codes function
torch.manual_seed(0)

# Create test data for the function parameters
test_codes = [
    "  CODE1  ",
    "code2.",
    "CODE1",  # duplicate
    "code3.",
    "  ",  # empty after strip
    "code4",
]

allowed_codes_set = {"CODE1", "CODE2", "CODE3"}

ARGS = {
    "codes": test_codes,
    "allowed_codes": allowed_codes_set,
}
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 tuple — a tuple output has no array shape of its own; none is 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
insert_dx_dot Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd9_descriptions.py
code served (permissive licence) · get_code("33995b5c5fdcbe54")
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

# The function insert_dx_dot takes a single parameter: code (a string)
# Based on the function body, it:
# - Takes a string parameter
# - Checks if it's empty
# - Accesses the first character and converts to uppercase
# - Uses string slicing and formatting
# - Returns a string

# Valid test cases for ICD-9-CM diagnosis codes:
ARGS = {
    "code": "4019"  # numeric code that should become "401.9"
}
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
insert_sg_dot Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd9_descriptions.py
code served (permissive licence) · get_code("5fe6aa0c222418f7")
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.

# Setup code for insert_sg_dot function

ARGS = {
    "code": "3324"
}
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
normalize_code Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/icd_label_space.py
code served (permissive licence) · get_code("81fe8d20d095447b")
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

torch.manual_seed(0)

ARGS = {
    "code": "  hello.world.  "
}
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 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
parse_answer_codes Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/icd_label_space.py
code served (permissive licence) · get_code("e64f1557f10b5520")
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

def normalize_code(code: str) -> str:
    """Normalize a code token assuming text-like input."""
    return code.strip().rstrip('.').upper()

def parse_answer_codes(answer) -> list[str]:
    if answer is None or pd.isna(answer):
        return []
    answer = str(answer)
    out: list[str] = []
    seen: set[str] = set()
    for part in answer.split(','):
        code = normalize_code(part)
        if code and code not in seen:
            seen.add(code)
            out.append(code)
    return out

ARGS = {
    "answer": "ABC, def, ABC, ghi."
}
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 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
parse_assistant_codes Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd_grpo.py
code served (permissive licence) · get_code("eb6f308f2f95650e")
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 re

CODE_BLOCK_RE = re.compile('<code>(.*?)</code>', re.DOTALL)

def parse_assistant_codes(text: str) -> list[str]:
    """Extract codes from assistant reply like '<code>A, B, C</code>'."""
    m = CODE_BLOCK_RE.search(text)
    payload = m.group(1) if m else text
    codes = [c.strip() for c in re.split('[,;\\n]', payload) if c.strip()]
    seen: set[str] = set()
    out: list[str] = []
    for c in codes:
        if c not in seen:
            seen.add(c)
            out.append(c)
    return out


# Test case 1: text with code block tags
text_with_code_block = '<code>A, B, C</code>'

# Test case 2: text with plain codes separated by commas
text_plain_comma = 'X, Y, Z'

# Test case 3: text with codes separated by semicolons and newlines
text_mixed_delim = 'Code1;\nCode2,\nCode3'

# Test case 4: text with duplicates
text_with_duplicates = '<code>Alpha, Beta, Alpha, Gamma, Beta</code>'

# Test case 5: empty/whitespace handling
text_with_whitespace = '  Item1  ,  Item2  ;  Item3  '

ARGS = {
    'text': text_with_code_block
}
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
parse_cms_file Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd9_descriptions.py
code served (permissive licence) · get_code("913cd30ae0a71375")
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 re
from pathlib import Path
import tempfile
import os

# Create a temporary file with valid CMS format content
def create_temp_cms_file():
    with tempfile.NamedTemporaryFile(mode='w', encoding='latin-1', delete=False, suffix='.txt') as f:
        f.write('AB Description of AB code\n')
        f.write('CD Another description\n')
        f.write('EFG Third code description\n')
        f.write('\n')
        f.write('HIJK Fourth code with longer description\n')
        temp_path = f.name
    return Path(temp_path)

# Define a dot_inserter function that adds dots to codes
def dot_inserter(code: str) -> str:
    """Insert dots into a code string, e.g., 'AB123' -> 'AB.123'"""
    if len(code) <= 2:
        return code
    return code[:2] + '.' + code[2:]

# Create the temporary file
temp_file_path = create_temp_cms_file()

# Construct the ARGS dictionary
ARGS = {
    'path': temp_file_path,
    'dot_inserter': dot_inserter,
}
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 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
parse_gt Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_hint_data.py
code served (permissive licence) · get_code("d9c1775debbd7fd3")
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
import torch.nn as nn

torch.manual_seed(0)

# The function parse_gt takes a string 'answer' and splits it by commas,
# stripping whitespace from each part, and filtering out empty strings.
# It returns a list of strings.

answer = "hello, world , test,  , foo"

ARGS = {
    "answer": answer
}
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
sample_id Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/inference_on_train.py
code served (permissive licence) · get_code("4cfdf11de3ea33a7")
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 hashlib

def sample_id(problem_text: str) -> str:
    """Stable 12-char hex id for each sample's problem text."""
    return hashlib.sha1(problem_text.encode('utf-8')).hexdigest()[:12]

# The function takes a single string parameter and returns a 12-character hex string
# It encodes the string to UTF-8 bytes, computes SHA1 hash, and returns first 12 chars

ARGS = {
    "problem_text": "What is the sum of all prime numbers less than 100?"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
sample_id Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/update_hint_pool.py
code served (permissive licence) · get_code("2290618303feb7da")
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 hashlib

def sample_id(problem_text: str) -> str:
    return hashlib.sha1(problem_text.encode('utf-8')).hexdigest()[:12]

ARGS = {
    "problem_text": "This is a sample problem for testing the sample_id function"
}
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
strip_sft_boilerplate Ran
ran; our contract draft was wrong, not the code
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_icd_grpo.py
code served (permissive licence) · get_code("d758bdea4700ae30")
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

ARGS = {
    "text": "Some header\nDischarge Summary: The patient was admitted with chest pain. On examination, vitals were stable. Patient discharged in stable condition.\nOutput ONLY the applicable codes: ICD-10 codes here"
}
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 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
write_train_with_hint_pool Ran
ran, honoured the contract we drafted
AlexandreWANG915/LLM4ICD/EasyR1/tasks/prepare_hint_data.py
code served (permissive licence) · get_code("0293939a97819f97")
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 os
import pandas as pd
import tempfile

# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()

# Create a sample parquet file with the expected structure
src_data = {
    'answer': [
        'apple, banana, cherry',
        'dog, cat',
        'red, green, blue, yellow'
    ],
    'other_column': [1, 2, 3]
}
src_df = pd.DataFrame(src_data)
src_parquet = os.path.join(temp_dir, 'input.parquet')
src_df.to_parquet(src_parquet, index=False)

# Define output path
out_parquet = os.path.join(temp_dir, 'output.parquet')

ARGS = {
    'src_parquet': src_parquet,
    'out_parquet': out_parquet
}
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 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

Also present in other papers' code

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

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

Automated International Classification of Diseases (ICD) coding is a core medical-coding task for billing, epidemiology, and clinical decision support. Generative large language models (LLMs) are often reported as weak medical coders, but this finding mainly comes from inference-time settings such as prompting, retrieval, reranking, or tool use, leaving the role of task-specific post-training underexplored. We present a controlled empirical study of posttraining for generative ICD coding, comparing discriminative baselines with LLM coders across prompting, supervised fine-tuning, and reinforcement learning under a common protocol and metric set. To our knowledge, this is the first study to evaluate RL-based post-training for generative LLM coders in ICD coding. We further introduce PHI, a diagnostic curriculum that extends GRPO to refine missed-code cases. Our results show that prompting-only evaluation substantially underestimates the potential of LLMs for ICD coding. SFT provides the main capability jump, GRPO further improves code-set prediction beyond SFT, and PHI provides targeted gains on macro-level performance. These findings suggest that the main bottleneck is not the generative formulation alone, but how the model is adapted and optimized for full-taxonomy recall. We release our code, data splits, and checkpoints at https:// github.com/AlexandreWANG915/LLM4ICD.

For agents

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

get_harvested_code_for_paper("2606.13940")
get_code_for_paper("2606.13940")
have("2606.13940")

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

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

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

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

Connect an agent — have() is free.