TorchSurv: A Lightweight Package for Deep Survival Analysis

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.To address these gaps, we propose a library that allows users to define survival model parameters using custom PyTorch-based neural network architectures.By combining computational efficiency with ease of use, this toolbox opens new opportunities to advance deep survival analysis research and application.Figure 1 compares the functionalities of TorchSurv with those of auton-survival (Nagpal et al., 2022), pycox (Kvamme et al., 2019), torchlife (Abeywardana, 2021), scikit-survival (Plsterl, 2020), lifelines (Davidson-Pilon, 2019), and deepsurv (Katzman et al., 2018).We notice that existing libraries constrain users to predefined functional forms for defining the parameters (e.g., linear function of covariates).Additionally, while there exist log-likelihood functions in the libraries, they cannot be leveraged.The limitations on the log-likelihood functions include protected functions (locked model architecture), specialized input requirements (format or class type), and reliance on external libraries like NumPy or Pandas.Dependence on external libraries hinders automatic gradient

Authors

Institutions

Publication Details

Journal
The Journal of Open Source Software
Published
2024-12-30
DOI
https://doi.org/10.21105/joss.07341
Citations
4
Primary Topic
Domain Adaptation and Few-Shot Learning
Type
article
Field-Weighted Citation Impact
1.39
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

TorchSurv: A Lightweight Package for Deep Survival Analysis

Nicholas Petrick, David Ohlssen, Peter Krusche, Mélodie Monod et al.
4 citations
The Journal of Open Source Software
Domain Adaptation and Few-Shot Learning
1.39
article

TorchSurv: A Lightweight Package for Deep Survival Analysis

Nicholas Petrick, David Ohlssen, Peter Krusche, Mélodie Monod, Thibaud Coroller, Berkman Sahiner, Qian Cao
article en
4 citations

Abstract

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.To address these gaps, we propose a library that allows users to define survival model parameters using custom PyTorch-based neural network architectures.By combining computational efficiency with ease of use, this toolbox opens new opportunities to advance deep survival analysis research and application.Figure 1 compares the functionalities of TorchSurv with those of auton-survival (Nagpal et al., 2022), pycox (Kvamme et al., 2019), torchlife (Abeywardana, 2021), scikit-survival (Plsterl, 2020), lifelines (Davidson-Pilon, 2019), and deepsurv (Katzman et al., 2018).We notice that existing libraries constrain users to predefined functional forms for defining the parameters (e.g., linear function of covariates).Additionally, while there exist log-likelihood functions in the libraries, they cannot be leveraged.The limitations on the log-likelihood functions include protected functions (locked model architecture), specialized input requirements (format or class type), and reliance on external libraries like NumPy or Pandas.Dependence on external libraries hinders automatic gradient

The Journal of Open Source SoftwareVol. 9(104)
Novartis (Switzerland) (CH), Center for Devices and Radiological Health (US), Novartis (United States) (US)
Climate action
Openalex Percentile: Top 15%
Domain Adaptation and Few-Shot Learning
1.39
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.