When a personalization model learns a pet from a few photos, it often memorizes the rug and the lighting along with the pet. Asked for "the dog on the moon," it brings the rug too. We argue that crystal generators have the same failure in a materials setting. Chemists usually make a wide-bandgap semiconductor absorb visible light by keeping a stable host such as $TiO_2$, $In_2O_3$ or $Bi_{0.5}Na_{0.5}TiO_3$ and adding a small local change: a dopant atom, an oxygen vacancy, or a surface layer. That change creates electronic states inside the gap. Today's generative models for crystals do something different. Asked for a 2 eV bandgap, they sample a whole new crystal, and the easiest way to hit the target is to pick a compound that is already narrow-gap. The requested property ends up tangled with the identity of the host, much as the pet ends up tangled with the rug.
We propose a host-anchored generator. It is given a fixed host crystal and a target change in electronic structure, such as "add an occupied state about 1.5 eV above the valence band without moving the band edges." It denoises only a small, learned set of sites, and it is trained on paired data in which hosts and perturbations vary independently. The question is whether this design produces visible-absorbing variants that keep the host's stability and band-edge positions more often than whole-crystal generation, inpainting with a hand-chosen region, or brute-force dopant enumeration with a surrogate model.
Core Claim
Conditioning a crystal diffusion model on an absolute bandgap scalar invites a shortcut. The model reaches the target by changing the host rather than by adding a localized state, and a localized state is what preserves the host's band edges, which must straddle the redox potentials of the target reaction, and its resistance to corrosion under light. Two changes borrowed from image personalization should remove that shortcut. The first is to make the host an explicit, frozen context. The second is to condition on the change in the density of states (DOS, the number of available electron energy levels at each energy) between host and perturbed crystal, learned from pairs in which host and perturbation are decorrelated. We expect these changes to raise the rate of valid "host plus perturbation" absorbers. We also predict where they will fail to beat simple enumeration: single substitutions in small cells. The design is built to tell those two cases apart.
Relation to Prior Work
The motivating evidence comes from materials inverse design. MatterGen is a diffusion model over atom types, coordinates and lattice that is steered toward property targets with small adapter layers. It generates the full unit cell from scratch and is reported to drift toward low-symmetry P1 structures. Con-CDVAE generates crystals from a property-conditioned latent space. Its authors report that conditioning on bandgap is much harder than conditioning on formation energy, which fits our view that bandgap depends on local orbital effects a monolithic latent does not capture smoothly. Density of States-Intermediated Crystal Generation is the closest work. It first generates a target DOS curve and then fine-tunes MatterGen to build a crystal matching that curve, and it reports large gains when several electronic targets must hold at once. We reuse its central move, which is to condition on a spectrum rather than a scalar. We differ in two ways: our spectrum is a difference relative to a supplied host, and the host is held fixed. That paper itself notes that it has no mechanism for adding a dopant to a given framework.
The method comes from the subject-context literature. MoA splits attention into a frozen prior branch and a trainable personalized branch, with a learned soft mask deciding which pixels go to which branch. Our learned site mask over atoms plays the same role: frozen host sites, trainable perturbation sites. Preserve and Personalize bounds model drift by the parameter distance $\|\theta_{tuned}-\theta_{base}\|^2$. We use that penalty to protect the base model's symmetry prior during fine-tuning. Phantom-Data argues that "in-pair" data, where subject and background never vary independently, give no gradient signal for separating them. That argument shapes our dataset design.
The physical cases supply ground truth and act as constraints. Kobayashi et al. measured a V $3d$ state about 1.7 eV below the Fermi level in V-doped $In_2O_3$ while the O $1s$ spectra stayed host-like, which is exactly a host-preserving perturbation. Duong et al. computed Ni mid-gap states in BNT, with Bi-site substitution favored at a formation energy of 3.0818 eV. Zhang et al. narrowed the $TiO_2$ gap to about 2.20 eV with $Ti^{3+}$ and oxygen-vacancy defects. These three systems become held-out recovery targets.
These sources also impose a constraint. Mid-gap states can act as traps where electrons and holes recombine, and nothing in this proposal measures recombination. We therefore report the position and localization of each generated state as a stated proxy, not as a claim about efficiency.
Research Program
The work has three parts.
Paired data. We build host–perturbation pairs from three sources. The first is the substitution-generated crystals of the WBM set used in Matbench Discovery, which are derived from known prototypes and so already come with parent–child pairs. The second is supercells of Materials Project hosts with single and paired substitutions and vacancies. The third is DOS labels from a surrogate model, with a DFT-checked subset. The dataset is built "cross-pair" in the Phantom-Data sense: each perturbation type appears across many hosts, and each host appears with many perturbations. This breaks the correlation between host identity and gap change.
Generator. We start from pretrained MatterGen weights and add a site-routing head that predicts, for each atom, a probability of belonging to the perturbation region. Atoms in the predicted host region are held at their noiseless coordinates and species during denoising, so only the routed sites are diffused. The model is conditioned on the target DOS difference $\Delta g(E) = g_{pert}(E) - g_{host}(E)$, where $g$ is the DOS as a function of energy $E$ referenced to the host valence-band maximum. Training minimizes the usual denoising loss plus $\lambda\|\theta-\theta_{base}\|^2$. Supercells exceed the 20-atom training regime of Alex-MP-20, so we fine-tune on 24–48-atom cells and report how quality degrades with size. This is the main feasibility risk.
Shortcut analysis. Every method's samples are decomposed into how much of the achieved gap reduction comes from host change and how much from new in-gap states. We measure this by comparing the generated structure's DOS against that of its nearest host prototype.
Baselines
The naive reference point is the unmodified host. It sets the floor for absorption onset, gives zero host drift by definition, and calibrates the preservation metrics.
The strongest existing generative competitor is DOS-conditioned MatterGen from Density of States-Intermediated Crystal Generation, given the full target DOS (host plus desired in-gap state) and allowed to generate the whole cell. It is the strongest competitor because it already solves the multi-target electronic problem that scalar conditioning fails. It reports 56x more type-correct transparent conductors than unconditional sampling and a spectral cosine similarity of 0.858 on thermoelectric targets. Those numbers are for a different task, and no result on Lacuna covers host-anchored dopant design. It gets the same paired training data, the same surrogate and DFT budget, and the same number of fine-tuning steps and hyperparameter trials as our model. We beat it if, at equal numbers of samples, we produce more candidates that meet the absorption target while keeping band edges and host structure. Matching it on raw absorption hits is not enough.
The scalar-adapter version of MatterGen, conditioned on $E_g$ alone, is included because it is the default practice and the model in which we expect the shortcut to be most severe.
The non-generative competitor enumerates single and paired substitutions and vacancies on each host up to a fixed supercell size. Candidates are ranked by surrogate DOS and an ML stability model, with the stability model chosen using the Matbench Discovery results, where MEGNet reported a discovery acceleration factor of 2.70 and M3GNet an F1 of 0.58. Enumeration gets the same number of surrogate evaluations as our generator gets samples.
Two ablations isolate our key ingredients. One replaces the learned site mask with a hand-specified inpainting region around a single site. The other replaces $\Delta g$ conditioning with absolute-$E_g$ conditioning while keeping the host frozen. A third, secondary ablation removes the parameter-distance penalty to test its effect on symmetry.
Why not just…?
Why not just enumerate dopants and screen with a surrogate? For a single substitution in a small cell, this is a real threat and may well win, since the search space is tiny. MatterGen reports beating substitution for complex multi-element systems, but not for dilute doping of a fixed host. We test this directly by splitting results by perturbation complexity: single substitution, then dopant plus vacancy, then multi-site. If enumeration matches us at every level, we will report that the generator's value is limited to search spaces too large to enumerate, or that it has none.
Why not just inpaint with MatterGen over a chosen region? Freezing the host and diffusing a hand-picked region already removes the host-change shortcut. The hand-specified-mask ablation is exactly this alternative. Our claim depends on the learned mask finding perturbation sites a person would not pick, such as a vacancy next to the dopant, often enough to raise hit rates. If it does not, the learned routing is unnecessary and the contribution reduces to $\Delta g$ conditioning plus paired data.
Why not just condition on the full DOS, as the DOS-intermediated work does? A full-DOS target does encode the band edges, so the shortcut may already be suppressed. We test this through the shortcut decomposition applied to that baseline. If its samples rarely change the host, our frozen-context design adds little and we will say so.
Proposed Experiments
The decisive check is held-out recovery. V-doped $In_2O_3$, Ni-doped BNT and oxygen-deficient $TiO_2$, along with all their near-duplicates, are removed from training. Each method is then given the host and the literature-reported in-gap state as a target. We ask whether the measured or computed perturbation appears among the top 100 samples, and whether its DFT-computed in-gap state falls within 0.3 eV of the reported position, such as the V $3d$ state about 1.7 eV below the Fermi level.
The broad check runs over roughly 30 wide-gap oxide hosts with absorption-onset targets in the 1.5–2.2 eV window. For each method we report four quantities. The first is target hit rate from the surrogate, confirmed by DFT on a fixed random subset per method. The second is host preservation: valence- and conduction-band-edge shifts and structural RMSD outside the perturbed region. The third is stability: defect formation energy and energy above hull. The fourth is the fraction of gap reduction attributable to host change rather than new in-gap states.
The prediction is clear. Scalar MatterGen should show a high host-change fraction. The full method should cut that fraction sharply while matching or beating the hit rate of the DOS-intermediated baseline on dopant–vacancy complexes. If neither the learned mask nor $\Delta g$ conditioning beats its ablation on that subset, the proposal's central claim is wrong.
References
- MatterGen: a generative model for inorganic materials design
- Con-CDVAE: A method for the conditional generation of crystal structures
- Density of States-Intermediated Crystal Generation for Material Inverse Design
- MoA: Mixture-of-Attention for Subject-Context Disentanglement in Personalized Image Generation
- Preserve and Personalize: Personalized Text-to-Image Diffusion Models without Distributional Drift
- Phantom-Data: Towards a General Subject-Consistent Video Generation Dataset
- Hybridization between the conduction band and<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mn>3</mml:mn><mml:mi>d</mml:mi></mml:mrow></mml:math>orbitals in the oxide-based diluted magnetic semiconductor<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:msub><mml:mrow><mml:mtext>In</mml:mtext></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:mo>−</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mtext>V</mml:mtext><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mtext>O</mml:mtext><mml:mn>3</mml:mn></mml:msub></mml:mrow></mml:math>
- An ab initio calculation on the structural, electronic and magnetic properties of Ni-doped \(\text{Bi}_{0.5}\text{Na}_{0.5}\text{TiO}_3\)
- Ti3+ Self-Doping of TiO2 Boosts Its Photocatalytic Performance: A Synergistic Mechanism
- Matbench Discovery - Can machine learning identify stable crystals?