Productionizing Health Insurance Appeal Generation

Holden Karau, Netflix27:11 · Apr 2024 · 594 views
Thumbnail for Productionizing Health Insurance Appeal Generation Watch on YouTube
TL;DR
  1. 1

    Holden Karau fine-tuned a model to turn health insurance denials into appeal letters using public California medical review records and synthetic training data.

  2. 2

    She deployed the model on an on-premises Kubernetes cluster because buying hardware was cheaper than renting enough GPU capacity for long-term inference.

  3. 3

    The project exposed practical limits of small-scale ML operations, including data access, model compatibility, hardware fit, power use, version pinning, and failed demo infrastructure.

Summary

Holden Karau describes a personal project to generate health insurance appeals. Her starting point is the difficulty of obtaining training data. Insurance companies have little reason to help, medical offices face privacy rules, and online appeals are too scarce for fine-tuning. She uses California independent medical review records to create synthetic denials and appeals, then fine-tunes a model with rented GPU capacity. For inference, she combines a desktop with an RTX 3090, an on-premises Kubernetes cluster, and a Django front end. The talk gives a detailed account of the costs and awkward parts of this setup, including GPU hardware that does not fit server chassis, ARM compatibility problems, power limits, ephemeral storage, and containers that break when the latest tag changes. The live demo fails because the machine running the model and Kubernetes head node are down. Karau is direct about the system's early state and says it should not yet be used for real appeals.

Key ideas
03:04

The project starts with a personal health insurance problem and a small budget

Karau frames the system as a personal attempt to make health insurance disputes easier to handle. She says Anthem Blue Cross, her insurer, denied around 20% of claims in 2019, and describes dealing with medical bills after being hit by a car and having surgeries. She is clear that this is not a Netflix project and that the budget is limited. The system is an imperfect technical response to a larger social problem. It takes an insurance denial as input and produces an appeal, then adds a front end so people do not need their own GPU, Python installation, or model files.

05:31

Public medical review records provide training material when direct records are unavailable

The hardest part is finding usable training data. Insurance companies are unlikely to provide records for a system intended to challenge their decisions. Doctor's offices would need to redact patient information manually, which creates substantial work and legal risk. Appeals posted online are useful but too limited for fine-tuning. Karau uses California's publicly downloadable independent medical review records instead. She says other states have similar records, although access and commercial-use restrictions vary. The published records omit patient names and much of the identifying information, so they can be used to create synthetic examples.

08:00

Synthetic data makes fine-tuning possible, but it needs filtering and license checks

Karau uses language models to turn the medical review inputs into possible denial letters and appeals. This produces a larger training set than the original public records alone. The approach has two clear costs. Generated data costs money, even if it is cheaper than asking people to create it, and the generated examples may be poor. She therefore filters the data before using it. She also checks the licenses of the models used to generate the synthetic records. The fine-tuning model is selected based on both its performance and whether it will fit the hardware available.

08:50

Fine-tuning is affordable when the work is moved to rented GPU capacity

Karau first used Dolly and shell scripts, then moved to Oxal, which abstracts much of the setup into Python scripts. Lambda Labs supplies the rented GPU capacity because her RTX 4090 can run inference but cannot fine-tune the model. The process still includes shell scripts for moving data and configuring machines, along with configuration for the base model, data location, sequence lengths, and sliding windows. She puts the fine-tuning cost at about $112. Oxal distributes the work across multiple GPUs and selects batch sizes that keep them heavily occupied.

10:35

On-premises inference turns hardware compatibility into part of the ML work

Serving the model requires more than a model server. Karau has ARM GPU devices from Nvidia, but they do not work well with many of the tools she uses. An RTX 3090 does not fit properly in either of her servers, so she puts a desktop computer at the bottom of the equipment rack. The setup uses more power than expected, and she has only 15 amps available. Her Kubernetes deployment targets amd64 hosts and uses the Nvidia runtime class so the container can access the GPU. She also needs ephemeral storage for downloading and holding the model.

11:50

Unpinned containers can break a deployment without an obvious source-code change

Karau shows a deployment that pulls the latest container tag, then explains why this is a bad practice. The container maintainers sometimes change how prompts are generated before releasing the corresponding source-code changes. A deployment can therefore stop working after an image update, even though the user did not change their own code. She recommends pinning a specific version. This is one of the small operational details that matters when a personal cluster is running the only copy of a model.

14:06

The failed demo exposes the cost of owning the infrastructure

The live demo fails because the Kubernetes cluster returns no pods. Karau traces the problem to the computer running the model, then finds that the machine named Jumba is down. The cluster's head node is also the node running model inference, so the front end cannot work while that machine is unavailable. She points out that on-premises systems take real time to reboot, unlike rented infrastructure where replacement capacity can often be requested through a service. The model and deployment code are available in the project's repositories, so someone with a working Kubernetes cluster can try the setup.

20:19

GPU inference is preferred because CPU paths are slow and incompatible with her ARM nodes

Karau has tried CPU inference, but says it has not produced particularly good results. The fine-tuned model already works only moderately well, and losing additional precision makes the output less useful. The bitsandbytes library, which is used by many quantization workflows, does not compile on her ARM nodes. CPU inference on an x86 node might work, but it would be slow and those machines already consume more power. She uses vLLM because its batching could improve GPU utilization when more than one user runs an appeal request, although the current batch size is one.

"We're going to make an ML model that'll take health insurance denials and produce appeals for people."05:08
Who should watch
  • You are building a small ML system and need to understand the practical costs of data collection, fine-tuning, serving, and hardware.
  • You are weighing rented GPU capacity against an on-premises setup and want a candid account of power, compatibility, and maintenance problems.
  • You want to see how a real prototype behaves when the infrastructure fails, rather than only hearing about a successful deployment.