Skip to content

Rényi-∞ divergence machinery for oracle-bounded reductions - #1076

Draft
Gustavo2622 wants to merge 1 commit into
mainfrom
library_renyi_divergence
Draft

Rényi-∞ divergence machinery for oracle-bounded reductions#1076
Gustavo2622 wants to merge 1 commit into
mainfrom
library_renyi_divergence

Conversation

@Gustavo2622

Copy link
Copy Markdown
Contributor

The Rényi-∞ (max-divergence / dominance) machinery for bounded-query reductions:

  • RDiv.ec: Rényi-∞ / max-divergence (rdiv_inf, dominated) with probability preservation (dominated_pr / rdiv_inf_pr), structural composition (dmap/dlet/dprod/dlist/dexcepted/dcond/djoin/dfold/dfun), and a distinguisher layer (Sample, adv_rdiv_inf, adv_rdiv_inf_dlist).
  • BoundedPreSample.ec: fresh-sampling = presampling-a-list equivalence (eq_pr_fresh_ref) for bounded-query adversaries; admit-free.
  • RDivOracle.ec: parametric bounded-query advantage bound rdiv_bound_sampler (Pr[Game1] <= M^N * Pr[Game2]) via BoundedPreSample + dlist tensorization.

@Gustavo2622
Gustavo2622 requested a review from strub July 13, 2026 16:02
@Gustavo2622 Gustavo2622 self-assigned this Jul 13, 2026
@strub
strub force-pushed the library_renyi_divergence branch from abd5301 to 5a014e7 Compare July 15, 2026 18:49
Comment thread theories/distributions/RDivOracle.ec Outdated
(* Single Iface clone — both top-level access target (consumers use
[RDO.Iface.Oracle]/[RDO.Iface.Adv]) and BPS substitution target. *)
clone import BPS_Iface as Iface with
type out_t = out_t,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use <- to avoid proliferation.


declare axiom A_bound1 :
hoare[ A(BPS1.Count(Sampler1)).main :
BPS1.Count.n = 0 ==> BPS1.Count.n <= N ].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here you probably want a quantification over the initial value of the counter, so the result can be applied generally where there is a preamble that cannot trigger distinguishing behaviour. (Did we discuss this already? If so, ignore this.)

}.

module type Adv (O : Oracle) = {
proc main(p : param_t) : bool

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could generalise this to arbitrary return types. This would require replace all the raw res events in probabilities below with a "for all event over res (and perhaps the game's globals)".

Not super clear what value this would add, but the presampling argument certainly doesn't rely on the event being the game's output only.

If you choose to generalise, be careful: if you include the globals in scope, you will need to post-sample unused queries in the lazy version.

@strub
strub force-pushed the library_renyi_divergence branch from 5a014e7 to 9fa0ec3 Compare July 22, 2026 14:21
Adds a Rényi-∞ (max-divergence) toolkit for probability-preservation
arguments in bounded-query reductions — e.g. rejection-sampling hops
where each of N oracle queries costs a multiplicative factor M.

- theories/distributions/RDiv.ec: the dominance predicate
  [dominated M d1 d2] and the divergence [rdiv_inf], probability
  preservation (mu d1 E <= M * mu d2 E), and closure under the standard
  constructions (dmap, dlet, dprod, dlist, djoin(map), dexcepted,
  drestrict, dcond, dfst/dsnd, dopt, dfold, dfun), each in an
  explicit-bound and a tight (rdiv_inf) form.  An abstract
  [Distinguisher] theory lifts preservation to adversaries
  ([adv_rdiv_inf], [adv_rdiv_inf_le], pre-composed variants), reusing
  SDist.GenDist for the Pr-to-distribution transport.

- theories/distributions/BoundedPreSample.ec: for an adversary making
  at most N oracle queries, answering queries by fresh sampling is
  Pr-equal, per event, to pre-sampling a list of N draws
  ([eq_pr_fresh_ref_ev]); proved by a counting/up-to-bad step plus
  eager sampling via PROM.

- theories/distributions/RDivOracle.ec: the user-facing bound
  [rdiv_bound_sampler],

    Pr[Game1(A) : E res] <= M ^ N * Pr[Game2(A) : E res],

  for any N-query-bounded A against per-parameter samplers d1/d2 that
  are uniformly M-dominated on the support of the parameter
  distribution.  A second theory [RDivOracleValid] packages the common
  "valid parameters only" restriction (conditioning the parameter
  distribution), stating validity as an event conjunct — no additive
  slack and no M >= 1 assumption — with a corollary paying the
  invalid-parameter mass additively.

- tests/rdiv-instantiate.ec: smoke instantiation realizing all
  parameter axioms of both oracle theories at a trivial instance.
@Gustavo2622
Gustavo2622 force-pushed the library_renyi_divergence branch from 9fa0ec3 to 1e10036 Compare September 1, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants