Robust Inference-Time Steering of Protein Diffusion Models via Embedding Optimization

Minhuan Li, Jiequn Han, Pilar Cossio, Luhuan WuNeurIPS 2026

TL;DR

Protein structure models like AlphaFold 3 have strong "habits"—they love predicting one dominant shape for a protein, even when lab experiments capture it in a completely different pose. Instead of fighting the model by forcibly shoving 3D atoms around to match experimental data, EmbedOpt gently tweaks the model’s internal sequence embeddings during generation. This shifts the model's underlying structural intuition on the fly, yielding physically realistic protein structures with far fewer steps and dramatically less hyperparameter headaches.

What Problem Does This Paper Address?

Proteins aren't rigid sculptures; they are dynamic machines that bend and twist to do their jobs. Biologists use lab techniques—like cryo-electron microscopy (cryo-EM), which gives 3D density blobs, or chemical cross-linking, which measures distances between specific amino acids—to catch proteins in these alternative poses. Turning that noisy, incomplete lab data into an exact 3D atomic structure is a classic inverse problem.

Recently, researchers started using pretrained diffusion models (like AlphaFold 3) as "priors" to fill in the blanks while using lab data to steer the generation. The standard steering method, Diffusion Posterior Sampling (DPS), nudges the noisy 3D atomic coordinates at each denoising step toward shapes that match the experiment.

Here’s the catch: pretrained models are stubborn. Their probability mass is often tightly concentrated around one dominant conformation. If your lab experiment captured a rare state, the prior and the data barely overlap. To get DPS to care about the lab data, you have to crank up the guidance weight—which destabilizes the math, mangles the protein's chemical geometry, and requires agonizing hyperparameter tuning.

Figure 1: (a) Illustration of DPS vs. EmbedOpt under prior–measurement mismatch. The diffusion prior has limited overlap with the measurement (top), so both the exact posterior and DPS samples remain distant from it (second). Upweighting the likelihood pulls DPS samples closer but produces an ill-conditioned sampling landscape (third). EmbedOpt (bottom) instead iteratively updates the conditional embedding, dynamically shifting the prior to produce samples concentrating around the measurement (see Appendix C). (b) Schematic of EmbedOpt. EmbedOpt adapts a pretrained diffusion model at inference time through optimization of the conditional embedding to maximize an experimental likelihood reward R(·). (Top) In a single forward pass, the embedding is updated ct →ct−1 using gradients from the denoised structure ˆxθ, greedily increasing the reward. (Bottom) We instantiate EmbedOpt on an AlphaFold 3-style backbone, where the Conditioning Module embeds sequence and MSA inputs into the initial embedding cT .

Methods

Instead of shoving coordinates around against a fixed prior, the authors introduce an orthogonal axis: optimize the prior itself at inference time.

In AlphaFold 3-style architectures (the authors use an open-source reproduction called Protenix), sequence and evolutionary data (MSAs) are compressed into conditional embeddings—specifically, single-residue ($s$) and residue-pair ($z$) representations—before entering the diffusion module. These embeddings dictate the model's structural preferences.

EmbedOpt treats structure determination as adaptive-prior reward maximization:

  1. At each diffusion step $t$, the denoiser predicts a clean 3D structure from the current noisy coordinates and current embeddings.
  2. A differentiable reward function scores how well this predicted structure matches the lab data (e.g., correlation with a cryo-EM map).
  3. Rather than backpropagating through the whole trajectory, EmbedOpt takes a single, lightweight gradient ascent step—normalized via blockwise Root Mean Square (RMS)—to update the embeddings ($c_t \rightarrow c_{t-1}$).
  4. The updated embedding then guides the standard coordinate denoising step.

Nothing is fine-tuned; model weights stay frozen, and you only tune the base learning rate and step count.

Datasets

EmbedOpt is purely an inference-time method (no training datasets needed) and is evaluated across three benchmarks:

  • Sparse Distance Constraints (Newly Assembled): 24 multi-domain flexible proteins from recent literature, using 20 oracle-selected residue-pair distance restraints with the largest prior-to-target discrepancies as a stress test.
  • Synthetic Cryo-EM Maps (Newly Assembled): 77 diverse, high-resolution (<4.5 Å), low-homology (<25% sequence similarity) PDB structures simulated into 5.0 Å density maps.
  • Real Experimental Cryo-EM Maps: 6 noisy, real-world targets of varying resolutions taken from the published CryoBoltz benchmark.

