Relaxation-Stable Topology for Screening Unrelaxed Crystals

Machine-learning screens for new inorganic crystals have an odd blind spot. Models are trained on the Materials Project, a large database of crystals whose atoms have already been moved by quantum-mechanical simulation (density functional theory, or DFT) into their lowest-energy positions. They are then asked to judge new candidate crystals whose atoms have not been moved yet: a known crystal with some elements swapped in. Prediction quality falls sharply on these unrelaxed inputs. This proposal tests a specific idea for closing that gap without running an expensive simulated relaxation. The idea is that relaxation mostly stretches and shifts a crystal while keeping its bonding network intact: which atoms form rings, which polyhedra enclose cavities. Persistent homology is a tool that summarizes a point cloud by the loops and cavities it contains across all length scales. We will build a periodic, species-aware version of it and ask whether this summary changes little under relaxation while still separating different materials.

The two-sentence version is as follows. If the shape of a crystal's ring-and-cavity network survives relaxation better than its interatomic distances do, a model reading that shape from the unrelaxed structure should predict the relaxed energy better than a distance-based model. We first measure this directly on Materials Project relaxation trajectories. Then we test whether it improves stable-crystal discovery on the Matbench Discovery benchmark.

Core Claim

The claim has two parts, and both can be falsified. The first is a measurement claim. Consider the distance between the descriptor of a crystal's initial structure and the descriptor of its relaxed structure, divided by the distance from the relaxed structure to its nearest different material. Call this the drift ratio. It should be smaller for persistent loop and cavity features (homology in dimensions 1 and 2, written $H_1$ and $H_2$) than for distance-only invariants, even after both are rescaled for volume change. The second is a prediction claim. A single-pass model, one that predicts energy directly from the unrelaxed structure with no relaxation step, should find stable crystals more reliably when it is given these features. The comparison is against the strongest single-pass baselines, measured by F1 score and the discovery acceleration factor (DAF), which is how many times more often the model finds stable materials than random selection does.

Where This Sits

Three bodies of prior work set up the problem. The first motivates it. Matbench Discovery trains on about 154,000 Materials Project crystals and tests on about 257,000 unrelaxed substitution candidates (the WBM set), and it shows that graph neural networks degrade on unrelaxed inputs. Gibson et al. find that as a crystal-graph network improves on relaxed structures, its error on unrelaxed ones grows. They counter this by adding random atomic displacements to training data, which brings error on 623 unrelaxed hydrides from 251 to 86 meV/atom. Graph-based machine learning beyond stable materials reports an error of 0.04 eV/atom on relaxed structures versus 0.21 eV/atom on roughly prepared ones, and finds that pretraining on Materials Project barely helps on unstable structures. None of these papers asks whether a better input representation, rather than more training data or a relaxation step, could absorb the relaxation gap.

The second body of work supplies the core technique. Widdowson and Kurlin's Pointwise Distance Distribution (PDD) describes each atom in the repeating unit by its sorted distances to its $k$ nearest neighbours in the infinite crystal, and weights each atom by how often it occurs. The result does not depend on how the unit cell is drawn, and it changes continuously when atoms move. The Periodic Set Transformer (PST) feeds these rows plus element embeddings into an attention model and matches leading graph networks on standard Materials Project and JARVIS tasks. We borrow PDD's per-atom construction exactly. We replace the sorted distance list with a persistence diagram, the list of birth and death scales of loops and cavities, computed on the finite neighbourhood of radius $R$ around each atom in the infinite crystal. Because each row is computed from the infinite crystal and weighted by multiplicity, the descriptor inherits PDD's independence from the unit-cell choice. It also sidesteps a problem with homology on the periodic torus: the torus carries extra loop features that wrap around it, and these change when a supercell is used. PDD records only distances, and its authors note it computes no $H_1$ or $H_2$ features. Our open question is whether those higher features contribute anything.

The third body of work constrains the design. Krishnapriyan et al. used $H_1$ and $H_2$ of porous metal-organic frameworks with a random forest to predict gas uptake. That is a regime where cavities are large and physically meaningful. Dense inorganic crystals have no such large pores, so the relevant features here are short-lived loops at bonding scales, which are exactly the features that standard topological practice discards as noise. RePHINE proves that filtrations by vertex colour and by edge colour carry different information, which tells us that species must enter the filtration itself and cannot simply be attached afterwards. We implement this with a weighted alpha complex. This is a nested sequence of shapes grown from balls around each atom, where each ball's radius scales with a tabulated ionic radius for that element.

The weighting has a physical motivation specific to substitution screening. When a large ion is swapped into a template built for a small one, its weighted ball overlaps its neighbours early in the filtration. The diagram therefore records local strain that the relaxation will later release. Can neural networks learn persistent homology features? warns that learned approximations of persistence are fragile. We therefore compute diagrams exactly, which is affordable for neighbourhoods of a few hundred atoms.

Research Program

