Do Flexible Clinical Models Fail Out of Site Because They Rebuild Missing Social Context?

Simple linear risk scores often transfer to new hospitals better than deep networks or boosted trees. Clinical machine learning keeps finding this, and nobody has explained it well. A six-variable linear survival model for liver transplant outcomes went from slightly worse than DeepHit inside the United States registry to clearly better on a Canadian hospital cohort. Over the same shift, the deep model's concordance fell from 0.828 to 0.749 (Predicting Long-Term Allograft Survival in Liver Transplant Recipients). The usual explanation is "overfitting to site artifacts," which names the symptom without the cause. We propose a specific, testable cause. Health records rarely record a patient's social circumstances, such as income, housing, food access and transportation. Flexible models partly reconstruct this missing social context from clinical proxies, for example lab patterns, visit timing and insurance-linked codes. The mapping from those proxies to social context differs from one hospital and population to the next, so the reconstructed signal breaks when the model moves. A linear model has less capacity to rebuild that context and therefore loses less when the mapping changes.

The hypothesis is only meaningful relative to a causal story about where social determinants sit. Social context can be a shared cause of both features and outcome, a pathway through which race or region affects health, or an upstream cause of the sensitive attribute itself. Each reading implies a different remedy. Under one, we should strip the reconstructed signal out. Under another, we should measure social determinants directly and keep the signal. So the proposal does two things. It builds a diagnostic that measures how much of each model's out-of-site loss runs through reconstructed social context. It then checks which conclusions survive across a small set of competing causal graphs, rather than trusting any single one.

Core Claim

The claim has three parts, any of which can fail. First, the amount by which a flexible model beats a linear model at reconstructing a social determinant $S$ from clinical features $X$ predicts how much worse the flexible model transfers. Call this the excess proxy capacity: $\Delta R^2 = R^2_{\text{flex}}(S \mid X) - R^2_{\text{lin}}(S \mid X)$. Its effect should scale with how much the $X \to S$ relationship changes between source and target sites. Second, giving both model classes the measured $S$ should shrink the out-of-site gap between them, because the flexible model no longer needs the unstable reconstruction. Third, the practical recommendation from the first two results (remove $S$, measure $S$, or prefer a linear model) should be reported only where it holds across every candidate graph we consider. Where the graphs disagree, we report the disagreement instead of a recommendation.

To our knowledge the closest work does not ask this question. When Worlds Collide compares logistic regression with a three-layer network while enforcing fairness across several expert-supplied causal graphs. It finds the linear model catches up as constraints loosen, but it studies fairness on COMPAS and LSAC, not transfer across clinical sites, and it uses no social-determinant data. Accounting for racial bias and social determinants of health in a model of hypertension control shows that social features alone carry most of the signal for uncontrolled hypertension, with XGBoost and a robustly trained logistic regression nearly tied. That study is single-site and associational, so it cannot say whether the near-tie survives a move to another hospital. Our contribution is the mechanism linking the two observations, plus a test that can falsify it.

Research Program

The work starts with semi-synthetic simulation, where the truth is known. We build structural causal models, meaning systems of equations that say which variables cause which. In each one, a latent social variable $S$ drives clinical features nonlinearly, for example deprivation affecting lab values only above a threshold. $S$ also affects the outcome. We vary three things independently: the $X \to S$ mapping across simulated sites, the $S \to Y$ effect across sites, and where $S$ sits in the graph relative to a sensitive attribute $A$. The positions are root cause of $A$, confounder of $A$ and $Y$, or mediator of $A$'s effect. This lets us check whether $\Delta R^2$ multiplied by the mapping shift tracks the flexible-versus-linear transfer gap when the mechanism is present, and stays near zero when it is not. We will also test the reverse case, where nonlinear physiology is real and stable. There, the flexible model should transfer better, as the hinge effect found by MuARS in cervical radiculopathy recovery suggests it can (Clinical predictive modelling of post-surgical recovery).

We then move to real cohorts in which $S$ is at least partly observed. On MIMIC-III, social determinants come from the MIMIC-SBDH discharge-summary annotations, and we use care-unit and admission-period splits as shifts. Because extractors fail many negation and attribution tests, we treat the labelled spans as ground truth and the extracted values as noisy measurements. Measurement error then becomes an explicit variable in the analysis. On the emergency-care benchmark MC-BEC, the revisit task is where the authors argue the driving mechanisms lie outside the hospital, and we use time-based splits. Where data-use agreements allow, we will link area-level indices by geography to the transplant registry setting of Gao et al., following the zip-code linkage of Roth et al.. That setting provides held-out OPTN regions and an external cohort, and it is the setting where the paradox was originally documented. The BMC hypertension cohort with THRIVE screening is the most direct test, but it requires a collaboration.

