Science
MIT and Oak Ridge's CrysVCD builds charge balance into AI crystal generation
A small transformer writes charge-balanced formulas before a diffusion model builds the crystal. Tuned for stability, 85% of outputs were predicted metastable. The code is open.
HackHoster Team · · 10 min read

At a glance
- CrysVCD, published in Nature Computational Science on August 26, 2026, writes a charge-balanced formula with a small transformer before a diffusion model builds the crystal.
- After fine-tuning for stability, 85% of its generated crystals were predicted metastable, within 0.1 eV per atom of the convex hull, and 68% were phonon-stable.
- In comparisons added during peer review, 14% of CDVAE's and 33% of MatterGen's generated crystals were phonon-stable, against 49% for CrysVCD before fine-tuning.
- The authors report that the formula step costs about 0.11 seconds per structure, against about 1.26 seconds for the diffusion step it feeds.
- The code has been public under the MIT license since July 2025, and base model checkpoints were added to the repository in February 2026.
Generative models can propose millions of new crystals, but many of the proposals break basic chemistry. A paper published on August 26 in Nature Computational Science tackles one of those failures at the source. The team, led by MIT's Mingda Li with collaborators including Yongqiang Cheng of Oak Ridge National Laboratory and Weiwei Xie of Michigan State University, describes CrysVCD, short for crystal generator with valence-constrained design.
The idea is to make sure a material's ions can balance their electrical charges before any expensive structure generation happens. According to the paper, that makes valence checking orders of magnitude more efficient than generating freely and screening afterwards. After fine-tuning for stability, 85% of CrysVCD's generated crystals were predicted metastable and 68% were phonon-stable. The team also used it to propose semiconductors with high thermal conductivity and materials with a high dielectric constant (high-κ).
The motivation is cost. MIT doctoral student Mouyang Cheng, the first author, told MIT News that validating candidates is something like 90 percent of the computational cost of producing usable materials and can take weeks or months. Every invalid candidate you never generate is validation you never pay for. Li describes the method as a plug-in for other generators: "If material-generating models are like DVDs, we are like the DVD player."
The problem with generating crystals freely
AI has already changed the scale of materials discovery. In 2023, Google DeepMind's GNoME project reported in Nature that its graph networks had found 2.2 million structures below the previously known convex hull of stable compounds. Of those, 736 had already been made independently in labs. In 2025, Microsoft Research's MatterGen, also in Nature, showed a diffusion model that generates new inorganic crystals and can be fine-tuned toward target properties; its authors reported that its structures were more than twice as likely to be new and stable as those from earlier generative models.
Diffusion models such as DiffCSP and MatterGen generate three things together: the atom types, their positions and the crystal lattice. They learn chemistry from data, but nothing in the process guarantees that the oxidation states of the atoms add up to zero. MIT News describes the usual fix as another layer of computing on top of generation, filtering out unstable materials afterwards. That means paying for a full generation, then throwing the result away.

Heather Kulik, an MIT chemical engineer and co-author, framed the stakes for smaller labs in the MIT News piece: generating structures and then down-selecting for stability is inefficient and expensive, while putting a language model at the start to constrain generation can sharply raise the share of stable outputs.
How CrysVCD works
CrysVCD splits generation into two separately trained stages.
Stage I: a language model that speaks in ions
The first stage is a small transformer, built on the GPT-2 implementation in Hugging Face's library, that writes chemical formulas. Its vocabulary is unusual. Each token is an element in a specific oxidation state, such as iron at +2 or +3, paired with a count of how many such atoms are in the unit cell. The preprint lists 217 element-and-valence tokens plus start and end tokens, and atom counts from 0 to 20.
Instead of starting those tokens from random vectors, the team builds their initial embeddings from electronic configurations, following the Aufbau principle for how electrons fill orbitals. The idea, borrowed from the SpookyNet interatomic potential, gives the model chemical structure from the start: oxygen and sulfur look alike as chalcogens, and manganese's many oxidation states, from +2 to +7, are related rather than unrelated.

Two transformers are trained, one for alloys and one for ionic compounds, on a valence-labeled version of MP-20, a standard benchmark set of known crystals from the Materials Project. That set, which the authors call MP-20-valence, has 8,299 alloys and 7,491 ionic compounds in its training split. At inference time the model writes a formula greedily, token by token, up to ten tokens, and a filter passes only charge-balanced ionic formulas on to the next stage.
Getting the labels right is the hard part. The authors start from a hand-curated list of common oxidation states, let alloys take a zero-valence form, and run a tree search over every charge-neutral assignment at the level of individual atoms, with rules that rule out impossible combinations. That lets one element appear in two oxidation states in the same compound.

