tff.learning.robust_aggregator
Stay organized with collections
Save and categorize content based on your preferences.
Creates aggregator for mean with adaptive zeroing and clipping.
tff.learning.robust_aggregator(
*,
zeroing: bool = True,
clipping: bool = True,
weighted: bool = True,
debug_measurements_fn: Optional[Callable[[tff.aggregators.AggregationFactory
], tff.aggregators.AggregationFactory
]] = None
) -> tff.aggregators.AggregationFactory
Zeroes out extremely large values for robustness to data corruption on
clients, and clips in the L2 norm to moderately high norm for robustness to
outliers.
Adaptive clipping approach is as described in Andrew, Thakkar et al. (2021)
https://arxiv.org/abs/1905.03871, which the robust_aggregator applies without
the addition of noise.
For details on clipping and zeroing see tff.aggregators.clipping_factory
and tff.aggregators.zeroing_factory
. For details on the quantile-based
adaptive algorithm see tff.aggregators.PrivateQuantileEstimationProcess
.
Args |
zeroing
|
Whether to enable adaptive zeroing for data corruption mitigation.
|
clipping
|
Whether to enable adaptive clipping in the L2 norm for robustness.
|
weighted
|
Whether the mean is weighted (vs. unweighted).
|
debug_measurements_fn
|
A callable to add measurements suitable for debugging
learning algorithms. Often useful values include None,
tff.learning.add_debug_measurements or
tff.learning.add_debug_measurements_with_mixed_dtype .
|
Raises |
TypeError
|
if debug_measurement_fn yields an aggregation factory whose
weight type does not match weighted .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.learning.robust_aggregator\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\nCreates aggregator for mean with adaptive zeroing and clipping. \n\n tff.learning.robust_aggregator(\n *,\n zeroing: bool = True,\n clipping: bool = True,\n weighted: bool = True,\n debug_measurements_fn: Optional[Callable[[../../tff/aggregators/AggregationFactory], ../../tff/aggregators/AggregationFactory]] = None\n ) -\u003e ../../tff/aggregators/AggregationFactory\n\nZeroes out extremely large values for robustness to data corruption on\nclients, and clips in the L2 norm to moderately high norm for robustness to\noutliers.\n\nAdaptive clipping approach is as described in Andrew, Thakkar et al. (2021)\n\u003chttps://arxiv.org/abs/1905.03871,\u003e which the robust_aggregator applies without\nthe addition of noise.\n\nFor details on clipping and zeroing see [`tff.aggregators.clipping_factory`](../../tff/aggregators/clipping_factory)\nand [`tff.aggregators.zeroing_factory`](../../tff/aggregators/zeroing_factory). For details on the quantile-based\nadaptive algorithm see [`tff.aggregators.PrivateQuantileEstimationProcess`](../../tff/aggregators/PrivateQuantileEstimationProcess).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `zeroing` | Whether to enable adaptive zeroing for data corruption mitigation. |\n| `clipping` | Whether to enable adaptive clipping in the L2 norm for robustness. |\n| `weighted` | Whether the mean is weighted (vs. unweighted). |\n| `debug_measurements_fn` | A callable to add measurements suitable for debugging learning algorithms. Often useful values include None, [`tff.learning.add_debug_measurements`](../../tff/learning/add_debug_measurements) or [`tff.learning.add_debug_measurements_with_mixed_dtype`](../../tff/learning/add_debug_measurements_with_mixed_dtype). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A [`tff.aggregators.AggregationFactory`](../../tff/aggregators/AggregationFactory). ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|-------------|----------------------------------------------------------------------------------------------------|\n| `TypeError` | if debug_measurement_fn yields an aggregation factory whose weight type does not match `weighted`. |\n\n\u003cbr /\u003e"]]