feat: Add deterministic truncated-Laplace noise to TrusTEE - #4279
Draft
raimundoltdf wants to merge 1 commit into
Draft
feat: Add deterministic truncated-Laplace noise to TrusTEE#4279raimundoltdf wants to merge 1 commit into
raimundoltdf wants to merge 1 commit into
Conversation
raimundoltdf
force-pushed
the
trustee-deterministic-noise
branch
2 times, most recently
from
July 23, 2026 17:00
5e50a05 to
74d59b0
Compare
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
force-pushed
the
trustee-deterministic-noise
branch
from
July 23, 2026 19:40
74d59b0 to
68a6b58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
DETERMINISTIC_TRUNCATED_LAPLACEnoise 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_usersis dropped before aggregation, so a sub-threshold marginal can't be recovered by differencing overlapping regions.Changes:
NoiseMechanismgainsDETERMINISTIC_TRUNCATED_LAPLACE;trus_tee.protoParametersgains aDeterministicTruncatedLaplaceNoiseParamsmessage (holdingtruncation_bound), mirroring the public API.DeterministicTruncatedLaplaceNoise(fingerprint + noise).SampledReachAndFrequency(reach + histogram).computeReachgains an overload on it; the existingLongArrayoverload delegates to it, so the Direct builders and their tests are unchanged.TrusTeeProcessorImplbranches 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