Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Slotted latent model: compositional and irreducible generators, slot identifiability, compositional contrast

Definition
ObjectCentric_Basic

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

identifiabilityjacobian-rankobject-centric-learningrepresentation-learning

Objects of Sections 2-3 and Appendix A of Brady, Zimmermann, Sharma, Schölkopf, von Kügelgen and Brendel (ICML 2023).

  1. Latent and observation spaces. A scene with KKK objects has latent representation z=(z1,…,zK)∈Z=Z1×⋯×ZK\mathbf z=(\mathbf z_1,\dots,\mathbf z_K)\in\mathcal Z=\mathcal Z_1\times\cdots\times\mathcal Z_Kz=(z1​,…,zK​)∈Z=Z1​×⋯×ZK​, where each slot space is Zk=RM\mathcal Z_k=\mathbb R^MZk​=RM. Observations are images with NNN pixels, x∈X⊆RN\mathbf x\in\mathcal X\subseteq\mathbb R^Nx∈X⊆RN.
  2. Diffeomorphisms. A generator f:Z→X\mathbf f:\mathcal Z\to\mathcal Xf:Z→X with inverse g:X→Z\mathbf g:\mathcal X\to\mathcal Zg:X→Z is a diffeomorphism: f\mathbf ff is C1C^1C1, g\mathbf gg is C1C^1C1 on X\mathcal XX, f(Z)=X\mathbf f(\mathcal Z)=\mathcal Xf(Z)=X and g(f(z))=z\mathbf g(\mathbf f(\mathbf z))=\mathbf zg(f(z))=z for all z\mathbf zz. A diffeomorphism h:RM→RM\mathbf h:\mathbb R^M\to\mathbb R^Mh:RM→RM is a C1C^1C1 bijection with C1C^1C1 inverse.
  3. Jacobian and index sets (eq. 3). Jf(z)\mathbf J\mathbf f(\mathbf z)Jf(z) has rows indexed by pixels and columns by the latent coordinates (k,m)(k,m)(k,m). For a pixel nnn, ∂fn∂zk(z)∈RM\frac{\partial f_n}{\partial\mathbf z_k}(\mathbf z)\in\mathbb R^M∂zk​∂fn​​(z)∈RM is its gradient with respect to slot kkk, and Ik(z)={n∈[N]:∂fn∂zk(z)≠0}I_k(\mathbf z)=\{n\in[N]:\frac{\partial f_n}{\partial\mathbf z_k}(\mathbf z)\neq\mathbf 0\}Ik​(z)={n∈[N]:∂zk​∂fn​​(z)=0}.
  4. Compositionality (Definition 1). f\mathbf ff is compositional if Ik(z)∩Ij(z)=∅I_k(\mathbf z)\cap I_j(\mathbf z)=\emptysetIk​(z)∩Ij​(z)=∅ for all z\mathbf zz and all k≠jk\neq jk=j.
  5. Mechanisms (Definitions 2-4). For S⊆[N]S\subseteq[N]S⊆[N], JfS(z)\mathbf J\mathbf f_S(\mathbf z)JfS​(z) is the submatrix of Jf(z)\mathbf J\mathbf f(\mathbf z)Jf(z) formed by the rows in SSS. The sub-mechanisms for S1,S2S_1,S_2S1​,S2​ are independent if rank⁡JfS1∪S2(z)=rank⁡JfS1(z)+rank⁡JfS2(z)\operatorname{rank}\mathbf J\mathbf f_{S_1\cup S_2}(\mathbf z)=\operatorname{rank}\mathbf J\mathbf f_{S_1}(\mathbf z)+\operatorname{rank}\mathbf J\mathbf f_{S_2}(\mathbf z)rankJfS1​∪S2​​(z)=rankJfS1​​(z)+rankJfS2​​(z) and dependent if the left side is strictly smaller.
  6. Irreducibility (Definition 5). f\mathbf ff is irreducible if for all z\mathbf zz, all kkk, and every partition of Ik(z)I_k(\mathbf z)Ik​(z) into two nonempty disjoint sets S1,S2S_1,S_2S1​,S2​, the sub-mechanisms JfS1(z)\mathbf J\mathbf f_{S_1}(\mathbf z)JfS1​​(z) and JfS2(z)\mathbf J\mathbf f_{S_2}(\mathbf z)JfS2​​(z) are dependent.
  7. Slot identifiability (Definition 6). g^:X→Z\hat{\mathbf g}:\mathcal X\to\mathcal Zg^​:X→Z slot-identifies z\mathbf zz if for every k∈[K]k\in[K]k∈[K] there is a unique j∈[K]j\in[K]j∈[K] and a diffeomorphism hk:Zk→Zj\mathbf h_k:\mathcal Z_k\to\mathcal Z_jhk​:Zk​→Zj​ with g^(f(z))j=hk(zk)\hat{\mathbf g}(\mathbf f(\mathbf z))_j=\mathbf h_k(\mathbf z_k)g^​(f(z))j​=hk​(zk​) for all z∈Z\mathbf z\in\mathcal Zz∈Z.
  8. Slot blocks. For a map h:Z→Z\mathbf h:\mathcal Z\to\mathcal Zh:Z→Z, z↦z^\mathbf z\mapsto\hat{\mathbf z}z↦z^, the M×MM\times MM×M block ∂z^j∂zi(z)\frac{\partial\hat{\mathbf z}_j}{\partial\mathbf z_i}(\mathbf z)∂zi​∂z^j​​(z) of Jh(z)\mathbf J\mathbf h(\mathbf z)Jh(z).
  9. Compositional contrast (Definition 7, eq. 6). Ccomp(f,z)=∑n=1N∑k=1K∑j=k+1K∥∂fn∂zk(z)∥2∥∂fn∂zj(z)∥2C_{\mathrm{comp}}(\mathbf f,\mathbf z)=\sum_{n=1}^N\sum_{k=1}^K\sum_{j=k+1}^K\big\|\frac{\partial f_n}{\partial\mathbf z_k}(\mathbf z)\big\|_2\big\|\frac{\partial f_n}{\partial\mathbf z_j}(\mathbf z)\big\|_2Ccomp​(f,z)=∑n=1N​∑k=1K​∑j=k+1K​​∂zk​∂fn​​(z)​2​​∂zj​∂fn​​(z)​2​.
  10. Objective (eq. 7). For a latent law pzp_{\mathbf z}pz​ on Z\mathcal ZZ, an encoder g^\hat{\mathbf g}g^​, a decoder f^\hat{\mathbf f}f^ and λ∈R\lambda\in\mathbb Rλ∈R, Ex∼px[∥f^(g^(x))−x∥22+λCcomp(f^,g^(x))]\mathbb E_{\mathbf x\sim p_{\mathbf x}}\big[\|\hat{\mathbf f}(\hat{\mathbf g}(\mathbf x))-\mathbf x\|_2^2+\lambda C_{\mathrm{comp}}(\hat{\mathbf f},\hat{\mathbf g}(\mathbf x))\big]Ex∼px​​[∥f^(g^​(x))−x∥22​+λCcomp​(f^,g^​(x))] with x=f(z)\mathbf x=\mathbf f(\mathbf z)x=f(z), z∼pz\mathbf z\sim p_{\mathbf z}z∼pz​.

