Lemma A.7 - OOD risk and the uncentered second moment
ProvedFeatureDistortion.OODRiskIdentityNotation: , is the input dimension, the feature dimension, the data map, the labels, the features, and the head. Adjoint means Euclidean transpose. The loss is , with no normalization. The probability model, when present, is explicitly specified below; deterministic flow statements involve no random data assumption.
For every pair of natural numbers , every probability measure on with integrable squared norm and for every nonzero , every , every , and every continuous real-linear map , let , where , and let and . The assertion is the conjunction , , and . The moment integral is operator-valued, the adjoint is Euclidean, and no mean-zero assumption is made. If , the positivity hypothesis is vacuous, , and . If , then , so the equivalences test whether .
Formalization note: Source-derived risk identity and positive-definiteness consequences. The reversed inequality in (A.28) is excluded. Source: Kumar, Raghunathan, Jones, Ma, and Liang, Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distribution, ICLR 2022, https://arxiv.org/pdf/2202.10054v1. Appendix A.2, PDF p. 26, Lemma A.7, equations (A.29)--(A.32). Source-backed parent: Section 3.4, PDF p. 10, Proposition 3.7, equations (3.10)--(3.11); Appendix A.7, PDF pp. 45--47.
import Definitions.Def_FeatureDistortion_Model open MeasureTheory Filter open scoped Topology
namespace FeatureDistortion
theorem OODRiskIdentity :
∀ (d k : ℕ) (D : OODLaw d) (w : Vec d) (v : Vec k) (B : Features d k),
oodLoss D w v B =
inner ℝ (weights B v - w) (secondMoment D.measure (weights B v - w)) ∧
(oodLoss D w v B = 0 ↔ weights B v = w) ∧
(0 < oodLoss D w v B ↔ weights B v ≠ w) := by sorry
end FeatureDistortion
Read-back
What the Lean code literally says, in plain math · gpt-6
For every pair of natural numbers , every probability measure on with integrable squared norm and for every nonzero , every , every , and every continuous real-linear map , let , where , and let and . The assertion is the conjunction , , and . The moment integral is operator-valued, the adjoint is Euclidean, and no mean-zero assumption is made. If , the positivity hypothesis is vacuous, , and . If , then , so the equivalences test whether .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.