We will build a per-atom persistence descriptor for every structure in Materials Project release 2021.05.13 and in WBM. For each atom we compute an alpha-complex filtration of the atom-centred cluster of radius $R$, at roughly 8 to 10 Å. We compute it in an unweighted variant and in a variant weighted by ionic radius, record $H_0$, $H_1$ and $H_2$ diagrams, and divide all scales by the cube root of volume per atom so that uniform expansion during relaxation cancels. Each diagram is turned into a fixed-length vector with persistence images, a standard smoothing that turns the diagram into a small grid. The vectors from all atoms are pooled with multiplicity weights.

The program has two stages. The first stage is purely diagnostic and needs no model. Using initial and final structures from Materials Project trajectories and WBM relaxation pairs, we compute the drift ratio for each descriptor family under the same transport distance (Earth Mover's Distance over weighted rows) for all of them. The second stage reuses PST's attention model, with rows consisting of element embeddings concatenated with PDD rows, persistence rows, or both. It trains on relaxed Materials Project energies and predicts energy above the convex hull for unrelaxed WBM inputs. The convex hull is the set of lowest-energy combinations at each composition, so energy above it measures how far a candidate is from stability. Using one architecture for every input lets us attribute any difference to the representation.

Baselines

The naive reference point is the dummy predictor reported in Matbench Discovery, together with PST on plain PDD rows. The latter is the "do nothing new" model: the same architecture and the same invariance guarantee, with no topology. We consider it the most important comparison, because it isolates whether loops and cavities add anything beyond distances. Beating it means a higher F1 and DAF on WBM, and a lower drift ratio, with confidence intervals from five seeds that do not overlap.

The strongest single-pass competitors are the crystal-graph network (CGCNN), its perturbation-augmented variant (CGCNN+P), MEGNet, and Voronoi+RF. Voronoi+RF is a random forest on Voronoi-cell features, which already encode neighbour connectivity. Matbench Discovery reports a DAF of 2.70 for MEGNet. The file gives no scalar values for CGCNN, CGCNN+P or Voronoi+RF ("no reported result found on Lacuna" for these), so we will rerun them from the benchmark's released settings. Every model, ours included, gets the same training data and validation split and an equal hyperparameter-search budget of 30 trials.

As an augmentation baseline, we will train PST-PDD with Gibson-style random-displacement augmentation. This tests whether augmentation alone matches the topology. The reference point is Gibson's reported drop from 251 to 86 meV/atom for CGCNN on their hydride set, though that set is not WBM. The relaxation-based reference is M3GNet, which reaches F1 0.58 and $R^2$ 0.59 on Matbench Discovery. It is not a fair single-pass competitor, because it runs a full machine-learned relaxation. We report it as an upper bound and compare wall-clock time per candidate.

Three ablations isolate the key ingredients. The first uses $H_0$ only, which is essentially a minimum-spanning-tree distance summary. The second uses $H_1$ and $H_2$ without species weighting. The third removes the volume normalization.

Why not just…?

Why not just rescale PDD by volume per atom? If relaxation is mostly uniform expansion, a rescaled distance list may capture everything. This is a real threat, and it is the reason the rescaled PDD is a baseline in the drift diagnostic rather than a straw man. If rescaled PDD reaches a drift ratio within 10% of the persistence descriptor, we drop the topological claim and report that the relaxation gap is mainly a scale effect.

Why not just augment training data with displacements, as Gibson et al. did? Augmentation clearly helps, but it teaches tolerance to random noise. Relaxation after a substitution is a systematic, species-driven distortion rather than random noise. The augmented PST-PDD baseline settles the question. If it matches us, the representation adds nothing beyond what cheap augmentation provides. The two approaches can also be combined, and we will report that combination.

Why not just use Voronoi features, which already encode connectivity? Voronoi cells capture first-shell neighbour topology but not the ring and cage structure at medium range, and they can change abruptly when a near-tie between neighbours flips. Because Voronoi+RF is in the Matbench Discovery suite, rerunning it under our protocol directly tests whether medium-range $H_1$ and $H_2$ add anything beyond the first coordination shell.

Why not just relax every candidate with M3GNet? For final ranking, that is probably the better choice. Our use case is a pre-filter that runs before relaxation over millions of substitutions. We judge success by DAF at a fixed compute budget per candidate, not by absolute F1 against M3GNet.

Decisive Checks

The project stands or falls on the first stage. On Materials Project trajectories and WBM pairs, the $H_1$/$H_2$ descriptor must show a lower drift ratio than both raw and volume-rescaled PDD. Pairs whose space group changes during relaxation are reported separately, since topology should change there. If the descriptor passes, the second stage must show that PST with persistence rows beats PST with PDD rows, and beats augmented PST-PDD, on WBM F1 and DAF. The $H_0$-only ablation must lose most of that gain, and species weighting must help most on substitutions with large ionic-radius mismatch. As a sanity check, we will also confirm that the descriptor does not hurt relaxed formation-energy prediction on the standard ALIGNN split used by Matformer, which reports a 4.5% improvement in mean absolute error over ALIGNN. A clean negative result in either stage, showing that relaxation gaps are about scale and not topology, would still settle an open question the screening literature has left untested.