When we first started building property prediction for solid electrolytes at Matforgelab, we tried the obvious thing: represent each candidate as a composition vector. Li6PS5Cl becomes a list of element fractions. Feed it through a gradient-boosted model, train on conductivity measurements, predict on new candidates. It worked, sort of, until it didn't.
The problem is that composition alone discards most of what determines a property. Two materials with identical stoichiometry can have wildly different ionic conductivities because their crystal symmetry differs, because the halide sits in a different Wyckoff position, because the local coordination geometry around the mobile Li ion changes the migration barrier. None of that information survives a composition-to-vector encoding.
Graph neural networks for materials are one serious answer to this problem. This post explains how they work, what they're actually good at, and where we've found their limits.
What a materials graph looks like
The core idea is straightforward: represent a crystal or molecule as a graph where atoms are nodes and bonds (or proximity relationships) are edges. Each node carries a feature vector encoding element type, oxidation state, coordination number, and whatever other atomic attributes are available. Each edge carries features describing the bond: length, type, angle context.
For molecular systems, edges usually map to covalent bonds. For periodic crystals the definition is less natural. The most common approach uses a cutoff radius: any two atoms within some distance threshold (often 6-8 angstroms) are connected by an edge. Some architectures add a voronoi tessellation step to get a more physically motivated neighbor list.
Edge features in crystal GNNs typically include the interatomic distance, but the more informative architectures also encode the bond angle and sometimes the dihedral. The Crystal Graph Convolutional Neural Network (CGCNN) paper from 2018 popularized the distance-only approach. Later work like MEGNet and DimeNet showed that including angle information consistently improves accuracy, especially for properties that depend on directional bonding.
Message passing: how local information becomes global
The learning mechanism in a GNN is message passing. In each layer, every node aggregates feature vectors from its neighbors, runs that aggregated context through a small neural network, and updates its own feature vector. After several layers, each node's representation encodes information about its local chemical environment out to a radius determined by the number of layers.
For property prediction you then need to reduce this set of node vectors to a single scalar (or vector). The standard approach is a readout function: average all node embeddings, or sum them, or apply attention weights. Averaging is permutation-invariant, which is the right inductive bias for extensive properties like formation energy per atom.
For intensive properties the choice of readout matters more. We've found that for properties like bulk modulus or band gap, a learned attention-weighted sum tends to outperform simple averaging, because the model can learn which atomic environments are most predictive of the target.
What GNNs buy you over descriptors
Traditional descriptor-based methods for materials ML rely on hand-crafted feature vectors: Coulomb matrices, Smooth Overlap of Atomic Positions (SOAP), Many-Body Tensor Representation, or element-fraction statistics. These are fast to compute and work well when your training set covers the structural space of interest.
GNNs don't require you to decide in advance which structural features matter. The message-passing layers learn which aspects of local geometry are predictive of the target property. For a new property domain, this adaptivity is valuable.
Concretely, we tested both approaches on a dataset of roughly 320 experimental ionic conductivity measurements for garnet and NASICON-type solid electrolytes. A SOAP-based Gaussian process achieved a mean absolute error around 0.38 log(S/cm) on a held-out test set. A three-layer GNN trained on the same split reached 0.24 log(S/cm). That is not a dramatic win, but for a dataset that size, the difference is consistent across multiple random splits.
The more important difference showed up in extrapolation. When we withheld all measurements from one structural family (say, all garnets) and trained on the rest, the GNN degraded gracefully: it got the right order of magnitude and the right ranking within the held-out family. The descriptor-based model was poorly calibrated outside its training distribution because SOAP features don't encode the same structural priors that the GNN learns implicitly.
Where the structure representation still falls short
We're not claiming GNNs solve structure-property prediction. Several real problems remain.
First, structure is often unknown for novel candidates. If you're generating new formulations and haven't run a DFT relaxation or X-ray diffraction measurement, you don't have a graph to feed the model. Some workflows address this by using a predicted structure from a separate model, but prediction errors compound. For screening applications where you're evaluating tens of thousands of hypothetical compounds, you often fall back to composition-based models precisely because structure prediction adds latency and uncertainty.
Second, many practically important properties depend on processing history, not just equilibrium structure. A cathode material's impedance after 200 cycles depends on surface reconstruction and electrolyte decomposition products that aren't captured in the pristine crystal graph. GNNs trained on equilibrium structures can tell you about intrinsic thermodynamic stability; they can't tell you about kinetics under operation.
Third, periodic boundary conditions and long-range interactions are awkward to handle in message-passing architectures. Electrostatic interactions decay as 1/r, so they have contributions from atoms far outside any reasonable cutoff. Some models handle this with an explicit long-range correction term; others ignore it and accept the approximation. For ionic conductors where long-range Coulomb interactions shape the energy landscape, this matters.
How we use graph representations in practice
At Matforgelab, GNN-based property models are one layer in a prediction stack, not the whole story. For composition screening (the first pass over a large candidate space) we use fast featurized models. When a composition clears the initial screen and we have a DFT-relaxed structure or a characterized sample, the graph representation switches on and we run the GNN model to get a more geometry-aware prediction with calibrated uncertainty.
The uncertainty estimate matters as much as the point prediction. We use an ensemble of GNNs (typically 5-8 member ensembles) to get a predictive distribution. The spread of that ensemble is a reasonable proxy for epistemic uncertainty, which tells us whether the model has seen training examples similar to this candidate or is extrapolating. High uncertainty is a flag to prioritize that candidate for experimental measurement, not to reject it.
One concrete example: for a garnet electrolyte screening campaign targeting Li-ion conductivity above 1 mS/cm at room temperature, we started with 4,200 hypothetical compositions generated by elemental substitution on the parent Li7La3Zr2O12 structure. A composition model filtered this to 380 candidates with predicted conductivity in a plausible range. DFT relaxation on those 380 gave us structures for the GNN pass. The GNN further narrowed to 47 candidates with both high predicted conductivity and low ensemble disagreement. Of those, 12 were synthesized and characterized. Eight showed conductivity above the target threshold. That hit rate is much higher than random sampling from the original 4,200 would give you.
Graph architectures worth knowing
For anyone building materials ML pipelines, the landscape of GNN architectures can feel overwhelming. A few checkpoints:
CGCNN (Xie and Grossman, 2018) is a reasonable baseline for crystal property prediction. It's well-understood, the code is public, and it works for formation energy and bandgap tasks. Its limitation is distance-only edge features.
DimeNet and DimeNet++ add directional message passing by encoding bond angles. Consistent improvement over CGCNN for tasks where angle information is informative, at higher computational cost.
SchNet and PaiNN encode interatomic distances through radial basis functions and continuous filters, which gives smoother gradients than discrete binning. Useful when you need to differentiate predicted energies for force prediction.
Equivariant architectures like NequIP and MACE go further by making the learned representations equivariant to rotations and reflections of the input structure. The benefit is data efficiency: the model doesn't need to learn rotation invariance from data because it's baked into the architecture. The cost is implementation complexity and somewhat slower inference.
For most property prediction tasks at the scales we work with (hundreds to low thousands of training points), DimeNet++ tends to give the best accuracy-to-effort ratio. For force field learning where you need both energy and force prediction, equivariant architectures are worth the overhead.
The composition vs. structure tradeoff is real
One thing we've come to appreciate is that the right representation depends on the task, not just on a general principle that "more information is better." For properties that are primarily composition-driven, like formation enthalpy trends across a family of oxides, SOAP or element-fraction features are fast, interpretable, and often accurate enough. Using a GNN doesn't help if the structural variation in your training set is small relative to the compositional variation.
The GNN advantage is clearest when: (a) you have structural data for training examples, (b) the property you're predicting depends on local geometry in a way composition can't capture, and (c) you have enough data to train the message-passing layers without overfitting. In our experience, (c) is often the binding constraint. With fewer than 150 training examples and structure data available, a GNN often underperforms a well-regularized SOAP-based model, because the GNN has too many parameters to learn reliably from sparse coverage.
That's where transfer learning enters. Pre-training a GNN on a large DFT database (Materials Project, AFLOW, OQMD) and fine-tuning on experimental measurements gives you a useful starting point even when experimental data is scarce. We'll write about that in more detail in a separate post.
The short version: graph representations are a meaningful step forward for materials property prediction, but they're not a universal upgrade over descriptors. Use them when you have structure data, a geometry-sensitive property, and enough training points to not overfit the graph layers. Otherwise, a descriptor-based approach is often faster and equally accurate.