Phase 2: analytic Renyi divergence certification - #3
Open
jameshoweee wants to merge 1 commit into
Open
Conversation
Certification layer (certification.py):
- Computes R_a(P_spec || P_ideal) exactly from the RCDT table and
BerExp quantization, without sampling
- Base sampler: R_128-1 ~ 9.1e-23 (informational; CDT quantization)
- Full sampler: R_128-1 ~ 1.3e-29 at typical (mu,sigma), 6 orders
of magnitude below the 2^{-75} target — BerExp rejection tightens
the distribution dramatically
- Tested at hostile fractional mu (0.0, 0.25, 0.5) and across sigma
range; all pass with large margin
- Finding: sigma=1.8 (near sigma0=1.8205 boundary) marginally fails
at R_128-1 = 3.94e-23 vs 2.65e-23 target — genuine BerExp
quantization effect at extreme sigma values
Effect-size diagnostics (saga.py):
- effect_sizes() method on UnivariateSamples: TV distance with
null-expected bias floor, R_2 divergence (= log(1 + chi2/n)),
resolution floor 1/sqrt(N)
- Framed as diagnostics, not security certification
Seeded determinism (test_sampler_determinism.py):
- Same seed produces identical output stream
- Different seeds produce different streams
README scope paragraph:
- Statistical layer detects bugs at delta ~ 1/sqrt(N)
- Certification layer certifies proof-level RD bounds
- Neither detects trace-level side-channel leakage
Test suite: 104 passed, 12 skipped (known blind spots), 0 failed
Owner
Author
|
consolidating into a single PR |
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
certification.py— analytic Renyi divergence computation for the base sampler and full sampler chain. This is the missing piece between statistical testing (which tops out at ~1/sqrt(N) sensitivity) and the proof-level guarantees (R_128 - 1 < 2^{-75}).Key results at default params:
Uses mpmath for arbitrary-precision arithmetic. Tests verify the computation at 6 (mu, sigma) pairs against known bounds.
Also updates the README with scope/install instructions.