Skip to content

Implement standalone hierarchical weights & cascading truncation. - #138

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

Implement standalone hierarchical weights & cascading truncation.#138
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/965561541

Conversation

@copybara-service

Copy link
Copy Markdown

Implement standalone hierarchical weights & cascading truncation.

  • 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.

- 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
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