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

PR1: Add mkmmd loss #168

Merged
merged 285 commits into from
Sep 25, 2024
Merged

PR1: Add mkmmd loss #168

merged 285 commits into from
Sep 25, 2024

Conversation

sanaAyrml
Copy link
Collaborator

@sanaAyrml sanaAyrml commented Jun 7, 2024

PR Type

[Feature ]

Short Description

This is a simplified updated version of MK-MMD loss implementation with additions to only Ditto and MR-MTL models.

One mk-mmd loss is implemented one to minimize distance between local features and aggregated global model. In this setting betas are updated even during training after a certain number of step based on beta_update_interval. Also in order to prevent from feature value boost a l2-norm regularizer has been added which can be controlled via feature_l2_norm parameter.

Also I generalized loss reporting function in fl4health/utils/losses as it was failing to report correctly due to addition of new keys during further steps in MOON setup.

Flamby MK-MMD loss experimental setup has also been added to the research/flamby/fedisic2019 folder.

Tests Added

Describe the tests that have been added to ensure the codes correctness, if applicable.

sanaAyrml and others added 24 commits September 18, 2024 12:13
Copy link
Collaborator

@emersodb emersodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few really minor questions/comments, but looks good to go!

fl4health/clients/mkmmd_clients/ditto_mkmmd_client.py Outdated Show resolved Hide resolved
fl4health/clients/mkmmd_clients/ditto_mkmmd_client.py Outdated Show resolved Hide resolved
fl4health/model_bases/feature_extractor_buffer.py Outdated Show resolved Hide resolved
research/flamby/fed_isic2019/mr_mtl_mkmmd/client.py Outdated Show resolved Hide resolved
@sanaAyrml sanaAyrml merged commit 26b1ae9 into main Sep 25, 2024
6 checks passed
@sanaAyrml sanaAyrml deleted the add_mkmmd_loss branch September 25, 2024 17:51
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.

2 participants