Retrosynthesis enables the discovery of viable synthetic routes to target molecules. It plays a central role in modern drug discovery and materials design. Retrosynthesis involves molecular graph transformations that can change both connectivity and graph size. These transformations may introduce reactant components absent from the target while revising the product-derived structure. To model these transformations, we propose RetroGEF, a flow-based generative model for single-step retrosynthesis. Starting from the target molecule, it constructs possible reactants by adding atoms and changing bonds in the molecular graph. RetroGEF models molecular transformations and changes in graph size within the same generative process, rather than relying on a fixed-size graph canvas. It learns this process directly from product--reactant pairs without requiring a prescribed edit order. Experiments on representative retrosynthesis benchmarks demonstrate that RetroGEF achieves state-of-the-art performance.
Figures & tables
Figure 1: RetroGEF : product-relative complete edits, bridge supervision, and generation. Paired endpoints supervise edit rates (dashed arrows); the shared network observes (P,Xt,t) . Each generated edit updates the graph before the next rate prediction. States are schematic.
Figure 2: Edit order and complete graph updates. A: Two correction orders reach the same graph, with total bridge intensity 2→1→0 . B: Location and attributes jointly define one update. Blue: product atoms; orange: added atoms.
Figure 3: Edit-rate prediction. Intensity and complete-edit probability determine each rate. Dashed links align product atoms; gray links inside the Transformer denote feature interactions, not molecular bonds.
Method
Top-1
Top-3
Top-5
Top-10
RetroSim
32.8
–
–
56.1
LocalRetro
39.1
53.3
58.4
63.7
GLN
39.3
–
–
63.7
RetroPrime
44.1
59.1
62.8
68.5
R-SMILES
48.9
66.6
72.0
76.4
NAG2G
49.7
64.6
69.3
74.0
Table 1: USPTO-Full test results. Top- k accuracy (%).
Pred.
Oracle
Graph changes
RetroDiT
RetroGEF
RetroDiT
RetroGEF
≤5
65.1
67.6
78.7
81.9
6–10
45.1
48.8
57.3
63.2
11–20
32.6
36.8
43.8
52.1
>20
25.7
29.5
33.6
42.5
Table 3: Transformation complexity on USPTO-Full. Top-1 accuracy (%) on 90,598 shared test products.
Added atoms
RetroGEF
RetroDiT
1
3
5
10
1
3
5
10
0
84.8
91.5
93.0
93.6
71.9
85.4
88.2
90.5
1–2
79.2
90.6
92.0
92.7
76.4
88.6
90.8
92.4
3–5
56.0
71.1
74.7
77.0
49.4
67.7
72.5
76.6
6–10
54.4
68.1
70.9
73.1
47.1
63.8
68.6
72.4
11–20
33.4
45.0
47.8
50.0
26.0
40.1
45.6
50.4
Table 4: USPTO-Full by added atoms. Oracle test accuracy (%) under the common decoding budget.
Figure 4: Accuracy across all ten USPTO-50K reaction classes. Shared nonuniform radial scale (%), labeled in the first panel. FG: functional group.
Oracle
Pred.
Variant
Top-1
Top-10
Top-1
Top-10
USPTO-50K
Reference
72.3
97.0
62.4
91.9
Constant addition rate
72.1
93.0
61.4
88.1
Uniform time sampling
71.6
95.8
61.2
90.5
No edge-feature updates
73.8
96.4
62.4
91.5
Table 5: Training and architecture variants. Test accuracy (%) on USPTO-50K and USPTO-Full.
Figure 5: USPTO-Full Oracle Top-1 predictions.
Figure 6: A sampled ten-edit construction path for a USPTO-50K protection reaction. The two rows list edits 0–4 and 5–10; the final panel is the complete reactant set.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Edit type
Location
Attributes
State change
Δ∣V∣
Δ∣E∣
Attached atom addition
existing atom
m,e
+1
+1
Isolated atom addition
graph
m
+1
0
Generated-atom deletion
most recent generated leaf/isolated u
none
−1
−d(u)
Bond addition
absent unordered pair
e
0
+1
Bond deletion
existing bond
none
0
−1
Appendix
Table 8: Complete graph edits and their state effects. A selected edit contains all fields needed to construct its deterministic successor. Here m and e are complete atom and bond attribute tuples, and d(u) is the current degree of a deleted atom. All edit types preserve unrelated graph records.
Dataset
Variant
Oracle
Pred.
1
3
5
10
1
3
5
10
USPTO-50K
Reference
72.3
92.9
96.0
97.0
62.4
82.8
88.6
91.9
Constant addition rate
72.1
89.0
91.3
93.0
61.4
80.9
85.1
88.1
Uniform time sampling
71.6
91.5
94.5
95.8
61.2
82.3
87.4
90.5
No edge-feature updates
73.8
92.6
95.5
96.4
62.4
83.8
88.4
91.5
USPTO-Full
Reference
68.6
80.7
82.8
84.1
54.3
70.1
74.1
77.1
Appendix
Table 9: Training and architecture variants. Test Top- 1/3/5/10 accuracy (%).
Condition
Partial hints
Recovery
Top- k
1
3
5
10
Pred.
Reference
62.4
82.8
88.6
91.9
✓
–
62.8
83.6
88.0
90.4
–
✓
60.2
81.1
85.4
88.0
✓
✓
63.3
82.8
88.2
90.2
Oracle
Reference
72.3
92.9
96.0
97.0
Appendix
Table 10: Supervision comparison on USPTO-50K. Top- k accuracy (%): reference on test, training variants on validation. Column maxima are bold.
Reaction class
n
Method
Pred.
Oracle
Top-1
Top-3
Top-5
Top-10
Top-1
Top-3
Top-5
Top-10
Alkyl./aryl.
1,516
RetroDiT
65.1
85.4
90.6
94.3
73.7
92.2
96.4
98.3
RetroGEF
67.5
85.4
90.8
93.6
74.5
94.2
97.6
98.0
Acylation
1,188
RetroDiT
74.9
91.9
94.6
96.2
82.2
97.4
98.2
98.7
RetroGEF
75.4
92.8
95.8
97.0
81.4
97.0
98.0
98.1
C–C formation
511
RetroDiT
41.9
63.2
69.9
75.0
55.4
80.2
87.1
92.0
Appendix
Table 11: USPTO-50K accuracy by reaction class. Top- k accuracy (%) on 4,930 paired products; bold denotes the larger value in each pair. FG denotes functional-group interconversion.
Figure 7: Reactant construction on USPTO-Full under Oracle conditioning. Added atoms are orange; the panels illustrate fragment recovery, coupling partner recovery, and bond-order revision.
Figure 8: Complete trajectories for USPTO-50K classes 1–6. Orange marks added atoms and their bonds; blue marks changes to inherited atoms or bonds. Every arrow represents one edit.
Figure 9: Complete trajectories for USPTO-50K classes 7–10. The oxidation example shows all 14 edits, including ten atom additions.
Figure 10: Complete trajectories across USPTO-Full graph-edit families. The three paths contain 14, nine, and four edits; each path is shown on its recorded inference grid.