fl4health.privacy.fl_accountants module¶
- class FlClientLevelAccountantFixedSamplingNoReplacement(n_total_clients, n_clients_sampled, noise_multiplier, moment_orders=None)[source]¶
Bases:
ClientLevelAccountant
This accountant should be used when applying FL with Fixed Sampling with No Replacement and measuring client-level privacy
- __init__(n_total_clients, n_clients_sampled, noise_multiplier, moment_orders=None)[source]¶
n_total_clients: total number of clients to be sampled from n_clients_sampled: number of clients sampled in a given round noise_multiplier: multiplier of noise std. dev. on clipping bound NOTE: The above values can be lists, where they are treated as sequences of training with the respective parameters
- class FlClientLevelAccountantPoissonSampling(client_sampling_rate, noise_multiplier, moment_orders=None)[source]¶
Bases:
ClientLevelAccountant
This accountant should be used when applying FL with Poisson client sampling and measuring client-level privacy
- __init__(client_sampling_rate, noise_multiplier, moment_orders=None)[source]¶
client_sampling_rate: probability that each client will be included in a round noise_multiplier: multiplier of noise std. dev. on clipping bound NOTE: The above values can be lists, where they are treated as sequences of training with the respective parameters
- class FlInstanceLevelAccountant(client_sampling_rate, noise_multiplier, epochs_per_round, client_batch_sizes, client_dataset_sizes, moment_orders=None)[source]¶
Bases:
object
This accountant should be used when applying FL and measuring instance-level privacy NOTE: This class assumes that all sampling is done via Poisson sampling (client and data point level). Further it assumes that the sampling ratio of clients and noise multiplier are fixed throughout training
- __init__(client_sampling_rate, noise_multiplier, epochs_per_round, client_batch_sizes, client_dataset_sizes, moment_orders=None)[source]¶
client_sampling_rate: probability that each client will be included in a round noise_multiplier: multiplier of noise std. dev. on clipping bound epochs_per_round: number of epochs each client will complete per server round client_batch_sizes: batch size per client, if a single value it is assumed to be constant across clients client_dataset_sizes: size of full dataset on a client, if a single value it is assumed to be constant across clients.