---
title: 'FoldFlow-SFM: Stochastic SE(3) Protein Design'
url: https://www.emergentmind.com/topics/foldflow-sfm
type: topic
---

# FoldFlow-SFM: Stochastic SE(3) Protein Design

FoldFlow-SFM is a stochastic generative modeling framework for protein backbone generation that operates on the Lie group of 3D rigid motions, $\text{SE}(3)$, integrating simulation-free flow matching, Riemannian optimal transport (OT), and stochastic bridge dynamics. Designed to address challenges in generating accurate, designable, diverse, and novel protein structures, FoldFlow-SFM learns continuous-time stochastic differential equations (SDEs) on $\text{SE}(3)$, coupling rotational and translational dynamics. It enables stable and efficient mapping from arbitrary source distributions to invariant target distributions, improving on the limitations of previous diffusion-based approaches in both training speed and expressiveness [2310.02391].

## 1. Mathematical Formulation on $\text{SE}(3)$

FoldFlow-SFM operates in the space of 3D rigid motions, with each element $X = (R, s)$ where $R \in SO(3)$ and $s \in \mathbb{R}^3$. The model defines time-indexed SDEs that decompose into a rotational Brownian bridge on $SO(3)$ and a Euclidean bridge on $\mathbb{R}^3$. The forward-inference SDEs, used in generation and trained in reverse, are:

- **Rotation** ($SO(3)$):
  $$
  dR_t = v_\theta(t, R_t)dt + \gamma_r(t) dB_t
  $$
- **Translation** ($\mathbb{R}^3$):
  $$
  dS_t = v_\theta(t, S_t)dt + \gamma_s(t) dW_t
  $$

where $v_\theta$ are trainable drift fields, $B_t$ and $W_t$ are Brownian motions on $SO(3)$ and $\mathbb{R}^3$ respectively, and $\gamma_r(t)$, $\gamma_s(t)$ are time-dependent noise scales. The guided bridge dynamics, conditioned on initial and terminal states, are expressed using the Riemannian log-map:

- **Rotation Bridge**:
  $$
  dR_t = \frac{\log_{R_t}(R_0)}{t}dt + \gamma_r(t) dB_t
  $$
- **Translation Bridge**:
  $$
  dS_t = \frac{S_t - S_0}{t}dt + \gamma_s(t) dW_t
  $$

These dynamics enable direct sampling and interpolation between boundary conditions, critical for protein backbone design.

## 2. Flow-Matching Objective and Loss

FoldFlow-SFM utilizes a flow-matching paradigm, regressing a neural drift field $v_\theta$ against the conditional bridge drift $u_t(x | x_0, x_1) = \frac{\log_{x_t}(x_0)}{t}$ under a coupling plan $\pi(x_0, x_1)$ on $SE(3)$. The stochastic flow-matching loss is:

$$
\mathcal{L}_{\text{SFM}}(\theta) = \mathbb{E}_{t, (x_0,x_1), x_t} \| v_\theta(t, x_t) - \frac{\log_{x_t}(x_0)}{t} \|^2_g
$$

where $\| \cdot \|_g$ represents the Riemannian norm on $T_{x_t}SE(3)$. This objective ensures the learned flow aligns with the true dynamics of the stochastic bridges over time, facilitating the generative process for structured protein backbones.

The 2-Wasserstein (OT) cost between marginals $\rho_0$ and $\rho_1$ is defined as:

$$
W_2(\rho_0, \rho_1)^2 = \inf_{\pi \in \Pi(\rho_0, \rho_1)} \int_{SE(3) \times SE(3)} \frac{1}{2} d_{SE(3)}(x, y)^2 d\pi(x, y)
$$

where $d_{SE(3)}$ denotes the geodesic distance on $SE(3)$.

## 3. Incorporation of Riemannian Optimal Transport

FoldFlow-SFM incorporates optimal transport to efficiently couple source and target distributions. Geodesic distances on $SE(3)$ with the standard left-invariant metric split into rotation and translation components:

