Hyperbolic Synthon Trees for Billion-Scale Virtual Screening

Drug discovery teams increasingly search make-on-demand chemical catalogs — libraries assembled combinatorially from stock building blocks, ranging from tens of millions to 70 billion assembled molecules. Docking every candidate against a protein target is computationally impossible, so the field has converged on a loop: a machine-learning surrogate predicts which molecules will dock well, a few are actually docked, and the results teach the surrogate where to look next. The dominant trick for making this loop affordable is to partition chemical space into blocks and allocate docking effort across them with a multi-armed bandit, as in BOBA, which clusters a 96-million-molecule library with K-means and lets a bandit decide which cluster to score next. But flat clustering treats every block as unrelated to every other, struggles as the number of blocks grows, and requires embedding the entire enumerated library up front.

Chemical space is not flat. Molecules share a branching structure — scaffolds elaborated into sub-scaffolds, building blocks combined into products — and hyperbolic geometry, a curved space whose available room grows exponentially with distance from the center in exactly the way a tree's leaves multiply, is known to represent such hierarchies with far fewer dimensions than Euclidean space: on the WordNet taxonomy, a 5-dimensional Poincaré embedding reached a mean average precision of 0.823 where a 200-dimensional Euclidean embedding reached 0.168 (Poincaré Embeddings for Learning Hierarchical Representations). The proposal here is to restructure the screening loop around that fact: cluster the building blocks (thousands of them, not billions of products) into a hyperbolic hierarchy, and run a bandit that climbs this tree — so that docking evidence gathered in one region informs its relatives, depletion of a region is handled by design rather than fought against, and the pipeline never needs to enumerate product embeddings at all.

Core Claim

Partitioning combinatorial libraries in hyperbolic building-block space, and allocating docking with a hierarchy-aware bandit over the resulting tree, will (a) recover the same top hits as flat partitioning with strictly fewer surrogate evaluations and dockings, and (b) keep running at library sizes where flat, product-level partitioning cannot, because the method stores $K$ synthon embeddings and implicitly covers the $K^2$ product regions formed by pairing them:

$$|\mathcal{A}| = K^2 \text{ product-space regions tracked with only } K \text{ embedded building blocks},$$

which is why the approach survives at $10^{10}$–$10^{11}$ products while product-level methods pay at least one embedding and one cluster assignment per molecule.

This is not "hyperbolic embeddings applied to molecules," which exists. The closest prior work embeds ~250,000 ZINC molecules in the Lorentz model with a hyperbolic autoencoder and improves drug-repositioning AUROC by 33.6% over a hierarchy-agnostic baseline (Hyperbolic Molecular Representation Learning for Drug Repositioning) — but it never touches docking, active learning, or libraries beyond $10^5$. HAEGAN builds stable deep hyperbolic networks for generating molecules, achieving validity and uniqueness of 1.0 on MOSES, but does not search, score, or partition existing catalogs (Hyperbolic Neural Networks for Molecular Generation). This proposal instead uses hyperbolic geometry as the control structure of a screening pipeline, reusing HAEGAN's Lorentz Direct Concatenation for a stable synthon encoder, and HYPHC's continuous hierarchical clustering — which reformulates tree clustering as gradient descent in the Poincaré disk with a $(1+\epsilon)$ approximation guarantee to the optimal tree (From Trees to Continuous Embeddings and Back: Hyperbolic Hierarchical Clustering) — to build the bandit's arm tree.

Research Program

The first component is a hyperbolic encoder for building blocks. A Lorentz-model encoder (trained with direct concatenation layers to avoid the vanishing gradients that tangent-space projections cause in deep hyperbolic networks, per HAEGAN) maps each synthon to a point on the hyperboloid, pretrained on ~1.6M MOSES molecules decomposed by BRICS rules so the encoder sees synthons in context. The design intent is that the radial coordinate (distance from the origin) tracks elaboration depth — bare core versus decorated scaffold — while geodesic distance tracks bio-isosteric similarity between fragments. This is validated against the BRICS decomposition trees themselves: recovered cluster trees should reconstruct known fragment hierarchies, using HYPHC's continuous lowest-common-ancestor formulation as the clustering objective.

The second component is the arm tree. HYPHC is applied to the embedded building blocks of a library (tens of thousands of synthons, not the assembled products), producing a multi-scale tree whose cut height sets the resolution. Internal nodes become coarse arms covering large regions; leaves become fine arms. Crucially, a product molecule never needs its own embedding: its arm membership is the pair of synthon clusters its reaction draws from, so the bandit's action space is over cluster pairs even though the underlying space is $K^2$ regions.

The third component is the bandit itself, and it must fix two problems BOBA names but does not solve. First, BOBA notes that clusters deplete as good candidates are sampled and that standard UCB1 does not handle this non-stationary reward decay. Our bandit uses a rotting-reward formulation: each arm's mean decays with the number of samples drawn from it, and the confidence bonus propagates along the tree path, so evidence about a fine arm softens the estimates of its ancestors and siblings rather than leaving them untouched. Second, BOBA's optimal cluster count grows sublinearly at $N^{2/3}$ with library size — still requiring re-partitioning as libraries grow. A zooming bandit over the hyperbolic tree instead refines resolution only where observed reward variance justifies it, so the effective number of arms adapts to evidence rather than to library size.

The fourth component is the surrogate, which stays deliberately non-additive: a Bayesian graph network scores whole assembled molecules within a selected cluster pair. This is the point of contrast with APEX, which factorizes scores into additive synthon contributions and thereby screens 10 billion molecules in ~30 seconds on one GPU but cannot represent interactions between synthons, such as steric clashes that appear only when particular fragment pairs meet (APEX: Approximate-but-exhaustive search for ultra-large combinatorial synthesis libraries). Our method keeps the expressive surrogate and buys its cost down with the tree.

Proposed Experiments

The primary benchmark is the AmpC β-lactamase library of ~96–99.5 million compounds, the shared testbed of the active-learning literature: MEMES recovered 90% of the top-1000 hits by docking about 6% of the library (MEMES: Machine learning framework for Enhanced MolEcular Screening), and MolPAL's MolCLR surrogate recovered 58.97% of the top-50,000 hits by docking 0.6% of the 99.5M library (Large-scale Pretraining Improves Sample Efficiency of Active Learning based Molecule Virtual Screening). The headline metric is the docking fraction needed to reach 90% top-1000 recovery, with surrogate evaluation counts and wall-clock reported alongside; secondary metrics are top-100 recovery and enrichment factor on the 2.1M-molecule Enamine HTS set, where MoLFormer achieved an enrichment factor of 140.2.

The second experiment targets approximation quality and non-additivity directly, using the BRICS combinatorial library of 10 billion molecules for which APEX exhaustively docked a 12-million-molecule ground-truth subset against five targets (PARP1, MET, DRD2, F10, ESR1). On this subset we measure how often the true top products involve fragment pairs whose joint contribution deviates from the sum of individual synthon scores, and whether our non-additive surrogate within tree-selected regions ranks those cases correctly where additive factorization cannot.

The third experiment is the scalability claim itself: run the full pipeline against the 70-billion-compound Enamine REAL library without enumerating product embeddings, reporting synthon-clustering cost, memory, and end-to-end runtime. BOBA, which requires an enumerable embedded library, cannot be run here at all — that contrast, not a marginal runtime number on 96M, is the decisive test of the design. As a calibration point, APEX screens this library in ~3 minutes on a single Tesla T4; we do not compete on raw throughput against exhaustive approximate scoring, but on hit recovery under a fixed docking budget, a regime APEX does not address because it never adaptively docks.

Baselines

The naive reference point is random sampling at the same docking fraction. This anchor matters because the active-learning literature already quantifies it: in MEMES, random sampling at the 6% rate recovered only about 5.5% of hits on the 96M library, versus 90% for the guided methods (MEMES: Machine learning framework for Enhanced MolEcular Screening). Any result of ours that drifts toward the random anchor means the tree is not helping.

The strongest existing competitor is BOBA: K-means clustering of T5Chem embeddings into $K$ arms, a UCB1 bandit across clusters, and a Laplace-approximated Bayesian neural network scoring only within the selected cluster (Target-Aware Bandit Allocation for Scalable Surrogate Optimization in Chemical Space). It is the strongest because it is the only published method that attacks the same bottleneck — surrogate inference cost during partitioned active search — and it reports recovering over 90% of the top-100 molecules while reducing surrogate evaluations $K$-fold and cutting optimization-loop runtime on the 96M library from 2,720 seconds to roughly 2,200 seconds. For fairness, we run BOBA with the same docking scores, the same surrogate family and training data, and the same tuning budget (grid over $K$ and acquisition constants), so the only difference is the geometry and structure of the partition. Beating BOBA means matching or exceeding its top-100/top-1000 recovery at equal docking budget while using fewer surrogate evaluations, and — separately — still running when the library is too large to embed per-product. If BOBA at its best $K$ matches us on the 96M library, the proposal's value must be established at billion scale, and we will say so plainly.

