TL;DR
Many physical problems are symmetric. Rotate a molecule, shift it across the room, or mirror it, and its energy stays the same while its forces turn along with it. Ordinary graph neural networks ignore this geometry. Earlier fixes that did respect it needed heavy machinery: higher-order tensors and spherical harmonics, which are costly and tied to three dimensions. The E(n) Equivariant Graph Neural Network (EGNN) keeps the layer simple. It passes messages built from node features and squared distances between nodes, and it moves each node's coordinates by a weighted sum of the directions to the other nodes. The result is exact under rotations, translations and reflections in any number of dimensions, and on the three benchmarks the authors chose it reported the best or very competitive results.
Builds on: Equivariance, Message Passing Neural Network, Rotation Matrix, Euclidean Distance · Leads to: DimeNet, Spherical Harmonics
Why it mattered
Graph networks are now a common tool for machine learning on molecules, particles and 3D point clouds, and the question of how to respect geometry comes up in many of those settings. EGNN gave the field a short recipe that works in any dimension: keep the usual message passing, feed squared distances into the message function, and let coordinates move only along the lines between points. Because the layer uses no spherical harmonics and no angles, it is easy to implement and cheap to run, which makes it a natural baseline for later equivariant models. The paper's own closing claim is that the same properties make it a fit for drug discovery, protein folding and materials design. Those are hopes, not results in the paper. The experiments cover a particle simulation, a graph autoencoder and a chemistry benchmark.
The problem
Start with a graph network, as in the Message Passing Neural Network recipe: every node keeps a feature vector, and each layer sends messages along edges, sums them, and updates the feature vector. This already respects one symmetry, permutation: relabel the nodes and the output relabels the same way. What it does not respect is geometry. If the nodes also have positions in space, a standard network sees the coordinates only as more numbers. Rotate the whole picture and the features change in a way the network was never told to expect, so it has to learn each rotation from data.
The obvious fix is to build the symmetry into the layer, so that the network is equivariant to the group of rotations, translations and reflections. Earlier models did this with higher-order representations. A feature could be a scalar (type 0, such as a temperature) or a vector (type 1, such as a velocity), and richer types were built out of spherical harmonics, which describe how a function on a sphere changes with direction. Those models work, but the transformations between higher-order types are expensive to compute, and the constructions are tied to three dimensions. The authors want something simpler and general in .
How it works
The model takes three things in and gives two things out. The inputs are a feature vector for each node, a position in -dimensional space, and the edges of the graph. The outputs are new features and new positions. One layer does the following, in order:
flowchart LR A["features h_i and positions x_i"] --> E["message m_ij from both features and squared distance"] E --> X["move x_i along the directions to its neighbours"] E --> M["sum the messages into m_i"] M --> H["new features from old features and m_i"]
Here is one tiny instance traced by hand. Use two particles on a line, with one number per particle for position and one number for its feature. Put particle 1 at and particle 2 at . Both start with feature . For this walkthrough the paper's learned functions are replaced by simple stand-ins, so that the arithmetic can be checked by hand: the message is for squared distance , the position weight is the message itself, and the feature update adds the message to the old feature.
- Measure the distance. The squared distance between the particles is . Check: the gap is 1, and .
- Compute the message. The message from particle 2 to particle 1 is . The message in the other direction is the same, , because the distance is symmetric. Check: close particles send strong messages, distant ones weak messages.
- Turn the message into a position weight. The weight is . Check: the weight is a plain number, so it scales the step but does not change its direction.
- Move each particle along the line between them. Particle 1 moves by the weighted difference , so its new position is . Particle 2 moves by , so its new position is . Check: the particles have moved apart, and the new gap is . Here , because there are particles.
- Aggregate and update the features. Each particle receives one message, so and . The feature update adds the message to the old feature: , and likewise . Check: both features changed, and they changed by the same amount because the situation is symmetric.
- Test the symmetry. Reflect the input, so and . Steps 1 to 3 give the same weight, . The new position of particle 1 is , and of particle 2 is . These are the negatives of the earlier answers, and , which is what a reflection should give. The features are still and , unchanged. Shift the input by instead, to and : the positions become and , which are the old answers plus , and the features are again unchanged.
The reflection and shift checks in step 6 are the whole point of the design. The message uses only distances, which do not change when the picture is moved. The position update uses only differences between positions, which move with the picture in exactly the way the picture moved.
Here is what the message function looks like for the toy stand-in. It is largest when two particles are close and falls off smoothly as they separate, which is the behaviour one would want from a learned interaction.
- message 1/(1+d)
The math
The layer in the paper has four equations. Each one is a step from the walkthrough, written with the paper's notation. Here is the feature vector of node at layer , is its position, and is an optional edge attribute, such as a bond type. The functions , and are small multilayer networks, the edge, position and node functions. The message from node to node is , and is the sum of all messages arriving at node .
Given features , positions and edges, the layer returns new features and new positions by the four updates below. Its positions are equivariant and its features are invariant to the group of rotations, reflections and translations.
Step 2 in symbols: the message
The only geometric input is the squared distance , the sum of squared coordinate differences. The walkthrough's plays this role. Because a distance does not change under rotation, reflection or shift, the message is invariant: it has the same value for every version of the picture that differs only by such a move.
Steps 3 and 4 in symbols: the position update
Here maps a message to a single scalar, and is a constant. The paper sets , which averages over the other nodes. The factor is a vector that points from to . The update therefore moves node along a sum of directions, each scaled by an invariant number. This is why the position output is equivariant. In the walkthrough, and , which gave and .
Step 5 in symbols: aggregation
Each node adds up the messages from all other nodes. The paper also notes that the sum can be restricted to neighbours when the graph is large, and that unknown edges can be estimated (see below).
Step 5 in symbols: the feature update
The new feature is a learned function of the old feature and the summed message. In the walkthrough, was the addition .
Why the symmetry holds
The paper proves the symmetry claim in its Appendix A, and the idea is short. Suppose the input positions are moved by an orthogonal matrix and a shift , so each becomes . The difference between two positions becomes , because the shift cancels. The squared length of that difference is unchanged, since is the identity, so every message is unchanged. In the position update, the difference term rotates as , and the weights are unchanged, so the whole update rotates as . The feature update only sees invariant inputs, so features do not change. Stacking layers preserves the property.
The paper also gives a variant with velocities. Instead of the position update above, a velocity is first computed from the initial velocity and the same weighted sum, and then added to the position. The variant is used in the particle experiment, where the initial velocity is an input.
Results
Particle simulation. The first experiment asks a model to predict where five charged particles in three dimensions will be after 1,000 time steps. The data has 3,000 training trajectories, 2,000 validation and 2,000 test. The mean squared error of the final positions is:
| Method | MSE | Forward time (s), batch of 100 |
|---|---|---|
| Linear motion baseline | 0.0819 | 0.0001 |
| SE(3) Transformer | 0.0244 | 0.1346 |
| Tensor Field Network | 0.0155 | 0.0343 |
| Standard GNN | 0.0107 | 0.0032 |
| Radial Field | 0.0104 | 0.0039 |
| EGNN | 0.0071 | 0.0062 |
EGNN's error is about 32 percent below the next best model, Radial Field, and it is much faster than the two higher-order models. The paper also varies the amount of training data from 100 to 50,000 samples. EGNN beats both the standard GNN and Radial Field in the small-data and large-data regimes, and the authors read this as data efficiency: the model does not have to learn rotations and shifts from examples.
Graph autoencoder. The second experiment embeds a graph into points in an -dimensional space and then reconstructs the adjacency matrix from those points. The graphs are a "community small" set with 12 to 20 nodes and random Erdős–Rényi graphs with 7 to 16 nodes and edge probability 0.25. A standard GNN has no way to tell apart nodes with the same neighbourhood, so on featureless graphs it gives every node the same embedding. The paper's fix is to feed Gaussian noise in as the starting coordinates. The noise gives each node a different starting point, and EGNN's outputs move with that noise instead of being scrambled by it. The reported edge error is 0.11 percent on the Erdős–Rényi set and 0.06 percent on the community set. The standard GNN is the worst of the models compared. In an overfitting test on 100 graphs, the GNN cannot fit the training data properly, especially on sparse graphs, while EGNN reaches perfect reconstruction.
Molecular properties. The third experiment predicts 12 chemical properties of small molecules from the QM9 dataset, which contains up to 29 atoms per molecule, with 100,000 training molecules, 18,000 validation and 13,000 test. Here the target is invariant, so the model skips the position update and uses only distances. EGNN's mean absolute error is:
| Property | EGNN | DimeNet++ | TFN | SE(3)-Transformer |
|---|---|---|---|---|
| (bohr) | 0.071 | 0.044 | 0.223 | 0.142 |
| (meV) | 48 | 33 | 58 | 53 |
| (D) | 0.029 | 0.030 | 0.064 | 0.051 |
| (bohr) | 0.106 | 0.331 | not reported | not reported |
| ZPVE (meV) | 1.55 | 1.21 | not reported | not reported |
The table shows five of the twelve properties in the paper's benchmark. EGNN beats TFN and the SE(3)-Transformer on all six properties those two report, which include HOMO, LUMO and (not shown here), and it beats DimeNet++ on and . DimeNet++ is better on most of the other properties. The paper notes that DimeNet++ uses slightly different train, validation and test splits, and DimeNet++ also uses angles and spherical harmonics, which EGNN avoids. The authors call EGNN "very competitive" here, and that is a fair reading: the simpler layer gets close to a heavier model without matching it everywhere.
Reading guide
The paper is short. Read it in this order, and use the lessons linked here for anything that is unfamiliar.
- Section 1, Introduction. The motivation: symmetry as an inductive bias, and why higher-order representations are costly. Needs Equivariance and Symmetry Group.
- Section 2, Background. Equation 1 defines equivariance in the paper's notation, and Section 2.2 writes the standard graph layer. Needs Equivariance, Message Passing Neural Network and Graph Neural Network.
- Section 3, Method. Equations 3 to 6 are the four updates in "The math" above. Read Section 3.1 for the symmetry claim, which uses Rotation Matrix and Euclidean Distance. Section 3.2 adds velocities, and Section 3.3 estimates edges with a Sigmoid Function over messages, which uses Adjacency Matrix ideas.
- Section 4, Related work and Table 1. A side-by-side comparison of the message and update rules of several models. Needs Spherical Harmonics to follow the higher-order methods, and it points ahead to DimeNet.
- Section 5, Experiments. Each subsection is independent. 5.1 is the particle simulation, 5.2 the graph autoencoder with Autoencoder and Erdős–Rényi Random Graph ideas, and 5.3 the molecular benchmark, which reports mean absolute errors. The tables are the paper's numbers; the figure captions say what each curve shows.
- Appendix A. The formal proof in "Why the symmetry holds" above. Read it after the walkthrough.
Check yourself
QuestionWhy does EGNN's message depend on the squared distance and not on the raw coordinates?Show answer
A raw coordinate changes when the picture is rotated, shifted or reflected, so a function of raw coordinates would give a different message for the same molecule in a different pose. The distance between two points does not change under any of those moves, so a message built from it is invariant. This is what lets the feature updates stay unchanged while the positions are moved along with the picture.
QuestionTwo particles sit at x equal to 0 and x equal to 3 on a line, with the paper's stand-in message 1/(1+d) where d is the squared distance, and the position weight is the message itself. With C equal to 1, where does particle 1 move after one layer?Show answer
The squared distance is . The message is , and that is also the position weight. Particle 1 moves by , so its new position is . Check: it moved away from particle 2, and by less than the walkthrough's step, because the particles are farther apart and the message is weaker.
QuestionWhy does the paper say the position update is the main difference from a standard graph neural network?Show answer
A standard GNN only updates feature vectors. It never changes positions, so it has no way to keep positions consistent with rotations. The EGNN position update adds a weighted sum of directions between nodes. Those directions rotate with the input, so the update is equivariant. Without this step the model would be the invariant variant that the paper uses on the molecular benchmark, where positions are fixed and only distances matter.
QuestionIn the graph autoencoder experiment, a standard GNN cannot separate nodes with the same neighbourhood. Why does adding random Gaussian noise as starting coordinates help, and why does the equivariant model handle it better?Show answer
Identical neighbourhoods give identical features, so the GNN produces identical embeddings and cannot tell which node is which. Noise gives each node a different starting point, which breaks the tie. A standard GNN then has to learn to cope with the noise. EGNN is equivariant to the noise, meaning a rotated or shifted noise sample produces a correspondingly rotated or shifted embedding, so the decoder based on distances still works, and the model does not have to learn each noise pattern separately.
Sources
- Víctor García Satorras, Emiel Hoogeboom, Max Welling, E(n) Equivariant Graph Neural Networks, ICML 2021, arXiv:2102.09844: https://arxiv.org/abs/2102.09844
- Justin Gilmer et al., Neural Message Passing for Quantum Chemistry, arXiv:1704.01212: https://arxiv.org/abs/1704.01212