HCC Coding Gap Classifier
SLM-Powered Risk-Adjustment Compliance Platform
A fine-tuned small language model that flags Medicare risk-adjustment documentation gaps — built to prove a small, locally-hosted model can match or beat a frontier LLM on a narrow enterprise task, at a fraction of the cost.
| Metric | Fine-tuned SLM | Frontier LLM |
|---|---|---|
| Accuracy | 88.9% | 75.9% |
| Cost / note | $0.00 | $0.0021 |
| Avg latency | 1.10s | 1.15s |
| Latency σ | 0.07s | 0.77s |
Breakeven ≈ 2.15M notes/year. UnitedHealthcare's ACA marketplace alone processed 6.4M claims in 2024 — 3× past breakeven on a single product line.
Annual cost: frontier API vs. self-hosted SLM, by volume (log–log). The flat gold line is the SLM's fixed hosting cost; the rising line is the API, which scales with usage. They cross at ~2.15M notes/year.
The Problem
Medicare pays insurers more for sicker patients through the CMS-HCC risk-adjustment model, where each diagnosis maps to a Hierarchical Condition Category worth real dollars. If a clinician's note lacks the specificity to justify a billed HCC, that's a documentation gap — lost revenue or audit exposure. Insurers run large human chart-review teams to catch this at scale; this project automates the first pass.
Under the Hood
- Ground truth from the official CMS-HCC Model V28 ICD-10-to-HCC crosswalk and RAF dollar coefficients
- LoRA fine-tuning of Phi-3.5-mini-instruct via Apple's MLX — fully local, no cloud GPU for training
- Hard-negative training examples added after error analysis exposed a relevance-checking blind spot
- Caught a model-version pricing bug and an ICD-9 / ICD-10 vintage mismatch in the source data
- Held-out test set built independently and inspected exactly once, after lock-in, to prevent leakage