nvflare.app_common.statistics.min_max_cleanser module

class AddNoiseToMinMax(min_noise_level: float, max_noise_level: float)[source]

Bases: FLComponent, StatisticsPrivacyCleanser

Random is used to generate random noise between (min_random and max_random).

Parameters:
  • min_noise_level – minimum noise – used to protect min/max values before sending to server

  • max_noise_level – maximum noise – used to protect min/max values before sending to server

For example, the random noise is to be within (0.1 and 0.3), i.e. 10% to 30% level. This component will make local min values smaller than the true local min values, and max values larger than the true local max values. As result, the estimate global max and min values (i.e. with noise) are still bound to the true global min/max values, such that:

est. global min value <
          true global min value <
                    client's min value <
                            client's max value <
                                    true global max <
                                            est. global max value
apply(statistics: dict, client_name: str) Tuple[dict, bool][source]
generate_noise(statistics: dict, statistic) dict[source]
validate_inputs()[source]