Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3 (as proved): conditionally exponential sources are recovered up to a linear transformation of their sufficient statistics

Proved
NonlinearICAAux.conditionally_exponential_linear_indeterminacy

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

contrastive-learningexponential-familyidentifiabilitynonlinear-ica

Assume the nonlinear ICA model with auxiliary variables, and that every source sis_isi​ is conditionally exponential of order kkk given u\mathbf uu (Definition 1):

p(si∣u)=Qi(si)Zi(u)exp⁡∑j=1kq~ij(si)λij(u).p(s_i\mid\mathbf u)=\frac{Q_i(s_i)}{Z_i(\mathbf u)}\exp\sum_{j=1}^k\tilde q_{ij}(s_i)\lambda_{ij}(\mathbf u).p(si​∣u)=Zi​(u)Qi​(si​)​expj=1∑k​q~​ij​(si​)λij​(u).

Assume there are nk+1nk+1nk+1 points u0,…,unk\mathbf u_0,\dots,\mathbf u_{nk}u0​,…,unk​ for which the nk×nknk\times nknk×nk matrix Lˉ\bar{\mathbf L}Lˉ with entries λij(ul)−λij(u0)\lambda_{ij}(\mathbf u_l)-\lambda_{ij}(\mathbf u_0)λij​(ul​)−λij​(u0​) (row (i,j)(i,j)(i,j), column lll) is invertible (eq. (10)). Then:

  1. the optimal regression function, the log-density ratio, can be written as
log⁡p(x∣u)−log⁡p(x)=h~(x)Tv(u)+a(x)+b(u)\log p(\mathbf x\mid\mathbf u)-\log p(\mathbf x)=\tilde{\mathbf h}(\mathbf x)^T\mathbf v(\mathbf u)+a(\mathbf x)+b(\mathbf u)logp(x∣u)−logp(x)=h~(x)Tv(u)+a(x)+b(u)

for some h~:Rn→Rnk\tilde{\mathbf h}:\mathbb R^n\to\mathbb R^{nk}h~:Rn→Rnk, v:Rm→Rnk\mathbf v:\mathbb R^m\to\mathbb R^{nk}v:Rm→Rnk and scalar functions a,ba,ba,b (eq. (11)); 2. whenever a regression function of the form (11) equals the log-density ratio for all x\mathbf xx and u\mathbf uu, there are a matrix A\mathbf AA and a vector c\mathbf cc such that, with s=g(x)\mathbf s=\mathbf g(\mathbf x)s=g(x),

(q~11(s1),q~12(s1),…,q~nk(sn))T=A h~(x)−cfor all x(eq. (12)).\big(\tilde q_{11}(s_1),\tilde q_{12}(s_1),\dots,\tilde q_{nk}(s_n)\big)^T=\mathbf A\,\tilde{\mathbf h}(\mathbf x)-\mathbf c\qquad\text{for all }\mathbf x\quad\text{(eq. (12))}.(q~​11​(s1​),q~​12​(s1​),…,q~​nk​(sn​))T=Ah~(x)−cfor all x(eq. (12)).

So, as in time-contrastive learning, the hidden units recover the sufficient statistics of the sources only up to a linear transformation.

Formalization Note The printed Assumption 4 refers to the regression function of eq. (6), but the proof and the conclusion use the form (11); the statement uses (11). "In the limit of infinite data" is encoded, as for Theorem 1, as equality with the log-density ratio. The matrix A\mathbf AA is not claimed to be invertible, as in the paper.

Preamble
import Mathlib
import Definitions.Def_NonlinearICAAux_Basic

open MeasureTheory
open scoped ENNReal
Formal statement
namespace NonlinearICAAux

theorem conditionally_exponential_linear_indeterminacy {n m k : ℕ} (μ : Measure (Fin m → ℝ))
    [IsProbabilityMeasure μ] (q : Fin n → ℝ → (Fin m → ℝ) → ℝ) (f : (Fin n → ℝ) ≃ (Fin n → ℝ))
    (hM : IsAuxICAModel μ q f)
    (Q : Fin n → ℝ → ℝ) (Z : Fin n → (Fin m → ℝ) → ℝ) (qt : Fin n → Fin k → ℝ → ℝ)
    (lam : Fin n → Fin k → (Fin m → ℝ) → ℝ)
    (hce : ∀ i, IsCondExpWith q i (Q i) (Z i) (qt i) (lam i))
    (hL : ∃ (u₀ : Fin m → ℝ) (us : Fin n × Fin k → (Fin m → ℝ)), IsUnit (lamBar lam u₀ us)) :
    (∃ (ht : (Fin n → ℝ) → (Fin n × Fin k → ℝ)) (v : (Fin m → ℝ) → (Fin n × Fin k → ℝ))
        (a : (Fin n → ℝ) → ℝ) (b : (Fin m → ℝ) → ℝ),
        ∀ x u, logRatio μ q f x u = regExp ht v a b x u) ∧
    (∀ (ht : (Fin n → ℝ) → (Fin n × Fin k → ℝ)) (v : (Fin m → ℝ) → (Fin n × Fin k → ℝ))
        (a : (Fin n → ℝ) → ℝ) (b : (Fin m → ℝ) → ℝ),
        (∀ x u, regExp ht v a b x u = logRatio μ q f x u) →
        ∃ (A : Matrix (Fin n × Fin k) (Fin n × Fin k) ℝ) (c : Fin n × Fin k → ℝ),
          ∀ x, sstatVec qt (f.symm x) = A.mulVec (ht x) - c) := by sorry

end NonlinearICAAux
Source
Hyvärinen, Sasaki and Turner, Nonlinear ICA Using Auxiliary Variables and Generalized Contrastive Learning, arXiv:1805.08651v3 (AISTATS 2019), Section 4.3, Theorem 3, eqs. (10)-(12), pp. 5-6; proof in Supplementary C, eqs. (32)-(40), p. 12
Read-back

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

Setting. Let n,m,kn, m, kn,m,k be arbitrary natural numbers; any of them may be 000. Write Rn\mathbb{R}^nRn for real nnn-vectors with coordinates indexed by 1,…,n1,\dots,n1,…,n, and write I={1,…,n}×{1,…,k}I = \{1,\dots,n\} \times \{1,\dots,k\}I={1,…,n}×{1,…,k} for the index set of pairs (i,j)(i,j)(i,j), which has nknknk elements. The data are:

  • a probability measure μ\muμ on Rm\mathbb{R}^mRm, the law of the auxiliary variable uuu;
  • functions qi:R×Rm→Rq_i : \mathbb{R} \times \mathbb{R}^m \to \mathbb{R}qi​:R×Rm→R, written qi(s,u)q_i(s, u)qi​(s,u), for i=1,…,ni = 1,\dots,ni=1,…,n;
  • a bijection f:Rn→Rnf : \mathbb{R}^n \to \mathbb{R}^nf:Rn→Rn with inverse g=f−1g = f^{-1}g=f−1;
  • functions Qi:R→RQ_i : \mathbb{R} \to \mathbb{R}Qi​:R→R, Zi:Rm→RZ_i : \mathbb{R}^m \to \mathbb{R}Zi​:Rm→R, q~ij:R→R\tilde q_{ij} : \mathbb{R} \to \mathbb{R}q~​ij​:R→R and λij:Rm→R\lambda_{ij} : \mathbb{R}^m \to \mathbb{R}λij​:Rm→R, for i≤ni \le ni≤n and j≤kj \le kj≤k.

No measurability or regularity is assumed of QiQ_iQi​, ZiZ_iZi​, q~ij\tilde q_{ij}q~​ij​ or λij\lambda_{ij}λij​ beyond what the hypotheses below say.

