REVIEW 2 major objections 5 minor 19 references
comprisk: A scikit-learn-compatible Python toolkit for competing-risks survival analysis
T0 review · 2 major / 5 minor · reviewed 2026-07-13 · grok-4.5
Pith's one-line read A single scikit-learn Python package now ships correct competing-risks survival analysis without leaving the Python stack.
desk verdict Useful Python tooling paper that closes a real R-to-Python gap for competing risks; engineering claims look solid, with only the usual restricted-cohort speed-table caveat. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The histogram-based, numba-compiled split kernel that quantile-bins continuous features into uint8 codes once and searches splits over histograms of event counts, turning the per-node scan into a bounded, cache-friendly reduction that yields both the reported speed-ups and bit-identical multi-threaded results.
What would settle it
An independent re-implementation or public re-run of the same forest and Fine–Gray estimators on the synthetic two-cause Weibull benchmark (or any fully public competing-risks cohort) that either fails to match the R packages within floating-point tolerance or fails to reproduce the reported wall-time ratios and C-index values.
Extended reading notes
Core claim
comprisk is a native-Python, scikit-learn-compatible toolkit that implements the full set of canonical competing-risks estimators and evaluation tools, each validated to floating-point agreement with the corresponding R reference implementations, while its histogram-based competing-risks random survival forest achieves 10–22 imes wall-time speedups over randomForestSRC at comparable C-index on real EHR cohorts and scales to n = 10^6 on ordinary hardware.
Load-bearing premise
That floating-point numerical agreement with the R reference packages plus comparable C-index on access-restricted cohorts is enough to establish that the Python estimators are statistically correct and that the headline speed claims will hold for other users.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript presents comprisk, a scikit-learn-compatible Python package that consolidates canonical competing-risks methods (competing-risks random survival forest, Fine–Gray and penalized Fine–Gray regression, cause-specific Cox, Aalen–Johansen CIF, Gray’s K-sample test) and competing-risks-aware evaluation (IPCW time-dependent AUC/Brier, cause-specific concordance with closed-form CIs, calibration) behind a single API. Every estimator is stated to be validated numerically against established R references (cmprsk, crrp, survival, riskRegression, randomForestSRC). The forest uses uint8 histogram binning and numba-compiled split kernels, claimed to fit 10–22× faster than randomForestSRC at comparable discrimination (C-index ≈ 0.85) on real EHR cohorts and to scale to n = 10^6 on a consumer CPU. The package is on PyPI, with a public synthetic Weibull benchmark, test suite, and optional equivalence="rfsrc" mode for exact RNG matching.
Significance. If the claims hold, the work removes a genuine friction point for Python-based clinical and epidemiological ML: the need for a Python-to-R round trip to obtain correct CIF-based competing-risks analysis. Consolidating the standard estimators plus IPCW scoring and closed-form concordance CIs under a scikit-learn API, with floating-point validation against independent R references and an explicit equivalence mode, is a useful engineering contribution. The histogram/numba design and reported scaling to n = 10^6 are concrete strengths for modern EHR cohort sizes. The public synthetic benchmark, test suite, and PyPI distribution further support adoption. The main limitation is that the headline real-cohort speed tables rely on access-restricted data, so the precise magnitude of the speedup is not fully independently re-runnable from the paper alone.
major comments (2)
- Data availability section: the headline 10–22× speed and C-index ≈ 0.85 comparisons on the de-identified heart-failure EHR and SEER breast-cancer cohorts cannot be re-run without data-use agreements. While the public synthetic Weibull benchmark and R-equivalence tests support correctness, the manuscript should either (a) add fully public large-n timing tables (e.g., synthetic or open EHR-like data) that reproduce the order of magnitude of the speedup, or (b) clearly demote the restricted-cohort numbers to illustrative and lead with the reproducible synthetic scaling result. As written, the central performance claim is only partially independently verifiable.
- Implementation and design / Abstract: the claim of “comparable discrimination” rests on C-index ≈ 0.85 under each library’s native scorer. Because native scorers can differ (IPCW vs. other formulations), the manuscript should report a side-by-side evaluation under a single common IPCW concordance (or the package’s own concordance_index_ci) on at least the public synthetic benchmark, so that “comparable” is not confounded by scorer choice.
minor comments (5)
- Statement of need: briefly note any existing partial Python efforts (e.g., wrappers or single-method ports) so the gap claim is fully scoped.
- Functionality: list the exact floating-point tolerances or test criteria used for the R-reference checks (e.g., max absolute difference on coefficients/CIFs) so readers can judge “validated numerically.”
- Implementation and design: state the default number of histogram bins (256) and any sensitivity of discrimination to that choice on the public benchmark.
- References: ensure riskRegression and crrp version pins match those used in the validation suite for long-term reproducibility.
- Abstract / Summary: “10–22× faster” is a range; a short table or sentence giving n, p, and hardware for the endpoints of that range would help readers interpret it.
Circularity Check
No circularity: software reimplementation validated against independent external R packages, not a self-referential derivation.
full rationale
comprisk is an engineering/software paper that reimplements established competing-risks estimators (Fine–Gray, cause-specific Cox, Aalen–Johansen, Gray’s test, competing-risks RSF) and reports numerical agreement with independent R packages written by other groups (cmprsk, crrp, survival, riskRegression, randomForestSRC). Speed and discrimination claims are empirical wall-time and C-index comparisons, not tautological predictions from fitted inputs. There is no self-definitional loop, no parameter fitted then re-presented as a prediction, no load-bearing self-citation uniqueness theorem, and no renaming of a known result as a new derivation. The optional equivalence="rfsrc" mode and public synthetic Weibull benchmark further externalize validation rather than close a circular chain. Score 0 is the correct honest finding.
Assumptions & free parameters
free parameters (2)
- histogram_bins =
256 (default)
- random_seed / per-tree RNG stream
assumptions (3)
- domain assumption Standard competing-risks theory: cause-specific CIF is the correct absolute-risk target; treating competing events as censoring biases absolute risk.
- domain assumption Numerical floating-point agreement with R reference packages (cmprsk, randomForestSRC, crrp, survival, riskRegression) implies statistical correctness of the Python estimators.
- ad hoc to paper Histogram binning of continuous features into uint8 codes yields splits of acceptable quality for the reported discrimination.
Cite this review
Pith. "Pith review of comprisk: A scikit-learn-compatible Python toolkit for competing-risks survival analysis." pith.science (2026). https://pith.science/paper/7RDHK6SE
@misc{pith2026260709431,
author = {Pith},
title = {Pith review of: comprisk: A scikit-learn-compatible Python toolkit for competing-risks survival analysis},
year = {2026},
howpublished = {\url{https://pith.science/paper/7RDHK6SE}},
note = {Machine review of arXiv:2607.09431}
}
read the original abstract
Medical time-to-event data are frequently subject to competing risks, where the occurrence of one terminal event precludes the others and standard survival methods that treat competing events as censoring yield biased absolute-risk estimates. Correct analysis instead targets the cause-specific cumulative incidence function (CIF). This methodology has been available to applied researchers almost exclusively through R packages, forcing Python-based machine-learning workflows into a Python-to-R round trip. We present comprisk, a scikit-learn-compatible Python toolkit that consolidates the canonical competing-risks methods (a scalable competing-risks random survival forest together with Fine-Gray subdistribution-hazard regression including a penalized variant, cause-specific Cox regression, the Aalen-Johansen CIF estimator, and Gray's K-sample test) behind a single, consistent API, and adds competing-risks-aware model evaluation (inverse probability of censoring weighted time-dependent AUC and Brier score, cause-specific concordance indices with closed-form confidence intervals, and calibration curves). Every estimator is validated numerically against the established R reference implementations. The forest uses a histogram-based, numba-compiled split kernel that fits 10-22x faster than randomForestSRC at comparable discrimination on real electronic-health-record cohorts and scales to n = 10^6 on a consumer CPU. comprisk is distributed on PyPI and lets applied researchers perform correct and scalable competing-risks analysis entirely within the Python scientific stack.
Reference graph
Works this paper leans on
-
[1]
Austin, Douglas S
Peter C. Austin, Douglas S. Lee, and Jason P. Fine. Introduction to the analysis of survival data in the presence of competing risks.Circulation, 133(6):601–609, 2016. doi: 10.1161/ CIRCULATIONAHA.115.017719
2016
-
[2]
Random forests.Machine Learning, 45(1):5–32, 2001
Leo Breiman. Random forests.Machine Learning, 45(1):5–32, 2001. doi: 10.1023/A: 1010933404324
doi:10.1023/a: 2001
-
[3]
lifelines: survival analysis in Python.Journal of Open Source Software, 4(40):1317, 2019
Cameron Davidson-Pilon. lifelines: survival analysis in Python.Journal of Open Source Software, 4(40):1317, 2019. doi: 10.21105/joss.01317
-
[4]
Jason P. Fine and Robert J. Gray. A proportional hazards model for the subdistribution of a competing risk.Journal of the American Statistical Association, 94(446):496–509, 1999. doi: 10.1080/01621459.1999.10474144
-
[5]
URL https://CRAN.R-project.org/package=crrp
Zhixuan Fu.crrp: Penalized Variable Selection in Competing Risks Regression, 2015. URL https://CRAN.R-project.org/package=crrp. R package version 1.0
2015
-
[6]
Gerds, Johan S
Thomas A. Gerds, Johan S. Ohlendorff, Paul Blanche, et al.riskRegression: Risk Regression Models and Prediction Scores for Survival Analysis with Competing Risks, 2026. URL https: //CRAN.R-project.org/package=riskRegression. R package version 2026.03.11. 4
2026
-
[7]
Gray.cmprsk: Subdistribution Analysis of Competing Risks, 2024
Robert J. Gray.cmprsk: Subdistribution Analysis of Competing Risks, 2024. URL https: //CRAN.R-project.org/package=cmprsk. R package version 2.2-12
2024
-
[8]
Hemant Ishwaran, Udaya B. Kogalur, Eugene H. Blackstone, and Michael S. Lauer. Random survival forests.The Annals of Applied Statistics, 2(3):841–860, 2008. doi: 10.1214/08-AOAS169
Show all 19 references
-
[9]
Gerds, Udaya B
Hemant Ishwaran, Thomas A. Gerds, Udaya B. Kogalur, Richard D. Moore, Stephen J. Gange, and Bryan M. Lau. Random survival forests for competing risks.Biostatistics, 15(4):757–773,
-
[10]
doi: 10.1093/biostatistics/kxu010
-
[11]
Lundberg, Gabriel Erion, Hugh Chen, Alex DeGrave, Jordan M
Scott M. Lundberg, Gabriel Erion, Hugh Chen, Alex DeGrave, Jordan M. Prutkin, Bala Nair, Ronit Katz, Jonathan Himmelfarb, Nisha Bansal, and Su-In Lee. From local explanations to global understanding with explainable AI for trees.Nature Machine Intelligence, 2(1):56–67,
-
[12]
doi: 10.1038/s42256-019-0138-9
-
[13]
scikit-survival: A library for time-to-event analysis built on top of scikit- learn.Journal of Machine Learning Research, 21(212):1–6, 2020
Sebastian Pölsterl. scikit-survival: A library for time-to-event analysis built on top of scikit- learn.Journal of Machine Learning Research, 21(212):1–6, 2020. URL http://jmlr.org/ papers/v21/20-729.html
2020
-
[14]
Hein Putter, Marta Fiocco, and Ronald B. Geskus. Tutorial in biostatistics: competing risks and multi-state models.Statistics in Medicine, 26(11):2389–2430, 2007. doi: 10.1002/sim.2712
2007 doi
-
[15]
Therneau.A Package for Survival Analysis in R, 2024
Terry M. Therneau.A Package for Survival Analysis in R, 2024. URL https://CRAN. R-project.org/package=survival. R package version 3.8-3
2024
-
[16]
Pencina, Ralph B
Hajime Uno, Tianxi Cai, Michael J. Pencina, Ralph B. D’Agostino, and L. J. Wei. On the C-statistics for evaluating overall adequacy of risk prediction procedures with censored survival data.Statistics in Medicine, 30(10):1105–1117, 2011. doi: 10.1002/sim.4154
2011 doi
-
[17]
Koller, Jacqueline C
Marcel Wolbers, Michael T. Koller, Jacqueline C. M. Witteman, and Michael Schemper. Prognostic models with competing risks: methods and application to coronary risk prediction. Epidemiology, 20(4):555–561, 2009. doi: 10.1097/EDE.0b013e3181a39056
2009 doi
-
[18]
Koller, Jacqueline C
Marcel Wolbers, Paul Blanche, Michael T. Koller, Jacqueline C. M. Witteman, and Thomas A. Gerds. Concordance for prognostic models with competing risks.Biostatistics, 15(3):526–539,
-
[19]
doi: 10.1093/biostatistics/kxt059. 5
Reviewed July 13, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.