Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§5.3, eq. (35), pp. 78–79 — the message-passing GNN layer is permutation equivariant

Proved
GeomDL.EGNN.eq_35_perm_equivariant

by mikedeng1 · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

geometric-deep-learninggraph-neural-networkp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1permutation-equivariance

Let A∈Rn×n\mathbf A\in\mathbb R^{n\times n}A∈Rn×n be an adjacency matrix with neighbourhoods Nu\mathcal N_uNu​, let X\mathbf XX assign a feature xu\mathbf x_uxu​ to each node uuu, and let FFF be the message-passing layer (35),

F(X,A)u=ϕ(xu,⨁v∈Nuψ(xu,xv)),F(\mathbf X,\mathbf A)_u = \phi\Big(\mathbf x_u, \bigoplus_{v\in\mathcal N_u}\psi(\mathbf x_u,\mathbf x_v)\Big),F(X,A)u​=ϕ(xu​,v∈Nu​⨁​ψ(xu​,xv​)),

for arbitrary functions ϕ\phiϕ, ψ\psiψ and an arbitrary aggregator ⨁\bigoplus⨁ of the multiset of messages. Then for every permutation σ\sigmaσ of the nodes, with permutation matrix P\mathbf PP,

F(PX,PAP⊤)=P F(X,A).F(\mathbf{PX},\mathbf{PAP}^\top) = \mathbf P\,F(\mathbf X,\mathbf A).F(PX,PAP⊤)=PF(X,A).

This is the equivariance property (10) of §4.1 for the message-passing flavour, the property the book requires of every GNN layer it studies.

Formalization Note Row uuu of PX\mathbf{PX}PX is row σ−1(u)\sigma^{-1}(u)σ−1(u) of X\mathbf XX, and (PAP⊤)uv=aσ−1(u)σ−1(v)(\mathbf{PAP}^\top)_{uv} = a_{\sigma^{-1}(u)\sigma^{-1}(v)}(PAP⊤)uv​=aσ−1(u)σ−1(v)​. The aggregator is any function of a multiset, which is how the book's "permutation-invariant function ⨁\bigoplus⨁" is encoded.

Preamble
import Mathlib
import Definitions.Def_GeomDL_EGNN_Defs
Formal statement
namespace GeomDL.EGNN

/-- §5.3, pp. 78–79: the message-passing layer (35), `h_u = φ(x_u, ⊕_{v ∈ N_u} ψ(x_u, x_v))`,
is permutation equivariant in the sense of (10): `F(PX, PAPᵀ) = P F(X, A)` for every
permutation `σ` (convention: row `u` of `PX` is row `σ⁻¹(u)` of `X`). -/
theorem eq_35_perm_equivariant {n : ℕ} {α M M' β : Type*} (φ : α → M' → β)
    (agg : Multiset M → M') (ψ : α → α → M) (σ : Equiv.Perm (Fin n)) (X : Fin n → α)
    (A : Matrix (Fin n) (Fin n) ℝ) :
    mpLayer φ agg ψ (permRows σ X) (GeomDL.Sets.permAdj σ A) = permRows σ (mpLayer φ agg ψ X A) := by sorry

end GeomDL.EGNN
Source
Bronstein et al., Geometric Deep Learning (arXiv:2104.13478v2), §5.3, p. 78 ("permutation equivariant functions F(X, A) constructed by applying shared permutation invariant functions") and eq. (35), p. 79; property (10), §4.1, p. 33
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 21, 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