FederatedScope icon indicating copy to clipboard operation
FederatedScope copied to clipboard

[WIP] FedGlobalContrast and FedSimCLR baseline

Open xkxxfyf opened this issue 2 years ago • 2 comments

current problem: global calculate contrast loss is slow because of epoch data size, but it will take more communication cost with batch size calculate global contrast loss

xkxxfyf avatar Aug 30 '22 21:08 xkxxfyf

provide a unit test (see test folder) for basic fed contrastive learning and fine-tuning.

joneswong avatar Aug 31 '22 13:08 joneswong

the revise of keeping the same Non-IID distribution of train and test has been verificated by fedsimCLR pre-train weight and local linear-prob evaluation. The client avg acc is 0.723 for val and 0.735 for test. It close to the global acc of 0.715 for val and 0.693 for test

xkxxfyf avatar Sep 22 '22 20:09 xkxxfyf

Please add unit-test ASAP, thanks.

rayrayraykk avatar Oct 12 '22 02:10 rayrayraykk

we have suggested to add UT, but there is still nothing

joneswong avatar Oct 12 '22 11:10 joneswong

  1. It is ok to alternatively make local and global updates. However, we have suggested to enable a combination of these losses in one gradient descent step, but it seems that this implementation still fails to do that. 2. There are still many issues remaining. 3. This pr would not pass the check of a linter, imo, right? @rayrayraykk .

The quality of this pr is exceptionally low. Please complete it ASAP.

Yes, the unit-test provided still does not work.

rayrayraykk avatar Oct 13 '22 10:10 rayrayraykk