Abstract / Summary
Abstract Precision medicine increasingly leverages molecular and clinical similarity to identify patient subgroups and guide individualized care. However, conventional cross-sectional approaches often characterize biological states independently of the clinical context in which they arise. Similar laboratory profiles may have different clinical implications depending on subsequent trajectory, while biologically distinct states may share similar clinical outcomes. Consequently, clustering based solely on clinical trajectory-agnostic clustering may incompletely capture clinically relevant heterogeneity. To address these limitations, we introduce CERL (Contextual Endotype and State Representation Learning), a clinical trajectory-informed representation learning framework that integrates clinical contexts to construct patient-state representations from clinical data. Rather than defining patients solely through discrete clusters, CERL learns a continuous clinical state space that preserves biological heterogeneity while organizing states according to clinically relevant trajectories. Across both simulated and real datasets, CERL robustly identified latent patient groups and reliably reproduced the learned patient groups in validation. In a proof-of-concept application across multi-institutional critical care cohorts, CERL identified three reproducible clinical state groups embedded within a state representation. The representation captured systematic variation in routine laboratory phenotypes and demonstrated clinical trajectory-specific redistribution dynamics within the continuous state space. These findings establish CERL as a framework for generating clinically contextualized state representations that integrate biological characteristics with clinical trajectories, providing a foundation for longitudinal pathological progression modeling and future digital twin approaches in critical care.