Skip to content

feat: Add deterministic truncated-Laplace noise to TrusTEE - #4279

Draft
raimundoltdf wants to merge 1 commit into
mainfrom
trustee-deterministic-noise
Draft

feat: Add deterministic truncated-Laplace noise to TrusTEE#4279
raimundoltdf wants to merge 1 commit into
mainfrom
trustee-deterministic-noise

Conversation

@raimundoltdf

@raimundoltdf raimundoltdf commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Adds the DETERMINISTIC_TRUNCATED_LAPLACE noise mechanism to the TrusTEE reach/frequency computation. Rest of Component B (sampler is #4188, public API is 0.96.0).

Noise: one truncated-Laplace draw per output, seeded from a SHA-256 fingerprint of the aggregate frequency vector. Reach and frequency draw from their own DP params (reach_dp_params / frequency_dp_params); sensitivity is 1. Because the seed is the aggregate, the noise is reproducible and identical no matter how many EDP vectors were summed to produce it.

Per-vector suppression (DTLN only): a contribution whose own reach is below min_users is dropped before aggregation, so a sub-threshold marginal can't be recovered by differencing overlapping regions.

Changes:

  • NoiseMechanism gains DETERMINISTIC_TRUNCATED_LAPLACE; trus_tee.proto Parameters gains a DeterministicTruncatedLaplaceNoiseParams message (holding truncation_bound), mirroring the public API.
  • New DeterministicTruncatedLaplaceNoise (fingerprint + noise).
  • New SampledReachAndFrequency (reach + histogram). computeReach gains an overload on it; the existing LongArray overload delegates to it, so the Direct builders and their tests are unchanged.
  • TrusTeeProcessorImpl branches to the new noiser; the Gaussian path is unchanged.

Tests: noiser unit tests (determinism, draw structure, clamping) and processor tests (deterministic result is reproducible, independent of the EDP split, and drops sub-threshold vectors).

Issue: NA

@wfa-reviewable

Copy link
Copy Markdown

This change is Reviewable

@raimundoltdf
raimundoltdf force-pushed the trustee-deterministic-noise branch 2 times, most recently from 5e50a05 to 74d59b0 Compare July 23, 2026 17:00
Wire DETERMINISTIC_TRUNCATED_LAPLACE into the TrusTEE reach/frequency
computation. Noise is drawn per EDP, seeded from a SHA-256 fingerprint of
each EDP's frequency vector, summed across EDPs; thresholds are applied
post-noise.

- Add DETERMINISTIC_TRUNCATED_LAPLACE to the internal duchy NoiseMechanism
  and truncation_bound to trus_tee.proto Parameters.
- Thread noise_mechanism and truncation_bound through TrusTeeParams.
- Add DeterministicTruncatedLaplaceNoise: builds a 0..maxFrequency histogram
  and noises it; reach derives from bucket 0, frequency reuses
  computeFrequencyDistribution with noise turned off.
- TrusTeeProcessorImpl fingerprints each EDP vector at ingest and branches to
  the deterministic path; the Gaussian path is unchanged.
@raimundoltdf
raimundoltdf force-pushed the trustee-deterministic-noise branch from 74d59b0 to 68a6b58 Compare July 23, 2026 19:40
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