Skip to content
AI.info

Research

Cross-Sample Augmented Test-Time Adaptation for Personalized Intraoperative Hypotension Prediction

Cross-Sample Augmented Test-Time Adaptation for Personalized Intraoperative Hypotension Prediction Overview Research area: Machine learning for clinical time-series forecasting, specifically test-time

arXiv
2512.15762
Published
2025-12-12
Authors
Kanxue Li, Yibing Zhan, Hua Jin, Chongchong Qi, Xu Lin, Baosheng Yu

AI summary

Cross-Sample Augmented Test-Time Adaptation for Personalized Intraoperative Hypotension Prediction

Overview

Research area: Machine learning for clinical time-series forecasting, specifically test-time adaptation (TTA) applied to intraoperative hypotension (IOH) prediction.

Technical level: Intermediate. The paper assumes familiarity with time-series forecasting models, self-supervised learning, and the general TTA paradigm, but the core ideas (retrieval, clustering, auxiliary losses) are explained at a level accessible to a reader with basic deep learning background.

Scope (1 sentence): The paper proposes CSA-TTA, a framework that augments a patient's own sparse intraoperative history with retrieved hypotension-relevant segments from other patients in order to make test-time adaptation more reliable for personalized blood-pressure prediction.

What This Paper Is About

Intraoperative hypotension — blood pressure dropping below a critical threshold during surgery — is dangerous, but its prediction is hard because each patient's physiological response is different and hypotensive events are rare. Standard test-time adaptation tries to personalize a model at inference time using only the current patient's recent history, but because hypotensive events are so scarce in that short history, the model tends to produce overly smooth predictions and misses sudden drops. CSA-TTA solves this by borrowing hypotensive and non-hypotensive examples from other patients, retrieving the ones most similar to the current patient's signal, and using them alongside the patient's own data to adapt the model.

Key Contributions

  1. First application of test-time adaptation to personalized IOH prediction. The authors state this is the first attempt to apply TTA for personalized intraoperative hypotension prediction.

  2. A cross-sample bank. Historical data from all patients is segmented into fixed-length fragments and partitioned into hypotensive and non-hypotensive subsets (ℬ = ℬ_hypo ∪ ℬ_non-hypo), giving adaptation access to diverse temporal patterns that a single patient's short record would not contain.

  3. A coarse-to-fine retrieval strategy. K-Shape clustering is applied separately to each subset to identify representative cluster centroids (coarse stage); Dynamic Time Warping (DTW) is then used to retrieve the top-K semantically similar samples to the current patient's history window (fine stage).

  4. Multi-task test-time optimization. The model is adapted with two objectives simultaneously — self-supervised masked reconstruction and retrospective sequence forecasting — under a partial fine-tuning scheme in which only the input, output, and layer-normalization parameters are updated.

The framework supports two modes: a fine-tuning mode (both tasks jointly fine-tuned offline before adaptation) and a zero-shot mode (no offline fine-tuning or architectural changes; adaptation done directly via retrospective regression). A hybrid trigger mechanism converts predicted blood-pressure sequences into point-wise risk scores, using a hard trigger for sustained hypotensive periods and a soft trigger evaluating average risk over sliding windows.

Main Findings

  • Zero-shot gains on VitalDB. With UniTS as the backbone on VitalDB at 30-second sampling, CSA-TTA raised Recall by 7.46% (43.24 → 50.70) and F1 by 5.07% (52.23 → 57.30). On VitalDB at 2-second sampling, UniTS gains were +7.67% Recall (44.83 → 52.50) and +4.87% F1 (49.67 → 54.53). With TimesFM as backbone, zero-shot gains were smaller: +1.13% Recall and +1.70% F1 on VitalDB (2S).

  • Fine-tuning gains on VitalDB. UniTS + CSA-TTA improved F1 by 1.13%, Recall by 1.33%, Precision by 0.99%, and Accuracy by 0.20% on VitalDB (2S), and raised Recall by 0.86% and F1 by 1.74% on VitalDB (30S). For TimesFM, CSA-TTA improved Recall by 1.06% and F1 by 0.63% on VitalDB (2S), and reduced MAE and MSE by 2.02% and 4.38% on VitalDB (30S).

  • Zero-shot regression reductions. On VitalDB, CSA-TTA reduced MAE by 3.24% (6.49 → 6.28) and MSE by 8.07% (92.77 → 85.28); on the in-hospital test set, MAE by 4.17% (6.00 → 5.75) and MSE by 5.28% (88.02 → 83.37).

  • In-hospital test set (130 cases, one-minute sampling). UniTS + CSA-TTA improved Recall by 9.56% (43.77 → 53.33) and F1 by 7.70% (56.10 → 63.80), though Precision dropped 4.58% (71.14 → 66.56). TimesFM + CSA-TTA improved F1 by 1.37%, Recall by 1.67%, Precision by 0.75%, Accuracy by 0.57%, MAE by 4.17% and MSE by 5.28%.

  • Sparsity of hypotensive events is the motivating problem. In the VitalDB dataset, hypotension accounts for just 12.6% of all samples, and the majority of patients experience it in less than 10% of the surgical timeline.

  • Multi-task optimization helps. At the 10-minute horizon, combining supervised prediction and masked reconstruction gave F1 64.70 and MSE 77.60, versus 64.60/82.14 for reconstruction-only and 64.40/80.49 for prediction-only. The combined setup achieved the best F1, MAE, and MSE across all horizons, though single-task setups occasionally showed higher Recall (reconstruction-only reached 71.90% at 5 minutes versus 71.60% for the combined setup).

  • Top-K = 3 is the chosen retrieval size. On TimesFM in zero-shot, Recall rose from 58.83 (K=1) to 59.27 (K=3) and MSE fell from 86.96 to 85.28.

  • Cross-sample bank plus perturbation works best. Using the bank alone raised F1 by 0.5% (64.47% → 64.97%) and Recall by 1.46% in zero-shot on VitalDB. Combining bank and perturbation in the fine-tuned setting raised Recall by 0.13% (62.20% → 62.33%) and reduced MAE by 1.69% (74.19 → 72.93).

  • Personalized retrieval beats random retrieval. In zero-shot, F1 rose from 63.93 to 64.90 and MSE dropped from 92.30 to 85.28 when personalized history was used instead of randomly selected sequences from other patients; fine-tuning gave smaller but consistent gains (F1: 65.73 → 66.07; MSE: 75.84 → 72.93).

  • Computational cost is low. For TimesFM, 5.05M of 477.36M parameters (1.06%) were updated, with an average of 6.587 seconds per adaptation epoch. For UniTS, 0.05M of 1.01M parameters (5.44%) were updated, at 1.688 seconds per epoch.

  • Case study. On two VitalDB (2S) cases, at the 15-minute horizon CSA-TTA reduced errors by more than half compared to vanilla TimesFM (MAE: 9.86 → 4.75; MSE: 129.75 → 30.88), capturing sharp declines and rebounds that the static model smoothed over.

Methodology in Plain English

The setup. A patient's vital signs (mean arterial pressure, body temperature, heart rate, ECG) form a multivariate time series with a 15-minute lookback window. The model forecasts the blood pressure sequence for the next 5, 10, or 15 minutes. A hypotensive event is defined as mean arterial pressure below 65 mmHg lasting at least one minute.

Why adaptation is needed. Models are trained on a population, but the true target depends on unmeasured patient-specific factors the authors call X_latent. A model that only sees X suffers a distributional mismatch. TTA tries to recover the latent context from a patient's recent history, but a short history rarely contains hypotensive events.

Step 1 — Build a cross-sample bank. Historical data from every patient in the training set is cut into fixed-length fragments. Fragments are sorted into a hypotensive pool and a non-hypotensive pool.

Step 2 — Retrieve relevant fragments. Several times per minute, the system takes the patient's recent history window and segments it into query fragments. In the coarse stage, K-Shape clustering (chosen because it aligns temporal shape without requiring warping or amplitude normalization) has already produced centroids for each pool; the query is matched to its nearest centroid. In the fine stage, DTW is used to rank all samples inside that cluster and pull the top K=3 most similar ones. Retrieved samples are rebalanced toward a 3:4 hypotensive-to-non-hypotensive ratio, and optionally perturbed with Gaussian noise and temporal scaling.

