Skip to content

Latest commit

 

History

History

differential_privacy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Federated learning experiments with differential privacy.

This directory contains source code for training of six federated optimization tasks with differential privacy including quantile-based adaptive clipping as described in "Differentially Private Learning with Adaptive Clipping" (2021).

This library uses TensorFlow Federated. For a more general look at using TensorFlow Federated for research, see Using TFF for Federated Learning Research.

Some pip packages are required by this library, and may need to be installed:

pip install --requirement differential_privacy/requirements.txt

Example usage

bazel run run_federated -- \
  --client_optimizer=sgd \
  --server_optimizer=sgd \
  --server_sgd_momentum=0.9 \
  --clients_per_round=10 \
  --uniform_weighting=True \
  --clip=0.1 \
  --target_unclipped_quantile=0.5 \
  --adaptive_clip_learning_rate=0.2 \
  --noise_multiplier=0.1 \
  --task=stackoverflow_word \
  --client_learning_rate=0.3 \
  --server_learning_rate=3 \
  --total_rounds=1500 \
  --client_batch_size=16 \
  --root_output_dir=/tmp/dp \
  --experiment_name=so_nwp \
  --max_elements_per_client=1000