Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dcph): enable federated learning with DeepCoxPH #134

Conversation

matteo4diani
Copy link
Contributor

@matteo4diani matteo4diani commented Nov 10, 2023

Solves #120

Federated learning is of great interest for survival analysis: to use the DeepCoxPH model in a FedML experiment we need a couple of features that this PR adds:

  • Easy access to the PyTorch module -> this allows for clean-code when we need to access the torch module often, as when manipulating state dicts in a federated experiment
  • PyTorch module init before fit -> this allows injection of a pre-existing state dictionaries into a fresh model, needed for federated training
  • Time-independent risk prediction + optional Breslow estimator -> The Breslow estimator conserves too much info (e.g. unique event times) about the dataset, it cannot be used as-is in a federated experiment as it could cause privacy issues.

A couple of unrelated QoL improvements have been added to this PR to support its implementations, namely:

  • datasets.load_dataset now has a return_features kwarg for SUPPORT that returns a dict containing categorical and numerical feature names, allowing for easier preprocessing
  • Minimal .gitignore to avoid sifting through useless __pycache__ entries when adding changes to git after running tests
  • Integration tests for the dcph.DeepCoxPH model
  • Fix indentation in dsm tests

* Expose PyTorch module under torch_module @Property
* Add pre-init of PyTorch module to allow for state dictionary injection
* Make Breslow fit optional
* Add time-independent risk prediction to avoid sharing unique times between FedML clients via the Breslow fit
@matteo4diani matteo4diani changed the title feat(dcph): enable federated learning with auton-survival feat(dcph): enable federated learning with DeepCoxPH Nov 10, 2023
@matteo4diani
Copy link
Contributor Author

@chiragnagpal please review 🙏🏼

@matteo4diani
Copy link
Contributor Author

Integrated in #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant