Manpreet Singh Research
South Korea
ICML2026 · SD4H Workshop
paperposter
Work done at Embedded LLM Embedded LLM
ICML 2026 · Workshop on Structured Data for Health · Seoul

From 805 ms to 23 ms: Accelerating State-Space Models for Real-Time ICU Monitoring

with Fused Triton Kernels

Embedded LLM, Singapore
End-to-end inference latency, one batch of ICU stays PhysioNet 2012 · batch 32 · NVIDIA RTX PRO 6000 · p50
35.7×lower latency, outputs matched within 5 × 10−7
PyTorch SSMreference
805 ms
Triton SSMfused
23 ms
50 ms bedside budget
Figure 1. Sub-50 ms inference is what 20 Hz bedside updates, waveform alarms and closed-loop control need. The PyTorch pipeline misses it on every call; the fused pipeline meets it with a p99 of 44.6 ms over 10,000 trials. More than 85% of the reference latency is preprocessing, not the model.
35.7×lower end-to-end latency, 805 → 23 ms
84.6×kernel speedup over PyTorch + torch.compile
10,316samples/s peak throughput, 82.8× higher
+0.037AUROC over GRU-D, 95% CI [0.018, 0.058]
Abstract

Real-time ICU early-warning systems operate under low-latency constraints, with sub-50 ms targets enabling timely clinical intervention. However, irregular sampling and missing values exceeding 30% in physiological time series force deep learning pipelines into sequential preprocessing routines that consume over 85% of total wall-clock time. We introduce Triton-accelerated state-space models (SSMs) with a time-aware formulation that fuses interpolation and inference into a single GPU kernel, eliminating this bottleneck. Our system reduces end-to-end inference latency by 35.7× (from 805 ms to 23 ms) compared to a PyTorch SSM implementation, trains 2.29× faster than GRU-D baselines, and scales to 10,316 samples per second. Across 5 seeds on PhysioNet Challenge 2012, the Triton SSM improves test AUROC over GRU-D by +0.037 (paired bootstrap 95% CI [0.018, 0.058], p < 0.01); the same kernel ports to MIMIC-III 25-task phenotyping with a +0.024 macro-AUROC improvement. The implementation is hardware-portable across NVIDIA and AMD GPUs.

1The bottleneck is the preprocessing, not the model

ICU data has two properties that sabotage standard GPU pipelines: vital signs are recorded at irregular intervals, and 30% or more of values are missing. Filling the gaps needs a conditional neighbour search and an interpolation that, even vectorized in PyTorch and compiled, degenerates into many small sequential GPU operations. Profiling shows this step alone takes more than 85% of inference time, which makes even a fast model clinically unusable.

For each missing value, we find the nearest valid observations within K = 10 timesteps and interpolate weighted by time. Unlike forward-fill or mean imputation, this preserves local clinical trends, and because every output depends only on a bounded window, it is fully parallel.

2One fused kernel

The whole interpolation runs as a single Triton kernel with one thread block per (batch, time, feature-tile). Each block coalesces a 128-feature load, runs a bidirectional neighbour search of up to K steps with early-exit flags, applies the time-delta weighting, and writes once. Nothing round-trips through global memory in between. The gap-filled tensor then feeds a standard 4-layer state-space model (827K parameters); the contribution is the interpolation front-end, not the SSM scan.

Kernel configurationKernel (ms)AUROCOccupancy
Lookback K = 50.0220.648 ± 0.01362.5%
K = 10 default0.0300.659 ± 0.01162.5%
K = 200.0470.661 ± 0.01262.5%
Feature tile 640.0410.659 ± 0.01175.0%
Feature tile 2560.0380.660 ± 0.01141.7%
BF16 recommended precision0.0190.658 ± 0.01262.5%
FP160.0180.657 ± 0.01462.5%
Table 1. Kernel design ablations (batch 32, sequence length 200). K = 10 is the accuracy/latency sweet spot; larger windows add latency without a significant gain. BF16 gives a further 1.6× kernel speedup with AUROC unchanged; FP16 is as fast but produced NaNs on 0.4% of sequences with extreme vitals (heart rate > 220).

3Speed at every level

The kernel stays nearly flat as sequences grow, while the optimized PyTorch baseline (cuDNN + torch.compile, the most realistic implementation a practitioner would write) grows with length. Every speedup below is against that compiled baseline, not the naive loop.

Sequence lengthTritonPyTorch + compileNaive loopSpeedup
500.02 ms1.74 ms58.52 ms84.6×
1000.02 ms1.75 ms112.67 ms79.6×
2000.03 ms1.78 ms234.96 ms68.8×
5000.04 ms2.06 ms–55.9×
1,0000.05 ms2.94 ms–53.6×
Table 2. Interpolation kernel latency. Correctness verified at every step. The naive Python loop was stopped beyond 200 timesteps because of its runtime.
End to end, batch 32p50p95p99Calls > 50 ms
PyTorch SSM798.4 ms832.1 ms861.3 ms100%
Triton SSM22.7 ms31.4 ms44.6 ms0.7%
Table 3. Tail latency over 10,000 calls. For bedside monitoring the mean is not enough: one late inference can miss a deterioration window. Of the 22.7 ms, the interpolation kernel itself takes 0.03 ms and the SSM forward 1.9 ms; the rest is host-side batching and launch overhead.

