Is Cross-Hospital Failure in Length-of-Stay Prediction a Dispersion Shift?

When a model that predicts how many days a patient will stay in intensive care is moved from one hospital to another, its accuracy drops. The usual explanation is that the patients differ, so the model's average prediction is off. This proposal tests a different explanation: much of the damage comes from a change in the spread of outcomes. Hospitals differ in discharge rules, bed pressure and step-down capacity. These change how tightly stays cluster around their expected value, and how much probability piles up at boundary values such as "discharged within a day." Most models used today cannot represent such changes cleanly. Some treat stay length as a smooth continuous number. Others use count distributions whose variance is locked to the mean.

The project builds and tests a simple idea. Predict a full distribution over whole-day stay lengths with a model that has separate outputs for the expected value and for the dispersion. When deploying at a new hospital, keep the expected-value part fixed and re-fit only the small dispersion part, using a few hundred labeled local stays. If the dispersion-shift explanation is right, this cheap local adjustment should recover most of the lost calibration. If it is wrong, the experiments will show that cleanly as well. Either result tells practitioners whether count-aware outputs matter for multi-site deployment, and at what level of time resolution they stop mattering.

Core Claim

The claim is that cross-center degradation in intensive care unit (ICU) length-of-stay (LoS) prediction contains a large, separable component of dispersion and boundary-mass shift. Adapting a dispersion-only output head on a small target-site sample corrects this component better than three alternatives given the same labels: recalibrating a continuous model, fully fine-tuning a model, or fine-tuning a histogram classifier.

A second, falsifiable claim concerns the time grid on which stay length is measured. The advantage of a discrete count likelihood over a continuous Gaussian one should shrink as that grid gets finer. Coarse whole days give low counts with heavy mass at 0 and 1. Six-hour blocks and hours give high counts, where a Gaussian approximation is known to become acceptable. Locating that crossover empirically addresses the open question, raised in Fully Heteroscedastic Count Regression with Deep Double Poisson Networks, of where discrete formulations become unnecessary.

Why this intersection, and what is already done

Two bodies of work motivate the gap without filling it.

Yet Another ICU Benchmark (YAIB) provides the cross-center setting. It harmonizes five ICU databases (MIMIC-III, MIMIC-IV, eICU, HiRID, AUMCdb) and runs train-on-one, test-on-another experiments. It reports that "even the best models had a Mean Absolute Error of nearly two days" on LoS. It also finds that training on the multi-hospital eICU database transfers better than training on single-center MIMIC. YAIB, however, treats LoS with standard continuous regression and never examines distributional shape across sites.

The Deep Double Poisson Network (DDPN) papers, Fully Heteroscedastic… and Flexible Heteroscedastic Count Regression with Deep Double Poisson Networks, supply the method. These networks output a mean and an inverse-dispersion parameter for a Double Poisson distribution, which can represent both under- and over-dispersion. They report the best mean absolute error (MAE) and continuous ranked probability score (CRPS) on a single-site Microsoft LoS dataset. Their only shift experiment is extreme out-of-distribution detection: Amazon reviews versus Bible verses, with AUROC (area under the ROC curve) of 0.887 for DDPN, 0.840 for a Gaussian model, and 0.330 for Poisson. So the obvious combination, a count-aware model evaluated across real hospitals with graded shift, has not been run. The proposal goes further than "run DDPN on YAIB" in two ways: it tests a specific adaptation mechanism, and it tests a specific granularity prediction.

A classical statistics literature constrains the design and predicts where effects should appear.

Together these predict that continuous models should be worst exactly at short stays. They also predict the failure should fade at fine time grids. We therefore report boundary-specific calibration and sweep granularity rather than reporting only aggregate MAE.

Feature-side robustness methods address a complementary problem. Compositional Feature Alignment makes the class head and the domain head orthogonal. Adaptive-CaRe penalizes reliance on non-causal inputs. Both act on the inputs and representation, and both are validated only on classification. Our intervention acts on the output distribution. These approaches can be combined; we include one as a secondary comparison rather than treating them as competitors.

Research Program

The model. Each stay length $y \in \{0,1,2,\dots\}$, measured in units of a grid width $\Delta$, is modeled with a Double Poisson likelihood. The model is a shared encoder $f_\theta$ over the first 24 hours of YAIB-harmonized ICU data, followed by two heads:

  • a mean head $\mu = g_\phi(f_\theta(x))$;
  • a dispersion head $\gamma = h_\psi(f_\theta(x))$.

Under this distribution the variance is approximately $\mu/\gamma$. Values $\gamma>1$ mean under-dispersion (stays cluster more tightly than Poisson), and $\gamma<1$ means over-dispersion.

Training. The model is trained on a source site. We use the stabilized β-DDPN variant, because the plain negative log-likelihood is reported to have convergence problems (Fully Heteroscedastic…).

Adaptation. At a target site with $n$ labeled stays, everything is frozen except the dispersion head, plus an optional scalar offset $b$ on $\log\gamma$. These are fit by

$$ \min_{\psi,\,b}\; -\frac{1}{n}\sum_{i=1}^{n} \log p_{\mathrm{DP}}\!\left(y_i \,\middle|\, \mu_i,\; e^{b}\,h_\psi(f_\theta(x_i))\right), $$

where $p_{\mathrm{DP}}$ is the Double Poisson probability of the observed count $y_i$, and $\mu_i$ is the frozen source mean for patient $i$. The logic is simple. If target error is mainly a dispersion problem, this low-capacity fit should fix calibration with very few labels and without harming the source-learned ranking of patients. A mirror condition adapts only the mean head (or a mean offset). Comparing the two conditions gives a direct decomposition: how much of the cross-site CRPS gap each kind of shift accounts for.

Analyses.

  1. A per-site characterization of empirical dispersion within strata of predicted mean. This asks whether the variance-to-mean relationship actually differs between, say, HiRID and eICU, before any modeling claim is made.
  2. A boundary analysis. For each site pair, we compare the predicted probability of stays at most 1 day long, and at most 2 days long, against observed frequencies.
  3. A granularity sweep at $\Delta \in \{1\text{ day}, 6\text{ h}, 1\text{ h}\}$, run with identical encoders.

Controls for harmonization artifacts. YAIB warns that harmonization artifacts can masquerade as transfer effects. We therefore also report dispersion statistics computed on the raw outcome alone, independent of any features, for each site.

Baselines

Naive reference points. The first "do nothing" baseline is the source-trained model applied unchanged at the target. The second is a feature-free predictor that outputs the target site's empirical marginal LoS distribution, estimated from the same $n$ labels. A method that cannot beat the marginal at small $n$ is not useful.

Strongest existing method. This is YAIB's best continuous LoS regressor, trained with YAIB's pipeline and cohort definitions (Yet Another ICU Benchmark), using LightGBM or the Transformer, whichever is better on source validation. Its reported reference number is an MAE of "nearly two days" within dataset. For cross-center LoS MAE, we found no reported result on Lacuna, because YAIB's transfer heatmaps for this task were not extracted. We will regenerate these numbers with YAIB's own code before adding anything. Because a point regressor has no distribution, we give it a distribution in two ways: a heteroscedastic Gaussian ensemble on the same encoder, and a log-normal variant fit on $\log(y+1)$. This gives it a fair CRPS and coverage comparison.

Discrete competitors. These are Poisson and Negative Binomial heads on the same encoder. They test whether the flexible dispersion matters, or whether any count likelihood suffices.

Adaptation competitors. Each is given exactly the same $n \in \{50, 200, 1000\}$ target labels and the same hyperparameter search budget:

  • full fine-tuning of the DDPN;
  • variance-only refitting of the Gaussian ensemble, which is the continuous analogue of our method;
  • split-conformal recalibration of the Gaussian intervals;
  • a histogram classifier over day bins whose final layer is refit on the target.

