Lipschitz-Fair Reaction Condition Prediction for One-Pot Synthesis Planning

One-pot synthesis — running several chemical transformations back-to-back in a single flask, without isolating or purifying the intermediates — saves solvent, time, and cumulative yield, and it underpins some of the most efficient syntheses in the literature, from a single-trigger six-step cascade to a four-component reaction that forms five bonds and five stereocenters at once Bioinspired Total Synthesis of (+)-Kopsiyunnanine B, One-pot double annulations to confer diastereoselective spirooxindolepyrrolothiazoles. The blocker is that no automated tool can tell in advance which consecutive steps will tolerate each other's reagents, solvents, and temperatures. Machine-learning planners for chemical synthesis plan one isolated step at a time, and even the most flexible current planner, MHNPATH, scores each step independently on cost, temperature, and greenness without ever asking whether adjacent steps can share a vessel A User-Tunable Machine Learning Framework for Step-Wise Synthesis Planning.

Meanwhile, in algorithmic fairness there is a mature line of work on individual fairness: the requirement that a model treat similar inputs similarly, enforced mathematically by a Lipschitz bound that ties an input metric to an output metric so small or irrelevant input changes cannot cause large output swings Fairness through awareness. This proposal transfers that machinery to reaction-condition prediction. The claim is that one-pot feasibility is, at its core, a metric-space question: two adjacent steps can be merged exactly when their required operating conditions are close in the right learned metric — and Lipschitz-constrained training under a fairness-style input metric is what makes those condition predictions both smooth and honest about which molecular changes matter.

Core Claim

We will build a reaction-condition predictor, in the mold of Parrot's Transformer that reads a reaction and outputs catalyst, solvent, reagents, and temperature Generic Interpretable Reaction Condition Predictions with Open Reaction Condition Datasets and Unsupervised Learning of Reaction Center, but trained under an individual-fairness constraint:

