  Predicting the likelihood of survival is of paramount importance for
individuals diagnosed with cancer as it provides invaluable information
regarding prognosis at an early stage. This knowledge enables the formulation
of effective treatment plans that lead to improved patient outcomes. In the
past few years, deep learning models have provided a feasible solution for
assessing medical images, electronic health records, and genomic data to
estimate cancer risk scores. However, these models often fall short of their
potential because they struggle to learn regression-aware feature
representations. In this study, we propose Survival Rank-N Contrast (SurvRNC)
method, which introduces a loss function as a regularizer to obtain an ordered
representation based on the survival times. This function can handle censored
data and can be incorporated into any survival model to ensure that the learned
representation is ordinal. The model was extensively evaluated on a HEad \&
NeCK TumOR (HECKTOR) segmentation and the outcome-prediction task dataset. We
demonstrate that using the SurvRNC method for training can achieve higher
performance on different deep survival models. Additionally, it outperforms
state-of-the-art methods by 3.6% on the concordance index. The code is publicly
available on https://github.com/numanai/SurvRNC
