A Critic That Learns From DFT: Closing the Fake-Sample Gap in Crystal Inverse Design

When a generative model is asked to produce crystals with a target electronic property, something has to grade its outputs. Usually that grader is a neural network that predicts the property and was trained only on real, known materials. The generator is then steered toward whatever the grader scores highly. Image generation has a long record of how this goes wrong. In the auxiliary-classifier GAN, the critic judged both realism and class, but its class head was trained only on real images. That head reached 81% accuracy on real ImageNet images and only 10.1% on generated ones (Conditional Image Synthesis with Auxiliary Classifier GANs). Generators also learned high-frequency patterns that excite class logits without being coherent objects (Activation Maximization Generative Adversarial Nets). We expect the same failure in materials: a property predictor trained on Materials Project crystals will be fooled by generated structures that lie off its training distribution.

Materials have one advantage images lack. For any generated crystal we can compute the true label. Density functional theory (DFT), the standard quantum-mechanical method that computes a material's electronic structure from its atomic positions, returns the true electronic density of states (DOS): the curve showing how many electron states exist at each energy. Bandgap and conductivity can be read off this curve. We propose a multi-task critic with two heads. One head judges whether a crystal looks like a real, stable material. The other predicts its DOS. Both heads are retrained, round after round, on the generator's own current outputs, which are labeled by a small, fixed budget of DFT calculations. The critic then guides a pretrained crystal diffusion model. The claim is that this on-policy, DFT-labeled training of the critic is what makes multi-property electronic targeting hold up when DFT checks the results, rather than only when the surrogate checks them.

Core Claim

The AC-GAN fix in images was AM-GAN's extra "fake" class. Its purpose was to make the class head see generated samples (Activation Maximization Generative Adversarial Nets). In images that was the only option, because no true label exists for a fake. In crystals, DFT supplies the true label, so the critic's property head can be trained on generated samples with correct DOS targets instead of a catch-all "fake" category.

Our central, falsifiable prediction concerns the exploitation gap. We define it as the difference between the surrogate-predicted and the DFT-computed rate at which guided samples meet their targets. We predict two things. First, guidance from a frozen surrogate (one trained once and never updated) will show a large exploitation gap that grows with guidance strength. Second, a critic retrained on-policy, meaning on samples from the current guided sampler, will shrink that gap. The gain should exceed what is obtained by spending the same DFT budget on generated samples collected once, before guidance.

The realism head plays a supporting role. It is trained to separate known stable crystals from generated crystals that DFT relaxation moves far or places high above the convex hull. The convex hull is the set of lowest-energy combinations of competing phases, so a large "energy above hull" means the crystal would decompose. This head is meant to stop the guidance from wandering into structures the property head has never seen. We test whether it adds anything beyond the property head; we do not assume it.

Relation to Prior Work

Three works supply the motivation and the starting point.

Generative Adversarial Networks for Crystal Structure Prediction already used an auxiliary-classifier critic for crystals. It reports 23 new Mg-Mn-O motifs among 28 DFT-screened photoanode candidates. However, its auxiliary head only checks chemical composition, and DFT is used purely as an offline filter. We feed DFT labels back into the critic and target continuous electronic properties.

Density of States-Intermediated Crystal Generation for Material Inverse Design shows that mapping several properties directly to a structure fails, while routing through a generated DOS curve works: 56x more type-correct transparent conductors and 0.858 cosine similarity on thermoelectric targets. Its pipeline runs one way, from property to DOS to structure. It is checked by a surrogate (DOSForge) that never sees the generator's mistakes. We keep the DOS as the target representation. What we add is a critic that learns from DFT-verified errors.

MatterGen supplies the generator, through its open code (microsoft/mattergen). It also documents two weaknesses we measure: a bias toward the lowest-symmetry space group P1, and conditioning on scalar properties.

Two other works supply method rather than motivation. Diffusion-Classifier Synergy shows that a classifier's signals can steer diffusion sampling inside a loop where the classifier and the generator improve each other. We borrow the loop structure, but our classifier is corrected by a physical oracle rather than by its own confidence.

Beholder-GAN supplies a constraint. Its continuous-regression critic, when pushed toward extreme target values, changed correlated attributes unpredictably. We therefore expect extreme DOS targets to pull composition and symmetry along with them, and we measure that drift explicitly.

Research Program

The generator is MatterGen pretrained on Alex-MP-20. We first fine-tune it with a DOS-conditioned adapter on the Materials Project DOS subset of 272,658 structures curated by Lee et al. This makes the starting point identical to their structure-generation stage.

The critic is an equivariant graph network, meaning a network on the crystal's atoms and bonds whose outputs do not change when the crystal is rotated or translated. It reads the denoiser's current estimate of the clean crystal and has two output heads. The property head predicts a 2D-binned DOS curve plus bandgap, DOS at the Fermi level, and the integrated number of states up to the Fermi level, N(E_F). The realism head outputs a probability that the crystal is a real stable material.

During sampling, the gradient of the critic's loss with respect to the target is added to the score: classifier guidance applied to the denoiser's estimate of the clean structure. The gradient therefore always acts on a near-crystal, never on pure noise.