The authors report that the scheme explains 97.6% of MP-20's compositions and cuts the valence-assignment failure rate by more than a factor of three compared with forcing all atoms of an element to share one oxidation state. In their response to reviewers, they gave Prussian blue as a case where common oxidation-state guessing tools fail and their search succeeds.
Stage II: diffusion builds the structure
The second stage is a conditional diffusion model, built on the open-source DiffCSP code, that generates atomic positions and the lattice for the given formula. Because the formula is fixed, the diffusion model effectively does crystal structure prediction rather than open-ended generation. Target properties, such as a stability label or a thermal conductivity value, are embedded and fed to both stages, and the diffusion model uses classifier-free guidance to steer toward them.
The asymmetry in cost is the point. The preprint says the formula step takes four or five inference steps, while diffusion typically runs about 1,000 denoising steps. Rejecting a bad formula is cheap; rejecting a finished structure is not. Developers who have used grammar-constrained decoding with language models will recognize the pattern: enforce validity while generating instead of checking afterwards.
A feedback loop for stability
Charge balance is necessary but not sufficient. A balanced formula can still produce a structure that would fall apart or rearrange. So the authors train an unconditional model on MP-20, generate a large batch of hypothetical compounds, label each one stable or unstable with MatterSim, a machine-learned interatomic potential, and fine-tune a conditional model on those labels. The preprint calls it concurrent learning: the model learns from its own successes and failures.
Two kinds of stability. Energy above hull asks whether a compound is thermodynamically competitive with the most stable known combinations of the same elements; CrysVCD counts anything within 0.1 eV per atom as metastable. Phonon stability asks whether the structure sits in a true energy minimum, with no vibration mode that would make it distort on its own. The second test is stricter and costlier to compute.

The screening settings are spelled out in the preprint. Energy above hull uses MatterSim's 1M model against Materials Project hull data after relaxing forces below 0.01 eV per Å. Phonons use the larger 5M model with tighter relaxation, finite-difference force constants and supercells at least 20 Å across. Any structure that fails to relax within 200 steps is labeled unstable.
The numbers
| Measure | CrysVCD | Comparison |
|---|---|---|
| Metastable (E above hull below 0.1 eV per atom), fine-tuned | 85% | higher than DiffCSP, MatterGen and CDVAE across thresholds, per the authors |
| Phonon-stable, fine-tuned | 68% | 49% for unconditional CrysVCD |
| Phonon-stable, unconditional | 49% | CDVAE 14%, MatterGen 33% |
| Stable ionic compounds at 0.05 and 0.10 eV per atom | 60% and 76% | from the authors' peer-review response |
| Stable alloys at 0.05 and 0.10 eV per atom | 39% and 48% | from the authors' peer-review response |
| Seconds per generated structure | 1.37 | DiffCSP 1.26, CDVAE 1.98, MatterGen 8.64 |
| Formula step alone | about 0.11 s |
Several of these comparisons were added during peer review, and the review file published with the paper shows why. The authors also report that even without fine-tuning, CrysVCD's energy-above-hull distribution sits lower than plain DiffCSP's, although DiffCSP is its own diffusion backbone, a difference they credit to the valence constraint.
Designing for heat and for chips
The same conditioning steers generation toward properties. For thermal conductivity, the team fine-tuned on a subset of MP-20 chosen with phonon-transport intuition: lighter elements, strong covalent or mixed bonding, small unit cells under 12 atoms, and no metals. Co-author Ju Li tied this to data centers, telling MIT News that about 30 percent of their energy goes to cooling and that the industry needs better heat-conducting materials.

The standout candidate is a hexagonal form of germanium carbide (GeC). It is not in the MP-20 training set, and the authors calculate a thermal conductivity of about 183 W per meter-kelvin and a band gap of 2.34 eV. In their response to reviewers they note that cubic GeC had been predicted in 2013 to reach about 270 W per meter-kelvin, that amorphous germanium-carbon alloys have been made, and that no single crystal of GeC in any phase has been grown.
For dielectrics, the team trained a graph-network surrogate on 944 Materials Project entries with computed dielectric data, used it to steer generation toward a target dielectric constant of 50, and checked a top candidate that is not in the Materials Project database with density functional theory. The preprint cautions that the surrogate's training data are themselves computed and may differ from experiment.

What the reviewers pushed back on
Nature Computational Science published the peer review file alongside the paper, and it is a useful corrective to the headline numbers. One reviewer called the approach conceptually appealing but listed real limits. Enforcing charge neutrality can exclude materials whose stability comes from point defects such as vacancies. A table of common oxidation states may miss context-dependent chemistry. A 0.1 eV per atom cutoff is permissive, especially for metals. Surrogate property models add uncertainty, and the training data leave out lanthanides, actinides and complex frameworks.
A second reviewer was blunter. It argued that checking oxidation-state balance is easy with existing tools such as pymatgen, that the original speed comparison looked only at the two internal stages rather than the whole workflow, and that the first version belonged in a more specialized journal. Two other reviewers asked whether any prediction had been checked experimentally, including the GeC crystal.

