Continuous-Guard Finite-State Monitors for Intraoperative Risk

Clinical risk scores such as APACHE-II, EuroSCORE and ASA are computed once, at admission or before surgery, and then left alone. Deep sequence models that update risk minute by minute predict much better, but clinicians cannot read their reasoning. This note proposes a middle path. We would learn a small automaton, a flowchart with five to ten named "risk stages." A patient's stage changes when their streaming vital signs satisfy a readable rule, for example "heart rate rose more than 12 beats per minute over the last 10 minutes while mean pressure stayed below 72." Each stage outputs a calibrated risk and an alarm decision.

The key design choice is that these rules act on raw continuous values, with exact thresholds found by search. Vitals are never pre-sorted into clinical bins, which is where existing interpretable models lose the most information. In the POMDP literature this automaton is called a finite-state controller. A POMDP is a decision problem in which the true state is hidden and only noisy observations arrive. Classical versions of these controllers need a discrete observation alphabet. The work asks whether such a controller, with memory bounded by construction and rules on continuous signals, can recover most of the accuracy of a recurrent network on intraoperative trajectories. It also asks whether keeping thresholds continuous is what makes that possible.

Core Claim

Our claim is that a Mealy-style controller does most of the work. In a Mealy controller, the next stage depends on the current stage and the current observation. Here each stage carries a shallow decision tree over continuous features of the most recent observations, and the leaves of that tree name the next stage. With a node budget $K \le 8$, this controller should come within about 0.01 to 0.02 AUROC of a GRU on the same streams. It should also clearly beat the same controller built on binned vitals, at an equal number of rule leaves.

We predict that most of the continuous-versus-binned gap will appear in two groups. The first is patients whose static preoperative score calls them low risk. The second is patients whose vitals hover near conventional alarm cutoffs. These are the groups where Beyond Thresholds found an AUROC gain of +0.223 from trajectory data (lowest-risk tertile), and where Walter et al. showed that binary thresholding hides sub-threshold harm. In their cardiac cohort, observed mortality was 60.9% against 45.1% expected when serum creatinine was used as a cutoff.

The three directions play different roles here. Finite-state controllers supply the representation. Discretization loss is the specific failure we design against and then measure. The limits of static risk scores define the application and the most sensitive evaluation subgroup.

Relation to Prior Work

Three papers supply method, each in a form we cannot use directly.

DetMCVI shows that controllers collapse redundant histories dramatically: a 39-node policy where tree solvers needed over 13,000. However, it targets goal-reaching tasks with discrete observations.

Symbolic Dynamic Programming for Continuous State and Observation POMDPs proves that, for a finite set of beliefs, a continuous observation space splits into finitely many regions where the optimal policy changes. That result motivates our "guard" design, meaning a stage's transition rule, as a finite partition of continuous observations. Its exact symbolic diagrams, though, were only tested in one and two dimensions. We give up that exactness in exchange for greedy tree search over dozens of channels.

ArborEnum and CLARITree show how to optimize trees on continuous features without pre-binarization, using sample-distance pruning and fast threshold sweeps. Both are static learners. Our contribution is to turn guard learning inside a sequential automaton into a sequence of static, cost-sensitive tree problems, so that their machinery applies.

The closest competitor is Beyond Thresholds. It fits a 6-state Gaussian hidden Markov model (HMM) to 6 vital channels on INSPIRE and feeds state-occupancy summaries to a logistic regression. It shows that trajectories matter, and its states are interpretable. Our approach differs in three ways:

  • Supervision. Their states are fit without outcome labels to explain the vitals. Our stages are shaped directly by outcome loss.
  • Transition form. Their transitions are fixed probabilities with Gaussian emissions. Ours are readable threshold rules.
  • Timing. Their summary is computed over the whole case. Ours issues a risk and an alarm decision online at every step.

Approximate Bilevel Difference Convex Programming for Bayesian Risk MDPs also outputs a controller and handles risk, but its "risk" means CVaR over path cost (the average of the worst outcomes) in grid worlds. We do not attempt its Bayesian treatment of uncertain parameters. That is a natural follow-up.

We deliberately do not claim closed-loop treatment control. Retrospective EHR data confound treatment with severity, so learning vasopressor policies from it would be an offline reinforcement learning problem we cannot validate. The only action our controller takes is to alarm or stay silent. In retrospective data that action does not affect the patient, so the POMDP can be evaluated honestly.

Research Program

The controller. It has $K$ stages. The starting stage is chosen by a shallow tree over preoperative variables, so the static score survives as the entry point and is then revised by the trajectory. At each 5-minute step, the controller computes a feature vector $x_t$ from the current window: raw values, first differences, and a short rolling standard deviation over the last $m$ observations. We report $m$ as part of the memory budget, so the "bounded memory" claim includes it. The current stage's guard tree then maps $x_t$ to the next stage. Each stage emits a risk, obtained by logistic calibration of the stage identity plus optional stage-specific linear terms in the style of CLARITree leaves, and an alarm bit.

The loss. The per-step loss combines log-loss on the eventual outcome with an alarm cost. Each alarm has cost $c_a$, and failing to alarm before the event has cost $c_m$.

Learning the guards. This is the technical core. Because the controller is deterministic, we can hold every guard fixed except node $q$'s. For each visit $(i,t)$ of patient $i$ to node $q$ at time $t$, we compute the cost-to-go $C_{i,t}(q')$. This is the total future loss of patient $i$ if the controller is placed in stage $q'$ at time $t+1$ and run forward under the current guards. Refitting $q$'s guard then becomes a cost-sensitive classification tree:

$$ g_q^{\text{new}} = \arg\min_{g \in \mathcal{T}_d} \sum_{(i,t):\, q_{i,t}=q} C_{i,t}\big(g(x_{i,t})\big), $$