A second active-learning baseline is the flat-surrogate loop without partitioning, in the MolPAL/MEMES style with a pretrained Euclidean surrogate, since GIN-E with greedy and UCB acquisition recovers over 90% of top-1000 compounds while docking under 10% of the library across six targets (Understanding active learning of molecular docking and its applications). This baseline tests whether partitioning itself is needed once surrogates are strong.

Three ablations isolate the proposal's ingredients. Clustering the same hyperbolic synthon embeddings but running the original non-hierarchical UCB1 over flat clusters isolates the tree (hierarchical reward propagation and rotting handling). Building a tree by recursively splitting Euclidean K-means clusters and running the same tree bandit isolates the geometry. And a hyperbolic tree with stationary (non-rotting) rewards isolates the non-stationarity fix. If the full method's gain appears only when all three combine, that is the result; if the Euclidean-tree ablation matches it, the hyperbolic component is decorative and the finding is still worth reporting — hierarchy, not curvature, would be the active ingredient.

Why not just…?

Why not just use Euclidean K-means with a bandit, as BOBA already does? This is the most serious alternative, and BOBA's own reported results — over 90% top-100 recovery with a $K$-fold cut in surrogate calls — show it works. The case against it is structural, not empirical yet: BOBA's authors state that Euclidean clustering treats arms as independent, ignoring parent-child scaffold relationships, that bandit over-exploration grows with $K$, and that the approach needs an enumerable embedded library. Our experiments settle this directly: a $K$-sweep on the 96M library should show flat-UCB recovery degrading at large $K$ while the zooming tree holds, and the 70B experiment is one BOBA cannot enter. We are honest that BOBA's measured runtime gain on 96M was modest (2,720 to ~2,200 seconds); the surrogate-call savings matter more as surrogates grow to 512–1024-dimensional transformer scorers, which is the regime we test.

Why not just use a strong pretrained Euclidean surrogate with standard active learning? MolPAL shows this is excellent on sample efficiency — MolCLR recovered 58.97% of top-50,000 hits docking just 0.6% of AmpC — and the same work found MoLFormer reaching an enrichment factor of 140.2 on Enamine HTS (Large-scale Pretraining Improves Sample Efficiency of Active Learning based Molecule Virtual Screening). The shortcoming is cost at scale, not accuracy on one library: scoring $10^{10}$ products with high-dimensional Euclidean embeddings is itself the bottleneck the partitioning line exists to remove. There is also a deeper caution both sides must respect: the GIN-E analysis found these surrogates succeed largely by memorizing 2D motifs that fit specific pockets and degrade on wide, flexible binding sites (Understanding active learning of molecular docking and its applications). A global tree prior could help exactly there — generalizing across scaffold relatives when local memorization fails — or could hurt by imposing structure the pocket does not respect. We therefore include one wide-pocket target in the evaluation and report per-target breakdowns rather than only aggregates.

Why not just factorize scores additively over building blocks, as APEX does? APEX screens 10 billion molecules in ~30 seconds on one GPU, which no neural-surrogate loop will match on raw throughput (APEX: Approximate-but-exhaustive search for ultra-large combinatorial synthesis libraries). But APEX solves a different problem: exhaustive approximate scoring with no adaptive docking, and its accuracy is capped by the assumption that synthon contributions add independently — its authors note it misses non-additive effects like cooperative steric clashes between distal fragments. Our BRICS experiment measures how often that cap binds, and our design keeps a non-additive whole-molecule surrogate precisely to catch those cases under a docking budget. The two are also composable — an additive APEX-style score is a natural cheap prior mean for a tree arm — and we will test that combination as an extension rather than treat APEX purely as a rival.

Decisive Checks

The proposal stands or falls on three numbers: the docking fraction for 90% top-1000 recovery on AmpC versus BOBA and the flat-surrogate loop; the recovery gap on non-additive top products in the 12M BRICS ground-truth subset versus an additive factorizer; and successful completion of the 70B Enamine REAL run without product enumeration, where every flat-partitioning baseline is infeasible by construction. The ablation triangle — hierarchy without curvature, curvature without hierarchy, neither — tells us which ingredient earned the result, and the per-target breakdown on wide pockets tells us whether the global tree prior helps or hinders where memorization-based surrogates are known to fail.