🤖 AI Summary
Survival analysis suffers from fragmented model interfaces, cumbersome preprocessing, and a lack of standardized evaluation protocols—hindering clinical adoption and methodological advancement. To address this, we introduce the first scikit-learn–compatible, unified survival analysis framework that seamlessly integrates classical statistical models (e.g., Cox proportional hazards, parametric survival models) with state-of-the-art deep learning approaches (e.g., Transformer-based and neural survival models). We propose a novel API design explicitly tailored for censored data, supporting time-dependent risk prediction, censoring-aware cross-validation, and hyperparameter optimization. The framework incorporates domain-specific evaluation metrics—including IPCW-weighted Brier score and time-dependent concordance index. Empirical validation across multiple clinical and real-world datasets confirms interface consistency and preserves model performance comparability. The open-source implementation has gained widespread adoption, substantially lowering the barrier to rigorous survival modeling in both research and practice.
📝 Abstract
Survival analysis, a foundational tool for modeling time-to-event data, has seen growing integration with machine learning (ML) approaches to handle the complexities of censored data and time-varying risks. Despite these advances, leveraging state-of-the-art survival models remains a challenge due to the fragmented nature of existing implementations, which lack standardized interfaces and require extensive preprocessing. We introduce SurvHive, a Python-based framework designed to unify survival analysis methods within a coherent and extensible interface modeled on scikit-learn. SurvHive integrates classical statistical models with cutting-edge deep learning approaches, including transformer-based architectures and parametric survival models. Using a consistent API, SurvHive simplifies model training, evaluation, and optimization, significantly reducing the barrier to entry for ML practitioners exploring survival analysis. The package includes enhanced support for hyper-parameter tuning, time-dependent risk evaluation metrics, and cross-validation strategies tailored to censored data. With its extensibility and focus on usability, SurvHive provides a bridge between survival analysis and the broader ML community, facilitating advancements in time-to-event modeling across domains. The SurvHive code and documentation are available freely at https://github.com/compbiomed-unito/survhive.