Sepsis prediction models built on sequence architectures such as transformers beat tree ensembles on the metrics that matter clinically. They also carry a known flaw. Interpreting Sepsis Prediction through Positional Explanation showed that these models, and the explainers applied to them, over-credit whatever sits at the first time step. That makes an admission demographic like Gender look like a sepsis driver. The same paper also showed that the effect disappears once measurement timing is separated from measurement value. That finding concerns the model's inputs. It does not say where inside the network the timing shortcut lives, whether a small set of components carries it, or whether that set is the same in every hospital.
This note proposes to answer those questions with circuit discovery. A circuit is a minimal subgraph of the network, found by pruning connections, that still reproduces a behavior. Circuit discovery has so far been run only on toy language tasks, and it inherits the cost problem of iterative pruning: connections are removed a few at a time, with an evaluation after each step. Our central move is to use the position-swap perturbation from the positional-explanation paper as the "corrupted input" that circuit discovery needs, and to pair it with a second perturbation that resamples values while holding timing fixed. Running the same pruning search under these two contrasts splits a sepsis model into a timing circuit and a content circuit. A two-stage search, cheap attribution first and then exact pruning, keeps the cost comparable to one pruning run rather than a sequence of retrainings.
Core Claim
The claim has three parts. First, the primacy bias in sepsis sequence models is carried by a small, identifiable set of attention components, and ablating them removes the spurious demographic attribution while leaving discrimination nearly intact. Second, faithful circuits can be recovered on clinical time series at a cost close to single-pass attribution, because the position-swap and value-resample corruptions stay inside the data distribution. Constructing such corrupted inputs is the obstacle that has kept edge-pruning methods off physiological data. Third, circuits found at one hospital can be tested for faithfulness at another. This gives a concrete, measurable version of the gap between explanations that are faithful for individual patients and explanations that hold across a population, a gap that The Computational Complexity of Circuit Discovery for Inner Interpretability proves is intractable to close exactly.
What is new is the pairing of clinically meaningful counterfactuals with pruning-based circuit search, together with an honest accounting of that search's compute cost. We are not proposing a new pruning criterion for compression.
Research Program
We train small decoder-style transformers of GPT-2 size on the PhysioNet/Computing in Cardiology 2019 sepsis data (Early Prediction of Sepsis from Clinical Data). Each hourly measurement is represented, following the positional-explanation paper, as a value together with its time position. The data contain Hospitals A and B, and we train separately on each. MedGemma and Mamba backbones from the same paper serve as a later extension. Circuit tooling for state-space models is immature, so Mamba is a stretch goal and not a core deliverable.
Two corruptions define two behaviors to explain. In the timing contrast, a patient's measurement positions are randomly swapped while their values stay fixed. The model's shift in sepsis logit under this swap is what the timing circuit must reproduce. In the content contrast, each value is replaced by a value from another patient at the same position and in the same variable. The resulting shift is what the content circuit must reproduce. Both corruptions produce inputs that look like real ICU records. The name-swap corruptions used for language tasks have no such clinical counterpart, and this is the missing piece the research file identifies.
The search follows Discovering Transformer Circuits via a Hybrid Attribution and Pruning Framework, which runs edge attribution patching at a permissive threshold as a coarse filter and then applies exact edge pruning on the surviving subgraph. That paper reports this as 46% faster than pure edge pruning on indirect object identification without losing cooperative components. We adapt it to the two corruptions. We then post-check each circuit for quasi-minimality, meaning that at least one component breaks the behavior when removed. The complexity paper shows this relaxed property can be checked in polynomial time, even though finding a truly minimal circuit is NP-hard. We treat that check as the practical guarantee we can actually certify.
Faithfulness of a circuit $C$ under corruption $\tilde{x}$ is measured as the fraction of the model's logit shift that the circuit alone recovers. In the definition below, $M$ is the full model and $M_C$ is the model with all edges outside $C$ patched to their values under $\tilde{x}$:
$$F(C) = \frac{\mathbb{E}\,[M_C(x) - M_C(\tilde{x})]}{\mathbb{E}\,[M(x) - M(\tilde{x})]}.$$
We report $F$ within the hospital where the circuit was found and at the other hospital. We also record circuit size and GPU-hours.
The clinical reading of the circuits then asks which input variables feed into each circuit's first-layer edges. The content circuit's inputs are compared against SOFA variables and against the physiological drivers the positional-explanation paper surfaced (Age, pH, BUN, AST). The timing circuit should draw disproportionately on first-step demographic tokens.
Baselines
The naive reference point is the dense model explained with LIME, the explainer the positional-explanation paper showed attributes importance to Gender through primacy bias. We run it on the same trained checkpoints. Beating it on attribution quality means cutting Gender's attribution rank without lowering deletion and insertion faithfulness.
The strongest existing interpretability method for this data is the positional explainer itself (PaX). It is the most direct competitor because it already separates timing from content, and it does so at the input level without touching weights. On MC-MED it raised insertion AUC by up to 0.03 over feature-only baselines. For our PhysioNet transformer, no reported PaX number was found on Lacuna, so we rerun it on our checkpoints with the same perturbation budget. Circuits beat PaX if two things hold. First, ablating the timing circuit changes predictions in the direction PaX's timing scores forecast, so that the circuit is causal support for PaX rather than a rival story. Second, the circuit additionally transfers across hospitals with higher $F$ than PaX's per-feature ranking achieves as a predictor of the other site's attributions.
For circuit search cost, the baselines are ACDC (Towards Automated Circuit Discovery for Mechanistic Interpretability) and full edge pruning. ACDC recovered the 26-head indirect-object circuit in GPT-2 Small in 8 minutes on one A100; no reported result was found on Lacuna for any circuit method on clinical time series. All searches get the same corruption sets, the same calibration patients, the same hardware, and a matched sweep over thresholds. The hybrid search wins if it matches full edge pruning's $F$ within noise at substantially lower GPU-hours.
For predictive performance, the reference is the temporal convolutional network (TCN) from Does Deep Learning REALLY Outperform Non-deep Machine Learning for Clinical Prediction on Physiological Time Series?, which reports AUROC 0.924 against 0.75 for the best tree model. That result is on a 40,336-sample subset and is not directly comparable to the challenge's 0.33 to 0.36 utility scores. We retrain the TCN on our splits. Our transformers must land near it for circuits of the transformer to be clinically relevant.
Two ablations isolate the key ingredient. The first swaps our in-distribution corruptions for zero or mean ablation, which tests whether the clinically valid counterfactual matters. The second applies the timing-circuit ablation to a random set of edges of equal size.
Why not just…?
Why not just use PaX and skip the internals? PaX tells us which inputs matter through timing. It cannot say whether the shortcut is concentrated in a few components or spread diffusely, and that determines whether it can be removed surgically and whether it recurs across sites. If the timing circuit turns out not to be small, that is itself the finding. In that case PaX-style input-level correction is the right tool, and our experiments would show it.
Why not just retrain with position-swap augmentation, or drop first-step demographics? This is a real threat to any debiasing claim. Retraining with randomized positions may remove primacy bias more cleanly than ablation does. We therefore include it as a debiasing baseline, with a matched training budget. If it matches circuit ablation on Gender attribution and AUROC, we drop the debiasing claim. The audit contribution survives regardless: augmentation shows that a bias can be trained away, but it does not show where the bias lived in a deployed model or whether a hospital's model carries it.
Why not just run edge attribution patching once, which is nearly free? The hybrid-search paper shows that attribution patching alone misses cooperative components such as S-inhibition heads. We report attribution-only circuits alongside the hybrid ones. If attribution alone achieves the same $F$ on clinical models, the cheaper method wins and we say so.
Why not just use XGBoost with feature importances? On physiological sequences, the gap reported by Liao et al. (AUROC 0.924 versus 0.75) is too large to accept for sepsis sensitivity. Their data-scaling result also shows that the deep-learning advantage appears only in the thousands-of-samples regime, and both hospitals exceed that.
Proposed Experiments
The first decisive check is concentration. On Hospital A models, we test whether a timing circuit using a small fraction of edges recovers most of the position-swap logit shift ($F$ near one). We then test whether ablating that circuit drops Gender out of the top attributions while AUROC moves by less than the gap between the transformer and the TCN. The random-edge control must show no such effect.
The second check is transfer across hospitals. We measure $F$ for Hospital A circuits evaluated on Hospital B and compare it with circuits found natively on B, along with edge overlap between the two. Given the site effect documented in the challenge paper, low transfer for the content circuit and high transfer for the timing circuit would indicate that the architectural artifact is shared across sites while the physiology is site-specific. That result would be clinically important.
The third check is cost. We record GPU-hours for ACDC, full edge pruning, the hybrid search, and attribution-only search, each at matched $F$. The proposal succeeds on the pruning-overhead axis if the hybrid search stays within a small multiple of attribution-only cost while matching the circuits found by full edge pruning.
The fourth check is corruption validity. Circuits found under mean or zero ablation are compared with circuits found under the in-distribution corruptions. The comparison covers size, transfer across hospitals, and agreement of input variables with SOFA and the PaX drivers. Our hypothesis is that the out-of-distribution corruptions yield larger circuits that are less clinically coherent.
References
- Interpreting Sepsis Prediction through Positional Explanation
- The Computational Complexity of Circuit Discovery for Inner Interpretability
- Early Prediction of Sepsis from Clinical Data: the PhysioNet/Computing in Cardiology Challenge 2019
- Discovering Transformer Circuits via a Hybrid Attribution and Pruning Framework
- Towards Automated Circuit Discovery for Mechanistic Interpretability
- Does Deep Learning REALLY Outperform Non-deep Machine Learning for Clinical Prediction on Physiological Time Series?