TL;DR
Clinical machine learning models trained on electronic health records (EHRs) assume patients take medications exactly as prescribed, but this paper reveals that widespread treatment non-adherence introduces a severe implicit bias. By leveraging Large Language Models (LLMs) to extract adherence data from unstructured clinical notes, the authors demonstrate that ignoring this bias can completely reverse causal inference conclusions, degrade predictive accuracy by up to 5%, and dangerously exacerbate racial disparities in healthcare algorithms.
What Problem Does This Paper Address?
When machine learning models are trained on EHR data to guide treatment decisions, they rely on a critical, often invisible assumption: that the patient actually took the drug the doctor prescribed. In reality, medication non-adherence is incredibly common, especially for chronic conditions like hypertension.
If a patient doesn't take their medication and their health fails to improve, an AI model trained on standard EHR records will misattribute this poor outcome to drug ineffectiveness rather than the true cause—the patient simply didn't take it. Historically, tracking non-adherence at scale has been bottlenecked by small-scale, bias-prone patient surveys or expensive hardware solutions like electronic pill caps. This paper addresses this measurement gap, quantifying exactly how this hidden variable distorts both causal effect estimation and predictive modeling in clinical AI.
Methods
The authors developed a pipeline to automatically detect, categorize, and evaluate the impact of treatment non-adherence:
- LLM-Based Information Extraction: The authors used GPT-4o in a zero-shot configuration with a self-validation double-check loop to parse unstructured clinical notes. The model identified whether a patient was non-adherent and extracted the specific reasons why.
- Validation: To ensure the LLM's reliability, its annotations were benchmarked against a gold-standard subset manually reviewed by human clinicians.
- Statistical & Topic Modeling: Unadjusted and multivariate logistic regressions were used to find clinical and demographic factors linked to non-adherence, while a BERT-based topic modeling approach (BERTopic) clustered the text to find patient-reported reasons for missing medications.
- Downstream Bias Evaluation: The authors evaluated the impact of this bias on two core tasks: causal inference (estimating the Average Treatment Effect of two common blood pressure drugs using Inverse Probability Weighting and meta-learners) and supervised learning (predicting whether a patient's blood pressure would normalize, using Logistic Regression and Random Forests).
Datasets
The study utilized a real-world, de-identified EHR dataset from the University of California, San Francisco (UCSF).
- Cohort Size: 3,623 patients diagnosed with primary hypertension, encompassing 5,952 consecutive visit pairs.
- Medications: The study tracked 10 of the most commonly prescribed antihypertensive drugs (e.g., amlodipine, lisinopril, losartan).
- Availability: Due to data use agreements, the patient data cannot be shared publicly, but the authors plan to make their codebase open-source.
Key Insights and Ideas
- The Prescription $\neq$ Consumption Blindspot: Out of 3,623 patients, the LLM identified that 21.7% were non-adherent. Treating prescription records as ground-truth consumption creates a massive data-quality issue for clinical AI.
- Causal Inversion: The most startling finding is that ignoring non-adherence can flip the mathematical sign of a treatment effect. A drug that appears ineffective or even harmful on paper might actually be highly effective when patients actually take it.
- Fairness Amplification: Non-adherence is not uniformly distributed; it correlates with systemic factors (e.g., higher rates among Black patients due to structural healthcare barriers). Consequently, models trained on uncleaned data exhibit higher error rates and worse fairness metrics (demographic parity and equal odds) for these exact populations.
- Less Data Can Be Better: Counterintuitively, dropping non-adherent data—even though it reduces the overall training set size—consistently improves model performance and fairness.
Key Results
- LLM Accuracy: GPT-4o achieved an impressive 92% accuracy, precision, and recall when validated against expert physician annotations.
- Why Patients Don't Comply: Topic modeling revealed that 59.8% of non-adherence reasons were due to side effects (predominantly dizziness and headaches), 17.7% due to forgetfulness, and the remainder due to refill or pickup difficulties.
- Causal Distortions: When evaluating Amlodipine vs. Lisinopril using Inverse Probability Weighting (IPW), the estimated systolic blood pressure reduction reversed from -0.06 mmHg (incorrectly implying Lisinopril was superior) on the full dataset to 0.11 mmHg (correctly favoring Amlodipine) when looking only at adherent patients.
- Predictive Degradation & Disparities: As the percentage of non-adherent data in the training set increased, model performance dropped by up to 5% in AUROC, and the false positive rate disparity between Black and non-Black patients doubled.
- Filtering Works: Removing the non-adherent data from the training set consistently improved test AUROC and slashed fairness disparities across multiple sample sizes.
Limitations and Future Work
While utilizing LLMs to unlock unstructured clinical notes is a major step forward, the authors note several limitations:
- Documentation Bias: The pipeline can only detect non-adherence if a patient reports it and a clinician explicitly writes it down. The true non-adherence rate is likely higher.
- Generalizability: LLM performance can shift across different hospital systems or changing patient populations, meaning automated extraction prompts must be continuously scrutinized.
- Data Inefficiency: Simply deleting non-adherent patient records wastes valuable clinical data. The authors suggest that future work should focus on developing robust ML models that can explicitly incorporate or mathematically impute non-adherence severity rather than just filtering it out.