AToP Translates EHR Attributions Into Temporal Pattern Narratives
A new explainability framework called AToP recasts Transformer predictions on electronic health records into visit-anchored clinical stories rather than isolated token scores. Built for unplanned 30-day readmission prediction, the approach takes per-token Integrated Gradients and organizes them into frequent temporal patterns that can be read as sequences, co-occurrences, and cross-visit trajectories. The core aim is straightforward but technically demanding: make a deep learning model’s internal logic legible without pretending the explanation is the same thing as causation.
The model underlying the framework was trained on MIMIC-IV v3.1, a large ICU-oriented dataset containing 218,196 patients, with 12.6% experiencing unplanned 30-day readmission. Its predictive performance was moderate, with an AUROC of 0.77 and a PR-AUC of 0.34. Those numbers matter because they frame the explainability task in realistic terms: a model that can rank risk better than chance still makes clinically meaningful errors, so any explanation layer has to reveal both what it appears to be using and where it may be leaning on broad population frequencies rather than patient-specific signals.
AToP addresses that problem by mining frequent episodes from salient-token subsequences in the training cohort. It then aggregates attribution among patients whose records contain a given token or pattern, and it collapses near-duplicate patterns using patient overlap. The result is not a simple feature-importance list. It is a hierarchical map of signals that can be read at different levels: token, within-visit pattern, and trajectory across visits.
Population Frequency and Patient-Specific Attribution Pulled in Different Directions
The contrast between population-weighted attribution and carrier-conditional attribution was one of the clearest findings. When attribution was weighted across the full population, high-prevalence codes dominated the explanation, even when their impact on any individual patient was small. In practical terms, common diagnoses and routine documentation can appear influential simply because they recur so often in the corpus. For bedside interpretation, that is a warning sign: prevalence can masquerade as importance when a model is summarized only at the cohort level.
Carrier-conditional attribution produced a very different picture. By averaging attribution only among patients who actually carried the token, the framework surfaced rare but highly attributed psychiatric markers, including psychosis, self-harm overdose, suicidal ideation, and severe major depressive disorder. These are the kinds of features a clinician would want an explainability system to surface if it is truly reflecting individualized risk structure rather than dataset frequency.
A token that appears in few records can still carry heavy predictive weight.
That shift matters because rare psychiatric events often cluster around acute instability, care fragmentation, and repeated emergency utilization. In a readmission model, those signals may capture the downstream consequences of behavioral health burden, medication disruption, social risk, or prior crisis care. The framework does not prove those mechanisms, but it does expose a plausible clinical logic that is otherwise hidden when attention is reduced to the highest-frequency codes alone.
Temporal Pattern Mining Exposed Sequences the Token Rankings Missed
The most clinically interesting element of AToP is its move beyond individual tokens into temporal structure. Token-level rankings can tell you that a diagnosis appears important, but they cannot show whether importance arises from a single encounter, a repeated pattern, or a change in clinical state over time. Pattern-level attribution filled that gap by identifying within-visit co-occurrences and cross-visit trajectories that were not captured by token rankings.
Several risk-increasing sequences stood out. Psychiatric progressions such as {MDD, SI} → SI suggested that a prior combination of major depressive disorder and suicidal ideation may be followed by persistent or escalating suicidal ideation in later visits. Oncologic progression also emerged, including a sequence from cancer anemia to ascites. In a hospital readmission model, this type of pattern is biologically and clinically plausible: advancing disease burden, treatment toxicity, or fluid overload can cluster with repeated acute care use, and the temporal ordering gives the model a way to register deterioration rather than a static diagnosis list.
Some patterns moved in the opposite direction. Obstetric patterns and chest pain evaluation patterns were associated with lower predicted readmission. Those findings likely reflect the structure of the training data as much as any direct protective effect. Obstetric admissions and chest pain rule-outs often involve defined pathways, shorter episodes, or lower downstream complexity than the unstable chronic disease trajectories that drive repeated readmissions. The model may be learning that these episodes, in this dataset, tend to resolve without the same level of near-term return risk.
Faithfulness Checks Supported the Framework Without Making It a Clinical Truth Machine
Validation focused on whether the pattern explanations aligned with model behavior. Masking tests, reversed-order analysis, token-level faithfulness tests, and comparison with KernelSHAP all served that purpose. These checks do not turn an explainability method into a biological assay, but they do establish whether the framework reacts in the same direction as the underlying model when information is removed or reordered.
Reversal of visit order is particularly informative in a temporal model. If the explanation shifts when sequence changes, the method is not merely describing a static bag of codes; it is tracking temporal dependencies that the Transformer itself has learned. Likewise, masking salient tokens tests whether the predicted signal weakens when an explanation-identified feature is obscured. Together, those analyses provide evidence that AToP is doing more than rephrasing the input data.
Even so, the framework stops short of clinical causality. Pattern attributions do not represent unique effects, and they do not establish validity outside the model’s learned representation. A sequence can be highly attributed because it is a reliable statistical marker of the training cohort, not because it is a direct driver of readmission. That distinction is essential for clinicians who might otherwise mistake a high-attribution pattern for a treatment target.
Why This Kind of Explainability Matters at the Bedside
Readmission prediction models are often judged on discrimination alone, but clinicians need to know whether the signal is driven by chronic illness burden, acute instability, psychiatric comorbidity, or simply dense documentation. AToP moves closer to that question by separating frequent codes from rare patient-specific markers and by showing how temporal order changes the explanation. In a hospital environment, that can help teams audit whether the model is tracking meaningful trajectories or amplifying administrative noise.
The method also points toward a more usable form of model review. A clinician examining a patient with repeated psychiatric crises may find more value in a narrative that links suicidal ideation, severe depression, and subsequent persistence of risk than in a flat importance ranking. The same is true for an oncology patient whose risk appears to rise as anemia gives way to ascites. Those sequences resemble the way clinicians already think: not in isolated labels, but in unfolding patterns of deterioration or stabilization.
At the same time, the framework remains tied to one dataset, one prediction target, and one class of Transformer architecture. Its explanations are only as good as the underlying model and the clinical records that fed it. The next question is not whether AToP can produce a more readable explanation — it clearly can — but whether those explanations hold up across other institutions, other coding practices, and other outcomes where the temporal structure of disease is less obvious.