Training proceeds in rounds. In each round we sample about 2,000 guided candidates across a held-out set of DOS targets. We select a few hundred of them for DFT, mixing two groups: candidates where the property head is most confident it met the target, which are where exploitation would appear, and candidates where its predictions are most uncertain. Each selected candidate is relaxed and its DOS computed. We use the same exchange-correlation functional as the Materials Project labels, so that the oracle stays consistent with the training data.

Both heads are then retrained on real data plus all generated, DFT-labeled data collected so far. The total budget is fixed in advance, roughly 3,000 to 5,000 calculations on cells of at most 20 atoms. We report every result as a function of DFT calls spent.

DFT's known errors, such as underestimated bandgaps, mean the targets are database-consistent rather than experimentally exact. We state this as a scope limit rather than hide it. A second, optional stage distills the converged critic into the adapter weights, so that sampling no longer needs guidance gradients.

Baselines

The naive reference point is the DOS-conditioned MatterGen adapter sampled with no critic at all. It shows what conditioning alone achieves.

The strongest existing method is the full DOS-intermediated pipeline of Lee et al.: a DOSSampler followed by CDOSGen, with DOSForge as a frozen post-hoc filter. We run it on the same Materials Project DOS subset and the same held-out targets, with the same number of final candidates sent to DFT for verification. Its reported results are 56x more type-correct transparent conductors than unconditional baselines and 0.858 spectral cosine similarity on thermoelectric translation (DOS-Intermediated Crystal Generation). Those figures are surrogate-checked. We found no reported DFT-verified multi-property match rate for it on Lacuna. We therefore recompute its rate under DFT ourselves, and beating it means a higher DFT-verified rate at equal verification budget.

For scalar bandgap alignment, the reference is CrystalGF's report that 66.49% of generated structures fall within 0.05 eV of the target bandgap (CrystalGF). We found no reported result on Lacuna for direct MatterGen classifier-free guidance on the three-property task. We run that guidance ourselves with the same adapter, and give it a sweep over guidance scale equal in size to our own tuning budget.

Three ablations isolate the key ingredient, all at an identical DFT budget and identical critic architecture. The frozen-surrogate ablation trains the critic only on real data and keeps it fixed. The offline-augmentation ablation spends the entire DFT budget once, labeling unguided samples before guidance begins. The property-head-only ablation drops the realism head.

Why not just…?

Why not just guide diffusion with a frozen DOS surrogate like DOSForge? This is the alternative our core claim targets. The AC-GAN gap between 81% accuracy on real samples and 10.1% on generated ones (Odena et al.) is direct evidence that heads trained only on real data misjudge generated samples. The frozen-surrogate ablation, read against the exploitation-gap curve, settles the question. If the frozen surrogate's DFT-verified match rate equals ours, the proposal fails.

Why not just retrain the surrogate once on DFT-labeled generated samples, as in ordinary active learning? This is the most serious threat, and it may capture most of the benefit. Our argument is that guidance moves the sample distribution, so data collected before guidance goes stale. The offline-augmentation ablation tests exactly this. If it matches on-policy rounds, the honest conclusion is that the DFT labels, and not the adversarial loop, did the work, and we will report it that way.

Why not just use MatterGen's classifier-free guidance on the three scalar targets? Lee et al. report that direct multi-property conditioning degrades sharply relative to DOS-intermediated generation. We still run it at a matched tuning budget, because their comparison was surrogate-checked rather than DFT-checked.

Why not just generate broadly and filter everything with DFT? DFT-based search took 12.5 hours for 15 compounds where DiffCSP's neural generation took 10 seconds (DiffCSP). We make the comparison explicit by plotting DFT-verified hits per DFT call. Pure filtering of naive samples is one point on that curve.

Why not avoid adversarial instability altogether? We do not train a GAN generator. The diffusion model stays fixed or is adapted only lightly, and the critic acts through guidance. The usual GAN failures of vanishing gradients and mode collapse therefore do not arise in the generator. We still monitor diversity through uniqueness and space-group spread.

Proposed Experiments

Evaluation uses held-out DOS and scalar targets drawn from the Materials Project DOS subset. Structural quality is measured with MP-20-style metrics: structural validity, energy above the hull after DFT relaxation, and the stable, unique and novel (S.U.N.) rate measured against Alex-MP-ICSD.

The primary metrics are all DFT-verified. They are the three-property joint match rate, the cosine similarity between the target DOS and the DOS computed by DFT, and the exploitation gap.

The secondary metrics test whether guidance distorts other properties, the drift Beholder-GAN warns of. They are the fraction of P1 structures, composition drift relative to the unguided adapter, and diversity.

The decisive check has three parts, all at matched DFT budget. The exploitation gap must be large for the frozen surrogate and must grow with guidance strength. On-policy rounds must shrink that gap. On-policy rounds must also beat the offline-augmentation ablation. If the first part fails, the motivating problem does not exist for crystals. If only the last part fails, the contribution reduces to "spend DFT on generated samples," which is a useful but smaller result.

We repeat the experiment on the transparent-conductor task of Lee et al., to check that the effect holds on a practically relevant multi-property target and not just on the held-out benchmark.