The i.i.d.-ensemble SQ oracle: Hoeffding concentration + sample complexity #
The statistical-query oracle realised on an i.i.d. ensemble of trajectories, with the O(1/√n)
query estimate. This file supplies the probabilistic core that SQBounds.truth_survives_pruning
takes as the bare hypothesis hemp : |emp − predR| ≤ τ: it DERIVES, by Hoeffding, that the
empirical SQ answer concentrates around the true answer, and threads that through to the "truth
survives pruning" guarantee.
This is the quantitative complement to SQBounds.truth_survives_pruning: there the 2τ geometry is
proved assuming the empirical answer is within τ of the truth's mean; here that very assumption is
discharged with an explicit sample complexity n ≥ (2/τ²)·log(2/δ).
Status: PROVED as a probability statement over an i.i.d. ensemble. The single load-bearing import
is Mathlib's Hoeffding inequality for sub-Gaussian MGFs
(ProbabilityTheory.HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun together with
hasSubgaussianMGF_of_mem_Icc).
What this DOES establish #
sq_oracle_concentration(Hoeffding): the empirical meanempiricalMeanofni.i.d. bounded query-valuesZ ideviates from the true answerpredZ = 𝔼φby≥ τwith probability≤ 2·exp(−nτ²/2). Two-sided, via the right tail on the centred family and the left tail on its negation.sq_oracle_sample_complexity(theO(1/√n)estimate, solved forn): oncen ≥ (2/τ²)·log(2/δ), the empirical answer is withinτof the truth with probability≥ 1−δ.sq_oracle_truth_survives(pruning wiring): chaining the sample complexity throughSQBounds.truth_survives_pruning, withn ≥ (2/τ²)·log(2/δ)the truth's predicted statistic lies within2τof the empirical answer with probability≥ 1−δ— so the2τSQ-pruning rule never discards the truth.sq_oracle_uniform_tail,empirical_isSQOracle(union-bound glue): the finite-query union bound. If each queryφ ∈ Qshas small tailμ{τ < |empᵩ − truᵩ|} ≤ δ(the shape ofsq_oracle_concentration's conclusion), thenμ{∃ φ ∈ Qs, τ < |…|} ≤ |Qs|·δ, and off that event — w.p.≥ 1 − |Qs|·δ— the empirical answers restricted toQssatisfy the genuineSQObjects.IsSQOraclepredicate. This is the glue from per-query concentration to the oracle object, at the union-bound level.empirical_isSQOracle_of_iid: the per-query INSTANTIATION — a query-indexed i.i.d. familyZq : Q → ℕ → Ω → ℝ(each query's values i.i.d. in[−1,1]with meantru φ, persq_oracle_concentration) DISCHARGESsq_oracle_uniform_tail'shtailwithδ_φ = 2·exp(−nτ²/2), giving the end-to-end corollary:n ≥ (2/τ²)·log(2·|Qs|/δ)samples per query ⇒ the empirical answers failSQObjects.IsSQOracleon↥Qswith probability≤ δ.
What this does NOT establish (stays in prose; no overclaiming) #
- Not the single-trajectory → i.i.d.-ensemble reduction, ergodicity (E1), or Birkhoff's theorem: the
ensemble is modeled directly as an i.i.d. family
Z : ℕ → Ω → ℝof query-values, and the per-trajectory queryφis taken already composed intoZ i = φ ∘ Xᵢ. Independence is the hypothesishindep, identical means the hypothesishmean. - Not the SQ statistical dimension
d_SQ, the concept classM, or the version-space envelope: those are the subject ofLearning/SQObjects.leanandLearning/SQEnvelope.lean. - Not the negligible-pruned-mass / competitor-decay half of the soundness of SQ pruning: that stays in prose.
Hypotheses: standard vs added/strengthened #
- Standard: i.i.d. ensemble (
hindep+ common meanhmean); bounded query-values (hbdd, theφ : · → [−1,1]normalisation of the SQ model); the empirical-mean estimatorempiricalMean; theO(1/√n)rate solved asn ≥ (2/τ²)·log(2/δ). - Added/strengthened (flagged): the query-values are taken in the concrete interval
[−1,1](giving the sub-Gaussian proxy1); independence and the common mean are stated separately (hindep,hmean) rather than as a singleIdentDistribfamily —hmeanonly constrains the first moment, which is all Hoeffding needs.
Empirical SQ answer: the mean of the query-values Z i ω = φ(Xᵢ ω) over the first n
ensemble trajectories.
Equations
- SQOracle.empiricalMean Z n ω = (↑n)⁻¹ * ∑ i ∈ Finset.range n, Z i ω
Instances For
Hoeffding concentration of the SQ oracle. The empirical mean of n i.i.d.
bounded query-values is within τ of the true answer predZ = 𝔼φ except with probability
≤ 2·exp(−nτ²/2).
Sample complexity of the SQ oracle. n ≥ (2/τ²)·log(2/δ) i.i.d. ensemble trajectories
answer the SQ query to tolerance τ with probability ≥ 1−δ.
Pruning wiring: the SQ oracle discharges SQBounds.truth_survives_pruning's
hypothesis. With n ≥ (2/τ²)·log(2/δ) ensemble trajectories, with probability ≥ 1−δ the truth's
predicted statistic predZ is within 2τ of the empirical answer — i.e. it is never pruned by the
2τ-rule.
The W-attack: window-noise budget 2η ≤ τ #
The window-sufficiency assumption (W) — "the window determines the next observation
under R" — is the determinism of the one-step predictor f_R; it weakens gracefully to the
window-noise rate η := μ(o_{t+1} ≠ f_R(w_t)) (the Bayes error of the window predictor under the
invariant measure; W is η = 0). noise_gap_integral is the genuine content — a [−1,1]-valued
query answer is distorted by at most 2η — and sq_oracle_truth_survives_noisy threads it, with
the arithmetic siblings in SQBounds, into the pruning guarantee: the deterministic truth survives
the unchanged 2τ-pruning rule with probability ≥ 1−δ exactly when the window-noise budget
2η ≤ τ holds.
A1 — the window-noise integral gap. Two [−1,1]-valued measurable observables
f, g that agree off a measurable event E have integrals differing by at most 2·μ(E).
Applied to a [−1,1]-valued SQ query answer, the realized-next-observation value φ(w, o_next) and
the deterministic-prediction value φ(w, f_R(w)) agree off the window-noise event
E = {o_next ≠ f_R(w)} of mass η := μ(E), so the query answer is distorted by at most 2η.
Boundedness on the probability measure discharges integrability; the majorant is the indicator
2·𝟙_E.
A3 — pruning wiring under window noise: the SQ oracle survives a 2η ≤ τ budget.
Mirror of sq_oracle_truth_survives that keeps the empirical mean's target a = 𝔼φ (the joint
window/next-observation answer, on which the time-average concentrates) distinct from the
deterministic-prediction truth predR: the two differ by the window-noise gap |a − predR| ≤ 2η
(bounded by noise_gap_integral at the call site). With n ≥ (2/τ²)·log(2/δ) ensemble
trajectories and window-noise budget 2η ≤ τ, the truth's predicted statistic predR lies within
2τ of the empirical answer with probability ≥ 1−δ — so the 2τ-pruning rule never discards it.
At η = 0 (so a = predR) this is exactly sq_oracle_truth_survives.
Union-bound glue #
The finite-query union bound that carries the per-query concentration of sq_oracle_concentration
to the genuine oracle object SQObjects.IsSQOracle: given a Finset of queries Qs, empirical
answers emp : Q → Ω → ℝ, truth tru : Q → ℝ, and a per-query tail bound (the shape of
sq_oracle_concentration's conclusion), the empirical answers restricted to Qs satisfy the oracle
predicate off an event of measure ≤ |Qs|·δ.
Finite-query union bound. If each query φ ∈ Qs fails the tolerance τ with probability
≤ δ, then SOME query in Qs fails with probability ≤ |Qs|·δ — the union bound over the finite
query set (measure_biUnion_finset_le).
Oracle-object glue. Off an event of measure ≤ |Qs|·δ — i.e. with probability
≥ 1 − |Qs|·δ — the empirical answers restricted to Qs satisfy the genuine oracle predicate
SQObjects.IsSQOracle (over the subtype ↥Qs). The complement of the good event is exactly the
"some query fails" event of sq_oracle_uniform_tail.
Per-query i.i.d. instantiation. A query-indexed i.i.d. family
Zq : Q → ℕ → Ω → ℝ — each query's values i.i.d. in [−1,1] with mean tru φ, per
sq_oracle_concentration's hypotheses — DISCHARGES sq_oracle_uniform_tail's per-query tail with
δ_φ = 2·exp(−nτ²/2), giving the end-to-end bound: with n ≥ (2/τ²)·log(2·|Qs|/δ) samples per
query, the empirical answers fail SQObjects.IsSQOracle on ↥Qs with probability ≤ δ.