---
title: 'ADFLIP: Inverse Protein Folding with All-Atom Flow'
url: https://www.emergentmind.com/topics/adflip
type: topic
---

# ADFLIP: Inverse Protein Folding with All-Atom Flow

Searching arXiv for the cited ADFLIP paper and directly related methods mentioned in the provided data.
Search query: arXiv id 2507.14156
ADFLIP, short for **All-atom Discrete FLow matching Inverse Protein folding**, is a generative model for inverse protein folding that designs amino-acid sequences conditioned on **all-atom structural contexts**, including complexes containing **small-molecule ligands, nucleotides, or metal ions**, and can operate over **multiple structural states** such as **NMR ensembles** [2507.14156]. It frames sequence design as a **discrete flow-matching** problem over amino-acid tokens, progressively incorporates predicted side-chain structure during denoising, supports **training-free classifier guidance** for sequence-level objectives, and reports **state-of-the-art performance** on single-structure and multi-structure inverse folding tasks [2507.14156].

## 1. Conceptual scope and problem setting

Inverse protein folding seeks a sequence of amino acids that adopts a target protein structure. In the formulation used by ADFLIP, the relevant target is not restricted to a protein backbone alone, but may include an **all-atom environment** containing non-protein components and, in the dynamic setting, a set of conformational states rather than a single static structure [2507.14156].

The model is motivated by two limitations identified for prior inverse folding methods. First, many such methods struggle on complexes that contain **non-protein components**. Second, they perform poorly when complexes adopt **multiple structural states**. ADFLIP addresses both by conditioning sequence generation on all-atom structural context and by averaging information across ensembles of structures during sampling [2507.14156].

This design scope places ADFLIP at the intersection of inverse folding, all-atom structural modeling, and conditional generative modeling. The paper situates this direction against the backdrop of recent progress in biomolecular structure modeling, noting that the breakthrough of **AlphaFold3** in modeling complex biomolecular interactions creates new opportunities for protein design [2507.14156]. A plausible implication is that inverse folding systems can increasingly be evaluated not only on isolated proteins but also on chemically heterogeneous complexes and conformationally distributed targets.

## 2. Discrete flow-matching formulation

ADFLIP casts sequence generation as a **continuous-time, discrete Markov flow** from a fully masked sequence to the target amino-acid sequence. Let
$$
s_t \in \{1,\ldots,20\}\cup\{m\}^L
$$
denote the sequence at time $t \in [0,1]$, where $m$ is a learned mask token and $L$ is sequence length [2507.14156].

The forward conditional law linearly interpolates between an all-mask state at $t=0$ and the true sequence $s_1$ at $t=1$:
$$
p_{t|1}(s_t=i \mid s_1)=
\begin{cases}
t, & \text{if } i=s_1 \\
1-t, & \text{if } i=m \\
0, & \text{otherwise.}
\end{cases}
$$
Equivalently,
$$
p_{t|1}(s_t)=\mathrm{Cat}\bigl(t\cdot \delta_{s_1,i} + (1-t)\cdot \delta_{m,i}\bigr).
$$

The marginal at intermediate times is
$$
p_t(s_t)=E_{s_1\sim p_{\mathrm{data}}}[p_{t|1}(s_t|s_1)].
$$
To simulate transitions, the model introduces a rate matrix $R_t(s_t,j)\ge 0$ for $j\ne s_t$ such that, for infinitesimal $dt$,
$$
\Pr[s_{t+dt}=j \mid s_t] \approx \delta_{s_t,j} + R_t(s_t,j)\,dt.
$$
In practice, ADFLIP uses an Euler discretization with step $\Delta t$:
$$
s_{t+\Delta t} \sim \mathrm{Cat}\bigl(\delta_{s_t,i} + R_t(s_t,i)\Delta t\bigr).
$$

Learning proceeds by denoising. The reverse rates satisfy
$$
R_t(s_t,j)=E_{s_1\sim p_{1|t}(s_1|s_t)}[R_t(s_t,j|s_1)],
$$
with oracle conditional rate
$$
R_t(s_t,j|s_1)=\delta_{s_1,j}\,\delta_{s_t,m}/(1-t).
$$
Accordingly, the central learning problem is to approximate the posterior $p_{1|t}(s_1|s_t)$ using a neural denoiser $f_\theta$, written as
$$
p_\theta(s_1|s_t,\chi_t),
$$
where $\chi_t$ encodes side chains incorporated so far. Training samples $t\sim \mathrm{Uniform}[0,1]$, $s_1\sim p_{\mathrm{data}}$, and $s_t\sim p_{t|1}(\cdot|s_1)$, removes side chains at masked positions, and minimizes the cross-entropy
$$
L_{\mathrm{CE}} = E_{t,s_1,s_t}\bigl[-\log p_\theta(s_1|s_t,\chi_t)\bigr].
$$

