Documentation

CslibFrontier.MachineLearning.SingularLearning.LearningCoefficient

The local learning coefficient as a volume exponent #

For a function K on a space with a distance and a volume, the local learning coefficient of K at a point w measures how fast the volume of the nearby points with K ≤ ε shrinks as ε → 0. When that volume behaves like ε ^ λ, up to factors that grow or decay more slowly than every power, the coefficient is λ; for an arbitrary function it is a lower limit and no such behaviour is implied. For a nonnegative K vanishing at w, a smaller coefficient means that near w more of the space has K small.

In singular learning theory [Wat09] K is the Kullback-Leibler divergence from the true distribution to the model at parameter w. The coefficient is defined there, for real-analytic K, as the exponent λ of the asymptotic form c ε ^ λ (log (1 / ε)) ^ (m - 1) of the volume of {K ≤ ε}, equivalently through the largest pole of the zeta function ∫ K ^ z; the existence of that form rests on resolution of singularities. The local coefficient at a point is the same invariant computed in a small ball about it [LFW+25], and measures how degenerate that one solution is. Under the hypotheses of [Wat09], its smallest value over the optimal parameters governs the asymptotics of the Bayes free energy and of the generalization error.

Deviation from the sources #

The definition here needs no analyticity and no resolution of singularities: volumeExponent is the lower limit of log vol / log ε, which exists for every function, and learningCoeff is its limit as the ball shrinks. When the volume has the asymptotic form above, this is the λ of the sources. In the sources that is the case for the germ of a real-analytic K ≥ 0 that is not identically zero, at a zero of K, with Lebesgue measure or a smooth positive density. That agreement is not proved here, and neither is the existence of the asymptotic form. The multiplicity m is not defined.

The values lie in EReal. If K has a positive lower bound near a point, as when K is continuous and positive there, then the sublevel sets in small balls are eventually empty and the coefficient is ⊤.

Main definitions #

Main results #

References #

noncomputable def Cslib.MachineLearning.sublevelVolume {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] (K : E → ℝ) (w : E) (r ε : ℝ) :

The volume of the part of the ball of radius r about w where K ≤ ε.

noncomputable def Cslib.MachineLearning.volumeExponent {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] (K : E → ℝ) (w : E) (r : ℝ) :

The volume exponent of K in the ball of radius r about w: the lower limit of log vol / log ε as ε → 0 from above, where vol is the volume of the part of the ball where K ≤ ε. If the volume is c ε ^ λ (log (1 / ε)) ^ (m - 1) to leading order, this is λ.

noncomputable def Cslib.MachineLearning.learningCoeff {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] (K : E → ℝ) (w : E) :

The local learning coefficient of K at w: the supremum over r > 0 of the volume exponents of K in the balls of radius r about w, which is their limit as r → 0 (volumeExponent_anti). For a real-analytic K ≥ 0 that is not identically zero near a zero w, with Lebesgue measure or a smooth positive density, this is the local learning coefficient of [LFW+25], also called the real log canonical threshold of K at w [Wat09]; that agreement is not proved here.

If the exponent exceeds a, the volume is eventually below ε ^ a.

If the volume is eventually at most ε ^ a, the exponent is at least a.

theorem Cslib.MachineLearning.lt_volumeExponent_iff {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] {K : E → ℝ} {w : E} {r a : ℝ} :
↑a < volumeExponent K w r ↔ ∃ (b : ℝ), a < b ∧ ∀ᶠ (ε : ℝ) in nhdsWithin 0 (Set.Ioi 0), sublevelVolume K w r ε < ENNReal.ofReal (ε ^ b)

Characterization of the volume exponent. The exponent exceeds a exactly when, for some b > a, the volume of the part of the ball where K ≤ ε is eventually below ε ^ b.

theorem Cslib.MachineLearning.volumeExponent_le_of_subset {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] {K K' : E → ℝ} {w w' : E} {r r' C : ℝ} (hC : 0 < C) (h : ∀ᶠ (ε : ℝ) in nhdsWithin 0 (Set.Ioi 0), Metric.ball w' r' ∩ {x : E | K' x ≤ ε} ⊆ Metric.ball w r ∩ {x : E | K x ≤ C * ε}) :

Comparison of volume exponents: if for small ε the part of one ball where K' ≤ ε lies in the part of another where K ≤ C ε, then the exponent of K is at most that of K'.

The exponent of a ball is at most that of any ball it contains.

theorem Cslib.MachineLearning.volumeExponent_anti {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] (K : E → ℝ) (w : E) {r s : ℝ} (h : r ≤ s) :

The volume exponent grows as the ball shrinks.

The volume exponent in any ball is at most the local learning coefficient.

theorem Cslib.MachineLearning.learningCoeff_le_iff {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] {K : E → ℝ} {w : E} {a : EReal} :
learningCoeff K w ≤ a ↔ ∀ (r : ℝ), 0 < r → volumeExponent K w r ≤ a

The local learning coefficient is at most a exactly when every volume exponent is.

theorem Cslib.MachineLearning.learningCoeff_le_of_le {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] {K K' : E → ℝ} {w : E} {C : ℝ} (hC : 0 < C) (h : ∀ᶠ (x : E) in nhds w, K x ≤ C * K' x) :

Comparison. If K ≤ C K' near w for a constant C > 0, then the local learning coefficient of K at w is at most that of K': the smaller function has the larger sublevel sets.

theorem Cslib.MachineLearning.learningCoeff_const_mul {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] (K : E → ℝ) (w : E) {c : ℝ} (hc : 0 < c) :
learningCoeff (fun (x : E) => c * K x) w = learningCoeff K w

A positive multiple of K has the same local learning coefficient as K.

The local learning coefficient is lower semicontinuous in the point. A small ball about a point near w lies in a ball about w, and shrinking the ball only raises the exponent.

theorem Cslib.MachineLearning.exists_isMinOn_learningCoeff {E : Type u_1} [PseudoMetricSpace E] [MeasureTheory.MeasureSpace E] (K : E → ℝ) {S : Set E} (hS : IsCompact S) (hne : S.Nonempty) :
∃ w ∈ S, IsMinOn (learningCoeff K) S w

Attainment. On a nonempty compact set the smallest local learning coefficient is attained.