Anchored Residual Forecasting of Irregular Lab Trajectories

Most of the variation in a hospital lab value comes from who the patient is, not from what is happening to them right now. One patient's creatinine sits at 0.7 mg/dL, another's at 1.4. The clinically decisive signal, such as a rising creatinine that defines acute kidney injury or a falling albumin that predicts death after a heart attack, is a small change layered on top of that large personal offset. Models that forecast absolute future values must first reconstruct the patient's baseline and only then the change. Work on motion, physics and video forecasting has documented this failure: such models spend capacity reproducing static structure and drift when their outputs are fed back in. The standard fix there is to predict the change from a reference state rather than the state itself. Clinical sequence models have not adopted it. They are trained on raw or imputed absolute values, and they also break when moved to a new hospital, where absolute levels shift.

This note proposes forecasting multivariate, irregularly sampled lab trajectories as residuals relative to a personal anchor, a denoised estimate of the patient's own reference state. The key design question that neither literature has asked is which anchor to subtract. Motion forecasting subtracts the last frame. Clinical readings are noisy enough that the last reading is a poor reference: single samples are distorted by exertion, pulsatile secretion or white-coat effects. We claim that the right anchor is a shrunk, filtered personal state. With that anchor, a residual forecaster conditioned on elapsed time beats both absolute-target models and last-observation residuals. It also degrades less across hospitals, because offsets specific to a hospital cancel within a patient. The work is framed so that the strongest simple alternative, gradient-boosted trees trained on the same residual target, can falsify the claim that anything beyond the target change matters.

Core Claim

Write the patient's measured value of lab $k$ at time $t$ as $y_t = s_t + \varepsilon_t$, where $s_t$ is the underlying physiological state and $\varepsilon_t$ is measurement and transient noise with variance $\sigma^2$. The forecaster predicts

$$\hat{y}_{t+\Delta t} = a_t + f_\theta(h_t, \Delta t),$$

where $a_t$ is the anchor, $h_t$ is a learned summary of the patient's history across all labs and vitals, and $\Delta t$ is the gap until the next measurement. Suppose the anchor is the last observation, $a_t = y_t$, as in velocity-style residuals. Then the regression target $y_{t+\Delta t} - y_t$ carries noise variance $2\sigma^2$ on top of the true change, and the network is pushed to learn regression to the mean rather than dynamics. Suppose instead the anchor is a filtered estimate $\hat{s}_t$ of the state, with its own error variance $v_t < \sigma^2$. Then the target noise falls to $\sigma^2 + v_t$. This follows from treating the anchor's error and the new reading's noise as independent. The concrete, testable prediction is that last-observation anchors should match filtered anchors on low-noise, fast-moving labs like hourly creatinine in the ICU. They should lose clearly on noisy ratio markers such as the neutrophil-to-lymphocyte ratio. Absolute-target models should lose everywhere, and they should lose most under transfer between hospitals.

The anchor idea is borrowed from generative animation. There, talking-head models predict landmark offsets from a fixed reference frame rather than from the previous frame, and this suppresses jitter and identity drift; the research file attributes this to MoDiTalker and related work. We replace the fixed frame with a statistically filtered personal reference state, which is the clinical analogue of identity.

Relation to Prior Work

The motivation comes from two places. On the clinical side, the evidence that change carries signal beyond the level is strong. In older AMI patients, the in-hospital change in albumin predicted mortality far better than the admission value, with an S-shaped risk curve (Association between albumin changes and prognosis in older patients with acute myocardial infarction). The hsCRP trajectory predicted metabolic syndrome better than baseline (hsCRP trajectories). A static neutrophil-to-lymphocyte ratio stratified ICU mortality but lost all prognostic value in sepsis (NLR and mortality in critical illness). All three studies compute a change by hand and test it in a regression; none builds a forecaster around change. On the modeling side, solid-mechanics emulators collapse when predicting absolute positions and stay stable when predicting increments (Diffusion-Based Hierarchical GNNs for nonlinear solid mechanics). Neural-operator work shows residuals over physical states help when data are limited (DeltaPhi). All of this work assumes fixed time steps and noiseless state readings, and we relax both assumptions.

