Skip to contents

Only the DISCRIMINATOR touches real data, so only the discriminator needs privatising. The generator sees the discriminator's output and nothing else, which makes it post-processing and therefore free – adding noise to it spends budget for nothing.

Usage

morie_dp_gan(
  disc_grads,
  C = 1,
  sigma = 1,
  lr = 0.1,
  n_disc_steps = 1,
  seed = NULL
)

Arguments

disc_grads

per-example discriminator gradients, (B, p).

C, sigma, lr

as for morie_dp_sgd.

n_disc_steps

discriminator steps per generator step, recorded for accounting.

seed

optional integer seed.

Value

list with disc_update, private_gradient, generator_is_free, steps_to_account.

Details

Account over discriminator steps, which typically outnumber generator steps several to one; counting generator steps instead understates the spend.

References

Xie, L. et al. (2018). Differentially private generative adversarial network. arXiv:1802.06739.

Examples

set.seed(1)
morie_dp_gan(matrix(rnorm(80), ncol = 4))$generator_is_free
#> [1] TRUE