Instruction-tuning large language models with medical classification data improves ICD coding of German tumor diagnoses
Stefan Lenz, Lakisha Ortiz Rosario, Georg Vollmar, Arsenij Ustjanzew, Fatma Alickovic, Thomas Kindler, Torsten Panholzer
Key points
From the paper's conclusion- Accurate coding of tumor diagnoses, with the German Modification of the International Classification of Diseases, 10th Revision (ICD-10-GM), and the International Classification of Diseases for Oncology, Third Edition (ICD-O-3), is essential for structured cancer documentation.
Abstract
Accurate coding of tumor diagnoses, with the German Modification of the International Classification of Diseases, 10th Revision (ICD-10-GM), and the International Classification of Diseases for Oncology, Third Edition (ICD-O-3), is essential for structured cancer documentation. Large language models (LLMs) offer opportunities for automating such tasks, but locally deployable, open-weight models often lack sufficient domain-specific coding expertise. This study investigates whether instruction-based fine-tuning on public classification resources improves the coding accuracy of open-weight LLMs for German tumor diagnosis texts. Eight models from the Qwen, Llama, and Mistral families (7–70 billion parameters) were fine-tuned on over 500,000 question-answer pairs based on the ICD-10-GM, ICD-O-3, and German procedure classification. The evaluation uses coded diagnoses from the local tumor documentation system as test data. ICD-10-GM accuracy rose from 1.4 to 24 to 41–58%, and partial (three-character codes only) accuracy from 31 to 74 to 73–83%. The accuracy of ICD-O-3 topography coding also improved but started and remained considerably lower. Malformed code outputs dropped to nearly 0% for almost all models. Tumor-diagnosis recognition reached 99%. A data quality analysis showed that incomplete diagnosis descriptions limited achievable test performance. Accuracy correlated positively with model size, but gaps between small and large models narrowed after fine-tuning. The reasoning mode in Qwen3 generally yielded lower performance than fine-tuning and was over 100 times slower. Our findings highlight the potential of leveraging public catalogues to build instruction datasets that improve LLMs in medical documentation tasks. To support reproducibility and further research, we publicly release the complete training dataset and the best-performing fine-tuned model checkpoints.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- CancerLLM: a large language model in cancer domainnpj Digital Medicine · 2026
- Exploring the Effectiveness of Large Language Models in Generating Clinical Differential Diagnoses: A Case Study of ICU PatientsApplied Sciences · 2026
- Towards understanding the disease landscape of clinical trials in Germany: Ontology and embedding-based pipelines versus Large Language Models for ICD-10 HarmonizationmedRxiv · 2026
- Call-Efficient ICD-10 Code Prediction via Supervised Candidate Generation and Selective LLM InvocationarXiv · 2026
- Evaluation of Large Language Models for Radiologists’ Support in Multidisciplinary Breast Cancer Teams: Comparative StudyJMIR Medical Informatics · 2026
- Can decision models extract clinical data from cancer pathology reports? An evaluation of accuracy, calibration, and failure modesarXiv · 2026