Skip to content

docs: Clarify scalar PLD scope for correlated multi-output Gaussian releases#430

Open
Gaijin-01 wants to merge 3 commits into
google:mainfrom
Gaijin-01:gci-correlated-gap
Open

docs: Clarify scalar PLD scope for correlated multi-output Gaussian releases#430
Gaijin-01 wants to merge 3 commits into
google:mainfrom
Gaijin-01:gci-correlated-gap

Conversation

@Gaijin-01
Copy link
Copy Markdown

@Gaijin-01 Gaijin-01 commented May 21, 2026

docs + fix: Clarify scalar PLD scope for correlated multi-output Gaussian releases + numerical hardening

Summary

This PR improves both usability and numerical robustness in Google's dp_accounting library:

1. Documentation Clarification (python/dp_accounting)

  • Clearly documents when and how to use scalar from_gaussian_mechanism for jointly observed correlated multi-output releases.
  • Introduces the Effective Sensitivity pattern: when outputs are linearly coupled (f_j = c_j · f_1) with independent noise, the exact ε-hockey-stick divergence equals the scalar case computed at Delta_eff = Delta × ||c_vec||₂.
  • Includes a practical Federated Learning example (2-client with coupling c=0.5).

This pattern is mathematically valid but was not explicitly documented, leading to potential privacy underestimation when users naively apply scalar PLD to multi-output scenarios.

2. Numerical Hardening (C++)

  • Added stable LogErfc(x) and LogNormalCdf(z) helpers using asymptotic expansions.
  • Switched to log-space arithmetic in CalculateDeltaForGaussianStddev to prevent NaN/overflow for large ε (ε ≳ 709).
  • Improved input validation and precision near boundary cases using expm1-based log1mexp.

These changes follow best practices from JAX, TensorFlow Privacy, and high-precision libraries, and are particularly valuable for extreme privacy parameters.

Comparison with other libraries

  • OpenDP: Stronger on formal composition, but less emphasis on scalar PLD optimizations for structured releases.
  • TensorFlow Privacy / Opacus: Primarily RDP-based; the effective sensitivity reduction is valid but not prominently documented.
  • This PR: Makes an advanced, efficient pattern explicit and safe to use inside Google's PLD tooling.

Related

See also: https://doi.org/10.5281/zenodo.20078486

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 21, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Gaijin-01 Gaijin-01 force-pushed the gci-correlated-gap branch from 1d199b0 to ce7ac32 Compare May 21, 2026 05:21
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.

2 participants