Telling Drivers from Shields in Fragmented Health Records

A blood marker that is high in sick people can play three different roles. It can cause the disease (a driver). It can be debris the disease leaves behind (a passenger). Or it can be the body's attempt to fight the disease (a shield). The treatment consequences are opposite: lowering a driver helps, lowering a passenger does nothing, and lowering a shield can make patients worse. Single-visit population surveys such as NHANES cannot separate these roles, because they measure marker and disease at the same moment. Hospital records do follow patients over time, but badly. Patients move between hospitals and vanish from the record. Tests are ordered mostly when a clinician is already worried. Diagnosis codes mark billing events, not the moment disease began.

We propose to learn, from these fragmented records, a continuous-time model of how marker and disease push on each other, and to read the role of each marker off the signs of those pushes. A driver raises the rate of damage. A passenger is raised by damage but has no effect on it. A shield is raised by damage and then lowers the rate of damage, which is a feedback loop. Two additions make this workable on real records. The first is an explicit model of when tests happen, so that a long silence in the record is not read as physiological calm. The second is a constraint from age-stratified survey snapshots. These snapshots describe the healthy, rarely tested majority that hospital records barely see.

Core Claim

The driver/passenger/shield ambiguity is a question about the signed cross-effects in a dynamical system, and one of the three roles is inherently cyclic. Current continuous-time causal discovery methods cannot answer this question on clinical data, for three separate reasons that this proposal addresses together.

The first reason is acyclicity. Causal Interpretable Progression Trajectory Analysis of Chronic Disease fits neural ordinary differential equations (learned vector fields that describe how a state changes over time) under an acyclic-graph penalty. That penalty rules out a shield by construction.

The second reason is how missing observations are treated. Consistency of mechanistic causal discovery in continuous-time using Neural ODEs assumes fully observed dense trajectories. CUTS: Neural Causal Discovery from Irregular Time-Series Data handles missing points but treats missingness as random or periodic.

The third reason is the testing pattern itself. Nonstationary Gaussian Process Regression for Evaluating Repeated Clinical Laboratory Tests shows that clinical undersampling outweighs oversampling by an order of magnitude, so volatile periods look falsely smooth. This matters most for shields. A shield surges exactly when a patient decompensates, and that is when sampling lags.

Our claim is that a model combining three pieces can recover marker roles that the existing methods misassign, especially shields. The pieces are a cycle-permitting signed vector field, a state-dependent observation process, and a survey-snapshot constraint. On simulations with known ground truth we expect the existing methods to misassign shields systematically as drivers.

Research Program

Let $z(t)$ be a patient's latent physiological state. It contains the candidate marker $x$ and a damage variable $D$ anchored to labs and outcomes. Let $s$ be static covariates such as age and sex. The state follows

$$dz = f_\theta(z, s)\,dt + \sigma\, dW,$$

where $f_\theta$ is a neural vector field with a sparsity penalty on its input-output connections but no acyclicity constraint, and $dW$ is Brownian noise. Lab tests arrive as a point process with intensity $\lambda_\phi(z(t), u(t))$, where $u(t)$ holds administrative context such as encounter type. Because test timing depends on the latent state, a gap carries information: it can mean the patient was stable, or it can mean the patient was untested. Record fragmentation from migration gets its own separate "under observation" indicator. When a patient leaves the network, observation stops but the biology keeps running. The likelihood therefore integrates over latent trajectories through unobserved intervals instead of truncating them.

Survey data enter through a population constraint. Write $p_\theta(z \mid a)$ for the distribution of states that the model produces at age $a$ when simulated over a birth-cohort-like population. Write $q_{\text{survey}}(z \mid a)$ for the survey-weighted NHANES distribution at age $a$. We add

$$\mathcal{L}_{\text{snap}} = \sum_a \mathrm{MMD}\big(p_\theta(\cdot \mid a),\, q_{\text{survey}}(\cdot \mid a)\big),$$

where MMD (maximum mean discrepancy) is a kernel distance between two sample sets. The survey terms are reweighted to the demographic mix of the record cohort.

We are explicit about what this term can and cannot do. Snapshots alone cannot identify direction. The term's job is to pin down the vector field in low-risk regions of state space where hospital records have almost no data because healthy people are rarely tested. Without it, flows in those regions are extrapolated freely, and the sign of $\partial f_D/\partial x$ near baseline health is poorly determined.

Roles are read from the signs of the two cross-derivatives, averaged over the region of state space where patients actually are:

  • driver: $\partial f_D/\partial x > 0$
  • passenger: $\partial f_x/\partial D > 0$ with $\partial f_D/\partial x \approx 0$
  • shield: $\partial f_x/\partial D > 0$ with $\partial f_D/\partial x < 0$

Unmeasured confounders are likely, so we do not claim point identification. Following the ensemble-bounds idea of Causal Interpretable Progression Trajectory Analysis of Chronic Disease, we train an ensemble of models and report a role only when the sign interval excludes zero. Otherwise we output "undetermined." Abstaining is part of the method and is scored.

Baselines

The naive reference point is the survey-only epidemiological pipeline of Fusing Data Mining, Machine Learning and Traditional Statistics to Detect Biomarkers Associated with Depression. That pipeline runs multiple imputation, boosted-tree filtering, and survey-weighted logistic regression. It produces associations such as total bilirubin at OR 0.12, but its authors state it cannot assign direction. We turn it into a role classifier by labeling positive associations "driver" and inverse associations "shield." This mirrors how such findings are often read in practice. We also report chance and an "always driver" rule.

