Adam's moment updates applied to the privatised gradient. The moments are post-processing and cost nothing extra.
Usage
morie_dp_adam(
grads,
C = 1,
sigma = 1,
lr = 0.001,
betas = c(0.9, 0.999),
eps = 1e-08,
state = NULL,
seed = NULL
)Details
They can still hurt. Adam's second moment estimates the gradient
scale, and under heavy DP noise what it actually tracks is the NOISE
scale – the adaptive step then shrinks in the directions where the
noise happens to be large rather than where the signal is small.
signal_to_noise below 1 is the regime where plain DP-SGD is
often the better optimiser, and the function says so.
