A Learned Controller for Real-Time Guidance of Protein Structure Diffusion

Modern protein structure predictors like AlphaFold are, at their core, denoisers: a diffusion model — a generator trained to gradually turn random noise into a molecular structure — produces a set of atomic coordinates in seconds to minutes. The newest variants can be guided: while the structure is still forming, one can compute how badly the current intermediate agrees with experimental data (an NMR distance restraint, an X-ray density map) and push the denoising step-by-step toward agreement. This is real-time feedback in the most literal sense — a control loop that closes every few hundred milliseconds of generation. Yet today's guided predictors run that loop open-loop-mindedly: the same guidance force, computed from a fixed loss formula, is applied uniformly to every region at every denoising step, regardless of whether a given stretch of the protein is already converging nicely or drifting toward a physically impossible conformation.

The opportunity is to make the guidance itself a learned, adaptive policy. Research on real-time feedback in other domains — adaptive tutoring, adversarial curriculum generation — has converged on a clear finding: controllers that observe state and decide when and where to intervene beat fixed schedules and post-hoc corrections. This proposal imports that finding into structure prediction. Concretely, we will train a small, fast policy network that watches the intermediate denoising states of a diffusion-based structure predictor and, at each step, decides per-region how strongly to apply guidance — pushing hard where the model is failing restraints or building steric clashes, backing off where it is on track, and suppressing chirality errors before they are baked into the final structure.

Core Claim

The claim is that adaptive, state-conditioned guidance outperforms uniform guidance and post-hoc repair on three measurable axes: matching experimental dynamics (flexibility) that unguided predictors cannot see, suppressing physically invalid structures (clashes, mirrored stereocenters) during generation rather than cleaning them up afterward, and doing so within the wall-clock budget that makes these models useful.

The closest existing work is Inverse problems with experiment-guided AlphaFold, which frames ensemble generation as an inverse problem and integrates physical feedback into AlphaFold3's diffusion during sampling, computing modality-specific gradient updates from X-ray and NMR forward models. It is the direct method substrate we build on — and it explicitly leaves open the exact gap we target: its guidance is a fixed mathematical law applied uniformly, with "no adaptive mechanism to dynamically prioritize specific regional uncertainties or multi-state conformational bottlenecks." Our contribution is precisely that missing mechanism: a controller, not a formula.

Two design constraints come from neighboring work. AgentFold: Closed-Loop Agentic Search for Protein Folding Model Design found that hard interventions — directly forcing geometric corrections into intermediate states — destabilize training and cause collapse, while soft, multiplicative gating stays stable; we therefore route all control through multiplicative gains rather than coordinate edits. And RosettaSearch: Multi-Objective Inference-Time Search for Protein Sequence Design, which closes a feedback loop at the trajectory level (propose a sequence, fold it with a structure predictor, score, revise — ~30 minutes per target, strictly bounded to 75 folding calls), demonstrates both the value of loop closure — one-shot LigandMPNN designs succeeded on only 7.9% of difficult PDB monomers versus 20.5% with its closed-loop search — and its cost: wall-clock dominated by repeated expensive folding calls. Our controller lives inside a single denoising trajectory, where every decision must be nearly free relative to the diffusion backbone.

Research Program

The object we build is a guidance policy $\pi$ operating during reverse diffusion. At denoising step $t$, with intermediate coordinates $x_t$ and experimental data $d$, the standard guided update adds the gradient of a data-mismatch loss $\mathcal{L}$ to the denoiser output. We generalize the fixed guidance law to:

$$x_{t-1}' \;=\; x_{t-1} \;+\; \gamma_t(s_t) \,\odot\, \nabla_{x_t}\, \mathcal{L}(x_{0|t},\, d)$$

where $x_{0|t}$ is the structure the current trajectory is predicted to end at, $\gamma_t(s_t)$ is a vector with one nonnegative gain per residue (or per atom block), and $s_t$ is a cheap state summary computed from the trajectory so far: per-region predicted confidence, counts of van der Waals overlaps, current residuals of the experimental restraints, and, for ligands, the sign of stereocenter geometry. Setting $\gamma_t$ to a constant everywhere recovers exactly the uniform guidance of Inverse problems with experiment-guided AlphaFold, which makes the comparison a controlled ablation of adaptivity alone. The policy's action space is deliberately small: raise, lower, or leave alone the guidance gain in each region, plus a global no-op. The no-op matters — it is the "do not intervene" action that Leveraging Deep Reinforcement Learning for Metacognitive Interventions across Intelligent Tutoring Systems found to be essential for letting capable learners proceed undisturbed, and it guards against the over-steering collapse that AgentFold documents. The policy is a compact network in the Double-DQN style of the metacognitive-intervention work, reading a few hundred state features and emitting gain adjustments in a single forward pass — negligible against the diffusion trunk, so the total runtime stays near the ~14 minutes the guided AlphaFold3 pipeline already reports, rather than the tens of minutes of trajectory-level search loops.

