Reinforcement Learning on the Discrete Composition Channel of a Crystal Generator: Validated Gains and Reward Hacking
Organizations: University of Florida · New York University · Oak Ridge National Laboratory
Abstract
Inverse materials design is a long-standing goal of computational materials discovery. Generative models for crystalline materials are typically trained to match the distribution of a structure database, while nothing in their training objective points them at specific design goals such as targeted properties. We use group-relative policy optimization (GRPO) to align a generative model based on stochastic interpolants and discrete flow matching with general black-box reward functions through reinforcement learning. Atom types are generated by a discrete flow and the policy gradient of our generalization of GRPO directly acts on the likelihoods of the atom-type transitions, which differentiates our work from previous reinforcement-learning approaches for diffusion and flow-based generative models of crystalline materials. We introduce a reward function that raises the yield of metastable, unique and novel structures (mSUN) from 13.4% for the pretrained model to 45.5% for the reinforced model, as evaluated by a community benchmark. Our reward also improves the performance of a reinforcement learning framework for crystalline materials based on latent denoising diffusion models. At the same time, we find that directly reinforcing atom-type transition likelihoods enables reward exploitation that has to be prevented with explicit guards. The same analysis also exposes a gap in the community metric. Single-element structures in distinct packings are counted as metastable, unique and novel materials and inflate mSUN without yielding any new compounds. A stability claim is only as good as its reference hull. We report every result split by the number of reference phases behind it and argue that benchmarks should do the same.
Figures & tables
| method | valid | unique | novel | metastable | SUN | mSUN | single-element | sparse hull |
|---|---|---|---|---|---|---|---|---|
| % | % | % | % | count | % (count) | in mSUN | % of mSUN | |
| prior | 94.1 | 99.5 | 82.1 | 27.2 | 8 | 13.4 (336) | 7 | 21.7 |
| best-of- | 97.9 | 77.9 | 11.5 | 65.6 | 72 | 7.7 (192) | 0 | 0.0 |
| frozen control | 93.5 | 99.5 | 87.7 | 18.7 | 9 | 9.8 (245) | 1 | 12.2 |
| Chemeleon2 | 94.9 | 90.6 | 68.1 | 67.5 | 36 | 36.6 (915) | 9 | 7.9 |
| OMatGRPO (ours) | 69.8 | 98.7 | 88.3 | 75.8 | 7 | 45.5 (1138) | 4 | 23.5 |
| trained in pipeline | ||
|---|---|---|
| reward | ours (native-channel SDE) | Chemeleon2 (latent VAE) |
| ours | 45.5 (1138) | 43.7 (1093) |
| Chemeleon2 | 18.6 (465) | 36.6 (915) |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| internal evaluation | LeMat-GenBench | |
|---|---|---|
| sample per method | generations | generations |
| rate basis | count per generations | fraction of the nominal (mSUN) or of the valid structures (other rates) |
| relaxation before scoring | FIRE under UMA with cell, at most 500 steps | our relaxed geometry, then the benchmark’s own 50-step relaxation |
| stability model | UMA | Orb, MACE and UMA, each against its own hull, two of three must agree |
| reference hull | UMA-consistent LeMat-Bulk hull | the benchmark’s per-potential hulls |
| metastability threshold | eV/atom | eV/atom |
| run | identifier | mSUN | % | single-element | sparse hull | compounds |
| prior | R0 | 336 | 13.4 | 7 (2.1%) | 21.7% | 329 |
| best-of- | bestofn48k_top2500 | 192 | 7.7 | 0 (0.0%) | 0.0% | 192 |
| frozen-composition control | frozen_control | 245 | 9.8 | 1 (0.4%) | 12.2% | 244 |
| Chemeleon2, released model | chemeleon2_mp20rl | 915 | 36.6 | 9 (1.0%) | 7.9% | 906 |
| discovery, pre-creativity | canonical | 1063 | 42.5 | 528 (49.7%) | 65.8% | 535 |
| discovery (Section 4.3 ) | canonical_creatrelax | 939 | 37.6 | 502 (53.5%) | 63.4% | 437 |
| # | reward optimized | what the policy did | why it paid | closure |
|---|---|---|---|---|
| 1 | relaxation displacement (RMSD) | near-stationary but energetically implausible structures | displacement carries no energy information | energy-based reward |
| 2 | formation energy | collapse onto deeply bound, far-above-hull fluorides | strong bonding is a poor proxy for phase stability when more stable competitors exist | switch objective to |
| 3 | unfloored | below-hull depth chasing in sparsely referenced regions | with few references is unbounded below, and depth pays linearly | floor at zero. removes the payout by construction |
| 4 | floored residual geometry term | sparse above-hull O/F binaries gaming the geometry term | thinly referenced hulls score leniently | route sparse-reference scores away from credit |
| 5 | full recipe, abstention routing | distinct single-element packings flooding the mSUN set | single-element subsystems are sparsely charted, and the packings pass the metastability, uniqueness and novelty checks of the three community implementations we checked at source | single-element guard. A single-element composition receives the penalty reward, and no relocation followed |
| run | single-element in mSUN | note |
| pretrained prior (MP-20) | 6 | |
| discovery recipe, pre-creativity, | 253 | abstention routing, no single-element guard |
| discovery recipe, pre-creativity, | 307 | matched rollout budget |
| single-element guard, pre-creativity | 12 | 2 to 15 across three seeds |
| discovery run (Eq. 5 without the guard) | 242 | |
| OMatGRPO (Eq. 5 ) | 2 |
| rate on valid | mSUN | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| run | valid | uniq | novel | meta | SUN | count | /val | /2500 | |
| prior (no RL) | 2352 | 0.948 | 0.995 | 0.821 | 0.272 | 8 | 336 | 0.143 | 0.134 |
| ours ours | 1745 | 0.703 | 0.987 | 0.883 | 0.758 | 7 | 1138 | 0.652 | 0.455 |
| theirs theirs | 2372 | 0.949 | 0.906 | 0.681 | 0.675 | 36 | 915 | 0.386 | 0.366 |
| B (theirs ours) | 2305 | 0.928 | 0.990 | 0.812 | 0.321 | 3 | 401 | 0.174 | 0.160 |
| B ′ (B relax) | 2322 | 0.933 | 0.992 | 0.817 | 0.341 | 6 | 465 | 0.200 | 0.186 |
| run | single-element in mSUN | sparse in mSUN | dominant arity | relax RMSE | ||
|---|---|---|---|---|---|---|
| prior (no RL) | 2.1% | 21.7% | 3 (50%) | 0.192 | 0.441 | |
| ours ours | 0.4% | 23.5% | 3 (46%) | 0.070 | 0.278 | |
| theirs theirs | 1.0% | 7.9% | 3 (48%) | 0.078 | 0.168 | |
| B | 7.5% | 26.7% | 3 (44%) | 0.178 | 0.456 | |
| B ′ | 4.1% | 22.2% | 3 (45%) | 0.161 | 0.448 | |
| A | 0.0% | 15.3% | 3 (49%) | 0.143 | 0.379 |
| term | untrained policy | trained policy | |
|---|---|---|---|
| creativity | 1.000 | 0.994 | |
| composition diversity | 0.473 | 0.648 | |
| energy | 0.043 | 0.125 | |
| structure diversity | 0.035 | 0.044 | |
| total | 1.551 | 1.811 |
| tier | run | MAE (eV/atom) | agreement | |
|---|---|---|---|---|
| trusted | prior | 4 | 0.005 | 3 of 4 |
| trusted | discovery, pre-creativity | 28 | 0.009 | 28 of 28 |
| trusted | guarded, pre-creativity | 13 | 0.019 | 12 of 13 |
| trusted | OMatGRPO | 22 | 0.026 | 20 of 22 |
| trusted | all | 67 | 0.016 | 63 of 67 |
| sparse | discovery, pre-creativity | 10 | 0.033 | 8 of 10 |
| run | formula | tier | refs | UMA | DFT | agree |
|---|---|---|---|---|---|---|
| D - | Ac 3 Hg 5 | T | 9 | 0.054 | 0.050 | y |
| D - | Ac 9 In 3 | T | 6 | 0.080 | 0.084 | y |
| D - | AgLi 8 | T | 11 | 0.007 | 0.013 | y |
| D - | AgLi 9 | T | 11 | 0.040 | 0.043 | y |
| D - | AgMg 9 | T | 7 | 0.068 | 0.085 | y |
| D - | AgSr 9 | T | 12 | 0.088 | 0.024 | y |
| setting | value |
|---|---|
| groups per iteration , group size | 4, 16 |
| time grid, species noise | 64 points, 0 |
| rollout iterations, inner epochs | 750, 3 |
| optimizer, learning rate, gradient-norm clip | AdamW, , 0.5 |
| clip range of Eq. 3 | 0.2 |
| channel weights | 1, 0.1, 0.1 |