arXiv:2610.17244cs.LGOct 2026

Manuscript Offprint

arXiv:2610.17244

MIRRA: Fast, High-Fidelity Molecular Generation with Chemistry-Informed Discrete Flow Matching

Ge Sun, Juan J. de Pablo

ABSTRACT

Fast, high-fidelity molecular generation requires accurate chemical choices and efficient sampling. Chemical building blocks reduce graph size, but make each node a choice among tens of thousands of related identities. We introduce MIRRA (Molecular Identity Representation, Refresh and Assembly), a discrete flow-matching generator that learns from chemical knowledge and evaluates identity probabilities only when needed, while keeping every identity in its vocabulary available. Chemical features share information across related blocks, and learned identity corrections distinguish them in molecular context. By deciding which positions will refresh before computing their probabilities, the sampler avoids unused predictions while preserving each sampling transition. Against the strongest baselines in each task, MIRRA reduces chemical and graph distribution errors on ZINC250k by 29–31% and 53–60%, respectively, with generation up to 8.6 times faster. Property targeting yields an estimated 7.8–20.8 times more distinct novel hits per second. On a held-out polymer test set, MIRRA achieves 100% periodic validity with known chain topology, versus 57.0% for a polymer variational autoencoder. These results demonstrate fast, high-fidelity generation with the full chemical vocabulary available throughout sampling.

1 Introduction

Molecules reuse chemistry. Rings and functional groups recur across compounds, so selecting one building block can specify several atoms and bonds at once. This makes substructure-based generation attractive: it reduces the number of graph variables while preserving chemically meaningful units (Degen et al., 2008; Jin et al., 2018; Han et al., 2025; Lee et al., 2026). Compression of the graph, however, relocates the difficulty to the individual nodes. Instead of choosing among a few atom types, a model must predict an identity from tens of thousands of building blocks, each in the context of a different partially formed molecule.

Two requirements follow. First, the predicted probabilities must reflect both chemical similarity and individual difference. Two aromatic blocks may share useful structural information while differing in ring size, heteroatoms or attachment pattern, and these differences can determine which surrounding structures they fit. Second, evaluating those probabilities must remain affordable, since the vocabulary is scored at every position of every sampling step; a large vocabulary can otherwise erase the computational benefit of the smaller graph.

We ask: can a generator retain detailed chemical choices and still be fast? MIRRA (Molecular Identity Representation, Refresh and Assembly) answers by combining chemistry-informed prediction with refresh scheduling (Figure 1). Every identity in its vocabulary remains available throughout generation. The representation assigns each block a probability from two terms: fixed chemical features shared across related entries, and learned per-entry corrections that depend on molecular context. The refresh schedule fixes which positions will be resampled before any scoring occurs, so only those positions evaluate the full vocabulary while the complete graph still supplies context. Assembly converts the sampled building blocks into a molecule by selecting a tree of connections and resolving compatible attachment sites from the terminal probabilities.

a Discrete flow matching on building-block graphs

Figure

26 heavy atoms →\rightarrow 5 block nodes

MIRRA generation

Prior

Flow sampling

Molecule

b Select positions before scoring

c Score chemical choices

Figure

Figure 1: MIRRA combines chemistry-informed prediction, refresh scheduling and constrained assembly. (a) A 26-heavy-atom molecule becomes five building-block nodes. The predictor pθp_{\theta} supplies node and connection probabilities for discrete flow matching, using refresh scheduling (b) and chemistry-informed identity scores (c). Constrained assembly D uses final identities and these probabilities to construct a tree over the blocks and pair compatible attachment sites, with limited identity changes when needed. (b) Independent Bernoulli refresh decisions select positions for vocabulary scoring using the full graph as context. A selected identity can remain unchanged. At 250 steps, expected scoring evaluations per position fall from 250 to 6.1. (c) Chemical-feature and identity-correction scores, plus a frequency offset, define probabilities over all 37,821 entries. The four chemical examples are vocabulary members, not a shortlist; intermediate states, matrices and probability bars are schematic.

Our contributions are:

• Higher fidelity at lower cost. MIRRA achieves the best chemical and graph fidelity in our ZINC250k evaluation. Compared with the strongest baseline, FragFM at 500 steps, MIRRA at 25 steps lowers Fréchet ChemNet Distance (FCD) by 28.7% and generates 8.6 times faster. Both models use the same training data, and matched timings include assembly.

• Chemical sharing and identity corrections improve fidelity. Chemical features share learning across related identities, while contextual corrections preserve their differences. Matched training controls and generation/assembly interventions establish how both components improve fidelity.

• Faster sampling through prediction-independent scheduling. Prediction-independent refresh scheduling computes identity probabilities only for positions selected to refresh, scoring every vocabulary entry at each refresh. It preserves the finite-step kernel and gives a 3.0-fold speedup at fixed weights.

• Beyond the benchmark. Conditional design increases estimated distinct novel target hits per second. On a reserved polymer test, MIRRA achieves 100% periodic validity under known chain topology. The fixed design also transfers to MOSES.

References (41)