A clinical prediction model is only useful if its warning arrives early enough for someone to act. Papers report a model's lead time as the gap between the last data the model sees and the event it predicts. That number quietly assumes the output appears the instant the data arrives. On real bedside and operating-room hardware, it does not. The data must fill a window, the model must run (sometimes on a slow embedded chip), and the result must be shown on a screen. By the time the warning appears, part of the lead time is gone. The same applies to perception: a surgical segmentation mask drawn half a second late outlines where the instrument was.
This note proposes to make that cost explicit and to train against it. We define delivered lead time as nominal lead time minus the measured end-to-end delay, and we evaluate every model by its accuracy at the lead time it actually delivers. We then train forecasters that receive the delay of the device they run on as an input and predict far enough ahead to cover it. The central empirical question is how much accuracy one millisecond of latency costs. We expect the answer to differ by orders of magnitude between surgical video, seconds-scale apnea forecasting and hour-scale sepsis prediction, and to decide which model one should deploy on which hardware.
Core Claim
Let $\tau_f$ be the end-to-end delay of model $f$ on a given device: compute time, plus the average wait for the next inference stride, plus display. If a warning must arrive $L$ seconds before the event, the model must forecast at horizon $h = L + \tau_f$. Its delivered accuracy is therefore
$$A^{\text{del}}_f(L) = A_f(L + \tau_f),$$
where $A_f(h)$ is the model's accuracy at forecast horizon $h$. When comparing a fast model $g$ with a slow model $f$, the extra delay costs roughly $A_f'(h)\,(\tau_f - \tau_g)$, where $A_f'(h)$ is the slope of the accuracy-versus-horizon curve. That slope acts as an exchange rate between milliseconds and accuracy, and it can be measured for each task. This follows from a first-order Taylor expansion of $A_f$ around $h$, so it holds only while the delay is small relative to the curvature of the decay curve.
We make two claims. The first is that the exchange rate has very different sizes across regimes. It is large for dense surgical video on embedded hardware, where instruments move appreciably within the 0.6 s an embedded chip can take. That figure is M2U-Net's measured latency on an ARM SoC, against 19.9 ms on a desktop GPU M2U-Net. The rate should be moderate for seconds-scale apnea forecasting. There, accuracy falls from an AuROC of 0.80 at 15 s to chance by 150 s Vetter et al.. A linear reading of those two points gives only about 0.002 AuROC per second, so latency should matter there only for multi-second strides or slow devices. The rate should be essentially zero for hourly sepsis prediction.
The second claim is that where the exchange rate is large, two rankings change. The best deployed model under delivered accuracy differs from the best model under nominal accuracy. And a forecaster trained across the distribution of device delays beats both an un-forecast fast model and a classical extrapolation applied to its outputs.
Relation to Prior Work
The closest work is Li et al.. They use an adaptive Kalman filter (a classical recursive estimator of position and velocity) to predict respiratory motion ahead of HoloLens 2 tracking delay, reaching a gating prompt about 142 ms early with over 92% accuracy on human traces. That paper supplies the core intuition we build on: forecast forward to cancel system delay. It works on a single low-dimensional kinematic signal with a hand-built motion model, and it does not ask how model capacity trades against delay. We extend the idea to learned, high-dimensional predictors and make that trade-off the object of study. We also use Li et al.'s approach as a baseline, applying Kalman extrapolation to the outputs of a fast segmenter.
Two papers motivate the gap from the efficiency side. DMNet keeps a memory of informative past surgical frames and runs at 38 FPS with 61.03% mean Dice on EndoVis17. It uses that memory only to segment the current frame, and its accuracy is scored against the frame it was given, not the frame on screen when its output appears. Lightweight networks such as M2U-Net and DMFNet cut parameters and FLOPs sharply. Both report latency and accuracy as separate axes and never combine them into one deployment number.
On the lead-time side, several papers fix the horizon and ignore delay. These include the PhysioNet 2019 challenge (6-hour sepsis), HEA-LSTM (which measures training throughput but not streaming inference) and EventScore (which claims real-time operation without profiling). These papers constrain the proposal more than they motivate it. Hourly charting makes compute delay negligible at those horizons, so we use sepsis as a negative control, not as a showcase. The heavy multimodal models of STraTS-Q-M likewise report no latency. Our framing predicts that this omission is harmless at a 2-hour horizon, and we test that prediction.
Research Program
The work has three parts.
Measurement. For each task we profile the true end-to-end delay distribution of candidate models on a desktop GPU and on an embedded ARM board. The delay includes the wait for an inference stride, not only the forward pass. We also estimate each model's accuracy-versus-horizon curve $A_f(h)$ by training or evaluating at a grid of horizons. Together these give delivered-accuracy curves and the empirical exchange rate.
Method: a latency-conditioned forecaster. The model receives the measured delay $\tau$ as an extra input and is trained to predict the target state at time $t + \tau + L$. During training, $\tau$ is sampled from the profiled delay distribution of the target device, including its jitter. At deployment, the device timestamps each input and passes the actual delay. For surgical video, this means a DMNet-style memory backbone with a head that outputs the future instrument mask. For apnea, it means the neural additive model of Vetter et al. (a model that sums separate learned functions of each input) given one additional input for $\tau$.
Deployment rule. We select a model per device by maximizing delivered accuracy at the clinically required $L$. We then check whether this rule picks a different architecture than ranking by nominal accuracy does.
Baselines
Do nothing. The naive reference is the current-frame model deployed as-is: DMNet, or a smaller M2U-Net-style variant, trained on EndoVis17 and scored against the frame displayed when its output appears. For EndoVis17 we restrict delays to multiples of the annotation spacing, so that both input and target frames have ground-truth masks. Its nominal score is DMNet's reported 61.03% mean Dice at 38 FPS (DMNet). Its delivered score has no reported result found on Lacuna. Producing that number is itself a contribution.
Fast model, no forecasting. The same pipeline with the lightest backbone we can run. This isolates whether simply shrinking delay recovers delivered accuracy.
Kalman extrapolation on outputs. Following Li et al., we track instrument mask centroids, or the apnea risk score, with an adaptive Kalman filter and shift the output forward by $\tau$. This is the strongest existing method for delay compensation.
Fixed-horizon retraining. The same architecture as ours, retrained once at horizon $L$ plus the mean delay, without $\tau$ as an input. This ablation isolates the key ingredient, which is conditioning on the actual, jittered delay.
For apnea, the reference is the Vetter et al. model at its reported 0.80 AuROC at 15 s, scored at delivered lead time. For sepsis, the references are the challenge's top utility scores of 0.33–0.36 and HEA-LSTM's 0.321 on the full test set.
All methods share data splits, backbone family, a matched hyperparameter-search budget and the same target device. Beating a baseline means higher delivered accuracy at the fixed required $L$, with paired bootstrap confidence intervals that exclude zero, at no greater measured delay.
Why not just…?
Why not just use a faster model? If delay were the whole story, the fastest network would win delivered accuracy outright. The decision is set by the exchange rate against the accuracy lost to shrinking. Within our framework, a faster model is simply one point on the delivered-accuracy curve. If it dominates on a device, we will report that it does, and the conclusion becomes "shrink, don't forecast." The latency-conditioned head can sit on any backbone, so the real comparison is forecasting versus not forecasting at matched delay.
Why not just extrapolate the outputs with a Kalman filter, as Li et al. do? For smooth, quasi-periodic motion this is a genuine threat, and it costs almost nothing to run. Li et al. themselves report degradation under irregular breathing, and a centroid filter cannot predict changes in shape, occlusion, or an instrument entering the field. Our experiments stratify EndoVis17 clips by motion irregularity. We expect the Kalman baseline to match us on steady segments and to fall behind on abrupt ones. If it matches us everywhere, the learned forecaster is unnecessary.
Why not just retrain at horizon $L$ plus the mean delay? This captures most of the benefit when delay is nearly constant. Our method should help only when delay jitters, as on shared embedded hardware or with variable strides. We test this directly by comparing the two under the measured jitter and under artificially widened jitter. If no gap appears, we drop the conditioning and recommend fixed-horizon retraining.
Why care at hour-scale horizons at all? We largely don't. Sepsis serves to confirm that the exchange rate is near zero, which bounds where this concern is real.
Proposed Experiments
The first check is the surgical video exchange rate. On EndoVis17 we measure the delivered mean Dice of DMNet-style and M2U-Net-style models on GPU and ARM across delays. The prediction is that nominal and delivered rankings disagree on ARM. If the rankings agree across devices, the central claim fails for this regime.
The second check is the latency-conditioned forecaster against all four baselines at the required $L$, stratified by motion irregularity and by jitter width.
The third check is apnea. If the Robin sequence cohort of Vetter et al. can be accessed, we estimate $A(h)$ finely between 5 and 30 s and simulate inference strides of 1–10 s on embedded hardware. We test whether delivered AuROC moves materially, and we expect the stride to matter more than the forward pass.
The fourth check is the negative control on PhysioNet 2019. We profile HEA-LSTM and a heavy transformer and confirm that their delivered utility equals their nominal utility within noise. A measurable gap here would indicate that our delay accounting has missed something.
References
- M2U-Net: Effective and Efficient Retinal Vessel Segmentation for Real-World Applications
- Neonatal apnea and hypopnea prediction in infants with Robin sequence with neural additive models for time series
- Fusing Prediction and Perception: Adaptive Kalman Filter-Driven Respiratory Gating for MR Surgical Navigation
- Efficient Global-Local Memory for Real-time Instrument Segmentation of Robotic Surgical Video
- 3D Dilated Multi-fiber Network for Real-Time Brain Tumor Segmentation in MRI
- Early Prediction of Sepsis from Clinical Data: the PhysioNet/Computing in Cardiology Challenge 2019
- Early Prediction of Sepsis From Clinical Datavia Heterogeneous Event Aggregation
- EventScore: An Automated Real-time Early Warning Score for Clinical Events
- Multimodal Transformers for Clinical Time Series Forecasting and Early Sepsis Prediction