Repository navigation
Ignore empty epsilon bounds when selecting the max-epsilon MIA result. - #655
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
Gonzohool
approved these changes
Nov 4, 2026
Gonzohool
approved these changes
Nov 4, 2026
`AttackResults.get_result_with_max_epsilon` averages each result's epsilon lower bounds and takes `np.argmax`. `EpsilonLowerBound.compute_epsilon_lower_bound` keeps only positive ratio bounds, so on small slices or slices with little measurable leakage every method can return an empty array, and `EpsilonLowerBoundValue.get_max_epsilon_bounds` then returns an empty array too. The mean of an empty array is NaN, and `np.argmax` always returns the index of the first NaN, so one empty-bounds slice wins the selection over slices with large finite epsilon. Calling the method on an empty `AttackResults` also raised ValueError instead of returning None like the sibling AUC, advantage and PPV selectors. The overall and per-slice "top epsilon lower bounds" lines of `AttackResults.summary` then report an empty bound on a zero-leakage slice and hide the slice with the strongest empirical privacy-loss evidence, so audits can understate measured epsilon. AUC, attacker advantage and PPV selection are unaffected. Empty and NaN average bounds now rank as negative infinity, each result's bounds are computed once, and empty results return None, matching the return type. Tests cover empty results, an empty-bounds slice placed ahead of a high-epsilon slice (selection and summary), negative finite bounds beating empty ones, and an all-empty input that no longer crashes; a synthetic NaN-bounds case is included defensively, since the library itself never emits NaN bounds. PiperOrigin-RevId: 1013659039
copybara-service
Bot
force-pushed
the
cl/1013659039
branch
from
November 5, 2026 14:20
99e3268 to
208ff0d
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.
Ignore empty epsilon bounds when selecting the max-epsilon MIA result.
AttackResults.get_result_with_max_epsilonaverages each result's epsilon lower bounds and takesnp.argmax.EpsilonLowerBound.compute_epsilon_lower_boundkeeps only positive ratio bounds, so on small slices or slices with little measurable leakage every method can return an empty array, andEpsilonLowerBoundValue.get_max_epsilon_boundsthen returns an empty array too. The mean of an empty array is NaN, andnp.argmaxalways returns the index of the first NaN, so one empty-bounds slice wins the selection over slices with large finite epsilon. Calling the method on an emptyAttackResultsalso raised ValueError instead of returning None like the sibling AUC, advantage and PPV selectors.The overall and per-slice "top epsilon lower bounds" lines of
AttackResults.summarythen report an empty bound on a zero-leakage slice and hide the slice with the strongest empirical privacy-loss evidence, so audits can understate measured epsilon. AUC, attacker advantage and PPV selection are unaffected.Empty and NaN average bounds now rank as negative infinity, each result's bounds are computed once, and empty results return None, matching the return type. Tests cover empty results, an empty-bounds slice placed ahead of a high-epsilon slice (selection and summary), negative finite bounds beating empty ones, and an all-empty input that no longer crashes; a synthetic NaN-bounds case is included defensively, since the library itself never emits NaN bounds.