For the causal-graph component, we write down three to four candidate graphs per cohort, explicitly including graphs where structural deprivation is a parent of the sensitive attribute. This follows the argument in Algorithmic Fairness amid Social Determinants and Position: Beyond Sensitive Attributes that treating race as a parentless root node is itself a form of misspecification. Under each graph we compute two quantities for the linear and the flexible predictor. One is the transported risk the graph implies. The other is counterfactual unfairness. Counterfactual unfairness has a closed form for linear structural equations and is estimated by sampling otherwise. For the part of $S$ that remains unmeasured, we apply the correlation-budget sensitivity analysis of The Sensitivity of Counterfactual Fairness to Unmeasured Confounding. That analysis holds the graph fixed, and we vary the graph around it. The output for each cohort is a statement of which conclusions hold under every candidate graph. We expect the main deliverable to be a cheap diagnostic: a small social-determinant-linked sample at a target site is enough to estimate $\Delta R^2$ and the mapping shift before a flexible model is deployed.

Baselines

The naive reference point is a pooled flexible model, gradient-boosted trees for binary outcomes and DeepHit for survival, trained on clinical features only and evaluated on the held-out site. It shows the size of the collapse we are trying to explain.

The strongest existing competitor is the sparse regularized linear model the paradox literature recommends. For survival this is an elastic-net Cox model in the style of MAS (Gao et al.). Gao et al. report a TDCI of 0.847 out of distribution against DeepHit's 0.749. For binary outcomes it is logistic regression trained with distributionally robust optimization, which Hu et al. report at 73.42% AUC against XGBoost's 74.49% within BMC. For the MC-BEC revisit task, the reported AUPRC is 0.11 to 0.24 across models. Every model gets the same splits, the same feature sets, and the same hyperparameter search budget, chosen on source-site validation data only. Our explanatory claim does not need a new model to beat these numbers. The adaptive recommendation, which picks the model class or adds measured $S$ depending on the diagnostic, counts as a win only if it matches the linear baseline where the mechanism is active and beats it by a confidence-interval margin where real nonlinearity is stable.

Two ablations isolate the key ingredient. In the first, we add measured $S$ to the flexible model. This is the direct intervention on the hypothesized channel. In the second, we train a flexible model whose $X \to S$ reconstruction capacity is restricted, using an additive model with no feature interactions. This separates "nonlinear reconstruction of social context" from "nonlinearity in general." For the fairness side, the comparison is Multi-World Fairness from When Worlds Collide, run with the same candidate graphs, so that any difference comes from adding social determinants and site shift and not from a different set of graphs.

Why not just…?

Why not just add the social-determinant features to XGBoost and move on? This is the most serious threat, and it is also our second prediction. If adding measured $S$ closes the gap whatever graph is assumed, the graph analysis turns out to be unnecessary for this question, and we will say so. Two things keep the full program worthwhile. Measured $S$ is sparse and noisy: Z-code use is below 2% (Enriching Real-world Data with Social Determinants of Health), and extractors fail 44.5% of negation tests on one category. The residual unmeasured part still needs the sensitivity analysis. And whether including $S$ is appropriate depends on whether it mediates a sensitive attribute's effect, which is a graph question.

Why not just always deploy the linear model? The accuracy plateau in Liew et al. makes this tempting. But the same study finds real threshold effects that linear models underfit. A linear model can also reconstruct $S$ linearly, and that reconstruction can break too. The diagnostic says when the linear choice is safe and when it gives up stable signal, and the stable-nonlinearity simulation tests exactly that case.

Why not just train for worst-case performance across sites? Robust training across sites needs several labelled training sites and does not say why transfer fails. Hu et al.'s distributionally robust logistic regression is already one of our baselines. If site-robust training of a flexible model matches the adaptive recommendation everywhere, the mechanism is still explained but the practical remedy adds nothing. We will report that outcome as such.

Why not use a graph-free fairness model like FairPFN? FairPFN removes the need to specify a graph, but it assumes the protected attribute has no parents. Here that is precisely the assumption in question. It has also not been tested on clinical transfer.

Decisive Checks

The hypothesis is falsified if, across the real-cohort shifts, excess proxy capacity times mapping shift fails to correlate with the flexible-minus-linear transfer gap. It is also falsified if adding measured $S$ leaves that gap unchanged, or if the interaction-restricted ablation collapses as badly as the unrestricted flexible model. The graph component counts as earning its place only if, on at least one cohort, the candidate graphs disagree on whether $S$ should be included and that disagreement changes the subgroup error rates by more than their confidence intervals.