Implement standalone hierarchical weights & cascading truncation. - #138
Open
copybara-service[bot] wants to merge 1 commit into
Open
Implement standalone hierarchical weights & cascading truncation.#138copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
- Implemented `_compute_row_root_mappings` in `transformations.py`: - Fully vectorized top-down relational hierarchy traversal. - Uniform random subsampling without replacement for parent groups exceeding capacity `max_children_per_parent` (s). - Cascading truncation to all descendants of dropped parent records. - Hardened against data-dependent errors (orphans, nulls, duplicates, unhashable objects) leaking privacy. - Implemented `compute_hierarchical_weights` in `transformations.py`: - Computes standalone sensitivity weights (w = 1/k_eff) per table ensuring unit sensitivity (Delta = 1.0) per root entity without Cartesian joins. - Added comprehensive unit tests in `transformations_test.py` covering multi-tier branching DAGs, multi-root forests, custom index alignment, RNG reproducibility, and adversarial DP edge cases. PiperOrigin-RevId: 965561541
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.
Implement standalone hierarchical weights & cascading truncation.
_compute_row_root_mappingsintransformations.py:max_children_per_parent(s).compute_hierarchical_weightsintransformations.py:transformations_test.pycovering multi-tier branching DAGs, multi-root forests, custom index alignment, RNG reproducibility, and adversarial DP edge cases.