Step 3 — Adapt with two objectives. The combined adaptation set (patient's own window plus augmented retrieved samples) is used to update the model. The shared encoder feeds two branches: one for the main prediction task and one for masked reconstruction, a self-supervised task. The combined loss in Equation 8 sums the prediction loss and the reconstruction loss. Only parameters in the input layer, output layer, and normalization layers are updated, which keeps the model from forgetting what it learned during pretraining.

Step 4 — Detect events. Predicted blood pressure sequences become point-wise risk scores. A hard trigger flags sustained hypotensive periods and a soft trigger averages risk over sliding windows; the two are combined into a final probabilistic estimate.

Experimental setup. VitalDB is a real-world clinical database from Seoul National University Hospital covering 6,388 patients who underwent noncardiac surgery between June 2016 and August 2017. After quality control (excluding cases with over 20% missing or abnormal values and surgeries lasting under one hour), 2,150 patient cases remained, sampled at both 2-second and 30-second intervals and split at the patient level into 70% training, 20% validation, and 10% test. A second real-world dataset from a collaborating hospital is sampled at one-minute intervals, with 130 cases for evaluation and an additional 910 cases used only to build the retrieval bank. Backbones are TimesFM and UniTS; TTA baselines are TTT and TTT++. Offline fine-tuning used 10 epochs, learning rate 1×10⁻⁴, batch size 64, and dropout 0.01. Test-time adaptation ran for one epoch in the fine-tuning setting and three epochs in the zero-shot setting. All experiments ran on four NVIDIA A100 GPUs.

Why This Matters

Impact on research. The paper reframes a data-scarcity problem as a retrieval problem. Rather than trying to squeeze more signal out of a single patient's short history, it treats the population as an external memory that can be queried at inference time. This is a distinct alternative to standard TTA approaches like TTT and TTT++, which adapt on the test sample alone. The result that UniTS gains far more than TimesFM (for instance, +7.46% versus +0.40% Recall in the same zero-shot VitalDB 30S setting) suggests that retrieval augmentation is especially valuable for models that start weaker.

Real-world applications:

  • Operating-room decision support. Alerts that fire several minutes before mean arterial pressure drops below 65 mmHg could let anesthesiologists intervene earlier, potentially reducing acute kidney injury, myocardial infarction, stroke, and mortality risk.
  • Deployment in hospitals with limited labeled data. The zero-shot mode requires no offline fine-tuning, so a site without historical hypotension labels could still adapt a pretrained model at the bedside.
  • Continuous perioperative monitoring. The partial fine-tuning scheme updates only 1.06%–5.44% of parameters and takes as little as 1.7 seconds per epoch, which fits within a real-time monitoring loop.
  • Reuse of existing record archives. Sites that already store vital-sign streams can populate a cross-sample bank without new data collection.

Industry relevance. The work was partly conducted with a hospital and a technology company (First People's Hospital of Yunnan Province and Yunnan United Vision Technology), pointing at commercialization paths in medical device software, anesthesia monitoring systems, and clinical AI platforms. Because the method works on top of existing pretrained backbones, it offers vendors a way to add personalization without retraining foundation models.

Future Directions

  1. Stronger statistical validation. The authors acknowledge that evaluation is based on a limited number of random partitions and propose repeated resampling schemes combined with paired statistical tests such as the Wilcoxon signed-rank test across multiple splits.

  2. Out-of-distribution fallback strategies. The method implicitly assumes every test case is reasonably close to at least one cluster in the training-derived bank. Truly out-of-distribution or highly idiosyncratic episodes may evade retrieval, and the authors call for explicitly characterizing these cases and designing uncertainty-aware fallbacks.

  3. Dynamic bank maintenance. The current bank is built from a static cohort. Future work could explore recency-aware updates, bias and fairness considerations across demographic and surgical subgroups, and principled rules for which patients contribute to adaptation.

  4. Transfer to other clinical tasks. The framework is not task-specific; the authors identify extension to other perioperative or critical-care time-series problems such as arrhythmia detection or postoperative deterioration as a natural next step.

Target Audience

This paper is most useful to machine learning researchers working on test-time adaptation, domain adaptation, or clinical time-series forecasting; to biomedical engineers and clinical informatics teams building intraoperative monitoring or early-warning systems; and to anesthesiology researchers interested in how predictive models handle rare adverse events. Practitioners who need to deploy forecasting models in data-scarce or distribution-shifted clinical environments will find the partial fine-tuning cost analysis and the zero-shot mode directly applicable. Readers without a machine learning background can still follow the problem framing and the clinical motivation, but the retrieval and optimization details require familiarity with clustering, dynamic time warping, and self-supervised learning.

Authors’ abstract

Intraoperative hypotension (IOH) poses significant surgical risks, but accurate prediction remains challenging due to patient-specific variability. While test-time adaptation (TTA) offers a promising approach for personalized prediction, the rarity of IOH events often leads to unreliable test-time training. To address this, we propose CSA-TTA, a novel Cross-Sample Augmented Test-Time Adaptation framework that enhances training by incorporating hypotension events from other individuals. Specifically, we first construct a cross-sample bank by segmenting historical data into hypotensive and non-hypotensive samples. Then, we introduce a coarse-to-fine retrieval strategy for building test-time training data: we initially apply K-Shape clustering to identify representative cluster centers and subsequently retrieve the top-K semantically similar samples based on the current patient signal. Additionally, we integrate both self-supervised masked reconstruction and retrospective sequence forecasting signals during training to enhance model adaptability to rapid and subtle intraoperative dynamics. We evaluate the proposed CSA-TTA on both the VitalDB dataset and a real-world in-hospital dataset by integrating it with state-of-the-art time series forecasting models, including TimesFM and UniTS. CSA-TTA consistently enhances performance across settings-for instance, on VitalDB, it improves Recall and F1 scores by +1.33% and +1.13%, respectively, under fine-tuning, and by +7.46% and +5.07% in zero-shot scenarios-demonstrating strong robustness and generalization.

Read the original paper