Training a Large Language Model for Medical Coding Using Privacy-Preserving Synthetic Clinical Data

John Cook, Michael Wyatt, Peng Wei, Iris Chin, Santosh Gupta +9 more
3/6/2026
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Improving the accuracy and reliability of medical coding reduces clinician burnout and supports revenue cycle processes, freeing providers to focus more on patient care. However, automating the assignment of ICD-10-CM and CPT codes from clinical documentation remains a challenge due to heterogeneous records, nuanced coding guidelines, and long-tail distributions.

Show full abstract

Large language models have been proposed to help or automate specific medical coding tasks. However, foundation models are not explicitly trained for medical coding and zero-shot coding has yielded poor results. We investigate whether a modern open-weight foundation model can be adapted for an expert-level medical coding task using privacy-preserving synthetic training data derived from electronic health records. We fine-tune Llama 3-70B on pairs of clinical notes and gold codes generated from EHR-grounded templates and coding policies, then evaluate exact-code prediction for ICD-10-CM and CPT. A zero-shot baseline with the unadapted model achieved an F1 score of 0.18 for exact code match. After fine-tuning on the synthetic corpus, exact-match F1 exceeded 0.70, representing a large absolute gain across both code systems. Notably, performance remained high on complex categories that often require multi-step clinical reasoning and code composition, including Advanced Illness and Frailty classes, and the model retained its performance on medical comprehension tasks. These results indicate that synthetic, policy-aware data can efficiently teach a general-purpose large language model to support precise medical coding without exposing protected health information. The approach offers a practical path for training coding agents safely and iteratively on specific tasks that represent real-world populations.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cook2026training,
  title  = {Training a Large Language Model for Medical Coding Using Privacy-Preserving Synthetic Clinical Data},
  author = {John Cook and Michael Wyatt and Peng Wei and Iris Chin and Santosh Gupta and Van Zyl Van Vuuren and Richie Siburian and Amanda Spicer and Kristen Viviano and Alda Cami and Raunaq Malhotra and Zhewei Yao and Jeff Rasley and Gaurav Kaushik},
  year   = {2026},
  eprint = {2603.23515},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.23515v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.23515.svg)](https://codeofpaper.com/paper/2603.23515)

Discussion