We introduce Fraglingo, an autoregressive molecular generator that constructs molecules step by step from chemically meaningful fragments connected through predefined attachment sites. At each generation step, Fraglingo jointly predicts which fragment to add and how it should attach by producing an attachment-aware fragment embedding and retrieving the nearest fragment through latent-space search. A wildcard-anchored readout represents both the growing molecule and candidate fragments relative to their attachment sites, enabling a single latent prediction to determine both fragment identity and attachment configuration. Because prediction operates in a continuous embedding space rather than over fixed fragment identifiers, larger fragment libraries can be introduced at inference time without retraining. This retrieval-based formulation provides a unified generation primitive for molecule generation, scaffold generation, scaffold decoration, and molecule optimization. Fraglingo also supports property-conditional generation, allowing desired molecular properties to guide the generation process. On controlled property-conditional benchmarks, Fraglingo achieves stronger joint property control than comparably trained baselines while maintaining competitive validity, uniqueness, and novelty. It also generalizes to fragment libraries up to four times larger than those used during training without retraining. Code is available at: https://anonymous.4open.science/r/FragLingo-3551.
Figures & tables
Term
Definition
Fragment
A chemically meaningful molecular substructure used as a generation unit.
Attachment site
A position on a fragment where a bond to another fragment can be formed, represented by a wildcard atom (*).
Active attachment site
The open attachment site of the growing molecule from which the next generation step proceeds.
Growing molecule
The partially assembled molecule at the current generation step.
Attachment-aware
A representation conditioned on the specific attachment site through which a fragment participates in assembly.
Wildcard-anchored readout
A graph readout that represents a molecule relative to a selected wildcard attachment site.
Table 1: Key terminology used in Fraglingo.
Figure 1: Attachment ambiguity in fragment-based molecular generation. The same pair of fragments can produce different molecular structures depending on which attachment sites are connected.
Figure 2: Overview of Fraglingo training and inference across four molecular design tasks. The architecture shown illustrates unconditional generation, with the GNN encoder and query projector abbreviated for clarity; detailed architectures are provided in Figure 8 .
Figure 3: (a) tSNE visualization of wildcard-anchored readouts. Each fragment contributes two readouts, one per wildcard; paired readouts are linked and shown with the same color. (b) fragments with the largest and smallest distances between their two wildcard-anchored readouts. Farthest pairs have distinct attachment environments, whereas closest pairs are nearly symmetric.
Model
Generation Quality
Joint Control
Per-Property Spearman
Validity
Uniqueness
Novelty
Diversity
NJD
Joint@1 ×
Joint@2 ×
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
MolGPT
25.7
100.0
100.0
0.3099
1.7339
53.97
95.02
6.32
0.8072
0.9442
0.6659
0.8537
0.7340
0.8242
0.6421
0.7816
(Std)
(1.9)
(0)
(0)
(0.026)
(0.113)
(1.362)
(3.945)
(0.190)
(0.038)
(0.031)
(0.074)
(0.037)
(0.057)
(0.039)
(0.056)
(0.012)
MolRWKV
90.9
100.0
100.0
0.8261
1.6090
43.77
90.46
6.17
0.8606
0.4830
0.7070
0.6449
0.8839
0.8572
0.8232
0.7514
(Std)
(2.2)
(0)
(0)
(0.027)
(0.103)
(4.851)
(4.196)
(0.161)
(0.032)
(0.044)
(0.075)
(0.040)
(0.041)
(0.030)
(0.023)
(0.027)
Table 2: Property-conditional molecule generation benchmarking results. Each model is followed by a row reporting the standard deviation over 3 runs where available. Best results are shown in bold ; second-best results are underlined .
Figure 4: Examples from property-conditional molecule generation . Green marks properties close to the requested target, and yellow marks properties within the acceptable tolerance range.
Train
Vocab
Generation Quality
Joint Control
Per-Property Spearman
Validity
Uniqueness
Novelty
Diversity
NJD
Joint@1 ×
Joint@2 ×
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
1K
100
97.8
98.7
100.0
0.8344
3.9288
12.24
42.58
3.99
0.5940
0.2953
0.2920
0.3903
0.5228
0.3101
0.4275
0.4045
500
97.8
99.0
100.0
0.8631
4.2554
11.84
39.05
3.82
0.6623
0.1473
0.3138
0.4428
0.4705
0.3381
0.4717
0.4066
1000
99.6
99.3
100.0
0.8748
4.1446
10.10
36.15
3.78
0.4501
0.1098
0.2547
0.4414
0.4598
0.3536
0.1643
0.3190
2000
99.8
99.6
100.0
0.8775
4.3054
11.25
35.18
3.78
0.5069
0.1394
0.2646
0.3582
0.4166
0.2783
0.4005
0.3377
Table 3: Property-conditional molecule generation under different vocabulary sizes and training dataset sizes. Best results are shown in bold ; second-best results are underlined .
Inference Vocabulary
Generation Quality
Joint Control
Per-Property Spearman
Avg.
OOV Frag.
Validity
Uniqueness
Novelty
Diversity
NJD
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
Training (500-frags)
100.0
99.9
100.0
0.8218
1.4928
6.56
0.8710
0.7746
0.6373
0.8296
0.8284
0.8190
0.7993
0.7942
0.00%
Inference (1000-frags)
100.0
100.0
100.0
0.8313
1.6028
6.40
0.8600
0.7496
0.6323
0.8476
0.8534
0.8280
0.7903
0.7945
29.11%
Inference (2000-frags)
100.0
100.0
100.0
0.8382
1.8628
6.16
0.8620
0.7286
0.5953
0.8226
0.8334
0.8150
0.7773
0.7763
48.76%
Training (1000-frags)
100.0
100.0
100.0
0.8313
1.2318
6.83
0.7740
0.8896
0.6043
0.8456
0.7354
0.7890
0.7523
0.7702
0.00%
Table 4: Inference-time vocabulary expansion. Models are trained with a fixed BFE fragment vocabulary but retrieve against a larger inference library at test time. OOV Frag.% is the fraction of selected fragments absent from the training vocabulary.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Configuration
Generation Quality
Joint Control
Per-Property Spearman
Validity
Uniqueness
Novelty
Diversity
NJD
Joint@1 ×
Joint@2 ×
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
Full model (Fraglingo)
100.0
99.9
100.0
0.8218
1.4928
69.65
97.75
6.56
0.8710
0.7746
0.6373
0.8296
0.8284
0.8190
0.7993
0.7942
InfoNCE ( → MSE regression)
99.8
100.0
100.0
0.8238
4.2248
26.85
24.94
3.73
0.1010
0.3146
0.0033
0.3636
0.1674
0.1470
0.1453
0.1772
Classification loss
100.0
100.0
100.0
0.8228
1.7878
56.52
88.14
5.95
0.7570
0.6966
0.4823
0.7756
0.7434
0.7520
0.7193
0.7032
RVQ regularizer
100.0
100.0
100.0
0.8268
1.5268
67.75
95.76
6.29
0.7780
0.8536
0.6053
0.8046
0.7344
0.7980
0.7243
0.7562
Appendix
Table 5: Component ablation on the shared 10k-molecule, 500-fragment setting. Each row removes or replaces exactly one component relative to the full model (top row); rows are ordered by severity of the resulting drop in joint control.
Model
Generation Quality
Optimization Performance
Property Distribution Similarity
Validity
Novelty
NJD
Tanimoto
Sim ≥ 0.6
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
HierVAE
100.0%
100.0%
1.7717
0.6746
66.14%
6.17
0.821
0.723
0.727
0.719
0.817
0.809
0.719
0.762
(Std)
(0)
(0)
(0.011)
(0.014)
(2.6)
(0.006)
(0.010)
(0.012)
(0.009)
(0.010)
(0.014)
(0.004)
(0.004)
(0.011)
JT-VAE
100.0%
99.9%
2.6481
0.2940
4.12%
5.19
0.509
0.329
0.373
0.277
0.537
0.421
0.515
0.423
(Std)
(0)
(0)
(0.093)
(0.027)
(0.74)
(0.60)
(0.078)
(0.069)
(0.090)
(0.063)
(0.093)
(0.071)
(0.102)
(0.098)
Appendix
Table 6: Molecule optimization against fragment-based baselines on the shared 10k matched-pair dataset. Tanimoto and Sim ≥ 0.6 measure preservation of the starting molecule.
Figure 5: Qualitative molecule optimization examples. Green marks properties close to target, yellow marks properties within tolerance, and red marks properties outside the target range.
Train
Vocab
Generation
Optimization Performance
Property Distribution Similarity
Validity
NJD
Tanimoto
Sim ≥ 0.6
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
10k
500
100.0%
1.6244
0.7952
95.72%
6.17
0.8390
0.7440
0.7130
0.7720
0.8690
0.8400
0.7880
0.7950
100k
100.0%
1.4031
0.7903
95.82%
6.34
0.8709
0.7712
0.7681
0.8327
0.8753
0.8593
0.8103
0.8269
1M
100.0%
1.2037
0.7853
94.62%
6.39
0.8617
0.7830
0.7981
0.8351
0.8941
0.8927
0.8791
0.8491
10k
1000
100.0%
1.6477
0.7896
94.72%
6.12
0.8414
0.6757
0.7280
0.7772
0.8656
0.8328
0.7924
0.7876
Appendix
Table 7: Ablation on training corpus size and vocabulary size for molecule optimization. Tanimoto and Sim ≥ 0.6 measure preservation of the starting molecule.
Figure 6: Qualitative scaffold generation examples. Fraglingo assembles scaffold-level BRICS fragments into valid core structures before side-chain decoration, producing diverse ring systems and attachment-ready topologies rather than complete decorated molecules.
Train
Vocab
Generation Quality
Joint Control
Per-Property Spearman
Validity
Uniqueness
Novelty
Diversity
NJD
Joint@1 ×
Joint@2 ×
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
10k
50
100.0
96.8
88.2
0.8059
2.5943
41.67
84.64
5.68
0.6169
0.7711
0.4029
0.5954
0.6196
0.5987
0.6701
0.6107
100
100.0
97.0
89.4
0.8262
2.5278
44.22
84.99
5.77
0.7397
0.7302
0.3994
0.6019
0.5859
0.6052
0.7786
0.6344
200
100.0
99.0
95.2
0.8363
3.1045
32.05
74.45
5.28
0.7253
0.6606
0.2815
0.5352
0.6709
0.4859
0.5754
0.5621
500
99.9
99.2
97.0
0.8397
3.9841
25.28
63.91
4.74
0.6526
0.4954
0.1639
0.4121
0.6040
0.2993
0.6391
0.4666
Appendix
Table 8: Scaffold generation under different vocabulary sizes and training dataset sizes.
Figure 7: Qualitative scaffold decoration examples. For each fixed scaffold, Fraglingo predicts branch fragments at the growable sites under the specified property targets. The tables report molecular-property values and signed errors before and after decoration, illustrating how site-conditioned retrieval can move decorated molecules toward the requested property profile while preserving the scaffold core.
Train
Vocab
Joint Control
Per-Property Spearman
NJD
Tanimoto
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
10k
500
1.08
0.3165
6.62
0.9126
0.7919
0.8381
0.8632
0.8996
0.8538
0.8032
0.8518
1000
0.95
0.3338
6.75
0.9115
0.8711
0.8852
0.9194
0.8839
0.9225
0.8891
0.8975
2000
1.00
0.3206
6.70
0.9030
0.8290
0.8287
0.8965
0.8770
0.9069
0.8870
0.8755
100k
500
0.80
0.3349
6.75
0.9412
0.8488
0.9086
0.9469
0.8826
0.9324
0.8958
0.9080
Appendix
Table 9: Scaffold decoration under different vocabulary and corpus sizes. Metrics are computed on decorated molecules with the scaffold held fixed.
Figure 8: Detailed architecture of Fraglingo’s next-fragment generation module.
Model
Dim.
Layers
Heads
Params
Small
128
4
4
1.2M
Baseline
256
6
8
6.4M
Large
512
8
8
32.9M
Appendix
Table 10: Model configurations and parameter counts.
Model size
Generation Quality
Joint Control
Per-Property Spearman
Validity
Uniqueness
Novelty
Diversity
NJD
Joint@1 ×
Joint@2 ×
Partial (/7)
logP
MW
QED
TPSA
HBD
HBA
RotBonds
Avg.
( ↑ )
( ↑ )
( ↓ )
( ↑ )
( ↓ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
( ↑ )
1.2M
100%
100%
100%
0.843
2.011
38.9%
84.9%
5.80
0.823
0.611
0.568
0.756
0.821
0.776
0.756
0.730
6.4M
100%
100%
100%
0.8444
1.9808
40.88%
85.90%
5.80
0.8373
0.6423
0.5632
0.7605
0.8161
0.7800
0.7760
0.7393
32.9M
100%
100%
100%
0.8443
2.017
39.05%
83.70%
5.73
0.793
0.621
0.603
0.754
0.825
0.782
0.750
0.733
6.4M ∗
100%
99.9%
100%
0.8218
1.4928
69.65%
97.75%
6.56
0.8710
0.7746
0.6373
0.8296
0.8284
0.8190
0.7993
0.7942
Appendix
Table 11: Effect of model size on property-conditional molecule generation (10k corpus, 500 fragments). Scaling parameters improves joint control at saturated generation quality. The 6.4M ∗ row applies BPE on BRICS fragments, called BFE (BRICS-based Fragment Enumeration) in MolLingo, coarsening the vocabulary.
Drug discovery requires efficient exploration of an astronomically large chemical space. Molecular graph diffusion models offer a promising approach to this task, but many require graph size to be fixed before generation. Although atom-level insertion and deletion can enable flexible-size generation, jointly modeling molecular size, atom types, and bonds while maintaining chemical validity remains challenging. We introduce FragFlex, a flexible-length discrete diffusion model that performs node insertion and deletion at the fragment level. During denoising, FragFlex jointly learns the size, fragment identities, and inter-fragment connectivity of the fragment graph. A neural attachment-site predictor and valence-aware assembler then convert the generated fragment graph into an atom-level molecule. In large-scale experiments generating 10 million molecules, FragFlex achieves near-perfect chemical validity while maintaining high uniqueness, demonstrating a strong balance between the two.
Sihyun Park, David Ryan Koes
Carnegie Mellon University · University of Pittsburgh
We introduce MolMiner, a fragment-based, geometry-aware, and order-agnostic autoregressive model for molecular design. MolMiner supports high-dimensional conditional control over twelve physicochemical and structural properties from partial specifications, constructs molecules via symmetry-aware fragment attachments, and conditions each generation step on force-field-relaxed three-dimensional geometry of the partial structure. Conditional control emerges without auxiliary property losses. On targeted property windows, conditioning lifts hit rates by up to 5.25x over unconditional generation and 3.5x over the training distribution itself -- overriding the model's intrinsic biases -- at the cost of a small reduction in unconditional distributional fidelity. MolMiner unifies dynamic geometry, symmetry handling, order-agnostic generation, and scalable multi-property conditioning within a single framework.
Raul Ortega-Ochoa, Tejs Vegge, Jes Frellsen
Department of Energy Conversion and Storage, Technical University of Denmark, DK-2800 Kgs. Lyngby, Denmark · CAPeX Pioneer Center for Accelerating P2X Materials Discovery · Department of Applied Mathematics and Computer Science, Technical University of Denmark
Three-dimensional (3D) molecule generation has been dominated by diffusion models, which achieve strong generation quality but typically require the molecular size to be specified a priori. Recent autoregressive approaches have substantially narrowed the performance gap while naturally supporting variable-length generation and conditioning on partial molecular context. However, balancing unconditional and context-conditioned generation remains challenging. We introduce KRONOS, a latent autoregressive diffusion framework that generates molecules in the latent space of a pre-trained autoencoder, jointly modeling molecular graph topology and geometry, while retaining the flexibility of autoregressive generation. We further introduce a mixed training strategy inspired by Fill-in-the Middle (FIM) paradigm, enabling both unconditional and fragment-conditioned molecular generation within a single left-to-right autoregressive model. Experiments on QM9 and GEOM-Drugs demonstrate that KRONOS achieves leading unconditional generation performance among autoregressive methods, while remaining competitive with diffusion models. Moreover, fragment-conditioned generation is achieved with negligible impact on unconditional generation performance, demonstrating that both generation paradigms can be supported within a single architecture.
Federico Ottomano, Gaopeng Ren, Yingzhen Li +2
Department of Chemistry Imperial College London · Department of Computing Imperial College London