---
title: 'SynBridge: Bidirectional Reaction Model'
url: https://www.emergentmind.com/topics/synbridge
type: topic
---

# SynBridge: Bidirectional Reaction Model

SynBridge is a bidirectional, flow-based generative model designed for multi-task chemical reaction prediction, explicitly modeling the inherently discrete changes in atoms and bonds during chemical transformations. The architecture leverages a discrete flow bridge to interpolate continuously in time between discrete reactant and product molecular graph distributions. By employing a graph-to-graph Transformer framework, SynBridge captures bidirectional chemical transformations, enabling both forward synthesis and retrosynthesis while achieving state-of-the-art results on several reaction benchmarks [2507.08475].

## 1. Discrete Chemical State Modeling

Chemical reactions involve non-continuous changes such as electron transfer, bond formation/breaking, and alterations in atomic charge states. SynBridge formulates the reaction process as a bidirectional translation between two molecular graphs: the reactant graph ($\mathcal{G}_-$, source) and the product graph ($\mathcal{G}_+$, target). Each graph $\mathcal{G} = (\mathcal{V}, \mathcal{E})$ is described by:

- **Atom-level discrete variables:**
  - Atom type $a^{(i)} \in \{1,\dots,M\}$, with one dummy type for atom deletion/appearance.
  - Aromaticity indicator $b^{(i)} \in \{0,1\}$.
  - Formal charge $c^{(i)} \in \{-6,\dots,+6\}$.

- **Bond-level discrete variables:**
  - Entries $r^{(ij)} \in \{0,1,2,3\}$ in adjacency matrix $R$, denoting nonbonded, single, double, and triple bonds.

SynBridge's central innovation is the **Discrete Flow Bridge**, which defines a continuous-time interpolation $p_t$ between the endpoint discrete distributions $p_0$ (reactants) and $p_1$ (products) for each variable $x \in \{a, b, c, r\}$:

\[
p_t(x \mid x_0,x_1) = \alpha_t\,\delta_{x_0}(x) + \beta_t\,\delta_{x_1}(x) + \sigma_t\,U_{1/K}(x),
\]

where $\delta$ is the Kronecker delta, $U_{1/K}$ is the uniform distribution over $K$ classes, and coefficients $(\alpha_t, \beta_t, \sigma_t)$ satisfy specific boundary and normalization constraints. This forms the basis for time-dependent transport between reactant and product states, supporting both synthesis directions.

## 2. Graph-to-Graph Transformer Architecture

SynBridge parameterizes conditional distributions $p_1^\theta(x|x_s, x_0)$ with a modular graph-to-graph Transformer $\phi^\theta$, structured as:

- **MolEncoder:** Processes atom-level embeddings for $(a, b, c)$ via linear layers summed to $Z_{in}\in \mathbb{R}^{N\times D}$. Bond information is integrated ($Z_{\mathrm{msg}} = R Z_{in}$), and a stack of $L_e$ TransformerEncoder layers implements self-attention, yielding $Z_{enc}$. Both the source graph $\mathcal{G}_-$ and the current noisy graph $\mathcal{G}_t$ are encoded separately and summed:
  \[
  Z'_{enc} = Z_{enc,-} + Z_{enc,t}
  \]
- **MergeEncoder:** Incorporates a learnable *task token* $x_{tsk}\in\{0,1\}$ (forward/retro) lifted to $z_{tsk}\in\mathbb{R}^{1\times D}$. $K$ layers of cross-attention Transformer blocks use $z_{tsk}$ as query and $Z'_{enc}$ as key/value, producing $Z'_{merge}$.
- **MolDecoder:** Processes $Z'_{merge}$ through $L_d$ Transformer layers, outputting $Z_{dec}$, which feeds four parallel heads for predicting atom type, aromaticity, charge, and bonds via softmaxed logits.

Training utilizes cross-entropy losses against ground-truth graphs for both reaction directions, with multi-tasking handled via $x_{tsk}$.

## 3. Discrete Flow Bridge Formulation and Training

The flow bridge defines a family of marginals $p_t(x)$ and associated instantaneous probability velocities $v_t(x|x_s, x_0, x_1)$ based on discrete flow matching theory:

\[
v_t(x|x_s, x_0, x_1) = (\dot\alpha_t-\alpha_t\gamma_t)\,\delta_{x_0}(x) + (\dot\beta_t-\beta_t\gamma_t)\,\delta_{x_1}(x) + (\dot\sigma_t-\sigma_t\gamma_t)\,U_{1/K}(x) + \gamma_t\,\delta_{x_s}(x)
\]
with $\gamma_t=\min\{\dot\alpha_t/\alpha_t, \dot\beta_t/\beta_t, \dot\sigma_t/\sigma_t\}$.

Learning is driven by minimizing:

- **Forward direction (reactant→product):**
  \[
  \mathcal{L}_+(\theta) = \mathbb{E}_{(x_0,x_1)\sim\pi,\;x_s\sim p_s(\cdot\mid x_0,x_1)} \mathrm{CE}(p_1^{\theta}(x|x_s,x_0), \delta_{x_1})
  \]