Hypothesis 1 (model). All of the following hold:

  1. fff and f−1f^{-1}f−1 are both twice continuously differentiable on Rn\mathbb{R}^nRn.
  2. Each qiq_iqi​ is jointly measurable in (s,u)(s,u)(s,u).
  3. For every u∈Rmu \in \mathbb{R}^mu∈Rm, the function s↦exp⁡(∑i=1nqi(si,u))s \mapsto \exp\big(\sum_{i=1}^n q_i(s_i, u)\big)s↦exp(∑i=1n​qi​(si​,u)) is Lebesgue-integrable on Rn\mathbb{R}^nRn and
∫Rnexp⁡(∑i=1nqi(si,u)) ds=1.\int_{\mathbb{R}^n} \exp\Big(\sum_{i=1}^n q_i(s_i,u)\Big)\,ds = 1.∫Rn​exp(i=1∑n​qi​(si​,u))ds=1.
  1. For every s∈Rns \in \mathbb{R}^ns∈Rn, the function u↦exp⁡(∑iqi(si,u))u \mapsto \exp\big(\sum_i q_i(s_i,u)\big)u↦exp(∑i​qi​(si​,u)) is μ\muμ-integrable.

Hypothesis 2 (conditional exponentiality). For every iii, all of the following hold:

  1. Qi(s)>0Q_i(s) > 0Qi​(s)>0 for all s∈Rs \in \mathbb{R}s∈R.
  2. Zi(u)>0Z_i(u) > 0Zi​(u)>0 for all uuu.
  3. The functions q~i1,…,q~ik\tilde q_{i1},\dots,\tilde q_{ik}q~​i1​,…,q~​ik​ are linearly independent over R\mathbb{R}R as elements of the space of functions R→R\mathbb{R} \to \mathbb{R}R→R.
  4. For all u∈Rmu \in \mathbb{R}^mu∈Rm and s∈Rs \in \mathbb{R}s∈R,
exp⁡qi(s,u)∫Rexp⁡qi(t,u) dt  =  Qi(s)Zi(u) exp⁡(∑j=1kq~ij(s) λij(u)).\frac{\exp q_i(s,u)}{\int_{\mathbb{R}} \exp q_i(t,u)\,dt} \;=\; \frac{Q_i(s)}{Z_i(u)}\,\exp\Big(\sum_{j=1}^k \tilde q_{ij}(s)\,\lambda_{ij}(u)\Big).∫R​expqi​(t,u)dtexpqi​(s,u)​=Zi​(u)Qi​(s)​exp(j=1∑k​q~​ij​(s)λij​(u)).

In item 4, the integral is taken to be 000 if t↦exp⁡qi(t,u)t \mapsto \exp q_i(t,u)t↦expqi​(t,u) is not integrable, and division by 000 yields 000. Since the right-hand side is strictly positive, the identity can only hold when that integral is nonzero.

Hypothesis 3 (invertibility). There exist a point u0∈Rmu_0 \in \mathbb{R}^mu0​∈Rm and points ul∈Rmu_l \in \mathbb{R}^mul​∈Rm, one for each index l∈Il \in Il∈I (so nknknk points), such that the nk×nknk \times nknk×nk matrix Lˉ\bar LLˉ is invertible. Its rows are indexed by (i,j)∈I(i,j) \in I(i,j)∈I, its columns by l∈Il \in Il∈I, and its entries are

Lˉ(i,j), l=λij(ul)−λij(u0).\bar L_{(i,j),\,l} = \lambda_{ij}(u_l) - \lambda_{ij}(u_0).Lˉ(i,j),l​=λij​(ul​)−λij​(u0​).

When nk=0nk = 0nk=0 the matrix is empty and this hypothesis holds automatically.

Notation for the conclusion. For x∈Rnx \in \mathbb{R}^nx∈Rn and u∈Rmu \in \mathbb{R}^mu∈Rm, set J(x)=∣det⁡Dg(x)∣J(x) = |\det Dg(x)|J(x)=∣detDg(x)∣, the absolute Jacobian determinant of g=f−1g = f^{-1}g=f−1 at xxx. Define

