Skip to content

Change DPQuantiles natural parameter from zcdp_rho to epsilon_levels#19

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/932620196
Open

Change DPQuantiles natural parameter from zcdp_rho to epsilon_levels#19
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/932620196

Conversation

@copybara-service

Copy link
Copy Markdown

Change DPQuantiles natural parameter from zcdp_rho to epsilon_levels

Replace the single zcdp_rho field with epsilon_levels: Sequence[float],
making the per-level exponential mechanism epsilons the explicit natural
parameters. This allows users to set custom per-level epsilon schedules
directly, or use calibrate() to derive them from a zCDP budget.

The calibrate method gains an epsilon_ratio keyword argument (default
2.0) controlling how aggressively the budget shifts toward deeper tree
levels. A ratio of 2 doubles epsilon per level, preserving the
signal-to-noise ratio as data is halved at each split. A ratio of 1 gives
uniform epsilon across all levels.

The internal _quantile_epsilon_levels helper is generalized accordingly,
replacing the hardcoded ratio-4 rho scaling with epsilon_ratio**2.

Replace the single `zcdp_rho` field with `epsilon_levels: Sequence[float]`,
making the per-level exponential mechanism epsilons the explicit natural
parameters. This allows users to set custom per-level epsilon schedules
directly, or use `calibrate()` to derive them from a zCDP budget.

The `calibrate` method gains an `epsilon_ratio` keyword argument (default
2.0) controlling how aggressively the budget shifts toward deeper tree
levels. A ratio of 2 doubles epsilon per level, preserving the
signal-to-noise ratio as data is halved at each split. A ratio of 1 gives
uniform epsilon across all levels.

The internal `_quantile_epsilon_levels` helper is generalized accordingly,
replacing the hardcoded ratio-4 rho scaling with `epsilon_ratio**2`.

PiperOrigin-RevId: 932620196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants