Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.2, Step 1: matching likelihoods force content invariance (eq. (9))

Disproved
ContentStyle.invariance_from_matching_likelihoods

by Xeroth · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

data-augmentationidentifiabilitylatent-variable-modelsself-supervised-learning

Let (pz,pA,ps~∣s,A,f)(p_z,p_A,p_{\tilde s\mid s,A},f)(pz​,pA​,ps~∣s,A​,f) be the true generative process and (p^z,p^A,p^s~∣s,A,f^)(\hat p_z,\hat p_A,\hat p_{\tilde s\mid s,A},\hat f)(p^​z​,p^​A​,p^​s~∣s,A​,f^​) a model on the same space Z=C×S\mathcal Z=\mathcal C\times\mathcal SZ=C×S. Both satisfy Assumptions 3.1–3.2 and condition (i), and f^(Z)=f(Z)\hat f(\mathcal Z)=f(\mathcal Z)f^​(Z)=f(Z). Suppose that the laws of the observed pairs agree, px,x~=p^x,x~p_{x,\tilde x}=\hat p_{x,\tilde x}px,x~​=p^​x,x~​. Then h=f^−1∘fh=\hat f^{-1}\circ fh=f^​−1∘f satisfies

h(z)1:nc=h(z~)1:ncalmost surely for (z,z~)∼p.h(z)_{1:n_c}=h(\tilde z)_{1:n_c}\qquad\text{almost surely for }(z,\tilde z)\sim p.h(z)1:nc​​=h(z~)1:nc​​almost surely for (z,z~)∼p.

This is the invariance (9), the first step of the proof of Theorem 4.2.

Formalization Note Matching likelihoods px,x~=p^x,x~p_{x,\tilde x}=\hat p_{x,\tilde x}px,x~​=p^​x,x~​ on X×X\mathcal X\times\mathcal XX×X is stated as equality of the two laws on every Borel set of Rd×Rd\mathbb{R}^d\times\mathbb{R}^dRd×Rd. The pair (x,x~)(x,\tilde x)(x,x~) has no density with respect to Lebesgue measure on X×X\mathcal X\times\mathcal XX×X, because c~=c\tilde c=cc~=c.

Preamble
import Mathlib
import Definitions.Def_ContentStyle_Basic

open MeasureTheory
open scoped ContDiff
Formal statement
namespace ContentStyle

theorem invariance_from_matching_likelihoods {nc ns d : ℕ}
    (C : Set (Fin nc → ℝ)) (S : Set (Fin ns → ℝ))
    (M Mhat : LatentModel nc ns) (f fhat : Latent nc ns → Obs d)
    (hM : IsAugModel C S M) (hMhat : IsAugModel C S Mhat)
    (hf : CondI C S f) (hfhat : CondI C S fhat)
    (hX : fhat '' (C ×ˢ S) = f '' (C ×ˢ S))
    (hmatch : ∀ E : Set (Obs d × Obs d), MeasurableSet E →
      obsPairProb C S M f E = obsPairProb C S Mhat fhat E) :
    pairProb C S M {w | (Function.invFunOn fhat (C ×ˢ S) (f w.1)).1 ≠
      (Function.invFunOn fhat (C ×ˢ S) (f w.2)).1} = 0 := by sorry

end ContentStyle
Source
von Kügelgen, Sharma, Gresele, Brendel, Schölkopf, Besserve and Locatello, Self-Supervised Learning with Data Augmentations Provably Isolates Content from Style, NeurIPS 2021, arXiv:2106.04619v4, Appendix A.1, proof of Theorem 4.2, Step 1, eqs. (6)-(9), pp. 17-18
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. Let nc,ns,dn_c, n_s, dnc​,ns​,d be arbitrary natural numbers; 000 is allowed. Latent points are pairs z=(c,s)∈Rnc×Rnsz = (c, s) \in \mathbb{R}^{n_c} \times \mathbb{R}^{n_s}z=(c,s)∈Rnc​×Rns​, called content ccc and style sss. Observations are points of Rd\mathbb{R}^dRd. Fix the following data:

  • arbitrary sets C⊆RncC \subseteq \mathbb{R}^{n_c}C⊆Rnc​ and S⊆RnsS \subseteq \mathbb{R}^{n_s}S⊆Rns​, with Z:=C×SZ := C \times SZ:=C×S;
  • arbitrary maps f,f^:Rnc×Rns→Rdf, \hat f : \mathbb{R}^{n_c} \times \mathbb{R}^{n_s} \to \mathbb{R}^df,f^​:Rnc​×Rns​→Rd;
  • two "latent models" MMM and M^\hat MM^.

Each latent model consists of three arbitrary real-valued functions:

  • a function pzp_zpz​ on Rnc×Rns\mathbb{R}^{n_c}\times\mathbb{R}^{n_s}Rnc​×Rns​;
  • a function pAp_ApA​ on the 2ns2^{n_s}2ns​ subsets A⊆{1,…,ns}A \subseteq \{1,\dots,n_s\}A⊆{1,…,ns​};
  • for each such AAA, a function qA(a,t)q_A(a, t)qA​(a,t) of two vectors a,t∈RAa, t \in \mathbb{R}^Aa,t∈RA.

For a style vector sss, write sA∈RAs_A \in \mathbb{R}^AsA​∈RA for its coordinates indexed by AAA. Write SA={sA:s∈S}S_A = \{ s_A : s \in S\}SA​={sA​:s∈S}. For t∈RAt \in \mathbb{R}^At∈RA, write s[A←t]s[A \leftarrow t]s[A←t] for the vector that equals ttt on AAA and sss off AAA. Write x+=max⁡(x,0)x^+ = \max(x,0)x+=max(x,0).

No openness, connectedness or other topological condition is imposed on CCC, SSS or ZZZ.

