Survival analysis is a critical component in healthcare decision-making, as it provides risk predictions for important events in a patient’s medical journey. However, due to data censoring, existing survival analysis methods have limitations. This paper proposes a novel approach called Ontology-aware Temporality-based Contrastive Survival (OTCSurv) analysis framework. OTCSurv enforces pairwise temporal concordance between censored and observed data, utilizing the partially observed time-to-event labels for supervised learning. Unlike previous studies that use ranking methods, OTCSurv employs contrastive methods to learn a discriminative embedding by contrasting data against each other.
The proposed framework consists of three key components. First, an ontological encoder and a sequential self-attention encoder are used to represent longitudinal electronic health record (EHR) data with rich contexts. Second, a temporal contrastive loss is designed to capture varying survival durations through a hardness-aware negative sampling mechanism. This loss function helps define temporal distinctiveness and construct negative sample pairs with adjustable hardness for contrastive learning. Lastly, the contrastive task is integrated into the time-to-event predictive task with multiple loss components.
To validate the effectiveness and explainability of the proposed model, extensive experiments are conducted using a large EHR dataset. The focus is on forecasting the risk of hospitalized patients developing acute kidney injury (AKI), a critical medical condition requiring urgent attention. The results of these experiments are supported by comprehensive quantitative and qualitative studies.