The authors' answers are in the same file. They added threshold sweeps from 0.05 to 0.15 eV per atom, separate statistics for ionic compounds and alloys, phonon comparisons with CDVAE and MatterGen, the per-structure timing table above, and more detail on the screening pipeline. They also uploaded all generated candidates and a pre-trained unconditional model. They argued that defect modeling is limited by today's structure generators, which mostly cannot represent fractional site occupancies, rather than by the valence constraint itself. And they clarified the efficiency claim: not that diffusion gets cheaper, but that the formula step adds negligible time while removing many invalid compositions before any diffusion or DFT work. Reviewer 2 asked for still more detail on the phonon criteria and the released workflow in a later round, and by the final round all four reviewers recommended publication.
The paper also discloses that Li and Cheng have filed a patent application on technology related to the work.
Open questions
- Everything is computed. The stability labels come from a machine-learned potential, an approximation of quantum-mechanical calculations, and the dielectric results depend on a surrogate trained on DFT data.
- Nothing has been made yet. Neither the abstract, the authors' responses to reviewers nor MIT's announcement reports synthesis of the proposed materials. Metastable on a computer is not the same as synthesizable, and the authors list that gap as future work.
- Scope is limited. MIT says the approach works best for solids with highly ordered crystal structures. Exotic oxidation states outside the 97.6% the labels cover may be missed.
- Benchmarks are self-reported. The baseline comparisons were run by the authors under their own settings. Independent reruns on other datasets would show how general the gains are.
Running it yourself
The code has been public since the preprint appeared in July 2025, under the MIT license at github.com/vipandyc/CrysVCD, with training data and generated crystals archived on Zenodo. The repository added base model checkpoints and the MP-20-valence data in February 2026, and scripts for MLIP screening in April.
Setup follows DiffCSP's stack. The README recommends a conda environment with Python 3.12, PyTorch 2.4.1 with CUDA and NumPy below version 2, then MatterSim, a few small packages, a prebuilt torch_scatter wheel and Hugging Face transformers for the formula model. Once installed, python main.py -g crygen_ionic -nf 100 generates 100 ionic formulas and their structures, and crygen_alloy does the same for alloys. Two scripts screen outputs for energy above hull and thermal conductivity with MatterSim. The README itself promises more documentation, so expect to read code.
Ideas for a hackathon team:
- Plug the formula stage into another generator. Li told MIT News the method can be added to other generators, including future ones. Put CrysVCD's Stage I in front of a different structure model and measure how many outputs survive the same MatterSim screen.
- Score the whole pipeline. Take the reviewers' point seriously: time a generate-then-filter baseline with a standard valence checker against CrysVCD end to end, including MLIP screening.
- Tighten the thresholds. Re-run the stability analysis at 0.05 eV per atom or below, separately for alloys and ionic compounds, and see which conclusions still hold.
Practical tip. MLIP screening is the expensive step. Before you scale up, run the phonon check on a few dozen structures and time it on your hardware, since the preprint's settings use the larger MatterSim model and large supercells.
What to watch
As of publication, the open question is experimental. The most interesting next result would be an attempt to synthesize hexagonal GeC or the dielectric candidate and measure them. On the modeling side, watch whether other generative-model groups adopt valence-constrained composition steps, and whether anyone extends the approach to defects and partially occupied sites, which the authors and reviewers both flagged as the main gap.
Sources
- Enhancing materials discovery with valence-constrained design in generative modeling (Nature Computational Science, August 26, 2026)
- Peer review file for the paper (Nature Computational Science)
- AI helps design new materials that work in the real world (MIT News, August 26, 2026)
- Preprint of the paper (arXiv 2507.19799, July 2025)
- CrysVCD code (GitHub)
- A generative model for inorganic materials design (MatterGen, Nature, 2025)
- Scaling deep learning for materials discovery (GNoME, Nature, 2023)
More from the blog

Science ·
Anthropic's wet lab reports a CRISPR-like enzyme family surfaced by Claude agents
About 950 Claude agent sessions mined sequence data for reverse transcriptases and flagged ART, a phage system with CRISPR-like repeats. Humans ran the experiments, and its function is unknown.
11 min read

Science ·
Six proteomic aging clocks read younger in rentosertib's lung fibrosis trial
A Nature Biotechnology study ran six protein-based aging clocks on serum from Insilico's IPF drug trial. The signal is consistent but small, early and hard to separate from the lung disease.
11 min read

Science ·
Google DeepMind's cyclone model gets a Nature paper and open weights
WeatherNext Cyclones gained a day or more of lead time over leading operational models on 2023 to 2025 storms. The code and weights are now on GitHub.
12 min read