Training proceeds in two stages. First, behavior cloning: we run uniform guidance across training targets, label each (state, step) with the post-hoc judgment of whether raising or lowering the local gain would have reduced final ensemble error, and clone those labels. Second, reinforcement fine-tuning on end-of-trajectory reward: Pearson correlation with experimental flexibility metrics, restraint-violation rate, and physicochemical validity of the final structure. For the fine-tuning curriculum we adapt Heterogeneous Adversarial Play Heterogeneous Adversarial Play in Interactive Environments: an adversarial teacher selects training targets that exploit the current controller's failure points — flexible linkers, weak co-evolutionary signal, antibody–antigen interfaces, exactly the categories where Impact of AlphaFold on structure prediction of protein complexes: The CASP15‐CAPRI experiment shows even the best groups struggle. We adopt HAP's own stabilization lessons (entropy regularization, cold-start, a probabilistic floor of no-op actions) because adversarial loops otherwise collapse into reward gaming.

A secondary analysis treats the controller's learned behavior as a scientific object: which regions get steered early versus late, and whether the policy discovers an interpretable schedule that a human could have written. If it does, that schedule itself becomes a transferable artifact.

Proposed Experiments

Three evaluations, each anchored to a benchmark with reported baseline numbers. First, the ubiquitin NMR benchmark from Inverse problems with experiment-guided AlphaFold: generate conformational ensembles and measure Pearson correlation against experimental N–H $S^2$ order parameters, NOE distance violations, and wall-clock time. The reference points from that paper are $r = 0.72$ for guided generation versus $r = 0.47$ for unguided AlphaFold3, with guided runs at approximately 14 minutes and greater than 15% improvement in NOE violations; our controller must exceed $r = 0.72$ at matched compute to claim the mechanism matters beyond uniform guidance. Second, docking: the PoseX-SD (718 self-docking) and PoseX-CD (1,312 cross-docking) benchmarks from PoseX: AI Defeats Physics-based Methods on Protein Ligand Cross-Docking, where the reported figures are SurfDock's physicochemical validity of 41.7% unrelaxed rising to 73.6% with post-hoc OpenMM relaxation, and approximately 77% cross-docking success for the relaxed hybrid. We apply the controller with clash and chirality guidance terms inside the pose-generating diffusion and ask whether in-flight suppression beats the post-hoc pipeline on both validity and pose RMSD. Third, flexible assemblies in the spirit of the CASP15-CAPRI target set, where high-quality models were achieved for only ~40% of targets despite massive sampling; we report ensemble quality on interface and linker regions, for which no reported result found on Lacuna for any adaptive-guidance method exists — this is genuinely open territory.

Baselines

The "do nothing" reference point is unguided sampling with AlphaFold3 on the NMR task, which Inverse problems with experiment-guided AlphaFold reports at $r = 0.47$ correlation with experimental $S^2$ order parameters, and unrelaxed SurfDock on PoseX-SD at 41.7% physicochemical validity per PoseX. This baseline calibrates how much of the problem the diffusion prior solves alone.

The strongest existing competitor is uniform guided diffusion, the method of Inverse problems with experiment-guided AlphaFold, reported at $r = 0.72$ on ubiquitin $S^2$, greater than 15% NOE-violation improvement, and ~14 minutes per run. It is the strongest because it is the only published method that steers a protein structure diffusion model with real-time physical feedback during sampling — the exact regime we operate in. To keep the comparison fair, we use the same AlphaFold3 diffusion trunk, the same restraint forward models, the same post-sampling AMBER relaxation and pruning, and the same wall-clock budget; our only change is replacing the constant guidance gain with the learned $\gamma_t(s_t)$. Beating it means a statistically significant gain in $r$ (target: an absolute improvement of at least 0.05 on a paired test over target-wise runs) and lower NOE violations at equal or lower runtime. On the docking benchmarks the strongest competitor is the PoseX hybrid pipeline — AI pose generation followed by OpenMM energy minimization — at 73.6% validity on PoseX-SD and ~77% success on PoseX-CD; we beat it only if in-flight guidance produces higher validity and non-inferior RMSD success without the relaxation stage.

