Scale-then-Privatize Adaptive Optimization (#88) Split PR 3 #109
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an example of Scale-then-Privatize adaptive optimization as detailed in Research paper, "On Design Principles for Private Adaptive Optimizers".
The Problem Addressed: Standard private adaptive optimizers add spherical noise to gradients before preconditioning, which creates a "noise floor" that destroys the benefits of adaptivity.
✔️ The Solution: I have implemented Algorithm 8 from the paper. Using the pre_clipping_transform hook in jax_privacy, gradients are rescaled into a "spherical" space before the sensitivity clip. The noised aggregate is then un-scaled, ensuring the effective noise distribution is aligned with the gradient geometry rather than being uniform.
✔️ Correctness Verification: I verified the implementation by monitoring the running_variance PyTree. The logs confirm that the preconditioner successfully departs from its initial state (1.0) to adapt to the data geometry, even in the presence of noise.