flower icon indicating copy to clipboard operation
flower copied to clipboard

Proposal: Add Split Learning Example to Flower

Open Raunak-Singh-Inventor opened this issue 4 months ago • 6 comments

Type

Documentation Improvement

Description

Proposed Contribution

I’d like to contribute a minimal working example of split learning under examples/split_learning/.

The example would:

  • Use PyTorch for model definition.
  • Split the model into client-side and server-side parts.
  • Demonstrate training on a simple dataset (e.g., CIFAR-10 or MNIST).
  • Show how Flower’s Strategy + Client APIs can orchestrate split learning.

Planned Implementation

Implementation Plan

  1. Implement a SplitLearningStrategy extending Flower’s Strategy.
  2. Implement a SplitClient that handles cut-forward / cut-backward operations.
  3. Add a runnable demo in examples/split_learning/ with a README.
  4. Add tests (basic correctness + CI integration).
  5. Provide a Colab/Jupyter notebook tutorial for users.

Additional Context

If maintainers agree with this proposal, I’d like to begin implementing it and open a PR.

Raunak-Singh-Inventor avatar Aug 19 '25 03:08 Raunak-Singh-Inventor

Hi @Raunak-Singh-Inventor,

Great incentive and really cool example! I'd be happy to support you throughout the process together with the rest of the team. Will get back to you tomorrow, need to check with the team to align on efforts in getting this potential example up and running, but I don't see any major hinders.

Looking forward to this.

WilliamLindskog avatar Aug 19 '25 22:08 WilliamLindskog

@Raunak-Singh-Inventor just following up here, we'd be happy to support you through the PR process. Feel free to open a pull request and follow the code structure as in the following examples:

  • https://github.com/adap/flower/tree/main/examples/app-pytorch
  • https://github.com/adap/flower/tree/main/examples/quickstart-catboost

Lmk if you have any questions.

WilliamLindskog avatar Aug 20 '25 13:08 WilliamLindskog

hi @Raunak-Singh-Inventor, did you open up a PR? Happy to take a look?

WilliamLindskog avatar Oct 13 '25 14:10 WilliamLindskog

I’m still working on it and will catch up with you soon. Thanks again for the opportunity.

Raunak-Singh-Inventor avatar Oct 14 '25 02:10 Raunak-Singh-Inventor

Hi @Raunak-Singh-Inventor, split learning would make a very promising Flower example. I’m wondering if you’d be able to open a PR for it? Let us know if you have any questions or concerns!

yan-gao-GY avatar Nov 27 '25 16:11 yan-gao-GY

Please find PR here: #6217

Raunak-Singh-Inventor avatar Nov 28 '25 13:11 Raunak-Singh-Inventor