NeurIPS 2026 · GenAI4Health Workshop

MedTex-LLM

Efficient ICD-O Coding for Cancer Registries with Small, Locally Deployable LLMs

Jinghui LiuAnthony Nguyen

Australian e-Health Research Centre, CSIRO

jinghui.liu@csiro.auanthony.nguyen@csiro.au

Cancer registries abstract structured data from the pathology reports they receive. Two of the central data items are ICD-O codes: the topography code, which records where a cancer arose, and the morphology code, which records its histological type and behaviour. MedTex-LLM assigns both with small language models that run entirely within the registry, so that reports never leave its infrastructure.

Exact topography
–
Exact morphology
–
LLM calls per report
3
One to extract and two to rerank; retrieval and recoding require none.
Per report on a laptop
–
The problem

Why ICD-O coding is hard to automate

–

A large, long-tailed label space

On-premise

Privacy and budget limit the options

Pathology reports contain identifiable patient information, so registries generally cannot send them to cloud services. Registries also run on limited operational budgets, and per-report charges for cloud APIs or large hosted models can be prohibitive at the volumes they process. An automated coding system must therefore run affordably on hardware the registry already operates.

Upkeep

Expert systems are costly to maintain

Many registries already rely on rule-based systems refined over years of use. These perform well on the report formats they were built for, but each new laboratory template or change in coding practice requires new rules, and accuracy varies across reporting styles.

The system

Extract, retrieve, rerank, recode

The model never has to recall a code from memory. It writes a phrase, a retriever turns the phrase into candidate codes, and the model only has to choose among ten. Click a stage to see it on a real example.

Input
A free-text pathology report.
free-text report
Output
C50.4topography
8500/3morphology
ICD-O codes

Walkthrough

One report, stage by stage

Synthetic reports written for this page, run through the paper's configuration on a laptop.

Loading the walkthrough…

Results

Better than prompting alone, and better than the deployed system

Field
Show every system and field as a table
Accuracy (%), with 95% bootstrap intervals over reports. The best value in each column is underlined.
Robustness

Steadier across laboratories

Accuracy on the same reports, grouped by cancer stream (the five most common in Queensland) and by source laboratory (the five largest, pseudonymised). Rule-based systems are tuned to the report templates they were built for; the LLM pipelines vary less across laboratories than the deployed system.

Split by
Topography (exact code)
Morphology (exact code)
Show as a table
Deployment

Runs offline on a laptop

Timed on a single laptop with no network connection to any model service.

Per report, on a laptop

Where the time goes
Median seconds per pipeline stage, per report.

Scope

What these results do and do not show

  • A single registry. The gold codes, assigned by registry coders, have since been updated to ICD-O-3.2 and so reflect current coding practice. Report templates and coding conventions nonetheless differ between registries.
  • Test data only. The reports served solely as a test set; no component was trained or fine-tuned on them. Two design decisions were nonetheless informed by this corpus: the registry recode rules, and leaving out morphology-group masking, which reduced accuracy when tested on it.
  • Two of many data items. Topography and morphology are central to a cancer notification, but registries abstract many further items, such as grade, laterality, basis of diagnosis and stage.
Citation

BibTeX

@inproceedings{medtexllm2026,
  title     = {Efficient {ICD-O} Coding for Cancer Registries with
               Small, Locally Deployable {LLMs}},
  author    = {Liu, Jinghui and Nguyen, Anthony},
  booktitle = {GenAI4Health Workshop at NeurIPS 2026},
  year      = {2026},
  url       = {https://openreview.net/forum?id=pd7PD93fEi}
}