Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§5.5, pp. 83–84 — the Satorras et al. layer keeps node features invariant and moves coordinates with every rigid motion

Proved
GeomDL.EGNN.layer_E3_equivariant

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

equivarianceeuclidean-groupgeometric-deep-learninggraph-neural-networkp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-bookp2o-v1

Let a graph on nnn nodes have adjacency matrix A\mathbf AA and neighbourhoods Nu\mathcal N_uNu​. Each node uuu carries features fu∈Rd\mathbf f_u\in\mathbb R^dfu​∈Rd and coordinates xu∈R3\mathbf x_u\in\mathbb R^3xu​∈R3. For arbitrary functions ϕ\phiϕ, ψf\psi_{\mathrm f}ψf​, a real-valued ψc\psi_{\mathrm c}ψc​ and an arbitrary aggregator ⨁\bigoplus⨁ of multisets, the equivariant message-passing layer of Satorras et al. (2021) is

fu′=ϕ(fu,⨁v∈Nuψf(fu,fv,∥xu−xv∥2)),xu′=xu+∑v≠u(xu−xv) ψc(fu,fv,∥xu−xv∥2).\mathbf f'_u = \phi\Big(\mathbf f_u, \bigoplus_{v\in\mathcal N_u}\psi_{\mathrm f}(\mathbf f_u,\mathbf f_v,\|\mathbf x_u-\mathbf x_v\|^2)\Big), \qquad \mathbf x'_u = \mathbf x_u + \sum_{v\neq u}(\mathbf x_u-\mathbf x_v)\,\psi_{\mathrm c}(\mathbf f_u,\mathbf f_v,\|\mathbf x_u-\mathbf x_v\|^2).fu′​=ϕ(fu​,v∈Nu​⨁​ψf​(fu​,fv​,∥xu​−xv​∥2)),xu′​=xu​+v=u∑​(xu​−xv​)ψc​(fu​,fv​,∥xu​−xv​∥2).

Let R\mathbf RR be any 3×33\times33×3 orthogonal matrix and b∈R3\mathbf b\in\mathbb R^3b∈R3. If the layer is applied to the same features and the transformed coordinates Rxu+b\mathbf R\mathbf x_u+\mathbf bRxu​+b, producing (fu′′,xu′′)(\mathbf f''_u,\mathbf x''_u)(fu′′​,xu′′​), then for every node uuu

fu′′=fu′andxu′′=Rxu′+b.\mathbf f''_u = \mathbf f'_u \qquad\text{and}\qquad \mathbf x''_u = \mathbf R\mathbf x'_u+\mathbf b.fu′′​=fu′​andxu′′​=Rxu′​+b.

So the output features are E(3)-invariant and the output coordinates are E(3)-equivariant: the equivariance property the book states on p. 83, for the layer of p. 84. It is the property that makes the layer suitable for molecular graphs, whose predictions must not depend on how the molecule is placed in space.

Formalization Note R\mathbf RR ranges over Matrix.orthogonalGroup (Fin 3) ℝ (rotations and reflections) and acts on EuclideanSpace ℝ (Fin 3) by Matrix.toEuclideanLin. The layer takes the coordinates themselves, not only their distance matrix. The feature update aggregates over Nu\mathcal N_uNu​ and the coordinate update sums over all v≠uv\neq uv=u, as printed. No hypothesis is added; n=0n = 0n=0 is allowed (both sides are empty).

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

/-- §5.5, pp. 83–84: the Satorras et al. (2021) layer is E(3)-equivariant. If the coordinates
are transformed by `g ∈ E(3)`, `x_u ↦ Rx_u + b` with `R ∈ O(3)` and `b ∈ ℝ³`, then the output
features `f'_u` are unchanged and the output coordinates transform in the same way,
`x'_u ↦ Rx'_u + b`. -/
theorem layer_E3_equivariant {n d : ℕ} {M M' F' : Type*} (φ : (Fin d → ℝ) → M' → F')
    (agg : Multiset M → M') (ψf : (Fin d → ℝ) → (Fin d → ℝ) → ℝ → M)
    (ψc : (Fin d → ℝ) → (Fin d → ℝ) → ℝ → ℝ) (A : Matrix (Fin n) (Fin n) ℝ)
    (f : Matrix (Fin n) (Fin d) ℝ) (x : Fin n → E3)
    (R : Matrix.orthogonalGroup (Fin 3) ℝ) (b : E3) :
    (egnnLayer φ agg ψf ψc A f (fun u => rigid R b (x u))).1 = (egnnLayer φ agg ψf ψc A f x).1 ∧
    ∀ u, (egnnLayer φ agg ψf ψc A f (fun u => rigid R b (x u))).2 u =
      rigid R b ((egnnLayer φ agg ψf ψc A f x).2 u) := by sorry

end GeomDL.EGNN
Source
Bronstein et al., Geometric Deep Learning (arXiv:2104.13478v2), §5.5, p. 83 (the equivariance property) and p. 84 (the Satorras et al. layer, "It can be shown that such an aggregation is equivariant under Euclidean transformations of the spatial coordinates")
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