Pretrained chemical language models are dense networks: every weight processes every atom of every molecule. There is good evidence that routing different chemical substructures to different specialist sub-networks helps. The best such method, however, only works for yes/no or multi-class property labels, and it builds its specialists from scratch. This leaves out the properties chemists most often need, which are continuous quantities such as solubility, hydration free energy, and lipophilicity.
We propose to carve an already-trained dense molecular model into a mixture of experts (a layer made of several sub-networks, with a small router that sends each input to only a few of them). Each chemical fragment is routed to experts according to how much that fragment changes the model's continuous prediction error. The two-sentence version: take the neurons a pretrained model already has, regroup them into fragment-specialized experts without adding parameters, and replace the classification-only "does this fragment help or hurt accuracy" signal with a continuous "how much does this fragment move the residual" signal. If this works, substructure-aware experts extend to regression, and continuous targets also become the first real test of whether dense-to-sparse conversion survives outside discrete prediction.
Core Claim
Two published results suggest this is possible but do not show it. ASE-Mol splits molecules into BRICS fragments (a standard rule set for cutting molecules at chemically meaningful bonds). It labels each fragment a positive or negative motif according to whether it raises or lowers classification accuracy, routes the two kinds to separate experts, and separates them with a fixed-margin triplet loss. It reports 96.3% ROC-AUC on BACE with a GCN encoder. Its authors state the method is classification-only, and it trains experts from scratch. Separately, the dense-to-sparse conversion literature shows that pretrained feed-forward layers already contain groupable specialization. MoEfication partitions neurons by how often they fire together. DOT-MoE does the partition with differentiable optimal transport that directly minimizes the layer's output reconstruction error. Every one of these conversion papers is evaluated on token generation, multiple choice, or image categories.
Our claim is that ASE-Mol's discrete motif signal can be replaced by a signed, continuous residual attribution. With that replacement, fragment-routed experts obtained by partitioning a pretrained dense model match or beat the dense model on MoleculeNet regression at reduced active parameters. They also beat both the binned-classification workaround and a from-scratch fragment MoE. The attribution for fragment $f$ of molecule $x$ with target $y$ is
$$a_f = |y - \hat{y}(x_{\setminus f})| - |y - \hat{y}(x)|,$$
where $\hat{y}$ is the dense fine-tuned model's prediction and $x_{\setminus f}$ is $x$ with the tokens of fragment $f$ masked. A positive $a_f$ means the fragment helps the prediction, and its size says by how much. There is no correctness boundary.
Research Program
The backbone is ChemBERTa-2, a dense transformer pretrained on SMILES strings (text encodings of molecules). BRICS fragments map to contiguous token spans. We first fine-tune the dense model on each regression target, both to compute $a_f$ and to serve as the reference.
We then convert each feed-forward layer into $E$ experts by partitioning its existing neurons. The partition uses DOT-MoE's output-aware optimal-transport assignment, and we reuse that method unchanged. Total parameter count stays constant and only the chosen experts run. This choice matters for a specific reason. MoleculeNet regression sets are small (FreeSolv has well under a thousand molecules), and weight-copying sparse upcycling multiplies parameters by $E$, which invites overfitting. ChemBERTa-2 uses smooth activations. MoEfication's co-activation graph assumes ReLU's hard zeros, whereas DOT-MoE's reconstruction objective does not, which is a second reason to build on DOT-MoE.
The router scores the pooled embedding of each fragment and sends all of that fragment's tokens to the same top-$k$ experts. We train it together with light expert fine-tuning, using the regression loss, a load-balancing term, and an attribution-ordering term that replaces ASE-Mol's fixed-margin triplet. For fragment embeddings $h_i, h_j, h_l$ with $a_i$ closer to $a_j$ than to $a_l$, we require
$$\mathcal{L}_{\text{ord}} = \max\big(0,\ \|h_i - h_j\| - \|h_i - h_l\| + \lambda\,(|a_i - a_l| - |a_i - a_j|)\big),$$
where $\lambda$ scales the margin. The margin therefore grows with how differently two fragments move the residual, instead of being a constant tied to a class boundary. The term reduces to a sign-based triplet when attributions are binary, so ASE-Mol's classification behaviour is a special case we can check on BACE and BBBP.
The program also answers a question the conversion literature leaves open. Sparse Upcycling reports an immediate performance drop after conversion (a "surgery dip") that recovers under further training on categorical losses. We do not know whether regression, where gradients scale with target magnitude and variance, shows the same recovery or instead diverges. We will record RMSE immediately after conversion and throughout recovery for each conversion method.
Baselines
The naive reference point is the dense ChemBERTa-2, fully fine-tuned on each target. It uses the same scaffold splits, the same number of hyperparameter trials, and a tuning budget equal to the conversion pipeline's total fine-tuning steps. This is the baseline that matters most. The strongest published regression result in our file is PhysChem, from Deep Molecular Representation Learning via Fusing Physical and Chemical Information, which reports ESOL RMSE 0.499 against a prior baseline of 0.547. ChemBERTa-2 itself reports RMSE 1.363 on Delaney/ESOL. Split protocols may differ across these papers, so we will rerun both the ChemBERTa-2 fine-tune and, where code permits, PhysChem under our scaffold split rather than compare against printed numbers. We found no reported result on Lacuna for ChemBERTa-2 or PhysChem RMSE on FreeSolv or Lipophilicity, and none for property-level error on QM9. The file only reports PhysChem's 3D-coordinate MSE dropping from 0.418 to 0.197. Beating the dense model means lower RMSE than the matched dense fine-tune, averaged over at least five scaffold-split seeds with non-overlapping standard errors, at 25–50% active feed-forward parameters. Matching it within error at 50% active parameters counts as a partial success.
The strongest conversion competitor is DOT-MoE's partition with a standard learned token router, trained on the regression loss alone, with no fragment routing and no attribution term. It isolates whether fragment-level routing and residual attribution add anything beyond good neuron partitioning. Under the same budget we will also run MoEfication's co-activation partition, after substituting ReLU approximations as that paper requires, and weight-copying sparse upcycling.
The strongest substructure competitor is ASE-Mol retrained with an MSE head and its original correctness-based motif labels. Correctness is redefined as "residual below the training median", since this is the minimal regression port of that method. For classification sanity we compare against ASE-Mol's reported 96.3% BACE ROC-AUC with GCN, run under its protocol.
Two ablations isolate the key ingredient. The first removes $\mathcal{L}_{\text{ord}}$ while keeping fragment routing. The second replaces continuous $a_f$ with its sign, which gives binary motifs. The proposal's central claim requires the full method to beat the sign-only version on regression while tying it on classification.
Why not just…?
Why not just fine-tune the dense model and skip conversion? This is a real threat. For molecules this small, inference cost is rarely the bottleneck, so the MoE has to earn its place through accuracy or specialization, not speed. The first decisive check is the dense-versus-converted comparison at matched budget. If the converted model loses on RMSE at every sparsity level, the honest conclusion is that fragment specialization from pretrained neurons does not help regression. That negative result would still usefully bound the scope of dense-to-sparse conversion.
Why not just bin the continuous targets and run ASE-Mol unchanged? Binning discards the order and distances between target values. MoleculeNet regression targets need fine resolution: the ESOL gap between PhysChem and its baseline is only about 0.05 log units. On coarse targets binning could be competitive, so we test it directly. We run ASE-Mol and our model with sign attribution on quantile-binned targets at 5, 10, and 20 bins, predict bin centres, and report RMSE. The continuous-attribution claim fails if some bin count matches it.
Why not just train a fragment-routed MoE from scratch? Sparse Upcycling reports that a from-scratch MoE needed about 120% of the dense pretraining compute to catch up with upcycling. CLIP-MoE (CLIP-MoE) reports conversion at under 2% of scratch cost. Both results come from data-rich regimes, and molecular regression sets are far smaller, which should favour pretrained initialization even more. The from-scratch ASE-Mol port above measures this.
Why not just prune the dense model? DOT-MoE reports that structured pruning loses much more accuracy than its conversion at equal sparsity on LLaMA-2, where DOT-MoE keeps 90% of dense performance at 50% active parameters. Whether this holds for regression, where pruned long-tail neurons may encode rare functional groups, is unknown. We therefore include magnitude-based structured pruning of feed-forward neurons at matched active-parameter counts.
Proposed Experiments
We will use ESOL, FreeSolv, Lipophilicity, and a subset of QM9 electronic properties from MoleculeNet. All use scaffold splits and report RMSE (MAE for QM9), at 25%, 50%, and 75% active feed-forward parameters. BACE, BBBP, and ClinTox, reported as ROC-AUC, check that the method does not break classification.
The decisive checks are three. First, the full method beats the matched dense fine-tune and the DOT-MoE token-router baseline on at least three of the four regression targets. Second, continuous attribution beats both the sign-only version and the best binned variant on regression, while tying on classification. Third, the post-conversion curves show whether regression recovers from the surgery dip as classification does. If the dip does not recover for replication-based upcycling but does for parameter-preserving partitioning, that result alone would tell practitioners which conversion to use for continuous targets. As a mechanistic check, we will test whether expert assignments line up with chemically interpretable fragment groups, such as polar versus hydrophobic groups on Lipophilicity, beyond chance. This confirms whether the experts specialize by chemistry or merely split the load.
References
- Adaptive Substructure-Aware Expert Model for Molecular Property Prediction
- MoEfication: Transformer Feed-forward Layers are Mixtures of Experts
- DOT-MoE: Differentiable Optimal Transport for MoEfication
- ChemBERTa-2: Towards Chemical Foundation Models
- Sparse Upcycling: Training Mixture-of-Experts from Dense Checkpoints
- Deep Molecular Representation Learning via Fusing Physical and Chemical Information
- CLIP-MoE: Towards Building Mixture of Experts for CLIP with Diversified Multiplet Upcycling
- MoleculeNet: a benchmark for molecular machine learning