Tabular, time-series, scientific, and geometric deep learning · Sets, point clouds, and geometric learning · SPE010 · Architecture
E(n)-equivariant graph neural network (EGNN)
EGNN models geometric systems with features and coordinates while respecting rotations, translations, reflections and node permutations under its specified update structure.
In CodeSplash
Running this needs images, audio, video, graphs or another data type CodeSplash doesn't load yet.
- Availability
- Needs a data type CodeSplash doesn't load yet
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
EGNN models geometric systems with features and coordinates while respecting rotations, translations, reflections and node permutations under its specified update structure. It is useful for physical dynamics, molecules and spatial graph prediction.
Question / hypotheses
The operative question is whether the specified representation, symmetry, likelihood or physical constraint improves held-out behavior for this data domain. This is a learning framework, not a null-hypothesis test; losses, attention weights and predictive confidence are not statistical p-values.
Architecture / computational structure
Invariant edge messages depend on node features and squared pair distances. Scalar message-dependent coefficients multiply relative coordinate vectors to update positions, while feature updates aggregate invariant messages.
Assumptions
Equivariance assumes consistent geometry and transformation-compatible features; arbitrary orientation-dependent scalar inputs can break it. Symmetry alone does not guarantee conservation, correct forces, long-range interactions or accurate extrapolation.
Formula / computational definition
, , and . Coordinate normalization may be added by a declared variant.
Parameters and notation
Learned or estimated: Edge, coordinate-coefficient and feature-update networks; embeddings and output heads. Coordinates are state variables, while learned scalar functions preserve the required transformation law.
Hyperparameters and effects: Graph cutoff or connectivity, depth/width, coordinate-step scale, aggregation normalization, loss and optimizer. Large coordinate updates can destabilize dynamics despite exact formal equivariance.
Fitting, fine-tuning, and adaptation
Fit the relevant property/dynamics loss, preserving invariant inputs and equivariant coordinate paths. Transfer compatible geometric blocks, initially freezing embeddings and fitting a new head, then use smaller-rate joint adaptation. Recheck units, atom/node types and cutoffs; monitor source retention and physical stability.
How to use and calibrate
Define the independent evaluation unit before preprocessing: row/entity, whole set/object, molecule/trajectory, input function or chronological forecasting origin. Keep target construction and normalization within permitted training data. Numerically test rotations/translations/reflections and node permutations, then evaluate task error and long-horizon stability. Distinguish scalar invariance from vector equivariance in metric definitions.
Example application
Predict particle trajectories or geometric graph properties without learning arbitrary global orientations. This is a proposed use case, not a claim of validated performance on supplied real data.
Interpretation / pitfalls
Watch out
Assess model error against domain baselines and the stated assumptions. Component-level mathematical correctness does not establish paper reproduction or scientific validity. Invariance/equivariance checks validate transformation behavior; they do not establish correct physical dynamics or chemical accuracy.
Python and R code examples
Scope: Simplified EGNN coordinate update with numerical rotation/translation equivariance check. Use the shared setup. Dependencies: NumPy / base R. Validation: Python executed; R unexecuted.
Full-model route: Python: official EGNN or custom PyTorch message passing. R: native torch geometry or bridge. The example verifies rotation and translation equivariance of a simplified scalar-weight coordinate update.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — Simplified EGNN coordinate update with numerical rotation/translation equivariance check. Use the shared setup.
Shared setup for this chapter
import numpy as np
def sm(x):
x=np.asarray(x); e=np.exp(x-x.max(axis=-1,keepdims=True)); return e/e.sum(axis=-1,keepdims=True)
X=np.array([[0.,0.],[1.,0.],[.2,.7]])
def update(P):
d=P[:,None,:]-P[None,:,:]; w=np.exp(-np.sum(d*d,axis=-1))
return P+.1*np.sum(d*w[:,:,None],axis=1)
R=np.array([[0.,-1.],[1.,0.]]); shift=np.array([2.,-3.])
assert np.allclose(update(X@R.T+shift),update(X)@R.T+shift)
print(update(X))
Component demo, not a trained model — Simplified EGNN coordinate update with numerical rotation/translation equivariance check. Use the shared setup.
Shared setup for this chapter
sm <- function(x) {
if(is.null(dim(x))) { e<-exp(x-max(x)); return(e/sum(e)) }
t(apply(x,1,function(v) { e<-exp(v-max(v)); e/sum(e) }))
}
X<-matrix(c(0,0,1,0,.2,.7),3,byrow=TRUE)
update<-function(P) {
out<-P
for(i in 1:nrow(P)) { d<-matrix(P[i,],nrow(P),2,byrow=TRUE)-P
w<-exp(-rowSums(d*d)); out[i,]<-P[i,]+.1*colSums(d*w) }
out
}
R<-matrix(c(0,-1,1,0),2,byrow=TRUE); shift<-c(2,-3)
transformed<-sweep(X%*%t(R),2,shift,"+")
stopifnot(max(abs(update(transformed)-sweep(update(X)%*%t(R),2,shift,"+")))<1e-12)
print(update(X))
Sources
- Source 1arxiv.org
From the CodeSplash reference, entry SPE010.