FEAT: Expose SeededLaplaceMechanism for deterministic RNG
Feature Description
For research and CI/CD testing purposes, full transparency or determinism w.r.t. random state is often desirable. differential-privacy makes a SeededLaplaceMechanism available for this purpose, but it looks like we only make LaplaceMechanism available in this library.
Is your feature request related to a problem?
Two issues:
- Replication of academic research that relies on exact reproduction of sample data
- CI/CD testing workflows where deterministic results for some test cases may be desirable
What alternatives have you considered?
Alternatives rely on asymptotic results and thresholds that may be arbitrary or result in false negative test results, especially on small sample sizes or for some metrics.
PS: this looks pretty trivial but happy to help implement too!
I thought I could PR this in 15 minutes but ran into an issue. I see that the SeededXYZ mechanisms are in numerical-mechanisms-testing.h, not numerical-mechanisms.h, which results in them being blocked from linking due to bazel's testonly behavior. I guess the options are to "re-implement" the seeded behavior or explore moving these Mechanisms in the differential-privacy repo itself.
Open to thoughts (or just closing as Won't Fix).
@dvadym what do you think about this?
I think this is a good feature to have, it can be definitely useful for some use cases.