Protein design models write amino-acid sequences meant to fold into a shape that does a job. But proteins live in water, and water is not a passive filler. A de novo amantadine-binding protein only worked experimentally because tightly ordered water molecules — completely absent from the dry computational design — mediated the hydrogen bonds the ligand needed (Park et al.). When solvent is dropped, charged residues collapse onto themselves (Wallace et al.), protein interfaces fall apart for lack of bridging waters (Bresciani et al.), and binding affinities are misjudged because the energetic cost of displacing pocket water is never counted (Zhung et al.). Current generative models either ignore solvent entirely or check it slowly, after the sequence is already written.
Two ideas from outside the field suggest a different route. First, grammar-constrained decoding: instead of asking a language model nicely to output valid JSON or SQL, you parse the prefix generated so far against a formal grammar and set the probabilities of all forbidden next tokens to zero, which guarantees well-formed output where prompting only nudges it (Kuchnik). Second, benchmark contamination: static protein benchmarks systematically overstate capability, because interface geometry leaks across standard splits — 56% leakage in the common split of SKEMPI v2.0 despite sequence-identity filtering (Revealing data leakage) — and models that ace static tests collapse on dynamically generated ones (DyVal). This proposal combines the three directions asymmetrically: solvent physics is the substance, grammar-constrained decoding is the enforcement mechanism, and contamination analysis is the evaluation lens that makes any claimed success credible.
Core Claim
The rules of solvation can be compiled into a formal grammar over the residue alphabet, and enforcing that grammar token-by-token during autoregressive protein sequence generation will produce designs that are correct in hydration — no buried unsatisfied polar atoms, required water-bridge sites actually realizable — at a rate that heuristic tool-call decoding and post-hoc filtering cannot match at equal compute. Because grammar-constrained generation provably never emits a token that violates the encoded solvent rules, the only remaining question is whether sequence-level solvent constraints transfer to real 3D hydration, and that question can only be answered on evaluation tasks that no pretraining corpus could contain.
To be honest about scope: a grammar over a linear sequence cannot capture every nonlocal 3D solvent effect. What it can capture is a set of necessary conditions — which residue classes may occupy buried versus solvent-exposed positions given a target secondary structure, and whether the running inventory of buried, unpaired hydrogen-bond donors and acceptors stays within a budget that designed internal water networks could satisfy. Whether those necessary conditions buy real hydration correctness is precisely the empirical question this proposal tests.
Research Program
The first deliverable is the hydration grammar itself, a finite-state automaton with counters that runs alongside the decoder. Given a task specification (a secondary-structure sketch and which face of each segment is buried), the automaton cycles through exposure states — helices repeat their buried/exposed pattern roughly every 3.6 residues, strands alternate — and at each state masks the vocabulary down to physicochemically compatible tokens: hydrophobics at buried states, polar and charged residues at solvent-exposed ones. A separate counter tracks buried polar groups whose hydrogen-bonding needs are not yet paired; a residue placement is legal only if the running count of unsatisfied buried donors/acceptors stays within the number of designed water-bridge sites the task allows, a mechanism directly inspired by the demonstration that synthetic internal water networks can be engineered to bridge protein segments and raise signaling activity (Chen et al.). Formally, with automaton state $s$ after prefix $h$, the allowed set is
$$A(h, s) = \{v \in V : \delta(s, v) \neq \bot \text{ and } c(s, v) \leq b\},$$
where $\delta$ is the grammar's transition function, $c$ the resulting count of unsatisfied buried polar groups, and $b$ the water-bridge budget. All tokens outside $A$ receive logit $-\infty$. Per-step state tracking of this size is cheap; the field's latency concern applies to parsing large general grammars and is being addressed with GPU-native engines (Gram2Token). This is deliberately different from prior constraint work in design: hard constraints have been enforced in continuous 3D diffusion over dry alpha-carbon backbones via a predict-proximal-renoise cycle (Constrained Diffusion), and biophysical tools have been consulted heuristically mid-generation by an agentic protein model (AgentPLM) — but neither encodes solvent rules, and neither guarantees anything at the token level.
The second deliverable is the evaluation: a generator of dynamic solvation stress tests, built on the logic of DyVal and A²RBench but physical rather than symbolic. The generator samples a topology sketch, a set of buried polar contacts that must be satisfied either by direct pairing or by designed water bridges, and a desolvation severity level; it constructs a reference solution forward to confirm solvability, in the spirit of A²RBench's cycle-consistency check $g(f(x)) = x$, except the verifier is physical: candidate sequences are folded (ESMFold), waters are placed in pockets and cavities with the same tools that feed GraphWater-Net — HydraMap and 3D-RISM (Zhang et al.) — and water-bridge satisfaction and desolvation energetics are scored. Because pocket geometry, water-bridge counts, and desolvation penalties are drawn from continuous ranges, no generated task matches any PDB entry, so pretraining memorization cannot help. A solvent-remapping test — permuting which positions require water mediation while holding difficulty fixed — measures memorization directly, mirroring A²RBench's symbolic remapping, which cost advanced models 17.7% of their accuracy. A smaller third thread extends the leakage audit of Revealing data leakage: its iDist interface-similarity embedding considers only amino-acid geometry, so we add interfacial water networks to the embedding and test whether conserved hydration patterns leak across splits that look clean by sequence and even by dry structure.
One risk deserves naming: forcing models down rigid syntactic paths can distort their underlying distributions, pushing toward degenerate repetition (Vejvar). We therefore track repetition scores, since PDFBench reports that once a sequence's repetition score exceeds 10 its structural plausibility collapses, and report diversity alongside success rate.
Baselines
The "do nothing" reference point is unconstrained sampling from the same base protein language model, followed by rejection screening — the generate-many, filter-later pipeline. The file gives concrete anchors for how weak this is: plain ESM-2 achieved a 12.37% top-10% hit rate on antibody optimization, versus 52.41% when generation was steered (AgentPLM); and on hard structural tasks, unconstrained or softly guided baselines produced 0% usable structures across nearly 100,000 samples, while hard in-loop constraint enforcement reached 100% constraint satisfaction and 21.0% usable structures on the PDZ benchmark and 97.8% on molecule encapsulation (Constrained Diffusion). Any positive usable-design rate at comparable compute beats the naive reference; we expect far more than that.
The strongest existing competitor is AgentPLM's Reasoning-Augmented Decoding with Contrastive Agent Policy Optimization, which pauses an autoregressive protein model to call ESMFold, FoldX, and AutoDock Vina and redirects generation when internal representations disagree with the oracle (AgentPLM). Its reported numbers set the bar: 52.41% hit rate on AntibodyOpt-VH (nearly double the next agentic baseline's 27.38%), an average 7.64°C melting-temperature improvement on ThermoStab-75 versus 5.19°C for the best previous method, and a +34% gain in catalytic efficiency on EnzymeDesign-EC3. Critically, its oracles are all implicit-solvent or empirical scorers, its tool calls are heuristic rather than grammar-guaranteed, and a Vina call costs about 2.4 seconds — so the comparison is exactly on point. We will run it on the same base model, the same training and evaluation data, and a matched total GPU-second budget including all tool-call latency, with the same hyperparameter search budget, so the only systematic difference is the enforcement mechanism. Beating it means a higher usable-design rate on the dynamic solvation benchmark and lower compute per usable design; if RAD matches our rate within budget, that is evidence against the claim and we will report it as such.
Two ablations isolate the proposal's ingredients. The dry-grammar ablation runs the identical automaton with the solvent rules removed (secondary-structure and generic structural constraints only), so any gap in usable designs and water-bridge satisfaction is attributable to the hydration rules — the same logic that showed adding water molecules to GraphWater-Net's input raised the CASF-2016 Pearson correlation by 0.154, from 0.714 to 0.868 (Zhang et al.). The soft-bias ablation replaces the $-\infty$ mask with a finite logit penalty, testing whether hardness matters or mere encouragement suffices. For structural context we also report RFdiffusion on MotifBench, where it provided a solution for only 16 of 30 cases, just 2 of 10 complex multi-segment motifs, scoring 28.05 out of 100 overall (MotifBench) — a reminder that even the strongest dry structure generators struggle exactly where coordinated active-site chemistry, often water-mediated, lives.
Why not just…?
Why not just prompt the model about solvent, or fine-tune it on solvated structures? Prompt-level formatting is probabilistic and breaks under edge cases and long-range constraints, while grammar masking eliminates invalid outputs outright (Kuchnik); the same asymmetry is documented for slot-filling prompts (Cai et al., Sun et al.). Fine-tuning on solvated PDB structures would help but cannot give guarantees, and it deepens the memorization problem this proposal is partly about, since PDB water networks are exactly what a contaminated evaluation would reward recalling. Our soft-bias ablation is the direct empirical test: if a finite penalty matches the hard mask, encouragement is enough and the grammar machinery is unnecessary.
Why not just generate many candidates and filter afterwards with structure prediction and water placement? This is a real threat for the milder constraints, and we will measure it rather than argue it: the decisive metric is compute per usable design. The literature leans our way — ESMFold evaluation is roughly 160 times slower than sequence-level decoding (PDFBench), and on the PDZ benchmark post-hoc rejection filtering on unconstrained baselines yielded zero usable structures across roughly 100,000 samples while in-loop enforcement reached 21.0% usable (Constrained Diffusion). There is also a principled failure mode filtering cannot fix: if a sequence buries three unpaired donors and the design budget allows one water, no downstream water-placement tool can rescue it — the violation is baked into the tokens.
Why not just use stricter splits — lower sequence identity, or a temporal cutoff like SwissTest? Because splits of that kind are proven leaky at the interface: even a strict 30% sequence-identity threshold left 30% interface-geometric leakage, and the standard SKEMPI v2.0 split carried 56% (Revealing data leakage). Temporal decontamination as in SwissTest (PDFBench) is a one-shot barrier against corpus inclusion, not against structural memorization of conserved motifs, and it is static by construction. Dynamic generation with continuous parameter sweeps is the only option in the file's repertoire that makes the evaluation distribution disjoint from any training corpus by design, which is why DyVal-style collapse findings (DyVal) motivated it.
Why not just extend AgentPLM's tool-call loop with a water-aware oracle? This is the closest serious alternative and we treat it as the headline baseline rather than dismiss it. Its weaknesses on our question are specific: tool calls fire heuristically and offer no token-level guarantee; its oracle latency (about 2.4 seconds per Vina call) makes per-token enforcement infeasible; and the paper itself notes that the agent exploits systematic biases in its oracles. If swapping one oracle for a solvation scorer closed the gap at matched compute, the grammar would be over-engineering — and the head-to-head, same-model, same-budget comparison is designed to find that out.
Proposed Experiments and Decisive Checks
The experimental sequence is as follows. First, static validation: apply the hydration grammar to MotifBench's 30 motif-scaffolding problems, including its orphan motifs with no PDB homologs, using its own success thresholds (motif RMSD at or below 1.0 Å, scaffold self-consistency RMSD at or below 2.0 Å) and its standardized 100-scaffolds-per-motif, 8-sequences-per-scaffold pipeline, adding water-bridge satisfaction as a new reported metric; RFdiffusion's 16-of-30 and 28.05/100 results are the reference (MotifBench). Second, the core test: the dynamic solvation benchmark, where grammar-constrained decoding, AgentPLM's RAD, unconstrained-plus-filtering, the dry-grammar ablation, and the soft-bias ablation are compared on usable-design rate, water-bridge satisfaction, desolvation-energy error, diversity, repetition score, and compute per usable design; the decisive check is a usable-rate gap between full grammar and dry grammar that mirrors, in generation, the +0.154 correlation gain that explicit water gave GraphWater-Net on CASF-2016 (Zhang et al.). Third, the remapping test: if solvent-aware models genuinely encode solvation rules rather than recalling PDB-associated sequences, their performance drop under water-bridge remapping should be far smaller than the 17.7% symbolic-remapping drop A²RBench measured for memorization-prone models (A²RBench); a large drop would be an honest negative result meaning the grammar enforces compliance without teaching understanding. Fourth, the leakage audit: re-audit SKEMPI v2.0 splits with solvent-network-augmented interface embeddings and report whether the known 56% leakage figure grows once conserved interfacial water is counted. Throughout, binding-energy sanity checks will use CASF-2016, where GraphWater-Net's 0.868 Pearson correlation stands as the scorer to approach, and FEP1, where LumiNet reached an RMSE of 1.13 kcal/mol against FEP+'s 1.08 at a fraction of the cost (Su et al.). The proposal succeeds if grammar-constrained decoding delivers a higher rate of hydration-correct, experimentally plausible designs than heuristic tool-call decoding at matched compute, on tasks that provably cannot have been memorized.
References
- Strain Problems Got You in a Twist? Try StrainRelief: A Quantum-Accurate Tool for Ligand Strain Calculations
- Dissecting the RAD51-BRC4 Interaction Landscape through Integrative Molecular Simulations and Experimental Biophysics
- 3D molecular generative framework for interaction-guided drug design
- Validating Large Language Models with ReLM
- Revealing data leakage in protein interaction benchmarks
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks
- Computational design of highly signalling-active membrane receptors through solvent-mediated allosteric networks
- Gram2Token: Enabling Run-time GPU-Native Grammar-Constrained Decoding for LLMs
- Constrained Diffusion for Protein Design with Hard Structural Constraints
- AgentPLM: Agentic Protein Language Models with Reasoning-Augmented Decoding for Protein Sequence Design
- A²RBench: An Automatic Paradigm for Formally Verifiable Abstract Reasoning Benchmark Generation
- Incorporating Water Molecules into Highly Accurate Binding Affinity Prediction for Proteins and Ligands
- ASPIRO: Any-shot Structured Parsing-error-Induced ReprOmpting for Consistent Data-to-Text Generation
- PDFBench: A Benchmark for De Novo Protein Design from Function
- MotifBench: A standardized protein design benchmark for motif-scaffolding problems
- In-context Learning for Few-shot Multimodal Named Entity Recognition
- Speech-based Slot Filling using Large Language Models
- Robust protein–ligand interaction modeling through integrating physical laws and geometric knowledge for absolute binding free energy calculation