arXiv:2610.25765cs.AIOct 2026

Manuscript Offprint

arXiv:2610.25765

TRACE: Tracking Multimodal Clinical Trajectories for Inpatient Risk Prediction

Minjun Kim, Jong Hak Moon

Abstract

Accurate inpatient risk prediction requires modeling heterogeneous clinical evidence that accumulates irregularly over time. This challenge spans in-hospital mortality, prolonged length of stay, and readmission, each with task-specific observation windows. Existing multimodal approaches combine structured health record data, chest x-rays, and clinical text, but primarily focus on modality fusion, admission-level relational structure, or missing-modality compensation, with limited attention to how clinical evidence evolves as a temporal trajectory over the course of an admission. We propose TRACE (TRAjectory modeling of multimodal Clinical Events), a daily-scale global-local framework that organizes recorded clinical events into a day-level trajectory, separating day-invariant global context, such as demographics and diagnosis-derived information, from day-specific local events drawn from structured EHR data, chest x-rays, radiology reports, and discharge summaries. The resulting trajectory is encoded using temporal global-local attention, allowing unavailable modalities to emit no tokens rather than being imputed. A phenotype-guided contrastive objective further organizes admissions according to both outcome status and diagnosis-derived phenotype, providing additional structure under heterogeneous disease distributions. We construct cohorts from MIMIC-IV, eICU, and MIMIC-III comprising nearly 180,000 admissions and ICU stays, and evaluate TRACE on in-hospital mortality, prolonged length of stay, and 30-day readmission prediction. TRACE achieves the highest AUROC across all nine dataset-task settings and the highest ACC in eight, compared with fusion-centered, relational, and missing-modality-aware baselines. Ablation studies show that the temporal global-local attention mask achieves the highest AUROC across all three tasks on MIMIC-IV, while phenotype-guided contrastive learning improves mean phenotype-stratified AUROC across all nine dataset-task settings. Trajectory-level attribution further localizes the hospital days and modalities associated with changes in predicted risk.

Keywords: Inpatient risk prediction, multimodal clinical trajectory modeling, electronic health records, temporal attention, supervised contrastive learning

1 Introduction

Inpatient risk prediction is challenging because patient status evolves over time and is documented through heterogeneous, irregularly recorded clinical events [1–11]. During hospitalization, clinicians integrate relatively stable patient context, such as demographics and diagnosis-derived information, with evolving signals, including laboratory measurements, medications, procedures, imaging findings, and clinical notes [6–10]. These data do not form a complete or uniformly sampled multimodal record. Instead, each admission contains a patient- and dataset-specific subset of modalities, and the meaning of the recorded events depends not only on what is observed, but also on when it occurs and how it changes over time [6–8].

Inpatient risk prediction is commonly formulated as admission-level binary classification, in which the model estimates the probability of an adverse outcome, such as prolonged length of stay (Long LOS), in-hospital mortality, and 30-day readmission [1, 2, 6–11]. The clinically appropriate observation window differs across these binary prediction tasks. Long LOS prediction is most useful early in the admission for resource planning [12–14], whereas in-hospital mortality prediction and 30-day readmission prediction may use data recorded over the completed hospitalization [2, 6–10]. A unified trajectory model should therefore support task-specific observation windows while preserving the temporal organization of the clinical record.

The central modeling challenge lies in how the admission representation is constructed within each observation window. Compressing the available data into a single static representation can obscure day-specific changes in patient status [4,5], while conventional multimodal fusion often assumes a fixed input structure that does not reflect the incomplete and irregular nature of real-world clinical records [6–9, 11, 15, 16]. A rigid organization of inputs may also fail to distinguish early prediction settings from completed-admission assessment.

Prior clinical AI models have addressed important aspects of this problem. Multimodal fusion methods combine structured EHR, imaging, and clinical text [2, 6–9, 15]; graph-based approaches [10] incorporate admission similarity or relational structure; and missing-modality methods [6–8] improve learning when some modalities are unavailable. These directions have substantially advanced admission-level clinical prediction, but with limited attention to how clinical evidence evolves as a temporal trajectory over the course of an

∗^{*}Equal contribution.

†^{\dagger}Corresponding author: Jong Hak Moon. Both authors are with Yeji X (mj.kim@yejix.ai; jh.moon@yejix.ai).