p(x∣u)=exp⁡(∑iqi(g(x)i,u)) J(x),p(x)=(∫Rmexp⁡(∑iqi(g(x)i,u′)) dμ(u′)) J(x),p(x\mid u) = \exp\Big(\sum_{i} q_i\big(g(x)_i, u\big)\Big)\,J(x), \qquad p(x) = \Big(\int_{\mathbb{R}^m} \exp\Big(\sum_i q_i\big(g(x)_i, u'\big)\Big)\,d\mu(u')\Big)\,J(x),p(x∣u)=exp(i∑​qi​(g(x)i​,u))J(x),p(x)=(∫Rm​exp(i∑​qi​(g(x)i​,u′))dμ(u′))J(x),

and

R(x,u)=log⁡p(x∣u)−log⁡p(x).R(x,u) = \log p(x\mid u) - \log p(x).R(x,u)=logp(x∣u)−logp(x).

Here log⁡\loglog is the real logarithm with the conventions log⁡0=0\log 0 = 0log0=0 and log⁡y=log⁡∣y∣\log y = \log|y|logy=log∣y∣ for y<0y<0y<0.

Conclusion. Both of the following hold.

(1) Existence. There exist functions h~:Rn→RI\tilde h : \mathbb{R}^n \to \mathbb{R}^{I}h~:Rn→RI, v:Rm→RIv : \mathbb{R}^m \to \mathbb{R}^{I}v:Rm→RI, a:Rn→Ra : \mathbb{R}^n \to \mathbb{R}a:Rn→R and b:Rm→Rb : \mathbb{R}^m \to \mathbb{R}b:Rm→R such that, for all xxx and uuu,

R(x,u)=∑(i,j)∈Ih~(x)(i,j) v(u)(i,j)+a(x)+b(u).R(x,u) = \sum_{(i,j) \in I} \tilde h(x)_{(i,j)}\, v(u)_{(i,j)} + a(x) + b(u).R(x,u)=(i,j)∈I∑​h~(x)(i,j)​v(u)(i,j)​+a(x)+b(u).

(2) Linear identifiability. Take any functions h~,v,a,b\tilde h, v, a, bh~,v,a,b of the types in (1), with no regularity assumed. Suppose that for all x,ux, ux,u

∑(i,j)∈Ih~(x)(i,j) v(u)(i,j)+a(x)+b(u)=R(x,u).\sum_{(i,j)\in I} \tilde h(x)_{(i,j)}\, v(u)_{(i,j)} + a(x) + b(u) = R(x,u).(i,j)∈I∑​h~(x)(i,j)​v(u)(i,j)​+a(x)+b(u)=R(x,u).

Then there exist an nk×nknk \times nknk×nk real matrix AAA and a vector c∈RIc \in \mathbb{R}^{I}c∈RI such that, for every x∈Rnx \in \mathbb{R}^nx∈Rn and every (i,j)∈I(i,j) \in I(i,j)∈I,

q~ij(g(x)i)=∑l∈IA(i,j), l h~(x)l−c(i,j).\tilde q_{ij}\big(g(x)_i\big) = \sum_{l \in I} A_{(i,j),\,l}\, \tilde h(x)_l - c_{(i,j)}.q~​ij​(g(x)i​)=l∈I∑​A(i,j),l​h~(x)l​−c(i,j)​.

In vector form, writing q~(s)=(q~ij(si))(i,j)∈I\tilde{\mathbf q}(s) = \big(\tilde q_{ij}(s_i)\big)_{(i,j)\in I}q~​(s)=(q~​ij​(si​))(i,j)∈I​, this says q~(f−1(x))=A h~(x)−c\tilde{\mathbf q}(f^{-1}(x)) = A\,\tilde h(x) - cq~​(f−1(x))=Ah~(x)−c. No invertibility or other condition is asserted for AAA.

Degenerate cases. If k=0k = 0k=0 or n=0n = 0n=0, then III is empty. In that case Hypothesis 3 is automatic and part (2) holds trivially. Part (1) then reduces to the claim that R(x,u)=a(x)+b(u)R(x,u) = a(x) + b(u)R(x,u)=a(x)+b(u) for some functions aaa and bbb.

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

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 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