Formalization Note "Diffeomorphism" and "differentiable" are read as continuously differentiable (C1C^1C1). The observation space is a subset X\mathcal XX of RN\mathbb R^NRN, and differentiability of a map defined on X\mathcal XX is differentiability relative to X\mathcal XX. Partial derivatives are taken from the Fréchet derivative, which is 000 at points where a map is not differentiable. Every statement that uses these notions therefore assumes the required differentiability. The objective is the expectation in [0,∞][0,\infty][0,∞] of ofReal\mathrm{ofReal}ofReal of the integrand, written as an integral over z∼pz\mathbf z\sim p_{\mathbf z}z∼pz​ with x=f(z)\mathbf x=\mathbf f(\mathbf z)x=f(z). This is the expectation under the push-forward px=f∗pzp_{\mathbf x}=\mathbf f_*p_{\mathbf z}px​=f∗​pz​.

Definition code
import Mathlib

/-!
Brady, Zimmermann, Sharma, Schölkopf, von Kügelgen and Brendel, *Provably Learning Object-Centric
Representations*, ICML 2023, arXiv:2305.14229v1: the slotted latent space and the pixel space of
Section 2 (eq. (1), (2)), the index sets `I_k(z)` (eq. (3)), compositionality (Definition 1),
mechanisms, sub-mechanisms and their (in)dependence (Definitions 2-4), irreducibility
(Definition 5), slot identifiability (Definition 6), the compositional contrast (Definition 7,
eq. (6)) and the auto-encoder objective (eq. (7)) of Section 3.