$$d_Y\big(c(r), c(r')\big) \le L \cdot d_X(r, r')$$

Here $r$ and $r'$ are two reactions, $c(r)$ is the predicted condition profile, $d_X$ is an input metric that measures only the $K$-hop neighborhoods of the two reaction centers, and $d_Y$ is a learned distance over condition space. The choice of $d_X$ is the individual-fairness contribution, borrowed from FACE, which decomposes representations into task-relevant and "sensitive" factors and projects out the sensitive ones Two Simple Ways to Learn Individual Fairness Metrics from Data. In our setting the "sensitive" directions are peripheral substituents and patent-idiom features: a methyl-to-ethyl change on an unreactive ring should not flip the recommended catalyst. This choice is grounded in a real theorem: MolR proved that reaction-equation error depends only on atoms within $K$ hops of the reaction center Chemical-Reaction-Aware Molecule Representation Learning, which both justifies the metric and makes the penalty cheap, since it is evaluated on small subgraphs rather than whole molecules. The Lipschitz penalty itself will be JacoLip's directional-derivative scheme, which added only hundredths of a second per iteration on graph workloads Aligning Relational Learning with Lipschitz Fairness.

The one-pot payoff is a merge criterion: adjacent steps $r_i$ and $r_{i+1}$ in a route are one-pot candidates when $d_Y(c(r_i), c(r_{i+1})) \le \tau$ and a small cross-reactivity head flags no destructive reagent pair. Because the bound is Lipschitz, the criterion is stable: a minor change to an unreactive part of the target molecule cannot cause a merged cascade to be declared infeasible, which is precisely the failure mode of current condition and route models. We stress that we claim empirical, penalty-based smoothness, not closed-form certificates; extending certificates to deep encoders remains open even in the fairness literature itself, where GUIC's guarantees are restricted to linear graph convolutions GUIC: Certified Graph Unlearning with Individual Fairness Guarantees. As a stretch goal we will test randomized-smoothing certification of condition recommendations, the technique shown to transfer from adversarial robustness to individual fairness Individual Fairness Revisited: Transferring Techniques from Adversarial Robustness.

A secondary claim addresses a documented pathology. The USPTO-bias study showed that a model with 90.9% Top-1 accuracy on USPTO-MIT Mixed collapses to 1.09% on foundational Hartenfeller reactions appearing fewer than ten times — the model memorizes patent idioms rather than chemistry Rethinking NLP for Chemistry: A Critical Look at the USPTO Benchmark. We hypothesize that a metric which discounts peripheral and frequency-correlated features, combined with a Lipschitz penalty, is a principled remedy: the model is forced to condition on the reaction center, which is exactly what transfers to rare reactions.

Research Program

The program has three parts. First, we construct the fair reaction metric $d_X$ from USPTO-Condition (~680,000 entries with catalyst, solvent, reagent, and temperature labels) Generic Interpretable Reaction Condition Predictions with Open Reaction Condition Datasets and Unsupervised Learning of Reaction Center, using FACE-style factor analysis to split reaction representations into center-localized and peripheral components and validating the split against held-out pairs of reactions that share a reaction center but differ elsewhere. Second, we train the Parrot-style predictor with the Jacobian penalty under $d_X$, and train the output metric $d_Y$ on condition-comparability pairs: EXPLORE-style pairs fit a Mahalanobis distance from labeled comparable instances Two Simple Ways to Learn Individual Fairness Metrics from Data, and we obtain comparability labels from published one-pot protocols, where steps documented to coexist in one vessel are positive pairs. Third, we integrate the merge criterion into a MHNPATH-style tree search, so that route search can propose collapsed one-pot routes rather than only isolated step chains, and we validate merges against literature one-pot cascades including the multicomponent indole-fused ring assemblies of A multicomponent reaction for modular assembly of indole-fused heterocycles.

Proposed Experiments

We run four evaluations. On USPTO-Condition and Reaxys-TotalSyn-Condition (~180,000 entries with temperature labels), we report top-1/top-3 condition accuracy and temperature MAE alongside a Lipschitz violation rate: the fraction of matched-center reaction pairs whose top-1 recommended conditions diverge beyond $L \cdot d_X$. On the Hartenfeller Reaction Set, we measure condition-accuracy on rare transformations, with the Chemformer collapse from 90.9% to 1.09% on sub-10-occurrence reactions as the motivating reference point for what frequency-driven memorization does Rethinking NLP for Chemistry: A Critical Look at the USPTO Benchmark; we will also compare against analogical fine-tuning, which in that paper lifted an unseen related reaction only from 0% to 18.8%. On a curated set of literature one-pot protocols (the cascade and multicomponent syntheses above), we report merge precision and recall against exact-match and rule-based merging. End-to-end, we run route search on PaRoutes, where MHNPATH reported an 85.4% solution rate and replicated 69.2% of experimentally validated pathways A User-Tunable Machine Learning Framework for Step-Wise Synthesis Planning, and require that merging does not degrade solution rate while increasing the share of routes containing a correctly recovered one-pot collapse.

Baselines

The do-nothing reference point is MHNPATH run exactly as published: a step-by-step planner that never merges, whose PaRoutes solution rate of 85.4% and 69.2% replication of validated pathways define the route-quality floor that any merging mechanism must not undercut A User-Tunable Machine Learning Framework for Step-Wise Synthesis Planning. The strongest existing method for the prediction half is Parrot, the Transformer condition predictor built on USPTO-Condition and Reaxys-TotalSyn-Condition; the file reports that it beat the previous best model (RCR) by up to 13.44% in top-3 accuracy and reduced temperature MAE by roughly 4°C, but no absolute top-3 accuracy figure is given, so we will retrain Parrot's public recipe on our splits. For the merging half, the strongest simple competitor is Parrot plus exact-match merging: merge adjacent steps only when their top-1 predicted conditions are identical. This pairing is the real threat because it requires no new machinery. All models — ours and baselines — will use the same Transformer backbone, the same training data, the same compute, and the same random-search tuning budget over identical hyperparameter ranges, with the Lipschitz penalty weight tuned on validation like any other hyperparameter. The key ablation swaps the learned fair reaction metric $d_X$ for a plain full-molecule Euclidean or graph-edit distance while keeping the Lipschitz penalty; this isolates whether the fairness-style metric, rather than regularization per se, drives any gains. We count the proposal as successful if, at equal condition accuracy, the Lipschitz-fair model cuts the violation rate substantially relative to Parrot, lifts rare-reaction condition accuracy well above the memorization floor, and beats exact-match and rule-based merging on one-pot precision and recall.

Why not just…?

Why not just filter routes with chemistry rules? A reviewer will reasonably propose hardcoded incompatibility lists and SMARTS-based filters. The evidence says these fall short: the USPTO-bias study notes that SMARTS templates are simplified abstractions that miss solvent effects and subtle electronic variation Rethinking NLP for Chemistry: A Critical Look at the USPTO Benchmark; Parrot outperformed the rule- and classification-based RCR by up to 13.44% top-3 precisely because learned models capture non-obvious condition links; and Egret's curated set of 11,831 reaction groups with identical reactants and products but different conditions and yields Enhancing Generic Reaction Yield Prediction through Reaction Condition-Based Contrastive Learning shows condition effects are continuous, not enumerable. We will still run rule-based merging as a baseline, and if it matches our merge precision at lower cost, the honest conclusion is that the learned metric is unnecessary — the comparison will settle it.

Why not just use standard contrastive learning without Lipschitz bounds? MolR already clusters reactions with a margin contrastive loss under its algebraic constraint $h_A + h_B = h_C + h_D$ Chemical-Reaction-Aware Molecule Representation Learning. But MolR explicitly omits conditions, so its embedding distance cannot measure operational comparability — exactly what one-pot merging needs — and it provides no bound on how predictions vary with input changes. The fairness literature also gives direct evidence that unconstrained training is jittery: SFG showed a tight Lipschitz constraint cut model weight fluctuations by roughly 86% on tabular fairness benchmarks Stable Fair Graph Representation Learning with Lipschitz Constraint, and JacoLip improved structural fairness by 74.1% at negligible cost (0.284s to 0.297s per iteration) Aligning Relational Learning with Lipschitz Fairness. Still, this alternative is a genuine threat, which is why the Euclidean-metric ablation and a contrastive-only-no-penalty run are in the design: if they match our violation-rate reduction, the penalty earns nothing and we will say so.

Why not just add a one-pot penalty to the existing tree search? MHNPATH already optimizes multiple practical objectives per node, so one might append a scalar one-pot score. The problem is structural: the planner evaluates nodes independently, but one-pot feasibility is a pairwise property of adjacent steps — whether step one's reagent poisons step two's catalyst cannot be read off either node alone. Worse, per-node heuristics inherit patent-frequency bias, and the USPTO-bias study showed such heuristics collapse on rare transformations, so elegant rare cascades get pruned before merging is even considered Rethinking NLP for Chemistry: A Critical Look at the USPTO Benchmark. Our approach does live inside a MHNPATH-style search — we are not proposing a new planner — but the criterion is a learned, smooth, pairwise metric decision rather than an independent per-node penalty, and the end-to-end PaRoutes experiment directly compares the two.

Decisive Checks

The proposal lives or dies on three numbers. First, on USPTO-Condition, the Lipschitz-fair model must reduce the violation rate on matched-center pairs relative to retrained Parrot at equal top-3 accuracy and temperature MAE. Second, on the Hartenfeller set, rare-reaction condition accuracy must lift well above the memorization floor that product-prediction models exhibit (1.09% for sub-10-occurrence reactions), and must beat the analogical fine-tuning gains of 0% to 18.8% reported for unseen related reactions. Third, on literature one-pot protocols, metric-based merging must beat exact-match and rule-based merging on precision and recall. If the first and third hold but the second does not, the project still delivers a working one-pot planner; if none hold, the honest reading is that fairness machinery does not transfer to condition space, and the violation-rate measurements will be the first quantitative record of that.