HACSurv
HACSurv: A Hierarchical Copula-based Approach for Survival Analysis with Dependent Competing Risks
Install / Use
/learn @Raymvp/HACSurvREADME
HACSurv: A Hierarchical Copula-Based Approach for Survival Analysis with Dependent Competing Risks
PyTorch implementation for the paper: HACSurv: A Hierarchical Copula-Based Approach for Survival Analysis with Dependent Competing Risks (AISTATS 2025).
<div align="center"> <img src="github_HACSurv.png" width="700px" /> </div>1. Framingham Dataset
Step 1: Learning the Hierarchical Archimedean Copula (HAC)
- Notebook:
HACSurv_FRAMINGHAM.ipynb- Learn copulas for pairs (0,1), (0,2), and (1,2).
- Select the strongest copula as the Inner copula.
- Select the weakest copula as the Outer copula.
Step 2: Conducting Survival Analysis Experiments
-
Reproducing HACSurv:
RunNew_HACSurv_FramingHam_bached.pyafter setting the paths to the inner and outer copula parameter files. -
Reproducing HACSurv (Symmetry):
Set the appropriate paths in the script and runNew_SymHACSurv_FramingHam_bached.py. -
Reproducing HACSurv (Independent):
In the optimizer configuration, comment out the following line:{"params": model.phi.parameters(), "lr": 5e-4}
2. Synthetic Dataset
Use Pre-trained HAC Checkpoint
- Run the following command:
python HACSurv_competing_syn.py
Learn HAC Parameters Yourself
- Step 1: Run
Synthetic_competing_learn_step1_copula.pyto capture the copula between events and censoring. - Step 2: Use
competing_syn_get_HAC.ipynbto:- Select two strongly dependent copulas (typically 01 and 23) as the inner copula.
- Choose the weakest copula as the outer copula.
- (This notebook also visualizes the learned HAC structure.)
- Step 3: Update the HAC checkpoint path in
HACSurv_competing_syn.pyand run the survival analysis experiments.
- To reproduce HACSurv (Symmetry) and HACSurv (Independent) results, run:
python Symmetry_HACSurv_competing_syn.py- For HACSurv (Independent): In the optimizer configuration, comment out the line:
{"params": model.phi.parameters(), "lr": 5e-4}
- For HACSurv (Independent): In the optimizer configuration, comment out the line:
3. MIMIC-III Dataset
-
Direct Experimentation:
Run the following command to use our pre-trained HAC checkpoint:python New_HACSurv_MIMIC.py -
Learning HAC Structure:
i. RunMIMIC_copula.pyto learn the copula between events and censoring.
ii. Since events 1, 3, and 5 (related to respiratory diseases) show strong dependency, an inner copula is learned to capture their dependency. UseMIMIC_learn_HAC.ipynbto learn the copula for events 1, 3, and 5 (copula 135) and to learn the inner copula 135 and 24.
iii. Experiment: Update the copula checkpoint path inNew_HACSurv_MIMIC.pyand perform the survival analysis experiments. -
Reproducing HACSurv (Symmetry) and HACSurv (Independent) Results:
Run the following command:python New_HACSurv_Sym__MIMIC.py
4. Specifying a Known Copula for Survival Analysis
Some practitioners may wish to specify a known copula for survival analysis. Using our HACSurv framework, this is achievable.
First, you can use the copula toolbox to sample from your specified copula. Then, use MLE to learn the copula network from these samples. Finally, freeze the HAC network to perform survival analysis.
If you have any questions or are interested in collaboration, feel free to contact:
xliu@seu.edu.cn
Citation
If you find this work useful, please consider citing our paper:
@inproceedings{
liu2025hacsurv,
title={{HACS}urv: A Hierarchical Copula-based Approach for Survival Analysis with Dependent Competing Risks},
author={Xin Liu and Weijia Zhang and Min-Ling Zhang},
booktitle={The 28th International Conference on Artificial Intelligence and Statistics},
year={2025},
url={https://openreview.net/forum?id=R2Xaxv4ADz}
}
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
isf-agent
a repo for an agent that helps researchers apply for isf funding
