google / google/differential-privacy

Expose RNG or Seeded mechanisms outside of `-testing`

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3.4k
Forks
434
Avg merge
4d 9h
Merged PRs (30d)
9

Description

## Problem Description
Downstream libraries or academic researchers using `differential-privacy` may desire to implement deterministic tests or substitute an alternative source of randomness, e.g., external random source.

However, RNG and seed-setting only appears to be implemented within `algorithms::numerical-mechanisms-testing`. These classes are not designed for external use and cannot be linked against in some contexts (e.g., bzl testonly).

## Proposed Solution
1. Create a new RNGNumericalMechanism abstract class and non-testing RNGNumericalMechanismBuilder
2. Implement non-testing `RNGXYZMechanism` and, optionally, `SeededXYZMechanism` as convenience
3. Re-implement test `SeededXYZMechanism` classes with non-testing mechanisms
4. Optionally implement warning/notice for use
5. Implement safe downstream deterministic test cases, e.g., in PyDP

## Alternative
Rely on asymptotic test cases or non-reproducible examples/research.

Contributor guide

Open the contributing guide

Research direction

Start by locating algorithms::numerical-mechanisms-testing and reviewing how its RNG and seeded mechanisms are linked and exposed. Done would mean non-testing RNG mechanisms are available for downstream use, the testing mechanisms use them, and deterministic downstream cases such as PyDP tests are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.