Throughout, "diffeomorphism" and "differentiable" are read as continuously differentiable (`C¹`).
-/

open MeasureTheory

noncomputable section

namespace ObjectCentric

/-- Section 2.1: the latent space `Z = Z_1 × ... × Z_K` with `Z_k = ℝ^M`; a scene representation
`z` assigns to each slot `k ∈ [K]` its latent vector `z_k = z k ∈ ℝ^M`. -/
abbrev Lat (K M : ℕ) : Type := Fin K → Fin M → ℝ

/-- Section 2 and Appendix A (Notation): the ambient pixel space `ℝ^N` containing the observation
space `X`; pixel `n ∈ [N]` of an observation `x` is `x n`. -/
abbrev Obs (N : ℕ) : Type := Fin N → ℝ

variable {K M N : ℕ}

/-- Section 2: `f : Z → X` is a (`C¹`) diffeomorphism onto the observation space `X ⊆ ℝ^N`, with
inverse `g : X → Z`: `f` is `C¹`, `g` is `C¹` on `X`, `f(Z) = X`, and `g (f z) = z` for all `z`
(so also `f (g x) = x` for all `x ∈ X`). Footnote 1: a differentiable bijection with
differentiable inverse. -/
def IsDiffeoWithInv (f : Lat K M → Obs N) (g : Obs N → Lat K M) (X : Set (Obs N)) : Prop :=
  ContDiff ℝ 1 f ∧ ContDiffOn ℝ 1 g X ∧ Set.range f = X ∧ ∀ z, g (f z) = z

/-- Definition 6: a (`C¹`) diffeomorphism `h : Z_k → Z_j` between two slot spaces `ℝ^M`. -/
def IsSlotDiffeo (h : (Fin M → ℝ) → (Fin M → ℝ)) : Prop :=
  ContDiff ℝ 1 h ∧ ∃ h' : (Fin M → ℝ) → (Fin M → ℝ),
    ContDiff ℝ 1 h' ∧ Function.LeftInverse h' h ∧ Function.RightInverse h' h

/-- The Jacobian matrix `J f (z) = (∂f_n/∂z_{k,m}(z))`, with rows indexed by pixels `n ∈ [N]` and
columns by pairs (slot `k`, slot coordinate `m`). -/
def jac (f : Lat K M → Obs N) (z : Lat K M) : Matrix (Fin N) (Fin K × Fin M) ℝ :=
  fun n c => fderiv ℝ f z (Pi.single c.1 (Pi.single c.2 1)) n

/-- The partial derivative `∂f_n/∂z_k (z) ∈ ℝ^M` of pixel `n` with respect to slot `k`. -/
def slotGrad (f : Lat K M → Obs N) (z : Lat K M) (n : Fin N) (k : Fin K) : Fin M → ℝ :=
  fun m => jac f z n (k, m)

/-- Eq. (3): `I_k(z) = {n ∈ [N] : ∂f_n/∂z_k (z) ≠ 0}`, the pixels that functionally depend on
slot `k` at `z`. -/
def indexSet (f : Lat K M → Obs N) (z : Lat K M) (k : Fin K) : Set (Fin N) :=
  {n | slotGrad f z n k ≠ 0}

/-- Definition 1 (Compositionality), eq. (4): for all `z` and all slots `k ≠ j`,
`I_k(z) ∩ I_j(z) = ∅`. (The paper requires `f` differentiable; that hypothesis is stated
separately wherever this notion is used.) -/
def IsCompositional (f : Lat K M → Obs N) : Prop :=
  ∀ z : Lat K M, ∀ k j : Fin K, k ≠ j → Disjoint (indexSet f z k) (indexSet f z j)

/-- Definitions 2-3: the rank of the (sub-)mechanism `J f_S (z)`, the submatrix of the Jacobian
formed by the rows (pixels) in `S ⊆ [N]`. -/
def subRank (f : Lat K M → Obs N) (z : Lat K M) (S : Set (Fin N)) : ℕ :=
  ((jac f z).submatrix (fun n : S => (n : Fin N)) id).rank

