# tff.learning.dp_aggregator

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) 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) |

Creates aggregator with adaptive zeroing and differential privacy.

    tff.learning.dp_aggregator(
        noise_multiplier: float, clients_per_round: float, zeroing: bool = True
    ) -> https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory

Zeroes out extremely large values for robustness to data corruption on
clients, and performs adaptive clipping and addition of Gaussian noise for
differentially private learning. For details of the DP algorithm see McMahan
et. al (2017) <https://arxiv.org/abs/1710.06963> The adaptive clipping uses the
geometric method described in Andrew, Thakkar et al. (2021)
<https://arxiv.org/abs/1905.03871>

<br />

<br />

<br />

| ## Args ||
|---|---|
| `noise_multiplier` | A float specifying the noise multiplier for the Gaussian mechanism for model updates. A value of 1.0 or higher may be needed for meaningful privacy. See above mentioned papers to compute (epsilon, delta) privacy guarantee. |
| `clients_per_round` | A float specifying the expected number of clients per round. Must be positive. |
| `zeroing` | Whether to enable adaptive zeroing for data corruption mitigation. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A [`tff.aggregators.UnweightedAggregationFactory`](https://www.tensorflow.org/federated/api_docs/python/tff/aggregators/UnweightedAggregationFactory). ||

<br />