EGNN: E(n)-Equivariant Graph Neural Networks
Published:
The EGNN Approach
EGNN maintains two quantities per node:
- h_i ∈ ℝ^d: invariant features
- r_i ∈ ℝ^n: equivariant coordinates (n=3 for 3D)
These are updated jointly across layers, always maintaining E(n) equivariance.
The EGNN Update Rule
Edge messages (invariant quantities only):
| The message uses the squared distance | r_i - r_j | ² — an E(n)-invariant scalar. Optional edge attribute a_{ij} is also invariant. |
Coordinate update (equivariant):
Relative positions (r_i - r_j) are translation-invariant and rotation-equivariant. A weighted sum of equivariant vectors is equivariant: rotating all coordinates by R gives R applied to the entire sum. So this update is automatically E(n)-equivariant.
Feature update (invariant):
Features are updated only using invariant messages, so h_i remains invariant.
Comparison to TFN / SE(3)-Transformers
| Property | EGNN | TFN / SE(3)-Trans |
|---|---|---|
| Symmetry group | E(n) | SE(3) |
| Geometric features | Distances + relative positions | Spherical harmonics (irreps) |
| Computational cost | O(N E d) | O(N E d L²) where L = max degree |
| Output types | Scalars + vectors (l=0,1) | Arbitrary tensors (l=0,1,…,L) |
| Complexity | Simple MLPs | Clebsch-Gordan tensor products |
| Practical speed | Fast | Slow for high L |
EGNN gives up expressive power beyond l=1 features (it has no l=2 or higher tensor outputs) in exchange for dramatically simpler and faster computation.
Applications
Molecular dynamics: predict energies and forces. Forces are the negative gradient of energy, so if energy is invariant, forces are automatically equivariant. EGNN can directly output equivariant force predictions.
N-body simulation: predict trajectories of charged particles. EGNN models the interaction forces and propagates positions forward.
Protein structure: predict residue positions given contact maps. Equivariance ensures predictions rotate consistently with the input.
Point cloud processing: EGNN applied to LiDAR point clouds maintains rotational equivariance for 3D object detection.
EGNN vs SchNet
| SchNet (Schütt et al., 2017) is an earlier distance-based model: messages depend on | r_i - r_j | , so it is rotationally invariant. But SchNet does not update coordinates — it only updates scalar features. EGNN updates both features and coordinates, enabling it to predict vector quantities (forces, displacements) directly. |
Training EGNN
For energy prediction:
- Target: energy E (scalar) — use invariant readout: E = Σ_i φ_out(h_i)
- Loss: MSE(E_pred, E_true)
For force prediction:
- Forces: F_i = -∂E/∂r_i (autograd through the EGNN coordinate update)
- Or: directly predict F_i using equivariant output head
Simultaneous energy and force training (combined loss) improves generalisation — forces carry information about the energy surface curvature.
Summary
| Component | Equivariance | How |
|---|---|---|
| m_{ij} (messages) | Invariant | Uses only distances |
| r_i update | Equivariant | Weighted sum of (r_i - r_j) |
| h_i update | Invariant | Uses only invariant messages |
| Graph readout | Invariant | Sum of invariant node features |
EGNN is the practical choice when E(n) equivariance is needed and the task requires only scalar (energy) or vector (force) outputs. For higher-order outputs (tensors, multipoles), TFN or MACE are needed.
References
- Satorras, V. G., Hoogeboom, E., & Welling, M. (2021). E(n) Equivariant Graph Neural Networks. ICML 2021 (EGNN: E(n)-equivariant message passing using only interatomic distances — no spherical harmonics required).
- Schütt, K. T., Kindermans, P.-J., Sauceda Felix, H. E., Chmiela, S., Tkatchenko, A., & Müller, K.-R. (2017). SchNet: A Continuous-Filter Convolutional Neural Network for Modeling Quantum Interactions. NeurIPS 2017 (SchNet: the simpler predecessor using only distances, motivating EGNN’s invariant message design).
- Hoogeboom, E., Satorras, V. G., Vignac, C., & Welling, M. (2022). Equivariant Diffusion for Molecule Generation in 3D. ICML 2022 (EDM: applying EGNN equivariance to 3D molecule generation via diffusion models).