This construction makes ADFLIP a discrete generative flow over amino-acid tokens rather than a direct autoregressive or one-shot conditional predictor. The significance of that choice is functional: sequence generation is staged through a denoising trajectory in which structural context can be updated as more residues become fixed.

## 3. Progressive side-chain conditioning and all-atom context

A defining feature of ADFLIP is its **progressive side-chain conditioning**. The rationale stated in the paper is that **side chains mediate most ligand, metal-ion and nucleotide contacts**. Instead of conditioning solely on backbone geometry, the model interleaves sequence denoising with side-chain packing, so that newly predicted residue identities can contribute explicit atomic context to subsequent denoising steps [2507.14156].

Sampling begins from
$$
s_0=(m,\ldots,m), \quad \chi_0=\varnothing, \quad t=0.
$$
At each step, for each structure $x^n$ in the input set, the denoiser computes
$$
p^n(s_1)=f_\theta(s_t,x^n,\chi_t).
$$
These are averaged into an ensembled sequence distribution,
$$
p(s_1)=\frac{1}{N}\sum_n p^n(s_1).
$$
A sample $s_1$ is then drawn; for each conformation, a side-chain packer $g_\eta$ predicts side chains
$$
\chi_1^n = g_\eta(s_1,x^n).
$$
The reverse step is applied, and $\chi_{t+\Delta t}$ becomes the union of $\chi_1^n$ over $n$, with atoms removed at still-masked positions.

The operationally crucial rule is that once a position is sampled and is no longer masked, its side-chain atoms are **permanently added** to $\chi$ for downstream denoising, whereas masked positions never carry side chains. This creates a progressive accumulation of atomistic context over the denoising trajectory [2507.14156].

In methodological terms, ADFLIP therefore differs from backbone-only inverse folding schemes by explicitly coupling sequence uncertainty to a partially realized side-chain environment. This suggests that the model is designed to improve sensitivity to chemically specific contacts at interfaces involving ligands, ions, and nucleotides.

## 4. Ensemble conditioning and training-free guidance

ADFLIP natively supports **dynamic complexes** by conditioning on multiple structural states. Given structures $\{x^n\}_{n=1}^N$, the model feeds each conformation to the denoiser and averages the resulting conditional sequence distributions:
$$
p(s_1|s_t)=\frac{1}{N}\sum_n f_\theta(s_t \mid x^n,\chi_t).
$$
In experiments on NMR ensembles with average $N\approx 18$, using all conformations simultaneously reduced perplexity and increased recovery by up to $\sim 8\%$ relative to single-structure designs [2507.14156].

The same sampling framework also supports **training-free classifier guidance**. To steer generation toward a property $y$ computed by a pretrained regressor $h_\phi(s_1)$, ADFLIP uses
$$
p(y|s_t)=E_{s_1\sim p_\theta(s_1|s_t)}[p_\phi(y|s_1)].
$$
The method does not retrain $h_\phi$ on partial sequences. Instead, during sampling it approximates the score $\nabla_{s_1}\log p(y|s_1)$ by the pseudo-gradient of $\|y-h_\phi(s_1)\|^2$ and reweights $p_\theta(s_1|s_t)$ accordingly [2507.14156].

Algorithmically, guidance proceeds by first computing the ensembled $p(s_1)$, then evaluating
$$
\hat y = h_\phi(p(s_1)),
$$
computing a guidance factor
$$
g_i \propto \exp(-\lambda \|y-\hat y\|^2)
$$
in logit space, reweighting the sequence distribution, and continuing with side-chain update and reverse discretization. The paper characterizes this as a **plug-and-play** scheme that can use arbitrary pretrained models, including **AlphaFold confidence** and **DSMBind affinity**, without retraining [2507.14156].

Two aspects are notable. First, ensemble conditioning and guidance are both integrated into the same denoising trajectory rather than treated as post hoc reranking. Second, the reported guidance results expose an explicit trade-off: property optimization can improve the targeted objective while reducing foldability relative to unguided sampling.

## 5. Architecture, dataset, and implementation

The training data comprise structures from the **PDB** satisfying the filters **post-December 16 2022**, **resolution $\le 3.5$ Å**, and **$<6{,}000$ residues**, followed by clustering at **30% identity by MMseqs2** [2507.14156]. The resulting split contains **27 818 clusters** in training and a held-out test set of **317 small-molecule complexes, 74 nucleotide complexes, and 83 metal-ion complexes**.

