Practical overview
When it fits
Use it when a Python/PyTorch experiment needs an EGNN implementation that updates both graph features and coordinates, particularly when the model must incorporate edge data or explicit sparse-neighbor structure.
Who it is for
- Researchers exploring equivariant graph neural network architectures
- Model developers working with geometric graph data
- Practitioners prototyping molecular activity prediction or dynamical system models
Documented uses
- Apply EGNN layers to node features and coordinates
- Build a deeper network with configurable dimensions, depth, and neighbor selection
- Pass continuous edge features into graph-learning layers
- Restrict message passing to an adjacency matrix
- Explore coordinate normalization and coordinate-weight clamping for configurations with many neighbors
Requirements & limits
The public repository identifies the project as MIT-licensed and provides a pip installation command.
- The documented interface expects PyTorch tensors for features and coordinates, with optional edge tensors and masks.
- The network supports nearest-neighbor configuration and adjacency-based sparse message passing.
- The README flags a masking-related neighbor-selection bug in versions earlier than 0.1.12.
- For high neighbor counts, the README discusses coordinate normalization and clamping coordinate weights as stability measures.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up and pass graph tensors through an EGNN layer
Install the package and use the documented layer interface to update node features and coordinates.
Before you start
- Python environment with PyTorch available
- Node feature and coordinate tensors; optional edge tensor when using edge features
Steps
Install the package with the command below.
pip install egnn-pytorchImport
EGNNfromegnn_pytorchand create a layer with the feature dimension.Pass feature and coordinate tensors to the layer; if using edges, set
edge_dimand pass the edge tensor.Use the returned feature and coordinate tensors as the updated representations.
Expected outcome
A documented Python workflow for applying an EGNN layer to graph feature and coordinate tensors.
Guide limitations
- The example demonstrates tensor passing, not model training or evaluation.
- For masked experiments using versions earlier than 0.1.12, the README warns of a neighbor-selection bug and recommends rerunning those experiments.
Configure sparse-neighbor network inputs
Set up the documented network interface to pass an adjacency matrix for sparse message passing.
Before you start
- PyTorch environment and
EGNN_Networkfromegnn_pytorch - Token features, coordinates, a boolean mask, and an adjacency matrix
Steps
Create an
EGNN_Networkwithonly_sparse_neighbors=True.Prepare token features, coordinates, and a boolean mask with matching graph positions.
Prepare an adjacency matrix describing the allowed neighbors.
Pass the features, coordinates, mask, and adjacency matrix to the network.
Expected outcome
A network call configured to attend only to neighbors represented by the supplied adjacency matrix.
Guide limitations
- The README's example uses a simple chain adjacency; it does not provide a domain-specific graph-construction procedure.
- This guide covers the documented input setup and call, not training or deployment.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- lucidrains/egnn-pytorch · Official homepage title · retained in its source language