The closest connecting work constrains rather than anticipates the proposal. Longitudinal Flow Matching for Trajectory Modeling models continuous trajectories across irregular visits, but it works in image autoencoder latents and aligns visits with spatial optimal transport. That machinery has no meaning for a panel of serum chemistries, and the authors report it degrades on aggressive, non-smooth progressions. PopPert predicts residual changes in distribution parameters relative to an unperturbed control population, which is the closest analogue to our anchor. Its residual is single-step and taken against an unpaired population, not a tracked individual over time. DDaTR learns difference features between serial chest X-rays, but it outputs report text rather than numerical forecasts.

Two results set the bar we must clear. Yet Another ICU Benchmark (YAIB) found that cohort and preprocessing choices moved results more than switching between LightGBM, GRUs and Transformers. A new architecture is therefore unlikely to matter, and we accordingly locate the contribution in the target and anchor rather than the backbone. The TADPOLE 1-year results showed that handcrafted patient-specific slopes drove the best ventricle forecasts and that cognitive scores were unforecastable. This tells us that simple slope features are a serious competitor, and that very noisy endpoints should be avoided as headline targets.

Research Program

We will build one forecaster and vary only what it subtracts and what it predicts. The history encoder is a time-aware GRU over YAIB's hourly grid. It is augmented with explicit time-since-last-measurement features per lab, so that sparse labs are not hidden by imputation.

The prediction head outputs a mean and variance for the residual at a queried gap $\Delta t$. The output layer is initialized to zero, so the untrained model defaults to "no change from anchor," which is the property that makes residual training stable in the motion literature.

Three anchors are compared. The first is the last observation. The second is the admission value, which is what the clinical delta studies use. The third is a filtered personal state, computed by a per-patient local-level Kalman filter whose noise variances are fit per lab on training data.

We also test a fourth, learned anchor, in which the network outputs a gate between the filtered state and the last observation. If this gate learns lab-specific weights that track each lab's measured noise ratio, that is direct mechanistic evidence for the core claim.

The analysis has three parts. First, we decompose forecast error by lab, sorted by the estimated noise-to-change ratio $\sigma^2 / \mathrm{Var}(\Delta s)$, and check whether the anchor ranking flips where the theory says it should. Second, we measure the drop in performance from training hospital to held-out hospital, and split it into a part removed by per-center standardization and a part removed only by patient-relative anchoring. Assay calibration offsets should be removed by both. Shifts in patient mix should be removed by neither. Third, we roll forecasts forward over multiple steps to check whether the anchor also curbs compounding drift.

Baselines

The naive reference point is carry-forward: predict that the next value equals the last observed one. This is the zero-change baseline that has embarrassed complex motion forecasters and that matched every method on ADAS-Cog13 in TADPOLE. A stronger naive point is the filtered anchor itself with zero predicted change. Comparing our model to this second baseline isolates what the learned dynamics add beyond denoising. Any proposed model must beat both on held-out mean absolute error with patient-level bootstrap intervals that exclude zero, or the dynamics component has no value.

The classical statistical competitor is a linear mixed-effects model per lab, with random intercept and slope in continuous time. Its random intercept is itself a shrunk personal anchor, so it directly embodies half of our idea. It will be fit on identical training patients with standard covariates. Beating it requires the neural model to win on labs where cross-lab interactions plausibly matter, for example creatinine given urine output and vasopressor changes. A uniform but tiny win would not count.