where $\mathcal{T}_d$ is the set of depth-$d$ trees with continuous thresholds. Each candidate split is scored by sweeping thresholds over sorted feature values, as ArborEnum and CLARITree do. The cost-to-go values are only approximate, because rerouting can change later visits to $q$ itself. For that reason, a refit is accepted only if a full rollout lowers the total loss. This makes the coordinate descent monotone.

Initialization and restarts. We start from a GRU distilled into $K$ clusters, and also run random restarts. This helps with the non-convexity that affects all controller search.

What this isolates. Because the guard class $\mathcal{T}_d$ can be swapped for a class restricted to quantile bins, the continuous-versus-binned comparison uses the same optimizer, the same $K$ and the same leaf budget.

Baselines

Naive reference points. The do-nothing reference is the static preoperative score used once. On INSPIRE, ASA classification reports AUROC 0.829 for 30-day mortality, and the static preoperative arm reports AUPRC 0.244 for ICU stays over 48 hours (INSPIRE; Beyond Thresholds). We also refit a gradient-boosting model on preoperative features on our own splits. INSPIRE reports AUROC 0.944 for 30-day mortality for such a model.

Strongest interpretable trajectory competitor. This is the Beyond Thresholds HMM-plus-logistic-regression pipeline, which reports AUPRC 0.339 for prolonged ICU stay and AUROC 0.944 for ICU admission. We rerun it on identical splits, with the same channels, the same preoperative covariates and the same tuning budget. We also build a streaming variant that feeds the HMM forward-filtered belief at time $t$ into logistic regression, so it can be scored at the same early horizons as ours.

Strongest opaque competitor. This is a GRU on the same continuous feature streams. MIMIC-Extract reports AUROC between 0.85 and 0.90 for mortality from recurrent models (MIMIC-Extract). We found no reported result on Lacuna for a GRU or LSTM on INSPIRE intraoperative streams, so we establish that number ourselves.

Ablations. The first is a binned-guard controller that is identical to ours but uses quantile and clinical-cutoff bins at 3, 5 and 10 levels. The second is a GRU distilled into a $K$-state automaton, with transition trees fit to the cluster labels and no refinement against the outcome.

Fairness and success criteria. Every model gets the same hyperparameter-search budget in GPU or CPU hours, and results are averaged over five patient-level splits. Beating the field means three things. First, the controller must exceed the binned ablation with non-overlapping bootstrap intervals. Second, it must match or exceed the HMM pipeline's 0.339 AUPRC at end of surgery, and exceed its streaming variant at 15, 30 and 60 minutes after induction. Third, it must stay within 0.02 AUROC of the GRU.

Why not just…?

Why not just use a GRU and explain it afterward? The GRU is likely the accuracy ceiling, and we expect to trail it slightly. Post-hoc explanations of a continuous hidden state do not give a clinician a finite list of stages and rules to audit, and no bounded description of the model's memory exists. The honest question is how much accuracy a readable, bounded controller gives up. The sweep over $K$ answers that directly. If the gap stays above 0.03 AUROC at $K=10$, the claim fails.

Why not just distill a GRU into an automaton? This is the real threat. Clustering hidden states and fitting transition trees is simple and might be enough. We use it as both initialization and ablation. Direct refinement against outcome loss must beat it at equal $K$, especially at small $K$, where clustering hidden states for fidelity rather than for the outcome should waste stages. If the two methods tie, the contribution shrinks to "continuous guards on distilled automata," and we would report it that way.

Why not just use the Beyond Thresholds HMM? It is already continuous and interpretable. However, its states come from unsupervised Gaussian clustering, and its prediction uses end-of-case summaries. The streaming-belief variant tests whether the HMM fails at early horizons. The low-risk-tertile analysis tests whether outcome-shaped stages find vulnerable patients that unsupervised states miss. If the HMM matches us everywhere, the finite-state representation adds nothing beyond presentation.

Why not just bin finely and use a rule list? Falling Rule Lists reach AUROC 0.80 on readmission, but only after pre-mining boolean features. ArborEnum documents how fine binning blows up the search space. The binned-guard ablation at 10 levels is exactly this alternative inside a temporal model. If it closes the gap, discretization loss is not the bottleneck.

Proposed Experiments

Primary benchmark: INSPIRE. We use 5-minute intraoperative vitals from about 131,000 cases, with outcomes of prolonged ICU stay, ICU admission and 30-day mortality. Predictions are scored at fixed times after induction and at end of surgery.

Second benchmark: MIMIC-III through MIMIC-Extract. We use hourly aggregates for mortality and vasopressor onset. The data are coarsened in time but not in value. This tests transfer to a different care setting and a different sampling rate.

Metrics. We report AUROC, AUPRC and calibration slope at each horizon. For the alarm policy, we measure sensitivity, median lead time before the event, and alarms per patient-hour. For interpretability, we count stages, total guard leaves, and the fraction of learned thresholds that fall within normal clinical ranges.

Decisive checks.

  1. Continuous versus binned guards, stratified. Split results by preoperative-risk tertile and by distance of each patient's vitals from conventional cutoffs such as a mean arterial pressure of 65. The mechanism predicts that the advantage concentrates in the lowest tertile and near the cutoffs.
  2. Performance against $K$. This curve shows where a bounded controller saturates relative to the GRU.
  3. Direct refinement against distillation. This comparison determines whether learning against the outcome matters.
  4. Blinded review. Two anesthesiologists review the learned $K\le 8$ controllers without seeing model labels, and rate stages for clinical coherence against HMM states. This check is secondary but shows whether the readability argument holds for the intended readers.