/-- Definition 4, eq. (5) (first display): the sub-mechanisms `J f_{S₁}(z)` and `J f_{S₂}(z)` are
independent: `rank J f_{S₁ ∪ S₂}(z) = rank J f_{S₁}(z) + rank J f_{S₂}(z)`. -/
def SubmechIndependent (f : Lat K M → Obs N) (z : Lat K M) (S₁ S₂ : Set (Fin N)) : Prop :=
  subRank f z (S₁ ∪ S₂) = subRank f z S₁ + subRank f z S₂

/-- Definition 4 (second display): the sub-mechanisms `J f_{S₁}(z)` and `J f_{S₂}(z)` are
dependent: `rank J f_{S₁ ∪ S₂}(z) < rank J f_{S₁}(z) + rank J f_{S₂}(z)`. -/
def SubmechDependent (f : Lat K M → Obs N) (z : Lat K M) (S₁ S₂ : Set (Fin N)) : Prop :=
  subRank f z (S₁ ∪ S₂) < subRank f z S₁ + subRank f z S₂

/-- Definition 5 (Irreducibility): for all `z`, all slots `k` and every partition of `I_k(z)` into
two sets `S₁, S₂` (nonempty, as sub-mechanisms are by Definition 3, disjoint, with union
`I_k(z)`), the sub-mechanisms `J f_{S₁}(z)` and `J f_{S₂}(z)` are dependent. -/
def IsIrreducible (f : Lat K M → Obs N) : Prop :=
  ∀ (z : Lat K M) (k : Fin K) (S₁ S₂ : Set (Fin N)), S₁.Nonempty → S₂.Nonempty →
    Disjoint S₁ S₂ → S₁ ∪ S₂ = indexSet f z k → SubmechDependent f z S₁ S₂

/-- Definition 6 (Slot identifiability): the inference model `ĝ` slot-identifies `z = g(x)` via
`ẑ = ĝ(f(z))` if for every slot `k` there is a unique slot `j` and a diffeomorphism
`h_k : Z_k → Z_j` with `ẑ_j = h_k(z_k)` for all `z ∈ Z`. -/
def SlotIdentifies (f : Lat K M → Obs N) (ghat : Obs N → Lat K M) : Prop :=
  ∀ k : Fin K, ∃! j : Fin K, ∃ h : (Fin M → ℝ) → (Fin M → ℝ),
    IsSlotDiffeo h ∧ ∀ z : Lat K M, ghat (f z) j = h (z k)

/-- Appendix A, Propositions 1 and 3: the `M × M` block `∂ẑ_j/∂z_i (z)` of the Jacobian of a map
`h : Z → Z`, `z ↦ ẑ` (applied there to `h = ĝ ∘ f`). -/
def slotBlock (h : Lat K M → Lat K M) (z : Lat K M) (j i : Fin K) : Matrix (Fin M) (Fin M) ℝ :=
  fun a b => fderiv ℝ h z (Pi.single i (Pi.single b 1)) j a

/-- Euclidean (`L²`) norm of a vector of `ℝ^M`. -/
def l2norm (v : Fin M → ℝ) : ℝ := Real.sqrt (∑ m, v m ^ 2)

/-- Definition 7 (Compositional contrast), eq. (6):
`C_comp(f, z) = ∑_{n=1}^N ∑_{k=1}^K ∑_{j=k+1}^K ‖∂f_n/∂z_k (z)‖ ‖∂f_n/∂z_j (z)‖`. -/
def compContrast (f : Lat K M → Obs N) (z : Lat K M) : ℝ :=
  ∑ n, ∑ k, ∑ j ∈ Finset.Ioi k, l2norm (slotGrad f z n k) * l2norm (slotGrad f z n j)

/-- Squared Euclidean distance `‖x - y‖₂²` in pixel space. -/
def sqDist (x y : Obs N) : ℝ := ∑ n, (x n - y n) ^ 2

