pytorch / opacus

Training PyTorch models with differential privacy
https://opacus.ai
Apache License 2.0
1.72k stars 345 forks source link

Why GDP and RDP give different result for the same config #643

Closed huynhducloi00 closed 8 months ago

huynhducloi00 commented 8 months ago

gdp

accountant=create_accountant(mechanism='gdp') accountant.history = [(3, 0.2, 50)] print( accountant.get_epsilon(delta=1/(60*800)))

==> result 1.83

rdp

accountant=create_accountant(mechanism='rdp') accountant.history = [(3, 0.2, 50)] print( accountant.get_epsilon(delta=1/(60*800))) ==> result 2.16

Shouldn't they be the same?

HuanyuZhang commented 8 months ago

No, they should not. Renyi DP is loose in accounting composed Gaussian mechanisms (https://arxiv.org/pdf/2106.08567.pdf).