FL4Health icon indicating copy to clipboard operation
FL4Health copied to clipboard

PR1: Add mkmmd loss

Open sanaAyrml opened this issue 1 year ago • 0 comments

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 avatar Jun 07 '24 00:06 sanaAyrml