/-- Theorem 2, eq. (7): the objective
`E_{x ∼ p_x}[‖f̂(ĝ(x)) - x‖₂² + λ C_comp(f̂, ĝ(x))]` with `x = f(z)`, `z ∼ p_z`, as an expectation
in `[0, ∞]` of a nonnegative quantity (written over `z ∼ p_z`, i.e. against `p_x = f_* p_z`). -/
def aeObjective (f : Lat K M → Obs N) (pz : Measure (Lat K M)) (ghat : Obs N → Lat K M)
    (fhat : Lat K M → Obs N) (lam : ℝ) : ENNReal :=
  ∫⁻ z, ENNReal.ofReal (sqDist (fhat (ghat (f z))) (f z) + lam * compContrast fhat (ghat (f z)))
    ∂pz

end ObjectCentric
Source
Brady, Zimmermann, Sharma, Schölkopf, von Kügelgen and Brendel, Provably Learning Object-Centric Representations, ICML 2023, arXiv:2305.14229v1, Section 2 (eqs. (1)-(5), Definitions 1-5), Section 3 (Definitions 6-7, eqs. (6)-(7)), Appendix A (Notation), pp. 2-6, 15
Read-back

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

Latent space Lat(K,M)\mathrm{Lat}(K,M)Lat(K,M). For natural numbers K,MK, MK,M, this is the type of all functions assigning to each slot index k∈{0,…,K−1}k \in \{0,\dots,K-1\}k∈{0,…,K−1} a vector zk∈RMz_k \in \mathbb{R}^Mzk​∈RM. Equivalently it is RK×M\mathbb{R}^{K \times M}RK×M, with entries zk,mz_{k,m}zk,m​ for k<Kk < Kk<K and m<Mm < Mm<M. Either K=0K = 0K=0 or M=0M = 0M=0 is allowed, and in that case the space is a single point. It has the product topology and the corresponding differentiable structure.


Pixel space Obs(N)\mathrm{Obs}(N)Obs(N). For a natural number NNN, this is RN\mathbb{R}^NRN. A point xxx has coordinates xnx_nxn​ for n∈{0,…,N−1}n \in \{0,\dots,N-1\}n∈{0,…,N−1}, and N=0N = 0N=0 is allowed.


IsDiffeoWithInv(f,g,X)\mathrm{IsDiffeoWithInv}(f, g, X)IsDiffeoWithInv(f,g,X). Here f:RK×M→RNf : \mathbb{R}^{K\times M} \to \mathbb{R}^Nf:RK×M→RN and g:RN→RK×Mg : \mathbb{R}^N \to \mathbb{R}^{K\times M}g:RN→RK×M are arbitrary functions defined everywhere, and X⊆RNX \subseteq \mathbb{R}^NX⊆RN is a set. The proposition holds exactly when all four of the following are true:

  1. fff is continuously differentiable (C1C^1C1) on all of RK×M\mathbb{R}^{K\times M}RK×M.
  2. ggg is C1C^1C1 on XXX in the relative sense: derivatives are taken within the set XXX, which need not be open.
  3. The image of fff is exactly XXX: f(RK×M)=Xf(\mathbb{R}^{K\times M}) = Xf(RK×M)=X.
  4. g(f(z))=zg(f(z)) = zg(f(z))=z for every z∈RK×Mz \in \mathbb{R}^{K\times M}z∈RK×M.

Consequences and gaps:

  • Condition 4 makes fff injective. Together with condition 3 it gives f(g(x))=xf(g(x)) = xf(g(x))=x for x∈Xx \in Xx∈X.
  • No condition is placed on the values of ggg outside XXX.
  • No relation between NNN and KMKMKM is stated as an assumption.

