sparsesurv: Knowledge distillation for sparse semiparametric survival models
Authors/Creators
- 1. ETH Zurich
- 2. IBM Research Europe
Description
Regularized models that perform integrated feature selection, such as the Lasso, have found broad application in high-dimensional time-to-event settings. Genomic and transcriptomic cancer survival datasets, where the p >> n regime is commonly observed, particularly benefit from these methods. Despite their broad usage, these models are prone to over-regularize and sensitive to the choice of the regularization hyperparameter. To enable easy survival analysis for such high-dimensional datasets while mitigating these challenges, we propose sparsesurv, a Python package for fitting sparse, semi-parametric, right-censored survival models via knowledge distillation (KD). KD, known as pre-conditioning in statistics, is a technique wherein a smaller neural network (student) is trained on the predictions of an ensemble of neural networks (teachers). Useful for both model compression and feature selection, a correct implementation of KD for survival analysis comes with its challenges. For example, selecting the appropriate teacher-student models and the right scoring function for hyperparameter selection to name a few. sparsesurv takes care of these implementation challenges by providing a set of teacher-student model pairs while allowing the user to include any custom teacher models that are compatible with the available student models. As part of this cohort of models, sparsesurv includes implementations of linear variants of the semiparametric Accelerated Failure Time (AFT) and the Extended Hazards (EH) model which are currently unavailable in Python. To enable easy execution of the KD methods, sparsesurv includes pipelines for the Cox PH model, the AFT model, and the EH model which provide the user with the flexibility of using scoring functions suited for the task at hand. Additionally, sparsesurv also includes survival function estimators circumventing the need to import external packages or even self-implemented functions for the same. As part of testing/validating our toolkit, we compare our distilled implementation of the Cox PH model to previous works on sparse linear Cox PH models and show that KD-based approaches achieve better discriminative performance across the regularization path while making the choice of the regularization hyperparameter significantly easier.