Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma A.3 - Frozen features off the training span

Proved
FeatureDistortion.FrozenOrthogonalFeatures

by Minghui · Sep 26, 2026 · Mathlib c5ea003 (Lean v4.30.0)

linear-algebramachine-learningprobability

Notation: n=#{training examples}n = \#\{\text{training examples}\}n=#{training examples}, ddd is the input dimension, kkk the feature dimension, X:Rd→RnX:\mathbb R^d\to\mathbb R^nX:Rd→Rn the data map, YYY the labels, B:Rd→RkB:\mathbb R^d\to\mathbb R^kB:Rd→Rk the features, and v∈Rkv\in\mathbb R^kv∈Rk the head. Adjoint means Euclidean transpose. The loss is L^(v,B)=∥XB⊤v−Y∥2\widehat L(v,B)=\|XB^\top v-Y\|^2L(v,B)=∥XB⊤v−Y∥2, with no normalization. The probability model, when present, is explicitly specified below; deterministic flow statements involve no random data assumption.

For every triple of natural numbers n,d,kn,d,kn,d,k, every continuous real-linear map X:Rd→RnX:\mathbb R^d\to\mathbb R^nX:Rd→Rn, every Y∈RnY\in\mathbb R^nY∈Rn, every v0∈Rkv_0\in\mathbb R^kv0​∈Rk, every continuous real-linear map B0:Rd→RkB_0:\mathbb R^d\to\mathbb R^kB0​:Rd→Rk, and every pair of functions a:R→Rka:\mathbb R\to\mathbb R^ka:R→Rk and F:R→L(Rd,Rk)F:\mathbb R\to\mathcal L(\mathbb R^d,\mathbb R^k)F:R→L(Rd,Rk), assume a(0)=v0a(0)=v_0a(0)=v0​, F(0)=B0F(0)=B_0F(0)=B0​, and that for every real s≥0s\geq0s≥0 derivatives within [0,∞)[0,\infty)[0,∞) exist with values a˙(s)=−2F(s)X∗(XF(s)∗a(s)−Y)\dot a(s)=-2F(s)X^*(XF(s)^*a(s)-Y)a˙(s)=−2F(s)X∗(XF(s)∗a(s)−Y) and F˙(s)=[x↦−2⟨X∗(XF(s)∗a(s)−Y),x⟩a(s)]\dot F(s)=\bigl[x\mapsto-2\langle X^*(XF(s)^*a(s)-Y),x\rangle a(s)\bigr]F˙(s)=[x↦−2⟨X∗(XF(s)∗a(s)−Y),x⟩a(s)], the latter being a derivative in the space of continuous linear maps. Then for every real t≥0t\geq0t≥0 and every x∈Rdx\in\mathbb R^dx∈Rd orthogonal to every vector X∗zX^*zX∗z with z∈Rnz\in\mathbb R^nz∈Rn, one has F(t)x=B0xF(t)x=B_0xF(t)x=B0​x. Thus the conclusion uses the orthogonal complement of {X∗z:z∈Rn}\{X^*z:z\in\mathbb R^n\}{X∗z:z∈Rn}. Adjoints and orthogonality are Euclidean. All dimensions may be zero; if this orthogonal complement is {0}\{0\}{0} only x=0x=0x=0 is tested, and if X=0X=0X=0 every xxx is tested. Existence of such curves and conditions at negative times are not asserted.

Formalization note: Direct source invariant, valid for arbitrary labels. 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. 24, Lemma A.3, equations (A.15)--(A.18). Source-backed parent: Section 3.4, PDF p. 10, Proposition 3.7, equations (3.10)--(3.11); Appendix A.7, PDF pp. 45--47.

Preamble
import Definitions.Def_FeatureDistortion_Model
open MeasureTheory Filter
open scoped Topology
Formal statement
namespace FeatureDistortion
theorem FrozenOrthogonalFeatures :
  ∀ (n d k : ℕ) (X : Vec d →L[ℝ] Vec n) (Y : Vec n)
    (v₀ : Vec k) (B₀ : Features d k) (γ : Trajectory d k),
    IsFineTuningFlow X Y v₀ B₀ γ →
    ∀ (t : ℝ), 0 ≤ t → ∀ x ∈ (rowSpace X)ᗮ, γ.features t x = B₀ x := by sorry
end FeatureDistortion
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. 24, Lemma A.3, equations (A.15)--(A.18). Source-backed parent: Section 3.4, PDF p. 10, Proposition 3.7, equations (3.10)--(3.11); Appendix A.7, PDF pp. 45--47.
Read-back

What the Lean code literally says, in plain math · gpt-6

For every triple of natural numbers n,d,kn,d,kn,d,k, every continuous real-linear map X:Rd→RnX:\mathbb R^d\to\mathbb R^nX:Rd→Rn, every Y∈RnY\in\mathbb R^nY∈Rn, every v0∈Rkv_0\in\mathbb R^kv0​∈Rk, every continuous real-linear map B0:Rd→RkB_0:\mathbb R^d\to\mathbb R^kB0​:Rd→Rk, and every pair of functions a:R→Rka:\mathbb R\to\mathbb R^ka:R→Rk and F:R→L(Rd,Rk)F:\mathbb R\to\mathcal L(\mathbb R^d,\mathbb R^k)F:R→L(Rd,Rk), assume a(0)=v0a(0)=v_0a(0)=v0​, F(0)=B0F(0)=B_0F(0)=B0​, and that for every real s≥0s\geq0s≥0 derivatives within [0,∞)[0,\infty)[0,∞) exist with values a˙(s)=−2F(s)X∗(XF(s)∗a(s)−Y)\dot a(s)=-2F(s)X^*(XF(s)^*a(s)-Y)a˙(s)=−2F(s)X∗(XF(s)∗a(s)−Y) and F˙(s)=[x↦−2⟨X∗(XF(s)∗a(s)−Y),x⟩a(s)]\dot F(s)=\bigl[x\mapsto-2\langle X^*(XF(s)^*a(s)-Y),x\rangle a(s)\bigr]F˙(s)=[x↦−2⟨X∗(XF(s)∗a(s)−Y),x⟩a(s)], the latter being a derivative in the space of continuous linear maps. Then for every real t≥0t\geq0t≥0 and every x∈Rdx\in\mathbb R^dx∈Rd orthogonal to every vector X∗zX^*zX∗z with z∈Rnz\in\mathbb R^nz∈Rn, one has F(t)x=B0xF(t)x=B_0xF(t)x=B0​x. Thus the conclusion uses the orthogonal complement of {X∗z:z∈Rn}\{X^*z:z\in\mathbb R^n\}{X∗z:z∈Rn}. Adjoints and orthogonality are Euclidean. All dimensions may be zero; if this orthogonal complement is {0}\{0\}{0} only x=0x=0x=0 is tested, and if X=0X=0X=0 every xxx is tested. Existence of such curves and conditions at negative times are not asserted.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Minghui · Sep 27, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me