$$
d_{SE(3)}((R, s), (R', s')) = \sqrt{d_{SO(3)}(R, R')^2 + \|s - s'\|^2}
$$

with
$$
d_{SO(3)}(R, R') = \| \log(R^\top R') \|_F.
$$

Replacing independent couplings with the OT plan $\pi$ in the flow-matching loss results in OT-regularized flow-matching, empirically reducing variance in the regression loss and accelerating convergence. Conditional paths between paired samples become geodesic ("straight") in probability space, yielding more stable learning trajectories.

## 4. Algorithmic Structure and Training

The FoldFlow-SFM training loop operates over protein backbones of $N$ frames (elements of $SE(3)^N$), utilizing both OT coupling and stochastic perturbations. The high-level training procedure is as follows:

1. Sample $t \sim \mathrm{Uniform}(0, 1)$.
2. Draw $(x_0, x_1) \sim \Pi(\rho_0, \rho_1)$ via a mini-batch OT routine.
3. For each frame $i = 1 \ldots N$, compute the geodesic interpolant $x^t_i = \exp_{x_{0i}}(t \cdot \log_{x_{0i}}(x_{1i}))$.
4. Sample bridge perturbations:
   - $\tilde{R}_{it} \sim IG(R_{it}; \gamma_r(t)^2 t(1-t))$
   - $\tilde{s}_{it} \sim \mathcal{N}(s_{it}, \gamma_s(t)^2 t(1-t))$
5. Compute drift target:
   - $u_{it} = \log_{\tilde{R}_{it}}(R_{i0})/t \oplus (\tilde{s}_{it} - s_{i0})/t$
6. Compute flow loss: $L_{\text{flow}} = \| v_\theta(t, \tilde{X}_t) - u_t \|^2_\Sigma$
7. Add auxiliary loss: $L_{\text{aux}} = \lambda_{\text{aux}} \cdot $ (structure + distance-map losses on predicted $x_0$)
8. Update parameters: $\theta \leftarrow \theta - \eta \nabla_\theta (L_{\text{flow}} + L_{\text{aux}})$

Hyperparameters include a learning rate of $10^{-4}$ (Adam optimizer), noise scales such as $\gamma_r(t) = \gamma_0 \sqrt{t(1-t)}$ with $\gamma_0 \approx 0.5$, auxiliary weight $\lambda_{\text{aux}} \approx 0.25$ (for $t < 0.25$), and an effective batch size inversely scaling with $N^2$ ($\approx 500,\!000/N^2$). At generation time, inference annealing is used, scaling the drift by $i(t) = c \cdot t$ with $c \approx 10$ [2310.02391].

## 5. Empirical Evaluation and Comparative Results

FoldFlow-SFM was evaluated on protein backbone generation tasks with sequence lengths $N \in \{100,150,200,250,300\}$, using metrics of designability (fraction of generated backbones refolded by ProteinMPNN→ESMFold with C$_\alpha$-RMSD < 2Å), diversity (average pairwise TM-score among designable samples), and novelty (fraction and mean maximum TM-score to the training set).

Key results, reported as mean ± standard error over 5 seeds, are summarized below:

| Model                | Designable %       | scRMSD (Å)      | Novel frac      | avg max TM    | Diversity (TM) |
|----------------------|-------------------|-----------------|-----------------|---------------|----------------|
| FoldFlow-Base        | 65.7 ± 4.2        | 3.00 ± 0.27     | 43.2 ± 7.4      | 0.452 ± 0.024 | 0.264          |
| FoldFlow-OT          | 82.0 ± 3.7        | 1.81 ± 0.25     | 48.4 ± 6.8      | 0.460 ± 0.020 | 0.247          |
| FoldFlow-SFM         | 71.6 ± 4.0        | 2.30 ± 0.39     | 54.4 ± 6.1      | 0.411 ± 0.023 | 0.248          |
| FrameDiff-Improved   | 55.5 ± 7.1        | 2.93 ± 0.35     | 29.6 ± 11.2     | 0.457 ± 0.026 | 0.278          |
| RFdiffusion*         | 96.9 ± 2.3        | 0.65 ± 0.14     | 70.8 ± 6.0*     | 0.449 ± 0.012*| 0.256          |

*RFdiffusion results correspond to a pretrained model on a larger dataset.

FoldFlow-OT achieves the highest non-pretrained designability. FoldFlow-SFM, with its stochastic bridge construction, results in the highest novelty, indicating improved off-support sampling due to the stochastic dynamics. Training is more than twice as fast per step compared to FrameDiff, as repeated score computations are unnecessary.

## 6. Advantages, Limitations, and Analysis

FoldFlow-SFM leverages OT couplings to generate "straight" McCann interpolants in probability space, empirically reducing regression variance and expediting convergence. Stochastic bridges confer robustness in high dimensions and foster sampling that extends beyond the strict support of deterministic ODE flows, reducing mode collapse and increasing sample novelty.

Unlike classical diffusion models, FoldFlow-SFM's flow-matching framework permits arbitrary source distributions, not restricted to Gaussian priors, supporting applications such as equilibrium sampling. The method is simulation-free, bypassing computational bottlenecks typical of score-matching and diffusion-based models.

A plausible implication is that stochasticity in the flow-matching setup allows FoldFlow-SFM to explore protein conformational space more broadly, achieving superior novelty at a modest cost to designability relative to its deterministic and deterministic-OT counterparts.

## 7. Broader Context and Related Research

FoldFlow-SFM is part of the broader FoldFlow family, which also includes FoldFlow-Base (deterministic, simulation-free) and FoldFlow-OT (deterministic with OT regularization). These models substantially improve over FrameDiff and offer competitive non-pretrained performance against RFdiffusion, a leading pretrained approach. The integration of SE(3)-stochastic flow matching with Riemannian optimal transport represents a synthesis of manifold generative modeling, optimal transport theory, and protein structure generation [2310.02391].

The formulation, scalability (up to 300 amino acids), and empirical efficiency position FoldFlow-SFM as a robust approach for high-dimensional generative problems involving rigid-body dynamics and symmetry constraints, with implications across computational protein design and related fields.

Source: https://www.emergentmind.com/topics/foldflow-sfm