Drugs that switch on AMPK, the cell's energy sensor, look remarkably protective in the lab. In mice, activating AMPK in the healthy liver around a tumor lets animals with liver cancer live normal lifespans. Metformin, the most widely prescribed drug that activates AMPK, is repeatedly reported to go with better cancer outcomes in people. The human evidence, however, comes from electronic health records (EHRs). These records are scattered across clinics, pharmacies and insurers. A prescription filled elsewhere, a cancer diagnosed at another hospital, or a patient who drifts out of the network simply vanishes from the data.
This note proposes to measure how much of the apparent human benefit of AMPK activators is produced by that scattering. It also builds an effect estimator that corrects for the three distinct ways missing records bias a drug comparison. Validation uses patients whose EHRs are linked to insurance claims: the fuller linked record serves as a reference answer against which the EHR-only estimate can be scored.
Core Claim
Fragmented records bias an observational drug comparison through three separate channels. The first is exposure misclassification: gaps in dispensing that exist only in the data look like stopping the drug. The second is outcome under-ascertainment: an event diagnosed out of network is recorded as no event. The third is informative loss to follow-up: patients leave the network for reasons tied to their health. Standard corrections address only the third. Metformin is unusually exposed to all three. Continuous use requires regular care, which produces more captured records. The drug is also stopped when kidney function falls, and kidney function is measured sparsely.
We claim that a doubly robust estimator can remove bias that censoring weights alone cannot. "Doubly robust" means the estimate stays unbiased if either the model of who gets treated or the model of outcomes is correct. To do this, the estimator needs a model of which true events and exposures get captured in the EHR, learned on a claims-linked subset. The concrete test case is incident hepatocellular carcinoma (the most common primary liver cancer) and liver decompensation in adults with type 2 diabetes. We compare new users of metformin against new users of a non-AMPK comparator, such as DPP-4 inhibitors or sulfonylureas.
The biology motivates this choice. Glucose starvation mimetic aldometanib… showed in mice that protection against liver cancer required AMPK in the non-cancerous host liver, with median survival of about 805 days against about 796 for tumor-free controls. That makes the liver the organ where a host-mediated AMPK effect should first be visible in humans. An ATF3 Inducer Ameliorates MASLD… and population data on MAFLD place fatty liver disease on the same metabolic axis. Glioma, the setting of the metformin review by Ma et al., is too rare in diabetic EHR cohorts to support a first test, so we keep it as a later transfer target.
Relation to Prior Work
The research file contains no study that joins AMPK pharmacology with methods for fragmented records. The obvious bridge would be a target trial emulation of metformin run with a modern causal survival model. That study is itself unpublished in the file, but it would inherit the very bias we want to measure. We therefore make fragmentation the object of study rather than a nuisance.
Three papers motivate the gap. The impact of EHR data continuity on prediction model fairness linked OneFlorida+ EHRs to Medicaid and Medicare claims. It found that only about a quarter of type 2 diabetes patients had a year of records before diagnosis, and that models trained on high-continuity patients degrade on low-continuity ones, with higher false positive rates for Black and Hispanic patients. It studied prediction, not treatment effects, and proposed no correction. Thomas et al. modeled progression of diabetes complications in the Indiana Network for Patient Care (INPC) under irregular visits. They speculated that unrecorded medications explained their false positives but never represented drug exposure. Lasko showed that repeated lab tests are undersampled far more often than oversampled. As a result, fast changes are smoothed away, which matters because metformin stopping is triggered by kidney-function declines that fall between tests.
Three further papers supply methods we reuse. Dynamic Survival Transformers (DynST) pairs a sequential Transformer outcome model with augmented inverse propensity weighting (AIPW) to estimate effects on restricted mean survival time. It was tested only on semi-synthetic ICU data with simulated treatments. SurvLatent ODE encodes irregular measurements into continuous-time latent states. CRL-MMNAR treats a missing test as a signal of clinician intent. Its setting is modalities missing within an ICU stay, not events missing because they happened in another health system.
One paper constrains the design. Weissler et al. warn that observational machine learning rarely meets regulatory evidentiary standards. We take that seriously, so the deliverable is a bias audit and a validated estimator rather than a treatment claim.
Research Program
The estimand is the difference in five-year restricted mean time free of hepatocellular carcinoma between metformin initiators and comparator initiators. The cohort is adults with type 2 diabetes and recorded fatty liver disease, with time zero at the first dispensing.
We write $Y$ for the true outcome indicator and $R_Y$ for whether an outcome that occurred is captured in the EHR. We write $\tilde A(t)$ for the true exposure history and $A^*(t)$ for the EHR-visible one. The capture sensitivity is defined as
$$s(x,t) = P(R_Y = 1 \mid Y = 1, X = x, t),$$
that is, the probability a true event is recorded given covariates $x$ and calendar time $t$. We learn $s$, together with a model of $P(\tilde A \mid A^*, x)$, on the claims-linked subset, where both the EHR view and the fuller claims view exist.
These capture models then enter a DynST-style AIPW estimator in two places. Outcome contributions are reweighted by $1/s$. Exposure histories are handled by multiple imputation from the misclassification model, so a dispensing gap that exists only in the data is not read as a real stop.
The key question is transport. The capture models must apply to patients without claims linkage, which is the situation most health systems are in. We therefore condition them only on EHR-observable continuity signals: time since the last encounter, the fraction of expected refills observed, and the pattern of which tests are ordered and which are absent, in the spirit of CRL-MMNAR's missingness embeddings.
Kidney function is the main time-varying confounder. We reconstruct it between sparse measurements with a continuous-time latent model in place of carrying the last value forward. PRISM reports that carrying values forward adds noise to patient representations.
Real linked data provide only a reference answer, not the truth, so we add a semi-synthetic layer. We keep real OneFlorida+ covariates and real capture patterns, simulate outcomes with a known treatment effect, and then pass them through the empirically learned fragmentation. This separates bias from fragmentation from bias from model misspecification.
We also exploit a second, natural fragmentation experiment in INPC, a regional exchange that aggregates many institutions. Restricting each patient to the records of a single health system recreates single-site fragmentation, and the full exchange record acts as the reference.
Baselines
The naive reference is an active-comparator new-user Cox model fit on EHR-only data. It adjusts for baseline covariates and treats EHR gaps at face value. This is what most published metformin–cancer analyses resemble, so its distance from the linked reference is the headline bias measurement.
The strongest existing competitor is DynST with AIPW, as described in Dynamic Survival Transformers. We add inverse probability of censoring weights for leaving the network, which is the standard treatment of loss to follow-up. On its semi-synthetic MIMIC-III benchmark, DynST reached a mean absolute error of 11.19, against 16.04 for a Cox model given the true simulation parameters and 11.42 for a static survival Transformer. No reported result was found on Lacuna for DynST, or any method in the file, on real outpatient drug exposures or on OneFlorida+ or INPC effect estimation. There is likewise no reported result on Lacuna for the metformin–liver-cancer effect in these cohorts.
For fairness, all methods receive the same cohort, the same covariates, the same kidney-function reconstruction and the same hyperparameter search budget. Hyperparameters are tuned only on semi-synthetic replicates, never against the real linked reference.
Two ablations isolate the proposal's ingredients. The first drops the outcome-capture correction and the second drops the exposure-misclassification correction. Each shows how much of the gain comes from the channel it removes. A third ablation replaces the continuous-time kidney-function model with carrying the last value forward.
Beating the strongest baseline has a specific meaning. On the semi-synthetic layer, the method must reduce absolute bias in the restricted mean survival difference and keep 95% interval coverage near nominal. On the real linked data, it must move the EHR-only estimate closer to the linked reference than censoring-weighted DynST does, in both the INPC and OneFlorida+ settings.
Why not just…?
Why not just restrict the analysis to high-continuity patients? For prediction, the OneFlorida+ continuity study shows this discards most patients and worsens performance for Black and Hispanic patients. For effect estimation, however, restriction is only biased if continuity modifies the drug's effect or is caused by the drug. That is a real possibility, but it has not been demonstrated. We therefore run the restricted analysis as an explicit arm. If it matches the linked reference as well as our estimator does, we will report that the simple fix suffices, and the contribution narrows to the bias audit.
Why not just add censoring weights for leaving the network? Censoring weights correct follow-up that stops. They do not correct an event that happened during apparent follow-up but was recorded elsewhere, nor a refill filled at an out-of-network pharmacy. Both kinds of error persist while the patient still looks observed. The two correction ablations measure exactly how much residual bias censoring weights leave behind. If that residual is negligible, the extra machinery is not justified, and we will say so.
Why not just run the study entirely in claims-linked data? Where linkage exists, the linked analysis is the better study, which is why we use it as the reference. But linkage covers mainly publicly insured patients, and most institutions have none. The question that matters in practice is whether EHR-only analyses, the common case, can be trusted. The transport test answers it: the capture model is trained on linked patients and evaluated on held-out linked patients whose claims are hidden from the model.
Proposed Experiments and Decisive Checks
The first experiment is the bias audit. In OneFlorida+ and in INPC with single-system restriction, we compute the gap between the EHR-only and the fuller-record metformin effect under the naive Cox model and under censoring-weighted DynST. We stratify the gap by race and ethnicity, and by the continuity measure (mean proportion of encounters captured) from the continuity study. A large gap that differs by subgroup confirms the premise. A negligible gap is a publishable negative result in its own right, because it would mean fragmentation is not driving the reported metformin effect.
The second experiment is semi-synthetic. We plant effects of known size, including zero, and compare bias and coverage across all baselines and ablations.
The third is a set of falsification checks. We pre-specify negative-control outcomes with no plausible AMPK pathway, such as accidental injury, which should show no effect after correction. We also compare metformin against a second non-AMPK comparator, which should agree with the first comparison.
The decisive result would take one of two forms. The corrected estimate tracks the linked reference across both networks and passes the negative controls while the baselines do not, in which case the estimator is validated. Or the apparent liver-cancer protection shrinks toward zero once capture is corrected, which would tell biologists that the aldometanib result has not yet been mirrored in human data at all.
References
- Glucose starvation mimetic aldometanib removes immune barriers permitting mice with hepatocellular carcinoma to live to normal ages
- An ATF3 Inducer Ameliorates Metabolic Dysfunction-Associated Steatotic Liver Disease Through the AMPK and PKA Pathways
- Associations between intake of different types of vegetables and metabolic dysfunction-associated fatty liver disease: a population-based study
- Advances in the treatment of glioma-related signaling pathways and mechanisms by metformin
- The impact of electronic health records (EHR) data continuity on prediction model fairness and racial-ethnic disparities
- Predicting onset of complications from diabetes: a graph based approach
- Nonstationary Gaussian Process Regression for Evaluating Repeated Clinical Laboratory Tests
- Dynamic Survival Transformers for Causal Inference with Electronic Health Records
- SurvLatent ODE : A Neural ODE based time-to-event model with competing risks for longitudinal data improves cancer-associated Deep Vein Thrombosis (DVT) prediction
- Causal Representation Learning from Multimodal EHRs under Non-Random Modality Missingness
- The role of machine learning in clinical research: transforming the future of evidence generation
- PRISM: Mitigating EHR Data Sparsity via Learning from Missing Feature Calibrated Prototype Patient Representations