Graph Neural Networks for Particle Physics Events

Graph Neural Networks for Particle Physics Events

If you have spent time flattening calorimeter deposits into a fixed-size image, or padding track lists to a uniform length so an RNN will accept them, you already feel the friction. Particle physics events are not grids or sequences — they are collections of objects with pairwise relationships, and the architecture should reflect that. Graph neural networks let you work with the structure you actually have.

What Makes a Graph the Right Representation

A detector event maps naturally onto a graph. Each reconstructed object — a track, a calorimeter cluster, a particle-flow candidate — becomes a node. Edges connect pairs of objects that have some physical relationship: spatial proximity, shared vertex, angular distance, or simply "all pairs within a jet." Node features are the observables you already use: transverse momentum, pseudorapidity, azimuthal angle, particle-identification scores. Edge features can encode relative quantities like ΔR, invariant mass of the pair, or charge product.

This is the key conceptual shift for graph neural network particle physics work: you are not inventing a new representation for the physics. You are letting the algorithm operate on the representation the physics actually has.

The Message-Passing Mechanism

Most GNNs used in HEP follow a message-passing scheme. The idea is simple in physics language:

Step 1 — Define the graph

For each event (or each jet, or each vertex), build a graph. Choose your nodes, choose a rule for drawing edges, and populate node and edge feature vectors from your reconstructed quantities. A common choice for jets is a k-nearest-neighbor graph in (η, φ) space, which gives each particle a fixed number of neighbors without padding or truncation.

Step 2 — Aggregate neighbor information

In each message-passing round, every node collects information from its neighbors. Concretely, a small neural network (often called the edge network or message function) takes the features of two connected nodes — and optionally the edge features — and produces a message vector. All messages arriving at a node are aggregated, typically by summing or taking a mean. Another small network then updates the node's feature vector using its own old features and the aggregated message.

Step 3 — Repeat for several rounds

Running several rounds of message passing lets information propagate across the graph. After one round, each node knows about its immediate neighbors. After two rounds, it has indirect information about neighbors-of-neighbors. For a jet with a few dozen particles, a handful of rounds is usually enough to give every node a globally informed representation.

Step 4 — Produce a graph-level output

For tasks like graph network jet classification — tagging a jet as quark-initiated, gluon-initiated, or produced by a heavy resonance — you need a single output per graph, not one per node. A readout function (sum, mean, or a learned attention-weighted sum over all node embeddings) compresses the full graph into one vector, which a final MLP maps to your class scores or a regression target.

Practical Choices You Will Encounter

Static versus dynamic graphs. You can fix the graph topology before training (static) or let the network recompute edges from learned node embeddings at each layer (dynamic). Dynamic graphs, popularized by architectures like EdgeConv, are more flexible but more expensive. Start static unless you have a good reason not to.

Normalization of features. Treat node features exactly as you would inputs to any other network: standardize them so no single observable dominates by scale. Relative coordinates (Δη, Δφ from the jet axis) often work better than absolute ones because they remove the dependence on jet direction.

Batch construction. Many GNN libraries (PyTorch Geometric is the most common in HEP) handle variable-size graphs in a minibatch by concatenating them into one large disconnected graph with a batch index. This is handled for you automatically, but it is worth understanding when you debug shape errors.

GNN HEP applications beyond jets. The same architecture applies to event-level graphs for particle-flow reconstruction, track-to-vertex association, and pileup removal. The only thing that changes is what you call a node, what you call an edge, and what prediction the readout layer makes.

Getting Started Without Starting from Scratch

The fastest path is to take an existing benchmark dataset — the JetClass or top-tagging datasets are widely used — and implement a minimal GNN using PyTorch Geometric's built-in GCNConv or EdgeConv layer. Build the graph from particle four-vectors, use three or four message-passing rounds, and compare the ROC (efficiency versus purity, in physics language) against a simple MLP baseline with the same input features. The difference in performance, at identical feature sets, isolates the benefit of the relational structure.

If you want to go deeper on architectures before committing to a full implementation, the complete HEP ML course covers GNNs alongside the broader landscape of deep learning for collider physics. You can also explore graph-based methods alongside other sequence and set architectures in the HEP ML full curriculum.

The core insight is durable: when your data has structure, use an architecture that respects it rather than one that destroys it first.

References

Guest, D., Cranmer, K., & Whiteson, D. (2018). Deep Learning and its Application to LHC Physics. Annual Review of Nuclear and Particle Science, 68, 161-181. arXiv:1806.11484.

Want to go deeper?

Machine Learning for High Energy Physics: The Complete Course takes you from first principles to a defensible result in 6 structured modules. $97, 30-day guarantee.

See the course →

Not ready yet? Grab Module 1 free →