ConRetroBert: EMA Stabilized Dual Encoders for Template-Based Single-Step Retrosynthesis

Mohammad Jahid Ibna Basher, Ali Khodabandeh Yalabadi, Ivan Garibay, Ozlem Ozmen Garibay
5/12/2026
cs.LG

No confident code implementation found for this paper.

Abstract

Template based single step retrosynthesis predicts reactants by selecting and applying an explicit reaction template, making each prediction traceable to a chemical transformation rule. This is useful for synthesis planning, but template based methods are often viewed as less competitive than template free models because template prediction is commonly formulated as global classification over a long tailed rule library.

Show full abstract

We argue that this weakness is not inherent to templates, but to the learning formulation. We present ConRetroBert, a dual encoder framework that reframes template based retrosynthesis as dense product template retrieval followed by candidate set listwise ranking. Stage 1 uses contrastive pretraining to learn a shared embedding space between products and reaction templates. Stage 2 refines template ranking over mined hard negative candidate sets with a multi positive listwise objective. To enable template side adaptation without destabilizing hard negative mining, ConRetroBert uses a slow moving exponential moving average template encoder for retrieval bank construction while updating the live template encoder through the ranking loss. On the local USPTO-50k benchmark, Stage 2 candidate set ranking improves top-1 reaction accuracy from 50.5% to 61.3%, while EMA stabilized template adaptation further improves it to 62.4%. Fine tuning from a leakage controlled USPTO-Full checkpoint reaches 75.4% top-1 accuracy on USPTO-50k. We also show that retrieval based template prediction is strong in the long tail of rare templates, and that many correct reactant predictions arise from alternative explicit templates rather than only the recorded positive label. Code and data are available at https://github.com/JahidBasher/ConRetroBert.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{basher2026conretrobert,
  title  = {ConRetroBert: EMA Stabilized Dual Encoders for Template-Based Single-Step Retrosynthesis},
  author = {Mohammad Jahid Ibna Basher and Ali Khodabandeh Yalabadi and Ivan Garibay and Ozlem Ozmen Garibay},
  year   = {2026},
  eprint = {2605.12736},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.12736v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.12736.svg)](https://codeofpaper.com/paper/2605.12736)

Discussion