pytorch / opacus

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

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

Closed huynhducloi00 closed 3 months ago

huynhducloi00 commented 3 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 3 months ago

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