Throughput scales near-linearly to 10,316 samples/s at batch 1,024, while PyTorch plateaus near 125 samples/s. Latency stays in the 32 to 35 ms range through batch 256, and memory settles at about 78.5 MB per sample, so batches up to 128 fit in roughly 10 GB: widely available 8 to 12 GB GPUs are enough.

4Faster, and more accurate than GRU-D

Speed is the point, but a fast model has to hold up. Under matched budgets over 5 seeds, with paired bootstrap confidence intervals and Wilcoxon tests, the Triton SSM beats GRU-D on PhysioNet 2012 while training faster and using fewer parameters.

PhysioNet 2012, 5 seedsTriton SSMGRU-DΔ vs. GRU-D
AUROC0.659 ± 0.0110.622 ± 0.014+0.037 [0.018, 0.058], p = 0.008
AUPRC0.328 ± 0.0140.241 ± 0.018+0.087 [0.041, 0.131], p = 0.012
Parameters827,2662,012,8652.4× fewer
Training time149.9 s343.3 s2.29× faster
Throughput2,607 samples/s757 samples/s3.44× higher
Table 4. Head-to-head, 100 epochs per seed. PhysioNet 2012 Set A: 4,000 ICU stays, 15.1% mortality, 30.3% missingness. GRU-D reaches a lower training loss (0.267 vs 0.411) but generalizes worse, a sign of late-epoch overfitting on irregular data.
MIMIC-III, 25 phenotypesTriton SSMGRU-DΔ
Macro-AUROC0.762 ± 0.0040.738 ± 0.005+0.024 [0.014, 0.036]
Macro-AUPRC0.421 ± 0.0060.392 ± 0.007+0.029 [0.017, 0.043]
Latency per stay27 ms142 ms5.3× lower
Table 5. The kernel transfers without modification to 41,908 MIMIC-III stays; only the input dimension and SSM head are re-instantiated.

Drawn honestly, the frontier has other points on it. A parameter-matched Transformer reaches a higher AUROC (0.698) but needs about 111 ms, above the bedside budget. Gradient-boosted trees on engineered features match or edge the SSM on these episodic tasks at low CPU latency. The SSM's advantage is a single GPU-resident pipeline that ingests the raw irregular stream with no hand-built features, at comparable accuracy.

5Near the hardware ceiling, on both vendors

The kernel is bandwidth-bound (0.30 FLOP/byte) and reaches 1,344 GB/s of effective HBM bandwidth, 75% of peak, against 143 GB/s (8%) for the PyTorch baseline. The remaining gap comes from divergence in the bidirectional search and masked writes at irregular sampling boundaries. The identical Triton source runs on AMD MI300X with no source changes.

Batch 32, same sourceLatencyThroughputEnergy / inference
NVIDIA RTX PRO 6000PyTorch289.1 ms110.7 /s52.0 mJ
NVIDIA RTX PRO 6000Triton33.5 ms955.1 /s5.6 mJ
AMD MI300XPyTorch312.4 ms102.4 /s60.1 mJ
AMD MI300XTriton36.2 ms884.0 /s7.2 mJ
Table 6. Steady-state on-device performance (mean latency), energy averaged over 1,000 runs. MI300X is about 8% slower from wavefront divergence in the neighbour search, and its 192 GB of HBM3 allows batches up to 4,096 without spilling. On MI300X the kernel reaches 3,710 GB/s, 70% of peak.

6Limitations

  1. A test AUROC of 0.66 on PhysioNet 2012 trails state-of-the-art feature-engineered ensembles. This work optimizes the systems substrate, not the predictive model.
  2. Linear interpolation assumes local smoothness and can soften abrupt clinical transitions such as acute desaturation or arrhythmia onset. A discontinuity-preserving kernel is future work.
  3. The headline interpolation is bidirectional, standard for retrospective benchmarks. A causal variant for streaming uses no future samples at identical cost, for −0.006 AUROC (0.653 vs 0.659, within seed variance).
  4. Cross-vendor results use one AMD SKU, and energy figures are steady-state averages from NVML / ROCm-SMI sampling.

BibTeX

@inproceedings{singh2026from,
  title     = {From 805 ms to 23 ms: Accelerating State-Space Models
               for Real-Time {ICU} Monitoring with Fused Triton Kernels},
  author    = {Manpreet Singh},
  booktitle = {ICML 2026 Workshop on Structured Data for Health},
  year      = {2026},
  url       = {https://openreview.net/forum?id=QSJGOuySuH}
}

More research

This is one piece of a broader line of work at Embedded LLM on portable, fused GPU kernels for biological and clinical foundation models, measured on both NVIDIA and AMD.

All research →

Let's stay in touch

I'm an undergraduate working on GPU kernels for scientific and clinical ML. Happy to talk about this work; questions and feedback are always welcome.