Skip to content

Fix Privacy Bugs in Odometer and Covariance#624

Merged
joshua-oss merged 3 commits intomainfrom
bugfix_privacy_errors
Feb 19, 2026
Merged

Fix Privacy Bugs in Odometer and Covariance#624
joshua-oss merged 3 commits intomainfrom
bugfix_privacy_errors

Conversation

@joshua-oss
Copy link
Copy Markdown
Contributor

This PR fixes:

#621 could result in reporting the wrong privacy consumption, and #622 could result in privacy leak

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes two privacy-accounting bugs affecting reported ε/δ consumption and covariance sensitivity bounds, aligning implementation with intended DP guarantees.

Changes:

  • Correct homogeneous odometer “optimal_b” formula by adding the missing log(1/tol) term (Issue #621).
  • Fix DP covariance release to compute covariance from clipped/cleaned data rather than the raw input (Issue #622).
  • Add a unit test to ensure DPcovariance.release() uses clipped data; add a sklearn import fallback for LinearModel.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sql/snsql/sql/odometer.py Fixes the homogeneous composition bound by applying the missing log factor in optimal_b.
sql/tests/odometer/test_odometer.py Updates the expected ε value to match the corrected odometer formula.
synth/snsynth/models/dp_covariance.py Ensures covariance is computed from new_data (clipped + imputed) to preserve bounded sensitivity.
synth/tests/test_dp_covariance.py Adds regression test validating release() uses clipped data (noise forced to zero).
synth/snsynth/models/linear_regression.py Adds compatibility import path for LinearModel across sklearn versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@joshua-oss joshua-oss requested a review from Shoeboxam February 10, 2026 03:29
This was linked to issues Feb 10, 2026
@joshua-oss joshua-oss merged commit 5e5fac8 into main Feb 19, 2026
11 of 14 checks passed
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.

Covariance Clipping Bug Odometer Formula Bug

2 participants