The key ablation is a state-blind but time-varying schedule: $\gamma_t$ hand-tuned as a function of step index alone (a ramp or staircase, optimized on validation targets with the same tuning budget given to the controller). This isolates the ingredient the proposal actually claims — state-conditioned adaptivity — from the weaker claim that guidance strength should simply vary over time. A second ablation replaces multiplicative gating with hard coordinate forcing of the same magnitude, directly testing the stability tension between AgentFold's negative result on hard intervention and the explicit gradient-forcing design of Inverse problems with experiment-guided AlphaFold. A third ablation removes the adversarial target curriculum and trains on random targets, isolating the Heterogeneous Adversarial Play ingredient.

Why not just…?

Why not just relax the output with OpenMM or AMBER afterward? This is the cheapest serious alternative, and the evidence shows exactly where it stops working. PoseX shows post-hoc relaxation lifts SurfDock's validity from 41.7% to 73.6%, so on purely local clash cleanup it is genuinely strong and our docking experiment must beat it head-to-head. But relaxation only minimizes whichever conformation the generator already committed to: it cannot recover a wrong global pose, discover an alternative conformational state, or fix a mirrored stereocenter baked in mid-generation. The clearest number is from Inverse problems with experiment-guided AlphaFold: in-flight steering reaches $r = 0.72$ against experimental flexibility where unguided generation reaches $r = 0.47$ — a gap no local minimization of a static structure can close.

Why not just sample massively with more seeds and filter by confidence? Scaling static sampling does help with difficulty but hits a ceiling on hard cases: RosettaSearch reports one-shot LigandMPNN success of only 7.9% on difficult PDB monomers versus 20.5% under closed-loop revision, and Protein Inverse Folding From Structure Feedback shows baseline models failing outright (TM-score below 0.5) on hard backbones where feedback training raised average TM-scores by 79.5%. For ensembles there is a deeper problem: independently seeded samples of a unimodal prior do not reproduce correlated dynamics, which is why unguided AlphaFold3 sits at $r = 0.47$ on the ubiquitin $S^2$ benchmark. We will nonetheless run the honest version of this baseline — an equal-compute comparison of many unguided samples versus one controlled trajectory — because if filtering suffices at matched cost, the controller is unjustified.

Why not just hand-tune a fixed guidance schedule? This is the most real threat, and we treat it as such. The evidence that adaptivity beats static schedules comes from a different domain: Leveraging Deep Reinforcement Learning for Metacognitive Interventions across Intelligent Tutoring Systems reports adaptive deep-RL interventions driving post-test scores from 70.0 (control) to 87.7, where static classifiers helped mid-tier students but failed struggling ones — but that is tutoring, not protein diffusion, and it does not settle our question. The state-blind-schedule ablation is the decisive experiment: it gets the same tuning budget as the controller, and if a hand-tuned ramp matches the learned policy's $r$ and validity, we will report that the simple method wins and reframe the contribution as the discovered schedule itself.

Why not just run restrained molecular dynamics? Restrained MD is the physics gold standard for ensembles matching NMR data, and Inverse problems with experiment-guided AlphaFold reports its guided diffusion pipeline achieving greater than 15% better NOE compliance in ~14 minutes, where restrained MD takes days to weeks per target. The controller adds negligible overhead to those 14 minutes, so the speed argument survives intact; MD remains the validation reference where compute allows, not the production method.

Decisive Checks

The proposal stands or falls on three numbers. On ubiquitin, does adaptive guidance exceed $r = 0.72$ at ~14-minute runtime where uniform guidance — the same trunk, same restraints — does not? On PoseX-SD and PoseX-CD, does in-flight clash and chirality suppression exceed 73.6% validity and ~77% success without the post-hoc relaxation stage? And does the learned policy beat the hand-tuned state-blind schedule, given the same tuning budget, by enough to justify its machinery? A "yes" to the first and any one of the other two establishes that real-time, state-aware control is a real ingredient in structure prediction rather than a fixed guidance law with extra steps — and the last question is the one we are prepared to lose honestly.