Change DPQuantiles natural parameter from zcdp_rho to epsilon_levels#19
Open
copybara-service[bot] wants to merge 1 commit into
Open
Change DPQuantiles natural parameter from zcdp_rho to epsilon_levels#19copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
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
3c909cf to
033d430
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change DPQuantiles natural parameter from zcdp_rho to epsilon_levels
Replace the single
zcdp_rhofield withepsilon_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
calibratemethod gains anepsilon_ratiokeyword argument (default2.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_levelshelper is generalized accordingly,replacing the hardcoded ratio-4 rho scaling with
epsilon_ratio**2.