The strongest practical competitor is LightGBM, which matched deep sequence models in YAIB. In YAIB it reached mortality AUROC between 0.84 and 0.87 across datasets, alongside the deep models (YAIB). We will run it twice under the same feature set: once predicting absolute values and once predicting the residual from the filtered anchor. Its features include last value, filtered anchor, hand-computed slopes, time since measurement and $\Delta t$. This target-swap pair is the key ablation. If LightGBM with the residual target matches our network, the contribution is the anchored target, not the network, and we will report it that way.

The deep competitor is a YAIB-configured GRU and Transformer trained on absolute targets. Every model receives the same YAIB cohort definitions and splits, and the same hyperparameter search budget of 50 trials by random search on a validation fold. For lab-value forecasting on these cohorts, no reported result found on Lacuna; the YAIB acute kidney injury task appears in the file without a reported number. We will therefore produce all baseline numbers ourselves under the shared protocol.

Why not just…?

Why not just carry the last value forward? For hourly ICU labs it will be very hard to beat on average, and we expect our margin to be small there. The case against it rests on events. Acute kidney injury is defined by creatinine rising relative to baseline, and the albumin study shows the dangerous patients are exactly those whose values move (albumin changes in AMI). We therefore score forecasts on intervals where the true change exceeds a clinical threshold, as well as on average. Carry-forward scores zero on detecting such changes by construction.

Why not just fit mixed-effects models with slopes? This is a real threat, because the random intercept is a shrunk personal anchor and TADPOLE winners relied on slopes. A mixed-effects model fails only where change depends nonlinearly on other variables or on elapsed gap. The per-lab error breakdown will show whether such labs exist in YAIB data. If the mixed-effects model ties everywhere, the proposal reduces to a recommendation to use mixed-effects models with filtered anchors, and that recommendation is still useful to report.

Why not just give LightGBM delta features and a residual target? This may well work as well as the network. YAIB's finding that architecture matters little predicts exactly that. The target-swap ablation exists to settle it. Our substantive claims concern the anchor choice and transfer between hospitals, and both are tested with LightGBM as well as the network. Those claims stand regardless of which learner wins.

Why not just standardize each hospital's features? Per-center z-scoring removes calibration offsets without any per-patient reference. The transfer decomposition reports exactly how much of the cross-hospital drop it recovers relative to patient anchoring. Patient anchoring is justified only if it recovers additional performance beyond standardization. One plausible mechanism is that hospitals differ in case mix as well as in calibration.

Proposed Experiments

The primary testbed is YAIB's harmonized MIMIC-IV, eICU, HiRID and AUMCdb cohorts. Targets are the next measured value of creatinine, lactate, albumin, the neutrophil-to-lymphocyte ratio, potassium and hemoglobin at their natural, irregular gaps. Metrics are mean absolute error normalized by each lab's within-patient standard deviation, Gaussian negative log-likelihood, and sensitivity for large changes. The downstream check is creatinine-defined acute kidney injury onset under YAIB's task definition. This links forecast quality to an endpoint that is itself defined as a residual. Transfer is measured with every train-on-one, test-on-the-others pairing, and specifically by training on single-center MIMIC versus multi-center eICU, since YAIB reported that the training source changes external performance.

The secondary testbed is TADPOLE. We train on D1 and D2 and evaluate prospectively on D4's 219 subjects. The target is ventricular volume, where the file reports that slopes helped but gives no reported result found on Lacuna for a specific ventricle error. We exclude ADAS-Cog13 as a primary target given its documented unforecastability. This testbed checks that the anchor-noise prediction carries over to sparse, month-scale sampling.

The decisive check is the anchor ranking flip. Filtered anchors must beat last-observation anchors on high-noise labs and must not lose on low-noise labs. The learned gate must correlate with the measured noise ratio. If last-observation residuals win uniformly, the core claim is false. If residual targets give no transfer advantage over per-center standardization, the generalization claim is false. Both outcomes would be reported. The second check is whether the network beats residual-target LightGBM. Its answer decides whether the contribution is a modeling one or a target-design one.