Key Insights and Ideas

  • Natural Preconditioning in Embedding Space: Mathematically, both DPS and EmbedOpt use the same reward gradient, but transform it differently. DPS pulls the gradient back through the denoiser's sensitivity to noisy coordinates, creating volatile trajectories. EmbedOpt projects it through the embedding Jacobian ($J_c J_c^\top$), acting as a smooth preconditioner that keeps updates aligned with chemically valid protein geometry.
  • Local Trust-Region Behavior: The authors prove theoretically—and verify empirically—that for small steps, EmbedOpt guarantees monotonic improvement of the surrogate reward. While DPS bounces around erratically, EmbedOpt glides smoothly upward.
Figure 2: Distance Constraint Benchmark. (a) Optimization Trajectory: Representative reward traces show a smooth and monotonic EmbedOpt increase, while DPS has high-frequency volatility. (b) Step-Efficiency Scaling: Constraints passed (left) and MolProbity score (right) as a function of the number of diffusion steps. DPS performance deteriorates sharply below 100 steps, whereas EmbedOpt maintains a median constraint satisfaction rate above 75% and lower MolProbity scores.
  • Set-It-and-Forget-It Robustness: Because updates stay on the learned structural manifold longer, EmbedOpt works across learning rates spanning two orders of magnitude ($0.01$ to $1.0$). DPS only works in a razor-thin window before producing atomic spaghetti.

Key Results

  • 4× Fewer Diffusion Steps: On distance constraints, EmbedOpt maintains near-optimal constraint satisfaction (~20/20 median passed) and healthy stereochemistry (MolProbity score < 2.0) down to 50 steps (from 200), whereas DPS collapses below 100 steps. (Per-step compute is 1.4–1.8× higher than DPS due to one extra forward pass, making the 4× step reduction a clear net win).
  • Escaping Local Optima: On hard synthetic cryo-EM targets (e.g., PDB 8H1I, requiring massive domain reorientation), the unguided prior scores a map correlation of 0.42, DPS gets stuck at 0.58, and EmbedOpt nails the rearrangement at 0.93.
  • Beating the State of the Art: On real cryo-EM maps, using a single fixed learning rate ($\alpha = 0.1$) and half the steps (100 vs. 200), EmbedOpt outperforms the published CryoBoltz baseline across data fit, physical plausibility, and reference RMSD on 5 out of 6 targets.

Limitations and Future Work

  • Manifold Coverage: EmbedOpt can only steer within what the base model knows. If evolutionary data (MSA) is missing or a target is wildly out-of-distribution, neither EmbedOpt nor DPS can find it.
  • Reward Hacking at Extremes: Pushing learning rates way too high can still pull embeddings off-manifold, causing local chemical violations (though much later and milder than DPS). Physics-aware regularization or variational bottlenecks during pretraining could help.
  • Complementary Local Optima: Occasionally, EmbedOpt's smooth deterministic path gets stuck in an embedding-space local optimum that DPS's noisy coordinate kicks manage to escape. The authors pilot a promising hybrid approach—running EmbedOpt first, then switching to DPS—suggesting that combining both axes is a rich direction for future work.

Summary updated

Abstract

A core challenge in structural biophysics is generating biomolecular conformations that are both physically plausible and consistent with experimental measurements. While sequence-to-structure diffusion models provide powerful priors, posterior sampling methods steer generation by perturbing atomic coordinates with gradients from experimental likelihoods. However, when the target lies in a low-density region of the prior, these methods require aggressive upweighting of the likelihood that can destabilize sampling and be sensitive to hyperparameters. We propose EmbedOpt, an inference-time steering framework that introduces an orthogonal optimization axis: rather than performing posterior sampling under a fixed prior, EmbedOpt directly optimizes the prior by updating the model's conditional embedding. This embedding space encodes rich coevolutionary signals, so optimizing it shifts the structural prior to align with experimental constraints. Empirically, EmbedOpt matches coordinate-based posterior sampling baselines on sparse distance constraints and outperforms them on cryo-electron microscopy map fitting, including real, noisy experimental ones. Furthermore, EmbedOpt's smooth optimization behavior yields robustness to hyperparameters spanning two orders of magnitude and enables comparable performance with fewer diffusion steps.
BibTeX
@inproceedings{li2026robust,
  author = {Minhuan Li and Jiequn Han and Pilar Cossio and Luhuan Wu},
  title = {{Robust Inference-Time Steering of Protein Diffusion Models via Embedding Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=DUpxIDDWMK},
}
Figure