The denoiser is a **multi-scale GNN with atom and residue nodes**. Its atom encoder uses **Fourier embeddings of residue/chain indices, element/type one-hots, diffusion time**, and **local Invariant Point Attention with frame averaging**. Its residue encoder uses **$k$-nearest neighbour geometric features (distances, angles)** to both backbone residues and all non-protein atoms. The trunk alternates **Local Atom Attention**, **Atom→Residue aggregation**, **message-passing GNN**, and **Residue→Atom scattering**, with an optional non-protein context block and diffusion-time modulation. The decoder is a **three-layer Transformer over residue nodes**, with **GeLU activations** and a final linear layer to **21 logits** [2507.14156].

For side-chain prediction, ADFLIP uses the **PIPPack network** $g_\eta$, identified in the paper as **PIPPack (Randolph & Kuhlman 2024)**, to predict $\chi$ from $(s_1,x)$ [2507.14156]. Optimization uses the cross-entropy objective defined above, averaged over $t\sim U[0,1]$, sequences, and structures. The paper explicitly notes that it **does not specify batch size, learning rate, optimizer, or regularization**.

The implementation is publicly available, with **code and pretrained weights** released at the project repository. The repository-level interface supports design from a single structure or an ensemble, accepts non-protein inputs such as ligands, and exposes guidance settings such as **DSMBind** and a **target gain** parameter [2507.14156]. This indicates a deployment model in which the research contribution is packaged not only as a benchmarked method but also as a reusable sampling system for new targets.

## 6. Benchmarks, performance, and interpretive context

ADFLIP was benchmarked against **PiFold**, **ProteinMPNN**, and **LigandMPNN** on held-out complexes. The primary metrics were **perplexity**, defined as $\exp(-\text{avg log-likelihood})$ over interface residues, and **sequence recovery rate**, defined as the fraction of native amino acids recovered at masked positions. Foldability was assessed by refolding with **Chai-1** and computing **RMSD**, **TM-score**, and **pLDDT** [2507.14156].

On **small molecules**, ADFLIP achieved **perplexity 3.57** and **recovery 62.2%**, compared with **LigandMPNN 3.84 and 59.2%**, **PiFold 4.03 and 59.2%**, and **ProteinMPNN 4.46 and 54.5%**. On **nucleotides**, it achieved **perplexity 4.86** and **recovery 50.2%**, versus **LigandMPNN 4.97 and 46.1%**. On **metal ions**, it achieved **perplexity 2.61** and **recovery 75.7%**, versus **LigandMPNN 2.73 and 69.3%** [2507.14156]. These results are presented as **state-of-the-art performance** on the tested single-structure tasks.

Foldability results follow the same pattern. For **small molecules**, ADFLIP reached **RMSD 1.15 Å, TM 0.96, pLDDT 90.6, and 100% foldability**, compared with **LigandMPNN 1.21 Å, TM 0.95, 94.6, and 98.8%**. For **nucleotides and metals**, the paper reports similar gains, giving as one example **nucleotide RMSD 5.55 Å vs 5.99 Å** [2507.14156].

The multi-structure setting is central to the method’s intended use. On NMR ensembles, using **all conformations** rather than a single snapshot improved recovery by **+8.6% for small molecules, +5.8% for nucleotides, and +2.6% for metals**, while reducing perplexity accordingly; ensemble foldability RMSD improved from **9.10 Å to 7.21 Å** [2507.14156]. These results support the claim that ADFLIP is not merely tolerant of conformational heterogeneity but is specifically designed to exploit it.

Classifier guidance introduces a more nuanced picture. With **DSMBind** and a target **+10% binding gain**, the **unguided** setting yielded **41.9% of designs exceeding wild-type affinity** with **100% foldable**, whereas the **guided** setting yielded **58.1% exceeding wild-type affinity** with **91.4% foldable** [2507.14156]. A common misconception would be to treat guidance as universally improving all downstream properties simultaneously. The reported data instead indicate a targeted optimization mechanism that can improve the chosen property while reducing another criterion, here foldability.

Taken together, the empirical profile of ADFLIP is that of an inverse folding model specialized for **all-atom, chemically heterogeneous, and conformationally distributed design problems**. Its main technical identity derives from the combination of **discrete flow matching**, **progressive side-chain conditioning**, **ensemble averaging across structural states**, and **training-free guidance**, all within a single generative sampling framework [2507.14156].

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