IsSlotDiffeo(h)\mathrm{IsSlotDiffeo}(h)IsSlotDiffeo(h). For h:RM→RMh : \mathbb{R}^M \to \mathbb{R}^Mh:RM→RM, this holds when:

  • hhh is C1C^1C1 on all of RM\mathbb{R}^MRM, and
  • there exists a C1C^1C1 map h′:RM→RMh' : \mathbb{R}^M \to \mathbb{R}^Mh′:RM→RM with h′(h(v))=vh'(h(v)) = vh′(h(v))=v and h(h′(w))=wh(h'(w)) = wh(h′(w))=w for all v,w∈RMv, w \in \mathbb{R}^Mv,w∈RM.

That is, hhh is a C1C^1C1 bijection of all of RM\mathbb{R}^MRM onto all of RM\mathbb{R}^MRM with a C1C^1C1 inverse. When M=0M = 0M=0, the unique map qualifies.


Jacobian Jf(z)J f(z)Jf(z). For f:RK×M→RNf : \mathbb{R}^{K\times M} \to \mathbb{R}^Nf:RK×M→RN and a point zzz, this is the real N×(K⋅M)N \times (K\cdot M)N×(K⋅M) matrix with rows indexed by pixels nnn and columns indexed by pairs (k,m)(k,m)(k,m):

Jf(z)n,(k,m)=(Df(z) ek,m)n=∂fn∂zk,m(z),J f(z)_{n,(k,m)} = \big(Df(z)\, e_{k,m}\big)_n = \frac{\partial f_n}{\partial z_{k,m}}(z),Jf(z)n,(k,m)​=(Df(z)ek,m​)n​=∂zk,m​∂fn​​(z),

where ek,me_{k,m}ek,m​ is the latent vector with a 111 in slot kkk, coordinate mmm, and 000 elsewhere. If fff is not differentiable at zzz, the derivative Df(z)Df(z)Df(z) is taken to be the zero map, so Jf(z)J f(z)Jf(z) is the zero matrix there.


Slot gradient. For fff, zzz, a pixel nnn and a slot kkk, the slot gradient is the vector in RM\mathbb{R}^MRM

∂fn∂zk(z)=(Jf(z)n,(k,m))m<M.\frac{\partial f_n}{\partial z_k}(z) = \big(J f(z)_{n,(k,m)}\big)_{m < M}.∂zk​∂fn​​(z)=(Jf(z)n,(k,m)​)m<M​.

It is the zero vector wherever fff is not differentiable, and it is the empty vector when M=0M = 0M=0.


Index set Ik(z)I_k(z)Ik​(z). For fff, zzz and a slot kkk:

Ik(z)={ n∈{0,…,N−1}  :  ∂fn∂zk(z)≠0∈RM }.I_k(z) = \Big\{\, n \in \{0,\dots,N-1\} \;:\; \frac{\partial f_n}{\partial z_k}(z) \neq 0 \in \mathbb{R}^M \,\Big\}.Ik​(z)={n∈{0,…,N−1}:∂zk​∂fn​​(z)=0∈RM}.

These are the pixels for which at least one partial derivative with respect to a coordinate of slot kkk is nonzero. The set is empty in two cases:

  • at every zzz where fff is not differentiable;
  • always, when M=0M = 0M=0.

IsCompositional(f)\mathrm{IsCompositional}(f)IsCompositional(f). For f:RK×M→RNf : \mathbb{R}^{K\times M} \to \mathbb{R}^Nf:RK×M→RN, this holds when, for every z∈RK×Mz \in \mathbb{R}^{K\times M}z∈RK×M and every pair of distinct slots k≠jk \neq jk=j,

Ik(z)∩Ij(z)=∅.I_k(z) \cap I_j(z) = \emptyset.Ik​(z)∩Ij​(z)=∅.
  • No differentiability of fff is assumed. At points where fff is not differentiable all index sets are empty, so the condition holds there automatically.
  • The condition is vacuously true when K≤1K \le 1K≤1.

Sub-mechanism rank rank⁡JfS(z)\operatorname{rank} J f_S(z)rankJfS​(z). For fff, zzz and any set S⊆{0,…,N−1}S \subseteq \{0,\dots,N-1\}S⊆{0,…,N−1} of pixels, this is the rank over R\mathbb{R}R of the submatrix of Jf(z)J f(z)Jf(z) consisting of the rows indexed by SSS, keeping all K⋅MK\cdot MK⋅M columns. It equals 000 when S=∅S = \emptysetS=∅.


SubmechIndependent(f,z,S1,S2)\mathrm{SubmechIndependent}(f, z, S_1, S_2)SubmechIndependent(f,z,S1​,S2​). For arbitrary pixel sets S1,S2S_1, S_2S1​,S2​, this holds when

rank⁡JfS1∪S2(z)=rank⁡JfS1(z)+rank⁡JfS2(z).\operatorname{rank} J f_{S_1 \cup S_2}(z) = \operatorname{rank} J f_{S_1}(z) + \operatorname{rank} J f_{S_2}(z).rankJfS1​∪S2​​(z)=rankJfS1​​(z)+rankJfS2​​(z).

S1S_1S1​ and S2S_2S2​ are not required to be disjoint or nonempty.


SubmechDependent(f,z,S1,S2)\mathrm{SubmechDependent}(f, z, S_1, S_2)SubmechDependent(f,z,S1​,S2​). For arbitrary pixel sets S1,S2S_1, S_2S1​,S2​ (again not required to be disjoint or nonempty), this holds when there is strict inequality:

rank⁡JfS1∪S2(z)<rank⁡JfS1(z)+rank⁡JfS2(z).\operatorname{rank} J f_{S_1 \cup S_2}(z) < \operatorname{rank} J f_{S_1}(z) + \operatorname{rank} J f_{S_2}(z).rankJfS1​∪S2​​(z)<rankJfS1​​(z)+rankJfS2​​(z).

IsIrreducible(f)\mathrm{IsIrreducible}(f)IsIrreducible(f). This holds when the following is true for every z∈RK×Mz \in \mathbb{R}^{K\times M}z∈RK×M, every slot kkk, and all pixel sets S1,S2S_1, S_2S1​,S2​ such that:

  • S1≠∅S_1 \neq \emptysetS1​=∅ and S2≠∅S_2 \neq \emptysetS2​=∅,
  • S1∩S2=∅S_1 \cap S_2 = \emptysetS1​∩S2​=∅, and
  • S1∪S2=Ik(z)S_1 \cup S_2 = I_k(z)S1​∪S2​=Ik​(z).

For every such choice,

rank⁡JfS1∪S2(z)<rank⁡JfS1(z)+rank⁡JfS2(z).\operatorname{rank} J f_{S_1 \cup S_2}(z) < \operatorname{rank} J f_{S_1}(z) + \operatorname{rank} J f_{S_2}(z).rankJfS1​∪S2​​(z)<rankJfS1​​(z)+rankJfS2​​(z).

Whenever Ik(z)I_k(z)Ik​(z) has at most one element, no such S1,S2S_1, S_2S1​,S2​ exist, and the condition is vacuous for that (z,k)(z,k)(z,k). This includes:

  • all zzz where fff is not differentiable;
  • all zzz when M=0M = 0M=0;
  • the whole condition when K=0K = 0K=0.

SlotIdentifies(f,g^)\mathrm{SlotIdentifies}(f, \hat g)SlotIdentifies(f,g^​). For f:RK×M→RNf : \mathbb{R}^{K\times M} \to \mathbb{R}^Nf:RK×M→RN and g^:RN→RK×M\hat g : \mathbb{R}^N \to \mathbb{R}^{K\times M}g^​:RN→RK×M, this holds when, for every slot kkk, there is exactly one slot jjj satisfying the following: there exists some h:RM→RMh : \mathbb{R}^M \to \mathbb{R}^Mh:RM→RM with IsSlotDiffeo(h)\mathrm{IsSlotDiffeo}(h)IsSlotDiffeo(h) (a C1C^1C1 bijection of RM\mathbb{R}^MRM with C1C^1C1 inverse) such that

g^(f(z))j=h(zk)for all z∈RK×M.\hat g\big(f(z)\big)_j = h(z_k) \quad \text{for all } z \in \mathbb{R}^{K\times M}.g^​(f(z))j​=h(zk​)for all z∈RK×M.

Points to note:

  • Uniqueness is asserted only for jjj, not for hhh.
  • It is not stated explicitly that distinct kkk give distinct jjj.
  • No regularity of fff or g^\hat gg^​ is assumed.
  • Only the values of g^\hat gg^​ on the image of fff matter.
  • Edge cases:
    • K=0K = 0K=0: the condition is vacuously true.
    • M=0M = 0M=0 and K≥2K \ge 2K≥2: every jjj qualifies, so uniqueness fails and the condition is false.

Slot block ∂z^j/∂zi\partial \hat z_j / \partial z_i∂z^j​/∂zi​. For a map h:RK×M→RK×Mh : \mathbb{R}^{K\times M} \to \mathbb{R}^{K\times M}h:RK×M→RK×M, a point zzz and slots j,ij, ij,i, this is the M×MM \times MM×M matrix with entries

(∂z^j∂zi(z))a,b=∂h(⋅)j,a∂zi,b(z),a,b<M.\Big(\frac{\partial \hat z_j}{\partial z_i}(z)\Big)_{a,b} = \frac{\partial h(\cdot)_{j,a}}{\partial z_{i,b}}(z), \qquad a, b < M.(∂zi​∂z^j​​(z))a,b​=∂zi,b​∂h(⋅)j,a​​(z),a,b<M.

It is the zero matrix if hhh is not differentiable at zzz.


Euclidean norm. For v∈RMv \in \mathbb{R}^Mv∈RM:

∥v∥=∑m<Mvm2,\|v\| = \sqrt{\textstyle\sum_{m<M} v_m^2},∥v∥=∑m<M​vm2​​,

which equals 000 when M=0M = 0M=0.


Compositional contrast Ccomp(f,z)C_{\mathrm{comp}}(f, z)Ccomp​(f,z). For fff and zzz:

Ccomp(f,z)=∑n<N  ∑k<K  ∑j<Kj>k∥∂fn∂zk(z)∥ ∥∂fn∂zj(z)∥.C_{\mathrm{comp}}(f,z) = \sum_{n<N} \;\sum_{k<K} \;\sum_{\substack{j<K\\ j>k}} \Big\|\frac{\partial f_n}{\partial z_k}(z)\Big\| \, \Big\|\frac{\partial f_n}{\partial z_j}(z)\Big\|.Ccomp​(f,z)=n<N∑​k<K∑​j<Kj>k​∑​​∂zk​∂fn​​(z)​​∂zj​∂fn​​(z)​.

This is a sum over all unordered pairs of distinct slots, using the natural order on slot indices. It is always ≥0\ge 0≥0, and it equals 000 in each of these cases:

  • K≤1K \le 1K≤1, N=0N = 0N=0, or M=0M = 0M=0;
  • at points where fff is not differentiable.

Squared distance. For x,y∈RNx, y \in \mathbb{R}^Nx,y∈RN:

∥x−y∥22=∑n<N(xn−yn)2.\|x - y\|_2^2 = \sum_{n<N} (x_n - y_n)^2.∥x−y∥22​=n<N∑​(xn​−yn​)2.

This is the squared distance, with no square root taken.


Auto-encoder objective L(f,pz,g^,f^,λ)\mathcal{L}(f, p_z, \hat g, \hat f, \lambda)L(f,pz​,g^​,f^​,λ). The inputs are:

  • functions f:RK×M→RNf : \mathbb{R}^{K\times M} \to \mathbb{R}^Nf:RK×M→RN, g^:RN→RK×M\hat g : \mathbb{R}^N \to \mathbb{R}^{K\times M}g^​:RN→RK×M and f^:RK×M→RN\hat f : \mathbb{R}^{K\times M} \to \mathbb{R}^Nf^​:RK×M→RN;
  • an arbitrary measure pzp_zpz​ on RK×M\mathbb{R}^{K\times M}RK×M with its Borel structure, which need not be a probability measure, finite, or have a density;
  • an arbitrary real number λ\lambdaλ, which may be negative.

The objective is the value in [0,∞][0,\infty][0,∞] of the lower Lebesgue integral

L=∫max⁡(0,  ∥f^(g^(f(z)))−f(z)∥22+λ Ccomp(f^,g^(f(z)))) dpz(z).\mathcal{L} = \int \max\Big(0,\; \big\|\hat f(\hat g(f(z))) - f(z)\big\|_2^2 + \lambda\, C_{\mathrm{comp}}\big(\hat f, \hat g(f(z))\big)\Big)\, dp_z(z).L=∫max(0,​f^​(g^​(f(z)))−f(z)​22​+λCcomp​(f^​,g^​(f(z))))dpz​(z).

Points to note:

  • The compositional contrast is that of f^\hat ff^​, evaluated at the point g^(f(z))\hat g(f(z))g^​(f(z)).
  • Negative values of the integrand, which are possible when λ<0\lambda < 0λ<0, are truncated to 000.
  • No measurability or integrability of the integrand is assumed.
  • No relationship among fff, g^\hat gg^​, f^\hat ff^​ is assumed.
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