Skip to content

[codex] require public numeric bounds#30

Draft
vvv214 wants to merge 1 commit into
google:mainfrom
vvv214:codex/require-public-numeric-bounds
Draft

[codex] require public numeric bounds#30
vvv214 wants to merge 1 commit into
google:mainfrom
vvv214:codex/require-public-numeric-bounds

Conversation

@vvv214

@vvv214 vvv214 commented Jun 17, 2026

Copy link
Copy Markdown

Summary

This draft PR removes exact data-derived min/max computation from the pipeline numerical derivation path.

  • require public NumericalAttribute bounds before DP quantile derivation
  • pass descriptor-provided public bounds from dataset_encoding.encode_dataset
  • fail fast when a numerical attribute lacks public bounds
  • update tests and the directly related docs so the pipeline no longer claims to privately infer numerical bounds

Why

numerical_values_derivation.derive_numerical_attributes previously used pipeline_functions.min_max_per_key to derive exact min/max from sensitive data, then reused those exact values to normalize and denormalize DP quantiles. That leaks the extrema outside the DP mechanism.

Validation

  • python3 -m py_compile dpsynth/pipeline_transformations/numerical_values_derivation.py dpsynth/pipeline_transformations/dataset_encoding.py tests/pipeline_transformations/numerical_values_derivation_test.py tests/pipeline_transformations/dataset_encoding_test.py
  • rg -n "min_max_per_key|pipeline_functions|min_value=min_max|max_value=min_max|privately deduce domain boundaries|real-world data bounds" dpsynth/pipeline_transformations docs tests/pipeline_transformations/numerical_values_derivation_test.py tests/pipeline_transformations/dataset_encoding_test.py returns no matches

Full pytest was not run locally because this checkout's test dependencies (pipeline_dp, mbi, dp_accounting, Beam/JAX stack) are not installed in the current environment, and the local Python is 3.14 while the project declares <3.14.

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.

1 participant