The strongest existing method for signed continuous-time structure is CTP from Causal Interpretable Progression Trajectory Analysis of Chronic Disease. It reports a reconstruction MSE of 0.20 on ADNI and counterfactual errors 4 to 6 times lower than non-causal neural ODEs. Its acyclicity constraint means it can at best call a shield a driver or a passenger.

For irregular data we compare against CUTS from CUTS: Neural Causal Discovery from Irregular Time-Series Data. CUTS reports edge AUROC 0.9705 on Lorenz-96 with 60% random missingness, where GRIN-imputed PCMCI and Neural Granger Causality stayed below 0.78. We also compare against NGM from Consistency of mechanistic causal discovery in continuous-time using Neural ODEs, which reports TPR above 0.95 at $d=100$ on Rössler. We first reproduce these published numbers on their own benchmarks to confirm our implementations are faithful.

All methods then receive the same fragmented trajectories and the same NHANES data where they can use it. They get the same latent dimension and the same hyperparameter search budget on a shared validation split. For a baseline to be "beaten," our model must show higher macro-F1 over the three roles on held-out simulated systems. It must also show a lower shield-to-driver misclassification rate, with ensemble intervals that do not overlap. Better reconstruction error alone does not count.

We also run three ablations that each remove one key ingredient. The first reinstates the acyclicity penalty. The second replaces the state-dependent test intensity with a constant, which amounts to random missingness. The third drops $\mathcal{L}_{\text{snap}}$. The central prediction is that the observation-process ablation hurts shields most, and that removing the snapshot term hurts near-baseline sign recovery most.

Why not just…?

Why not just run CTP or NGM on the hospital records and ignore surveys and test timing? This is the most natural move, and we include it as a baseline rather than dismiss it. The evidence against it is structural. CTP's acyclicity forbids the shield pattern outright. NGM assumes full observability. Lasko's rate-space analysis shows that clinical gaps coincide with high volatility, which is the regime where a shield's protective effect happens. The experiment that settles this is the shield-heavy simulation: if CTP plus a cycle-permitting relaxation matches our model there, the observation process and snapshot term are unnecessary and we will say so.

Why not just impute the gaps and then run standard causal discovery? CUTS already tested this two-stage recipe. GRIN followed by PCMCI or Neural Granger Causality stayed below 0.78 AUROC on Lorenz-96 at 60% missingness, versus 0.9705 for joint modeling. NGM likewise reports that interpolate-then-differentiate pipelines introduce structural errors. Informative sampling should make imputation worse still, because an imputer fills sick-period gaps with values drawn from tested, and therefore sicker, neighbors. We include this pipeline anyway, because on the real record cohort it is cheap and may be competitive for passengers.

Why not just discretize into monthly bins and run Granger causality with inverse-intensity weights to correct for test ordering? This is a real threat, because weighting is the standard epidemiological fix for informative observation. However, NGM shows that discrete Granger methods suffer false-discovery inflation when sampling becomes sparse. Weighting also corrects bias in estimated effects only if the ordering process depends on observed history. Ordering driven by an unrecorded clinical impression violates that condition. We will run a weighted binned baseline under two simulation regimes, one where test intensity depends only on past observed labs and one where it depends on the latent state. We expect weighting to be adequate in the first regime and to fail in the second. If it is adequate in both, the point-process component is not needed.

Why not just use cross-sectional mediation analysis in the survey? As noted for Association among obesity, insulin resistance, and depressive symptoms: a mediation analysis, cross-sectional mediation cannot rule out reverse causation. A shield produces an inverse cross-sectional association that is indistinguishable from a driver of protection.

Proposed Experiments

The primary testbed is simulation with known roles. We extend the kinetic systems used by CTP (Hao, Zheng, MM-25, MM-50) by planting one driver, one passenger, and one shield loop per system. We then corrupt the trajectories in three ways:

  • state-dependent test intensities calibrated so that undersampling exceeds oversampling by roughly tenfold, matching Lasko's rate-space finding;
  • migration dropouts that end observation for random fractions of patients;
  • an unmeasured confounder.

Survey-style snapshots are drawn from the same simulator at uniform ages. We report role macro-F1, shield recall, abstention rate, and calibration of the sign intervals, sweeping the undersampling ratio and the migration fraction. There is no reported result on Lacuna for role classification on any benchmark, so all numbers here will be new. As a sanity check, we reproduce the CUTS and NGM published figures on Lorenz-96 and Rössler.

Real-data evaluation uses a multi-institution record source of the INPC type described in Predicting onset of complications from diabetes: a graph based approach. That source spans over 800,000 patients and 20 years, and its authors had to restrict analysis to patients with continuous second-year records. We pair it with NHANES cycles 1999–2018 and use the marker families that the survey literature leaves ambiguous: uric acid and bone density, the prognostic nutritional index and heart failure, and insulin-resistance surrogates and osteoarthritis.

Real data have no ground-truth roles, so the decisive checks are predictive and falsifiable. The first is forecasting of the first labs after a patient returns from a migration gap. A model that reads gaps as calm should systematically underpredict change. The second is agreement with a small clinician-curated set of marker–outcome pairs whose direction has been established by randomized evidence, fixed before any model is fit. The third is stability of assigned roles across institutions with different test-ordering cultures. A shield assignment that flips when ordering intensity changes would indicate that the model is still learning the testing pattern rather than the biology.