Abstract
Automated medical coding using the International Classification of Diseases (ICD) is a critical yet challenging task due to the "long-tail" distribution of medical conditions and strict data privacy regulations. This study investigates the utility of GPT-3.5 as both an autonomous medical coder and a data augmentor for training specialized neural models. While GPT-3.5 performs poorly as a zero-shot coder on real-world clinical notes, it proves to be a powerful tool for generating synthetic discharge summaries. These synthetic notes significantly improve the performance of local models on rare medical codes, offering a viable path to mitigate data sparsity in clinical NLP.
Introduction: The Data Sparsity Challenge
Automated ICD coding involves assigning standardized codes to clinical documents like discharge summaries. The primary hurdle is the "long-tail" distribution: common conditions like hypertension are overrepresented, while thousands of rare conditions lack sufficient training data. Furthermore, the sensitive nature of clinical data limits large-scale sharing. Researchers explored whether Large Language Models (LLMs) like GPT-3.5 could bridge this gap by generating realistic synthetic summaries for rare conditions to "teach" smaller, specialized models.
Methodology
The study employed GPT-3.5 (gpt-3.5-turbo-0613) in two primary roles:
- Data Generation: "Silver standard" label sets were created by substituting rare "sibling" codes into real clinical code combinations. GPT-3.5 was then prompted to write detailed discharge summaries based on these descriptions.
- Zero-Shot Coding: The model's ability to extract ICD-10 codes from both real MIMIC-IV notes and its own synthetic notes was evaluated.
The resulting synthetic dataset (9,606 documents) was used to augment real data for training three neural architectures: CAML, LAAT, and Multi-Res CNN.
Dataset Characteristics
The research utilized the MIMIC-IV dataset, specifically the Nguyen split to preserve the long tail of rare codes. The synthetic augmentation set consisted of 9,606 summaries based on 114 low-population "generation codes."
As shown in Figure 6, synthetic summaries tended to be shorter and contained fewer labels per document compared to the original MIMIC-IV data, reflecting the constraints of the LLM's context window and prompting strategy.
Key Insights
- In-Prompt Bias: GPT-3.5 excels at coding its own synthetic data (F1 ~48) because it often reproduces prompt descriptions verbatim. However, its performance on messy, real-world clinical notes is significantly lower (F1 ~14).
- Augmentation vs. Autonomy: LLMs are better "tutors" than "practitioners" in this context. Synthetic data improved the Macro-F1 for rare classes in Multi-Res CNN and CAML by 26% and 78%, respectively.
- The "Uncanny Valley": Clinicians found synthetic summaries to be "correct" but "unnatural" and "fragmented," often failing to link diagnoses into a coherent patient narrative (e.g., treating diabetes and its complications as unrelated facts rather than a linked progression).
Results and Limitations
Augmented models showed a significant reduction in "out-of-family" errors for rare codes. However, GPT-3.5's zero-shot precision on real notes was under 10%, frequently hallucinating codes or failing to identify standard clinical concepts without explicit guidance.
The primary limitations included:
- Token Limits: The 4,096-token limit of GPT-3.5 resulted in shorter summaries than many real-world documents, which can reach much greater lengths.
- Narrative Coherence: The model struggled to prioritize "critical" vs. "minor" diagnoses, often giving equal weight to a life-threatening event and minor ailments.
Future work suggests using In-Context Learning (ICL) and restructured prompts to improve the narrative flow and authenticity of synthetic clinical data, potentially helping the model build more plausible patient histories.
Summary updated