Machine learning models that predict how tightly a small molecule binds a protein are trained on small, heavily recycled datasets — fewer than 20,000 labelled complexes in the standard PDBbind benchmarks — and there is growing evidence they partly memorize rather than learn. A recent benchmark of ligand-conditioned protein generation showed accuracy collapsing from roughly 90% on well-annotated molecules to about 33% on molecules seen only once, a hallmark of retrieval rather than understanding (Generalise or Memorise? Benchmarking Ligand-Conditioned Protein Generation). Meanwhile, real medicinal chemistry manufactures molecules in families: one-pot synthesis — running several reactions in a single flask without isolating intermediates — routinely emits whole series of densely ringed polycycles that differ from one another at a single stereocenter or one peripheral substituent. Current affinity models represent each molecule holistically, so they are structurally blind to exactly these local differences.
The opening insight of this proposal comes from an unexpected place: software engineering. Code-intelligence research has documented the same pathology and built cures for it. Duplicated code snippets — "micro-clones," fragments under ten lines — inflate evaluation metrics by up to 100% and survive coarse deduplication (one corpus still harboured 68.7% duplicate methods after standard filtering), and fixing them properly required fragment-level, hierarchical treatment (The adverse effects of code duplication in machine learning models of code). We propose to transplant that machinery to molecular graphs: detect sub-structural micro-clones (conserved ring fragments shared across training and test ligands), and train affinity models with "in-scaffold" hard negatives — molecules from the same one-pot family that differ only locally — so the model is forced to learn which few atoms, aligned to which protein residues, actually decide binding.
Core Claim
The claim has three parts. First, a diagnostic: standard and even leakage-proof splits of protein–ligand affinity benchmarks still share sub-fragment micro-clones between training and test ligands, and models exploit them; no reported result found on Lacuna for sub-structural duplicate rates in PDBbind, so the magnitude is genuinely open, but the code-side evidence (51.4% drop in identifier prediction after true near-duplicate removal) motivates expecting a real effect. Second, a method: a hierarchical ligand encoder that decomposes each molecule into atoms, small ring motifs, ring-system blocks, and the whole molecule — the chemical analogue of the statement-to-block-to-function hierarchy that lifted code retrieval from a CodeBERT zero-shot mean reciprocal rank of 0.5 to 25.6 (MGS3: A Multi-Granularity Self-Supervised Code Search Framework) — aligned to residue-level protein features. Third, a training signal: hard negatives generated by systematically inverting single stereocenters and toggling synthetic handles within enumerated one-pot product families, which current contrastive schemes never see because their negatives perturb the entire docking pose rather than one local feature (DecoyDB: A Dataset for Graph Contrastive Learning in Protein-Ligand Binding Affinity Prediction).
Where Each Direction Fits
The micro-clone literature supplies the mechanism. MGS3 contributes three reusable ideas: hierarchical decomposition of code into nested units, a MaxSim operator that lets each small unit match its best counterpart on the other side of the retrieval pair, and negative sampling from within the same function, which forces fine distinctions that global negatives never teach. The adverse effects of code duplication supplies the leakage diagnosis and warns of the "capacity trap": bigger models memorize duplicates better. Boosting Redundancy-Based Automated Program Repair by Fine-Grained Pattern Mining contributes a cautionary design note: its Simplified Three-Address Code abstraction matches multi-line fixes well precisely because it drops syntax, but dropping context also loses execution meaning — so our fragment embeddings will carry their parent-block context rather than abstracting it away.
The residue-specific affinity literature supplies the protein side of the alignment and the interpretability target. Exploiting Hierarchical Interactions for Protein Surface Learning (HCGNet) already showed that atoms cannot be treated apart from their parent residues, achieving 0.893 ROC-AUC on binding-site prediction and 0.826 on partner matching while running at roughly 17 ms per protein; we reuse its atom-to-residue feature propagation but extend it to small-molecule ligands, which it never handled. CheapNet is the closest existing work on the ligand side: it pools atoms into learned clusters to avoid quadratic attention. We differ in that its clusters are dynamic and untethered, whereas ours correspond to explicit, enumerable synthetic building blocks and stereocenters — which is what makes our negatives constructible and our fragments auditable. The residue chemistry itself — arginine and lysine making up nearly 40% of energetic hot spots at nucleic-acid interfaces, arginine–tryptophan pairing, and aspartate/glutamate acting as suppressors of non-specific stickiness — comes from An in silico method to assess antibody fragment polyreactivity, which reached an AUC of roughly 0.85 predicting off-target binding from residue composition alone and guided corrective mutations with over 90% success; this gives us a concrete grammar our learned alignments should recover.
One-pot synthesis supplies the data-generation regime rather than a wet-lab program. One-pot double annulations to confer diastereoselective spirooxindolepyrrolothiazoles shows a four-component reaction assembling five bonds and five stereocenters in one flask — a combinatorial grid we can enumerate in silico to mass-produce families of molecules that share most of their graph. Bioinspired Total Synthesis of (+)-Kopsiyunnanine B supplies the canonical hard case: its final step yields an epimeric mixture (the natural product and its 7-epi form) that must be equilibrated with acid — two molecules differing at one stereocenter, exactly what pose-level contrastive learning cannot distinguish. Organocatalytic Diastereo- and Enantioselective Synthesis of Chlorinated and Trifluoromethylated Pyrrolidines Featuring a Removable Nitro Group adds a second perturbation axis: the nitro-bearing intermediate versus the denitrated final product (the handle removal runs at only ~57% yield, and the final compound shows 19.31 µM activity against colorectal cancer cells). Polycyclic complexity is the evaluation regime: dense fused and spiro ring systems maximize shared sub-fragments and stereocenter density, making them the worst case for holistic representations and the best case for fragment-level ones.
Research Program
We build four components. The first is a ligand fragmenter that decomposes a molecular graph into a hierarchy — individual atoms, conserved 3–5 atom ring motifs, ring-system blocks with their substituents, and the whole molecule — with each fragment embedding conditioned on its parent block so that context is retained. The second is a residue-side encoder that reuses HCGNet's chemical feature propagation to produce embeddings for residue groups in a binding pocket. The third is a scoring head that aligns the two hierarchies with a MaxSim operator, letting each ligand fragment find its best-matching residue group:
$$S(x,p)=\sum_{i\in F(x)}\ \max_{j\in R(p)}\ h_i^{\top} m_j$$
where $F(x)$ is the set of sub-fragments of ligand $x$, $R(p)$ the residue groups of pocket $p$, and $h_i$, $m_j$ their embeddings. This is MGS3's alignment operator transplanted from comment-to-code matching to fragment-to-residue matching; it is what makes the model's binding explanation auditable, because each term names a fragment and a residue group.
The fourth component is the negative generator, and it is where the one-pot direction becomes operational. We enumerate the combinatorial space of known multi-component reactions — the aldehyde, cysteine, and oxindole grid of the spirooxindole annulation is the template — and, within each product family, systematically invert each stereocenter and toggle each removable handle, docking the resulting families into target pockets. This yields, at a scale comparable to DecoyDB's 5.3 million generated decoys, a supply of in-scaffold negatives: same scaffold, same pocket, one local change. Training pairs each ligand with these near-identical siblings as negatives for the same protein, exactly as MGS3 pairs a code snippet with other snippets from the same function. The same fragmenter doubles as a leakage detector: fragment-level embeddings with a similarity threshold define micro-clone matches across train/test splits, from which we construct purged splits of PDBbind.
Baselines
The naive reference point is a standard whole-molecule graph network trained from scratch on the usual PDBbind splits — the GIGN model, whose reported root mean square error on the PDBbind Core Set 2016 is 1.263 (as tabulated in DecoyDB). It is the right floor because it represents everything our proposal claims is insufficient: one global molecular embedding, no fragment structure, no residue alignment. It will be retrained by us on each split variant so the leakage experiment compares like with like.
The strongest existing competitor is the DecoyDB-pretrained graph contrastive model, which reports an RMSE of 1.188 on the PDBbind Core Set 2016, ahead of GIGN's 1.263 and ConBAP's 1.268 (DecoyDB). It is the strongest because it is the only method that already attacks the representation problem with self-supervision over a large generated decoy set, and its data infrastructure (61,104 ground-truth complexes plus RMSD-annotated decoys) is the substrate we build on. The comparison is kept fair by matching parameter count, training compute, and evaluation protocol on the identical Core Set 2016, and by retraining it on our purged splits so both models see the same data. Beating it means three things: an RMSE below 1.188 with non-overlapping bootstrap intervals on the standard core set; materially better paired ranking of native ligands against locally perturbed siblings on our stereo-discrimination benchmark, where we expect the DecoyDB model to sit near the 50% chance level because its training never presented local-only differences; and better decoy enrichment on DUD-E screening — no reported result found on Lacuna for enrichment factors of these models on the EGFR and PYYM targets, so we establish both under one protocol rather than compare to a published figure.
The key ablation runs our full architecture twice dismantled: once with global negatives replacing in-scaffold negatives (isolating the training signal), and once with the hierarchy collapsed to a flat atom graph while keeping in-scaffold negatives (isolating the representation). A third ablation replaces the MaxSim head with pooled single-vector matching, isolating local alignment itself. If the in-scaffold-negative ablation alone recovers most of the gain, the hierarchical machinery is unnecessary and we will say so.
Why not just…?
Why not just deduplicate with whole-molecule fingerprints? Tanimoto-threshold filtering on global fingerprints is the chemical analogue of the coarse deduplication that failed in code: Allamanis found 68.7% duplicate methods surviving standard filtering in the Concode corpus, and true near-duplicate removal dropped downstream identifier prediction by 51.4% (The adverse effects of code duplication in machine learning models of code). Chemically, two epimers can be near-identical by fingerprint yet bind differently, and two molecules with different fingerprints can share the one decisive ring fragment. The existing leakage-proof split LP-PDBbind guards protein-level leakage, but nothing in the file indicates it checks sub-fragment sharing. Experiment 1 settles this directly: if Tanimoto purging and LP-PDBbind splitting produce the same test performance as fragment-level purging, the fine-grained detector is unnecessary and the diagnostic claim fails.
Why not just pretrain with DecoyDB-style pose decoys? This is the real threat, and it is the strongest baseline for a reason. But its negatives perturb the entire ligand pose, scored by whole-complex RMSD, so the training signal never isolates a single stereocenter's contribution; the 7-epi mixture from the kopsiyunnanine B synthesis is precisely the comparison such a model has never been taught (Bioinspired Total Synthesis of (+)-Kopsiyunnanine B). The memorization side is equally documented: models that look strong on familiar ligands fall to about 33% accuracy on singleton ligands (Generalise or Memorise?). We will measure the DecoyDB model on our stereo-discrimination benchmark first; if it already ranks epimers well above chance, our central motivation weakens and we report that.
Why not just use 3D shape complementarity or docking rescoring? Geometric fit tells you where a molecule can sit, not which partner it chooses: HCGNet's ablations showed geometry carries site prediction while hierarchical chemical features drive interaction matching (Exploiting Hierarchical Interactions for Protein Surface Learning), and structural heuristics like loop length and hydrophobicity completely failed to predict off-target binding while residue composition succeeded with AUC around 0.85 and over 90% mutational-rescue success (An in silico method to assess antibody fragment polyreactivity). Epimers are near-shape-identical, so pure geometry is close to its worst case on exactly our target regime. We are honest about scope: shape may remain sufficient for gross scaffold selection, and our claim covers only the local-discrimination regime.
Proposed Experiments
Experiment 1 is the leakage diagnostic. We measure fragment-level clone rates across PDBbind training and core-set test ligands, then retrain the GIGN-style and DecoyDB-style baselines under four splits: standard, LP-PDBbind, Tanimoto-purged, and micro-clone-purged. The decisive number is the RMSE difference between the last two; the DecoyDB-over-GIGN margin is 0.075 RMSE, so if fragment-level purging beyond fingerprint purging moves RMSE by less than about 0.05, the leakage claim does not carry practical weight and we conclude against it.
Experiment 2 builds the stereo-discrimination benchmark. From the enumerated one-pot families and the documented literature pairs (the 7-epi indole/oxindole pair; the nitro-handle intermediate versus the denitrated product from Organocatalytic Synthesis), we assemble paired-ranking tasks: given the same pocket, rank the native or more-active member above its locally perturbed sibling. Chance is 50%; the DecoyDB baseline's score here is the honest test of whether global-pose contrastive learning already solves local distinction, and our model's margin over both that baseline and its own global-negative ablation measures the contribution of each ingredient. Absolute affinity is evaluated in parallel on Core Set 2016 against the reported 1.188 RMSE.
Experiment 3 tests screening rather than scoring, because the review of structure-based deep-learning models (Structure-based, deep-learning models for protein-ligand binding affinity prediction) documents that high scoring accuracy does not transfer to decoy enrichment. We run enrichment on the DUD-E EGFR and PYGM targets under one protocol for all models, since no reported enrichment figures exist on Lacuna for these systems.
Experiment 4 checks residue specificity: do the learned fragment-to-residue alignments recover the documented grammar — arginine/lysine hot spots, arginine–tryptophan pairing, aromatic anchoring, aspartate/glutamate suppression? We quantify agreement between MaxSim-assigned residue importance and the hot-spot composition statistics, and we test whether ligand fragments bearing concentrated cationic and aromatic character, aligned to sticky surface patches, predict non-specific binding in the spirit of the polyreactivity predictor (An in silico method to assess antibody fragment polyreactivity).
The kill criteria are explicit. If fragment-level purging adds nothing over fingerprint purging, the diagnostic dies. If DecoyDB training already ranks epimers above chance, the training-signal claim dies. If the flat-graph ablation with in-scaffold negatives matches the full hierarchy, the representation claim dies and the interesting part of the work reduces to a data-augmentation trick — which would still be worth reporting, but not as this proposal.
References
- Generalise or Memorise? Benchmarking Ligand-Conditioned Protein Generation
- The Adverse Effects of Code Duplication in Machine Learning Models of Code
- MGS3: A Multi-Granularity Self-Supervised Code Search Framework
- DecoyDB: A Dataset for Graph Contrastive Learning in Protein-Ligand Binding Affinity Prediction
- Boosting Redundancy-Based Automated Program Repair by Fine-Grained Pattern Mining
- Exploiting Hierarchical Interactions for Protein Surface Learning
- CheapNet: Cross-attention on Hierarchical representations for Efficient protein-ligand binding Affinity Prediction
- An in silico method to assess antibody fragment polyreactivity
- One-pot double annulations to confer diastereoselective spirooxindolepyrrolothiazoles
- Bioinspired Total Synthesis of (+)-Kopsiyunnanine B
- Organocatalytic Diastereo- and Enantioselective Synthesis of Chlorinated and Trifluoromethylated Pyrrolidines Featuring a Removable Nitro Group
- Structure-based, deep-learning models for protein-ligand binding affinity prediction