- **Reverse direction (product→reactant):**
  \[
  \mathcal{L}_-(\theta) = \mathbb{E}_{(x_0,x_1)\sim\pi,\;x_s\sim p_s(\cdot\mid x_0,x_1)} \mathrm{CE}(p_0^{\theta}(x|x_s,x_1), \delta_{x_0})
  \]

The losses are combined multi-task via the task token. Noise injection, governed by the schedule 
\[
\alpha_t = \left(1-\sigma\sqrt{t(1-t)}\right)(1-t),\quad \beta_t = \left(1-\sigma\sqrt{t(1-t)}\right)t,\quad \sigma_t = \sigma\sqrt{t(1-t)},
\]
($\sigma \in [0,2]$), provides a balanced degree of stochasticity, ensuring the bridge does not prematurely collapse to either endpoint.

## 4. Multi-Task Reaction Prediction Process

SynBridge implements multi-task learning, randomly choosing task direction at each iteration using the $x_{tsk}$ token. The model predicts either forward (synthesis) or reverse (retrosynthesis) over cleaned, atom-mapped input graphs, without explicit reagent or catalyst information. The sampling procedure for graph generation is conducted via an ODE-style Euler solver over $t \in [0,1]$ in $n$ discrete steps:

\[
\mathcal{G}_{t+h} \sim \delta_{\mathcal{G}_t}(\cdot) + v_{t+h}^\theta(\mathcal{G}_t,\mathcal{G}_-) h
\]

Bidirectionally, this enables SynBridge to serve both major tasks in reaction prediction within a unified framework.

## 5. Experimental Results and Comparative Analysis

Performance is evaluated on three reaction datasets:

| Dataset      | Size (train/val/test) | Notable Features                              |
|--------------|----------------------|-----------------------------------------------|
| USPTO-50K    | 40k/5k/5k            | No ionic species                              |
| USPTO-MIT    | $\sim$480k           | Includes ionic species and charge information  |
| Pistachio    | $\sim$2.8M raw, 478k filtered | High structural diversity and charge diversity   |

The primary evaluation metric is Top-$k$ accuracy (SMILES match from predicted atom/bond states). SynBridge is compared to baselines including MEGAN, NeRF, RetroBridge, T5Chem, G2G-Former, and S2S-Former. Results (Top-1 / Top-3 / Top-5, %):

| Task/Dataset           | SynBridge       | Baseline          |
|------------------------|-----------------|-------------------|
| USPTO-50K forward      | 95.9 / 96.2 / 96.5 | S2S-Former 95.0 / 95.2 / 95.8   |
| USPTO-50K retro        | 79.4 / 84.4 / 85.7 | G2G-Former 53.8 / 77.0 / 79.2   |
| USPTO-MIT forward      | 88.4 / 90.1 / 92.4 | NeRF 87.1 / 88.8 / 89.1         |
| USPTO-MIT retro        | 37.8 / 40.1 / 41.5 | G2G-Former 25.6 / 32.8 / 34.6   |
| Pistachio forward      | 94.8 / 97.4 / 98.0 | NeRF 92.2 / 94.6 / 95.9         |
| Pistachio retro        | 66.1 / 75.0 / 79.3 | G2G-Former 55.6 / 66.5 / 66.7   |

On multi-task retrosynthesis (Pistachio Top-1): SynBridge 71.5%, T5Chem 67.4%. Improvements of 2–10 percentage points across tasks are statistically significant ($p<0.01$, paired bootstrap, 1000 resamples) [2507.08475].

## 6. Ablation Studies and Model Analysis

Systematic ablations on USPTO-MIT forward prediction demonstrate:

- **Role of Initial Graph Input:** Excluding $\mathcal{G}_-$ from $\phi^\theta$ reduces Top-1 accuracy from 88.4% to 66.4%, indicating the necessity of source graph context for message passing.
- **Effect of Uniform Noise Level $\sigma$ (20 steps):**
  - $\sigma=0.0\rightarrow 77.5\%$, $\sigma=0.5\rightarrow 82.1\%$, $\sigma=1.0\rightarrow 88.4\%$, $\sigma=2.0\rightarrow 85.7\%$.
  - Insufficient noise causes model over-confidence and early errors; excessive noise reduces signal quality.
- **Sampling Steps (with $\sigma=1.0$):**
  - $n=1\rightarrow 86.2\%$, $n=10\rightarrow 87.9\%$, $n=20\rightarrow 88.4\%$, $n=100\rightarrow 89.5\%$.
  - Increasing steps enables self-correction, with performance plateauing beyond 20–50 steps.

Key findings include the need for both endpoint context and carefully balanced noise scheduling for robust discrete bridge generation, and superior performance of multi-step bridging over one-step direct mappings, especially for retrosynthesis.

## 7. Context and Significance

SynBridge introduces a principled framework for modeling chemical reaction state transitions as discrete, bidirectional flows, unifying forward synthesis and retrosynthesis tasks in a single architecture and training objective. The discrete flow bridge formulation addresses the fundamental challenge of the non-continuous nature of chemical changes, surpassing prior one-step and diffusion-based architectures in both accuracy and bidirectionality. The approach demonstrates applicability across reaction types, molecular charge states, and dataset diversity, and establishes new benchmarks for data-driven reaction prediction [2507.08475].

Source: https://www.emergentmind.com/topics/synbridge