Expectation over pairs. For a model MMM and any [0,∞][0,\infty][0,∞]-valued φ\varphiφ on pairs of latents, define

EM[φ]  =  ∑A⊆{1,…,ns}pA(A)+∫Zpz(z)+∫RAqA(sA,t)+ φ(z,(c,s[A←t])) dt dz,z=(c,s).\mathbb{E}_M[\varphi] \;=\; \sum_{A \subseteq \{1,\dots,n_s\}} p_A(A)^+ \int_{Z} p_z(z)^+ \int_{\mathbb{R}^A} q_A(s_A, t)^+ \, \varphi\big(z, (c, s[A\leftarrow t])\big)\, dt\, dz, \qquad z=(c,s).EM​[φ]=A⊆{1,…,ns​}∑​pA​(A)+∫Z​pz​(z)+∫RA​qA​(sA​,t)+φ(z,(c,s[A←t]))dtdz,z=(c,s).

All integrals are Lebesgue lower integrals with values in [0,∞][0,\infty][0,∞], so they are defined even for non-measurable integrands. The inner ttt-integral ranges over all of RA\mathbb{R}^ARA. When A=∅A = \varnothingA=∅, RA\mathbb{R}^ARA is a single point carrying mass 111.

  • The latent pair probability is PM(E)=EM[1E]P_M(E) = \mathbb{E}_M[\mathbf 1_E]PM​(E)=EM​[1E​].
  • The observed pair probability is PM,fobs(E)=EM[1E(f(z),f(z~))]P^{\mathrm{obs}}_{M,f}(E) = \mathbb{E}_M\big[\mathbf 1_E(f(z), f(\tilde z))\big]PM,fobs​(E)=EM​[1E​(f(z),f(z~))] for E⊆Rd×RdE \subseteq \mathbb{R}^d \times \mathbb{R}^dE⊆Rd×Rd, where (z,z~)(z, \tilde z)(z,z~) denotes the pair.

Hypotheses. Each of MMM and M^\hat MM^ satisfies the following conditions:

  • pzp_zpz​ is Borel measurable on all of Rnc×Rns\mathbb{R}^{n_c}\times\mathbb{R}^{n_s}Rnc​×Rns​.
  • pz≥0p_z \ge 0pz​≥0 on ZZZ, and ∫Zpz+=1\int_Z p_z^+ = 1∫Z​pz+​=1. In particular ZZZ must have positive Lebesgue measure, otherwise the hypotheses cannot hold.
  • pA≥0p_A \ge 0pA​≥0 for every subset AAA, and ∑ApA(A)=1\sum_A p_A(A) = 1∑A​pA​(A)=1.
  • For every AAA:
    • (a,t)↦qA(a,t)(a,t) \mapsto q_A(a,t)(a,t)↦qA​(a,t) is jointly measurable;
    • for every a∈SAa \in S_Aa∈SA​ and every ttt, qA(a,t)≥0q_A(a,t) \ge 0qA​(a,t)≥0;
    • for every a∈SAa \in S_Aa∈SA​, ∫RAqA(a,t)+ dt=1\int_{\mathbb{R}^A} q_A(a,t)^+\,dt = 1∫RA​qA​(a,t)+dt=1;
    • for every s∈Ss \in Ss∈S and every ttt with s[A←t]∉Ss[A\leftarrow t] \notin Ss[A←t]∈/S, qA(sA,t)=0q_A(s_A, t) = 0qA​(sA​,t)=0.

Each of fff and f^\hat ff^​ satisfies the following conditions:

  • It is smooth on ZZZ in the following sense: every point of ZZZ has an open neighbourhood UUU and a C∞C^\inftyC∞ function on UUU that agrees with the map on U∩ZU \cap ZU∩Z.
  • It is injective on ZZZ.
  • Its chosen inverse is smooth, in the same sense, on the image of ZZZ.

The chosen inverse f^−1\hat f^{-1}f^​−1 is defined on all of Rd\mathbb{R}^dRd:

  • for x∈f^(Z)x \in \hat f(Z)x∈f^​(Z), it returns the unique z∈Zz \in Zz∈Z with f^(z)=x\hat f(z) = xf^​(z)=x;
  • for x∉f^(Z)x \notin \hat f(Z)x∈/f^​(Z), it returns a fixed but unspecified latent point.

Further hypotheses:

  • The images coincide: f^(Z)=f(Z)\hat f(Z) = f(Z)f^​(Z)=f(Z).
  • For every Borel measurable E⊆Rd×RdE \subseteq \mathbb{R}^d \times \mathbb{R}^dE⊆Rd×Rd,
PM,fobs(E)=PM^,f^obs(E).P^{\mathrm{obs}}_{M,f}(E) = P^{\mathrm{obs}}_{\hat M,\hat f}(E).PM,fobs​(E)=PM^,f^​obs​(E).

No positivity or smoothness assumptions are made on pzp_zpz​ or on any qAq_AqA​ beyond those listed above.

Conclusion. Write (f^−1(x))c∈Rnc\big(\hat f^{-1}(x)\big)_c \in \mathbb{R}^{n_c}(f^​−1(x))c​∈Rnc​ for the content component of f^−1(x)\hat f^{-1}(x)f^​−1(x). Under the true model MMM, the set of latent pairs (z,z~)(z, \tilde z)(z,z~) satisfying

(f^−1(f(z)))c  ≠  (f^−1(f(z~)))c\big(\hat f^{-1}(f(z))\big)_c \;\neq\; \big(\hat f^{-1}(f(\tilde z))\big)_c(f^​−1(f(z)))c​=(f^​−1(f(z~)))c​

has PMP_MPM​-probability exactly 000. This set is not asserted to be measurable, and the probability is the lower integral defined above.

Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me