Theorem 4.4 (as proved): sample error bound for spectral JEPA risk
ProvedJEPAGeneralization.sample_error_bound_spectral_jepaLet be an action-conditioned co-occurrence model on a finite nonempty observation space with positive marginals, and fix an action and . Let be a nonempty class of encoders and a nonempty class of predictors , all with sup-norm below : and for all arguments and coordinates. Let with . Let be the sample of Definition A.3, i.e. i.i.d. tuples with , and . Let . Then with probability at least over , every minimizer of the tuple risk over satisfies
with and . Here
and
This is the sample-error half of the paper's approximation–sample error trade-off. Richer encoder and predictor classes, or a larger , raise the right-hand side.
Formalization Note This is the version the proof establishes. (1) The comparison point is the infimum of the risk over , not the unrestricted minimizer of Section 3.1. The proof needs , which uses . With the unrestricted minimizer the printed bound fails: take , and small . (2) is the coordinatewise complexity of used in the proof (the classes ). The display in the theorem defines it instead as the complexity of the loss class. (3) The sample is the i.i.d. tuple law of Definition A.3, which is the law of the permutation construction. Its probability is an exact finite sum. (4) Minimizers are quantified universally; the paper takes their existence for granted.
import Mathlib import Definitions.Def_JEPAGeneralization_Basic open Finset
namespace JEPAGeneralization
theorem sample_error_bound_spectral_jepa {X A : Type*} [Fintype X] [Nonempty X] {k : ℕ}
(hk : 1 ≤ k) (pX : X → ℝ) (w : X → X → A → ℝ) (hw : IsCoOccurrence pX w) (a : A)
(F : Set (X → Fin k → ℝ)) (hF : F.Nonempty)
(G : Set ((Fin k → ℝ) → A → Fin k → ℝ)) (hG : G.Nonempty) (κ : ℝ)
(hFκ : ∀ f ∈ F, ∀ x i, |f x i| < κ) (hGκ : ∀ g ∈ G, ∀ y a' i, |g y a' i| < κ)
(m : ℕ) (hm : 1 ≤ m) (δ : ℝ) (hδ0 : 0 < δ) (hδ1 : δ < 1) :
1 - δ ≤ sampleProb w a m (fun S => ∀ fh ∈ F, ∀ gh ∈ G,
(∀ f ∈ F, ∀ g ∈ G, empRiskS fh gh a S ≤ empRiskS f g a S) →
sJepaRisk pX w fh gh a - (⨅ p : F × G, sJepaRisk pX w p.1.1 p.2.1 a) ≤
(32 * (k : ℝ) ^ 2 * κ ^ 3 + 32 * k * κ) * (radPred m F G a + radEnc m F) +
(8 * (k : ℝ) * κ ^ 2 + 2 * (k : ℝ) ^ 2 * κ ^ 4) *
(Real.sqrt (Real.log (2 / δ) / (2 * m : ℝ)) + δ)) := by sorry
end JEPAGeneralizationRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. is a finite, nonempty set of observations and is an arbitrary set of actions. is a natural number, and latent vectors live in with the Euclidean inner product . An encoder is a map . A predictor is a map .
We are given and , assumed to form a co-occurrence model:
- for all ;
- and for every ;
- for every and every action ;
- the next-state marginal is strictly positive for every and every .
A fixed action is chosen. We are also given:
- a nonempty set of encoders and a nonempty set of predictors;
- a real with for all , all and all coordinates ;
- for all , all , all actions and all .
These bounds are strict, and since , and are nonempty they force . Finally, is a natural number and is a real number with . No normalization of or is assumed.
Objects. The normalized co-occurrence matrix is the matrix with entries
The spectral JEPA risk is
This is , where:
- is the matrix with columns ;
- is the matrix with columns .
A sample is an -tuple of triples in . Its empirical risk is
The probability of an event about is the sum, over all in the event, of
In other words, the triples are treated as independent, each with law ; under the hypotheses this law has total mass . No underlying dataset or permutation enters.
Rademacher complexities. For a class of real functions on and points , define
and the worst-case version . Two classes are used:
- the encoder complexity
- the prediction complexity
which uses the fixed action .
The classes are nonempty and bounded by , so these suprema are genuine.
Assertion. With probability at least over the sample , the following holds. For every and , if minimizes over (that is, for all , ), then
Here is the natural logarithm. The infimum is a genuine infimum, since and the class is nonempty. The bound carries an additive term inside the second factor.
For a sample on which no empirical minimizer exists in , the condition holds vacuously, and such samples count toward the probability.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.