Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix NN uncertainty evaluation and UncertaintyWeighted aggregation
Changes
predict_proba_mcapplied softmax to a single logit, so binary models always reported entropy 0 and an accuracy equal to the share of class 0. It now uses sigmoid.evaluate()always reports the standard metrics and adds the MC-dropout ones (entropy,val_accuracy) only for classification.inference.py. The model metadata now includesdropout_pandmc_samples(=T). Without themload_modelrefused to rebuild the model.n_outis consistent across sites.load_dt4hno longer replaces the metadata class count with the number of classes present locally. A site missing a class used to get a different output layer from the other sites.UncertaintyWeightedaggregates evaluation metrics. The strategy now receivesevaluate_metrics_aggregation_fn, sometrics_distributedis populated.UncertaintyWeightedwith a regression task now switches to FedAvg at config time.accept_failuresis respected inUncertaintyWeightedFedAvg.aggregate_fit.test_nn_uncertainty_weightedcovers binary, multiclass and regression with MC dropout on.fl_runnergainsserver_extra_args. CI also runs on PRs totests_and_CI.New server arguments (
server_cmd.py)--uw_epsilon0.1n / (ε + entropy)^γ. Limits how much a client with near-zero entropy can dominate (max ratio ≈ (1+ε)/ε).--uw_gamma1.00is plain FedAvg; larger values give more weight to low-entropy clients.Both only apply with
--strategy UncertaintyWeighted.