TorchSurv: A Lightweight Package for Deep Survival Analysis

Mélodie Monod, Peter Krusche, Qian Cao, Berkman Sahiner, Nicholas Petrick, David I. Ohlssen, Thibaud P. Coroller · The Journal of Open Source Software · 2024

TorchSurv is a Python package that serves as a companion tool to perform deep survival modeling within the PyTorch environment (Paszke et al., 2019).With its lightweight design, minimal input requirements, full PyTorch backend, and freedom from restrictive parameterizations, TorchSurv facilitates efficient deep survival model implementation and is particularly beneficial for high-dimensional and complex data analyses.At its core, TorchSurv features calculations of log-likelihoods for prominent survival models (Cox proportional hazards model (Cox, 1972), Weibull Accelerated Time Failure (AFT) model (Carroll, 2003)) and offers evaluation metrics, including the time-dependent Area Under the Receiver Operating Characteristic (ROC) curve (AUC), the Concordance index (C-index) and the Brier Score.TorchSurv has been rigorously tested using both open-source and synthetically generated survival data, against R and Python packages.The package is thoroughly documented and includes illustrative examples.The latest documentation for TorchSurv can be found on our website. Statement of needSurvival analysis plays a crucial role in various domains, such as medicine, economics or engineering.Sophisticated survival analysis using deep learning, often referred to as "deep survival analysis," unlocks new opportunities to leverage new data types and uncover intricate relationships.However, performing comprehensive deep survival analysis remains challenging.Key issues include the lack of flexibility in existing tools to define survival model parameters with custom architectures and limitations in handling complex, high-dimensional datasets.Indeed, existing frameworks often lack the computational efficiency necessary to process large datasets efficiently, making them less suitable for real-world applications where time and resource constraints are paramount.

Read the paper · More papers on PaperTik