Key ablation. The ablation that isolates the proposal's key ingredient is dispersion-only versus mean-only versus both-head adaptation on the identical frozen encoder.

Fairness and success criteria. Every model uses the same encoder architecture, the same YAIB cohorts and splits, five seeds, and equal tuning trials. Beating the field means a lower target-site CRPS and better boundary calibration than Gaussian variance-only refitting and conformal recalibration at $n \le 200$, averaged over all twenty ordered site pairs. It also requires MAE no worse than the YAIB baseline.

Why not just…?

Why not just regress $\log(y+1)$ with a Gaussian and recalibrate its variance at the new site? This is the most serious threat, because a Gaussian also has a separate variance output. The material suggests it should fall short specifically at low counts. Log-ratio and log transforms of low counts behave badly on a lattice (Counts: an outstanding challenge for log-ratio analysis…), and continuous densities misplace mass at boundaries (Higher-Order Approximations of Sojourn Times…). Even so, it may match DDPN at hourly resolution. The granularity sweep is designed to show exactly where it does. If it matches DDPN at day resolution too, the core claim is false and we will report that.

Why not just use a histogram classifier over day bins? For ICU stays the support is effectively bounded, so the parameter-explosion objection raised in CountsDiff is weak here. The real objection is sample efficiency. Refitting a softmax over dozens of ordered bins with 50 to 200 target labels re-estimates many parameters, and it ignores the ordering between neighboring days. Our method re-estimates a single dispersion function. The matched-label comparison settles this directly. If the histogram wins at $n=1000$ but loses at $n=50$, that is itself a useful deployment guideline.

Why not just train on many centers, as YAIB recommends? Pooled multi-center training does transfer better (Yet Another ICU Benchmark), and we include eICU-trained source models in every condition. Pooling, however, averages dispersion across sites rather than matching any particular one. If pooled models no longer benefit from dispersion-only adaptation, then dispersion shift was an artifact of single-site training. That is a clean, reportable outcome.

Why not just conformal prediction at the target? Conformal recalibration gives marginal interval coverage but not a calibrated probability for each day. In particular, it does not give the boundary probabilities, such as discharge within a day, that bed planners need. We compare on coverage, where conformal methods are strong, and on boundary calibration, where we expect them to be weak.

Proposed Experiments

Data and tasks. All experiments use YAIB's five databases and its LoS task definition, run over all ordered source-to-target pairs. Results are reported at the three granularities.

Metrics. We report MAE, CRPS, negative log-likelihood on the lattice, and randomized probability integral transform calibration (a test of whether outcome ranks under the predicted distribution are uniform). We also report coverage of 80% and 95% intervals, and boundary calibration error at 1 and 2 days.

Sanity check. We reproduce DDPN's single-site Microsoft LoS ranking as a check that our implementation matches the original.

Decisive check 1: the decomposition. If dispersion-only adaptation closes most of the gap between the source model and an oracle trained on the target, while mean-only adaptation closes little, then the dispersion-shift hypothesis holds. If the reverse happens, cross-hospital LoS failure is mostly a mean shift, and output-distribution work is the wrong place to invest.

Decisive check 2: the granularity prediction. The DDPN-versus-Gaussian CRPS advantage should decrease monotonically from day to hour resolution. An advantage that is flat or reversed would contradict the lattice-mismatch account.

Decisive check 3: raw-outcome dispersion. Site-level dispersion differences must appear in the raw outcomes, independent of features. Otherwise the apparent shift may be a harmonization artifact.

Secondary experiment. We add the Adaptive-CaRe input penalty on top of the best adapted model. This tests whether DDPN's built-in loss attenuation, its learned tendency to down-weight hard examples, conflicts with feature-side shortcut suppression. The DDPN and Adaptive-CaRe papers leave this interaction unexamined.