Figure

Figure 1: Overview of TRACE. Admission-level global categories and local inputs recorded within the task-specific observation window are encoded using frozen pretrained vision or language encoders, projected into a shared space, and augmented with modality and day embeddings. For visual brevity, the category-specific global tokens Gi\mathbf{G}_i are shown collectively as GclsG_{\text{cls}}. Global tokens, day-specific local tokens Li(k)\mathbf{L}_i^{(k)}, and learnable [TASK] and [PHENO] tokens are encoded by a masked Transformer using the temporal global-local attention mask ATGL\mathbf{A}^{\text{TGL}}, which keeps global context accessible, preserves temporal order among local events, and allows [PHENO] to attend to [TASK] but not the reverse. The encoded [TASK] and [PHENO] states produce p^(k)\hat{p}^{(k)} and r(k)\mathbf{r}^{(k)}, respectively, and are jointly optimized using L(k)=Lpred(k)+λLpheno(k)\mathcal{L}^{(k)} = \mathcal{L}_{\text{pred}}^{(k)} + \lambda \mathcal{L}_{\text{pheno}}^{(k)}. Snowflake and flame icons indicate frozen and trainable modules.

admission. Less directly addressed is how to construct a unified admission representation that reflects this trajectory at the day level, separates stable global context from evolving local events, and accommodates task-specific temporal windows across datasets with different modality availability.

We propose TRACE (TRAjectory modeling of multimodal Clinical Events), a daily-scale global-local framework for multimodal inpatient risk prediction. TRACE retains the admission-level prediction objective but changes how the clinical record is represented before the final task-specific prediction. For each task, the model organizes multimodal clinical events recorded within the corresponding observation window along the admission timeline, separating day-invariant global context, such as demographic, diagnosis-derived, or severity-related information, from day-specific local events, including structured EHR events, imaging studies, radiology reports, and clinical documentation. Because each local event is tied to a specific day and modality, real-world irregularity in modality availability is handled naturally: rather than forcing each admission to conform to a complete multimodal grid, TRACE operates directly on whatever is actually recorded, with missing modalities simply emitting no tokens. This event-driven representation preserves modality identity, hospital-day position, and the temporal structure of the recorded clinical data.

To encode the resulting trajectory, TRACE uses temporal global-local (TGL) attention. Global context tokens remain accessible across the trajectory because they are not tied to a specific hospital day, whereas local event tokens follow the temporal order of the admission and support same-day multimodal fusion. This design combines stable patient context with evolving daily events without reconstructing unobserved modalities.

TRACE further incorporates phenotype-guided supervised contrastive learning to organize admission representations. Patients reaching the same endpoint may follow heterogeneous disease trajectories [17,18], and prior work has demonstrated the value of contrastive learning for structuring clinical representations [19]. We therefore define positive pairs using both outcome status and diagnosis-derived phenotype [20,21].

We evaluate TRACE on MIMIC-IV [22], eICU [23], and MIMIC-III [24] across three clinically distinct binary prediction settings: in-hospital mortality prediction using the completed admission, early Long LOS prediction from the first 48 hours, and discharge-time prediction of 30-day readmission. Across these datasets and tasks, TRACE achieves consistent discrimination gains over fusion-centered, relational, and missing-modality-aware baselines. Ablation studies evaluate the contribution of individual modalities, temporal global-local attention, and phenotype-guided contrastive learning. Finally, trajectory-level attribution localizes hospital days and modality-specific inputs associated with changes in predicted risk.

Our contributions are summarized as follows:

• We propose TRACE, a daily-scale multimodal framework that separates day-invariant global context from day-specific local events and encodes them as a temporal global-local trajectory using temporal global-local (TGL) attention within each task-specific observation window.

• We incorporate phenotype-guided contrastive learning to structure admission representations jointly by outcome status and diagnosis-derived phenotype.

• We evaluate TRACE on MIMIC-IV, eICU, and MIMIC-III across in-hospital mortality, Long LOS, and 30-day readmission prediction, achieving the highest AUROC across all nine dataset-task settings.

• We show that trajectory-level attribution localizes the hospital days and modalities driving changes in predicted risk, offering an interpretable view of how predictions evolve over an admission.

References (30)