Authors: Jiajun He, Jacky Chen, Weiliang Luo, Heather Kulik, David R. Koes, Carles Domingo-Enrich, Yuanqi Du
Organizations: Microsoft Research New England, Cambridge, MA 02142, USA · Department of Engineering, University of Cambridge, Cambridge, CB2 1PZ, UK · CMU-Pitt Joint Program in Computational Biology, Pittsburgh, PA 15213, USA · Department of Computational and Systems Biology, University of Pittsburgh, Pittsburgh, PA 15213, USA · Department of Chemistry, Massachusetts Institute of Technology, Cambridge, MA 02139, USA · Department of Chemical Engineering, Massachusetts Institute of Technology, Cambridge, MA 02139, USA
Rare events drive transformations across physics, chemistry and biology, yet predicting their mechanisms and rates remains a fundamental challenge. Here we introduce Pharos, a framework that learns to make rare transitions accessible while predicting how frequently they occur under physical dynamics. Through stochastic optimal control, Pharos jointly learns the probability of completing a transition and how to steer simulations toward it, allowing sampling and learning to improve one another. Across biomolecular benchmarks, Pharos learns accurate transition probabilities with order-of-magnitude gains in convergence speed over previous algorithms. It transfers across ion assembly systems in explicit solvent while maintaining accurate reaction rate predictions, scales to host-guest binding systems that span millisecond timescales, and enables chemical reaction studies with a computationally demanding machine learning interatomic potential. By combining efficient sampling, quantitative kinetics, and transferability, Pharos opens a route toward foundation models of rare event mechanisms and rates across molecular systems.
Figures & tables
Figure 1: Pharos iterates between flexible simulation and committor learning. a , The current committor estimate defines a control that drives simulations toward otherwise rare transitions. An unbiased trajectory remains trapped in A , whereas controlled trajectories can cross the barrier toward B ; arrows illustrate the physical force and the learned control. b , Pharos can learn from trajectories generated under different simulation dynamics. Controlled trajectories, including simulations with modified forces or noise, are stored in a shared replay buffer. The self-consistency objective explicitly accounts for the dynamics that generated each trajectory, allowing data collected under controls in earlier iterations and sampling conditions to be reused together. c , The committor is updated through the self-consistency objective using segments from the selected trajectories in the buffer. The updated committor then defines the control for subsequent simulations, closing the iterative sampling learning loop.
Figure 2: Pharos enables highly efficient committor learning. a-c , Alanine dipeptide, chignolin and Trp-cage. Left, committors estimated by unbiased shooting and predicted by Pharos, projected onto the same collective variables. n denotes the total number of test data points. Center, predicted versus shooting committors for Pharos (teal) and the baseline (orange): semigroup learning [ 35 ] in a,b and DGA [ 50 ] in c . Solid lines and shading show binned shooting means and ±1 standard deviation; dashed diagonals indicate perfect agreement. Right, Pearson correlation and RMSE versus cumulative simulated time throughout training. Teal and orange denote Pharos and the corresponding baseline; gray denotes semigroup learning on Trp-cage. Open circles mark the checkpoints shown in the center panels.
Figure 3: Pharos learns an explicit-solvent committor for host-guest binding. a , Bound and unbound reference structures and basin definitions. b , Predicted versus shooting committors; lines and shading show binned shooting means and ±1 standard deviation. c , Predictions projected onto guest height and tilt; purple curve, projected q=0.5 contour. d , Preliminary unbinding-rate estimates from RETIS and the Hill relation, compared with published computational estimates. e , Predicted committor versus cavity water count for guests near the host (blue) and farther away (red); error bars, ±1 standard deviation. f , Two configurations at similar guest heights but with different shooting committors, alongside the model predictions.
Figure 4: A learned committor transfers across ion pairs and gives accurate dissociation rates. a , The simulation box: one cation-anion pair in water. b , Five NaCl test configurations ordered by ion separation r , with their shooting committors q(x) and the predictions of the network trained on all six pairs. The committor follows the number of bridging waters (opaque; other waters translucent). c , The six networks and the pairs each was trained on (filled) or never saw (open); teal, the network trained on all six pairs; grays, networks trained without one ion. d , Shooting committor against each network’s q(x) , 1,200 configurations per pair (mean in 0.1-wide bins; markers and colors as in c ; dashed, held-out pair; thin gray line, identity). e , Rate constants kAB from the contact pair A to the separated pair B , from RETIS using interfaces defined by each network’s qθ(x) , relative to long plain MD (gray band, 95% interval); mean ± s.e. of four runs; pairs ordered by the long MD rate constant, shown below the plot in gray.
Figure 5: Pharos resolves the dimerization of hydrogen cyanide in liquid HCN and in aqueous solution. a , Reactant and product boxes in liquid HCN and aqueous solution phases. Reactive species are opaque, and the solvent is transparent. b , Predicted versus shooting committors for test configurations. Solid lines and shading show binned shooting means and ±1 standard deviation; dashed diagonals indicate perfect agreement. c , Free energy along s=logitq from umbrella sampling in aqueous solution. Shading marks ±2 s.e. from bootstrap over replicas. R and P mark the reactant and product states. The purple band stands for computed barriers for cyanide adding to HCN, from 21.8 kcal mol -1 [ 47 ] to 24.0 kcal mol -1 [ 6 ] . The green dotted line stands for the experimental activation energy of 20.4 kcal mol -1 [ 46 ] . d , Rate constants of the ion pair channel CN - + HCNH + → IAN in liquid HCN: direct counting in plain MD, the Hill relation using q(x) , and RETIS using interfaces defined by q(x) . The bars stand for 95% intervals. e , Structures in the transition state ensemble near the q=1/2 surface, with the length of the forming C-C bond, the shooting committor q(x) and the network prediction. Reacting molecules are opaque and nearby solvent molecules are transparent.
Salt
LiCl
LiI
NaCl
NaI
CsCl
CsI
RA
0.23
0.26
0.27
0.31
0.34
0.38
RB
0.48
0.53
0.53
0.59
0.60
0.68
Table S1 : Ion-pair basin thresholds. All distances are in nm.
Ion
σ (nm)
ϵ (kJ mol -1 )
Mass (Da)
C1
0.27027
0.23248
104.06
C4
0.16949
0.06800
8.95
C5
0.15083
0.12569
39.00
A0
0.53097
0.08243
38.31
A2
0.38217
0.22361
62.45
Table S2 : Virtual ions in the retained salts. C and A denote virtual cations and anions, with charges +1 and −1 .
Figure S1 : How ion and water motion affect the dissociation committor. a , Response of the committor to thermal motion near the transition state ( D ), separated into contributions from the ions (gray), water in the first hydration shells (blue), and water outside these shells (light blue). b , The fraction of the total response contributed by each region, illustrated around the ion pairs. Darker shading indicates a larger contribution. c , Number of waters in the first hydration shells (top) and their mean response per water (bottom); open and filled circles denote chloride and iodide salts. Example LiCl and CsCl configurations show first-shell waters in red, with darker colors indicating larger responses. Blue dots represent outer waters; purple and gold spheres represent the cation and anion. d , Change in the relative response of outer and first-shell water from Li + to Cs + . Gray shows the contribution from changing ion properties at fixed configurations, blue from changes in the sampled configurations, and black their combined effect. Error bars indicate 95% bootstrap intervals.
Salt
LiCl
LiI
NaCl
NaI
CsCl
CsI
R+
0.2625
0.3125
0.3275
0.3175
0.4275
0.3925
R−
0.4025
0.4325
0.3675
0.4175
0.3825
0.4225
Table S3 : First hydration shell radii. R+ and R− are the cation-oxygen and anion-oxygen first-shell radii, respectively, in nm.
Figure S2 : Committor validation of the transferable ion networks. Rows, networks trained on all six salts or with one ion species left out (no Na + , Li + , Cs + , I - or Cl - ); columns, ion pairs. Points, the 1,200 test configurations per pair: shooting committor (500 shots with Maxwell velocities) against q(x) (256 velocity draws). Line, mean shooting committor in 0.05-wide bins of the prediction; shading, ± 1 s.d.; dashed, identity; dashed frames, held-out pairs.
Figure S3 : Rate estimates from the Hill relation. Per ion pair (rows) and network (groups), kAB from the flux out of A weighted by the learned committor at interfaces from the exit of A to q=0.7 (squares, light to dark), with q(x,v) (left) and its velocity average q(x) (right); RETIS (teal) and long plain MD (gray band, 95%) for reference; open symbols and shading, held-out pairs.
Rare events, from biomolecular conformational changes and phase transitions to chemical reactions, are central to many physical systems, yet extremely difficult to study computationally because unbiased simulations seldom produce them. Transition Path Theory provides a rigorous statistical framework for analyzing such events: it characterizes the ensemble of reactive trajectories between two metastable states (reactant and product), and its central object, the committor function (the probability that the system next reaches the product rather than the reactant), encodes essential kinetic and thermodynamic information. We introduce a framework for committor estimation that builds on stochastic optimal control, with a principled formulation that grounds committor learning on capped hitting-time trajectories. In this framework the committor defines a feedback control, proportional to the gradient of its logarithm, that steers trajectories toward the reactive region, enabling sampling of reactive paths. As practical algorithms, we develop two training losses: a heuristic on-policy direct backpropagation loss and a principled off-policy Value Matching loss, for which we establish first-order optimality guarantees. Being off-policy, Value Matching can leverage simulated trajectories from alternative sampling processes and reuse them from a replay buffer, which enables efficient learning. In particular, we derive a reactive current-preserving sampling process that can accelerate exploration. On reversible and non-reversible dynamics, the framework yields more accurate committor estimates, reaction rates, and transition path samples than existing methods.
Yuanqi Du, Jiajun He, Dinghuai Zhang +2
Microsoft Research New England · Cornell University · University of Cambridge +1
Chemical reaction networks are widely used to model stochastic dynamics in biophysical processes. Their exact probabilistic description via the chemical master equation becomes intractable for high-dimensional systems due to the exponential growth of the state space. This difficulty is further exacerbated when metastable transitions and rare events dominate the dynamics. Here, we present an advanced neural-network approach that effectively tackles large reaction networks and rare-event dynamics within a unified framework. Building on autoregressive representations of the full joint probability distribution, we achieve efficient training through second-order optimization methods, including natural gradient descent and the time-dependent variational principle. We leverage enhanced-sampling strategies that enable accurate resolution of low-probability regions governing rare transitions. We demonstrate the method on a multistable genetic toggle switch and a mitogen-activated protein kinase (MAPK) cascade consisting of 16 species and 35 reactions with dense coupling. We further quantify rare events in spatially extended Schlögl models in both one- and two-dimensional lattices, reaching system sizes with extremely large state spaces up to 3×1015. These results highlight the potential of neural modeling as a flexible and scalable framework for studying high-dimensional chemical reaction networks and rare events.
Jiayu Weng, Xinyi Zhu, Jing Liu +3
Institute of Data Science, University of Hong Kong, Hong Kong · Department of Systems Science, Faculty of Arts and Sciences, Beijing Normal University, Zhuhai 519087, China · School of Physics, University of Electronic Science and Technology of China, Chengdu 611731, China +6
We consider the probability that a reversible Markov chain started in a set A is in a rare set B after a fixed horizon, a quantity often needed for many start laws, down to single states. Twisted sequential Monte Carlo (SMC) estimates such probabilities without bias, with small variance when its proposal and twist approximate the dynamics conditioned on reaching B, but these components are usually learned from forward simulations, which contain almost no successful paths when the event is rare. We introduce Foresight-SMC, which learns both components from the target side: under reversibility, relaxations started in B that return to A are, read backwards, exact samples of the conditioned paths, and their number is governed by the return probability rather than by the rare probability. Extending this reversal to the recorded propose--accept decisions of a Metropolis-adjusted sampler, we fit a controlled Langevin proposal with exact likelihood ratios by maximum likelihood, together with a classifier twist; the resulting estimator is unbiased for any start law. A variance analysis shows that resampling reduces the variance when the importance weights degenerate, as they do over long horizons. On an Allen--Cahn field, the learned proposal alone suffices, and one trained model is more accurate than splitting at equal cost. On alanine tripeptide, resampling with the learned twist is necessary, and Foresight-SMC needs less computation per query than adaptive multilevel splitting on localized start sets.
Ziyi Fan, Yuxuan Qiu, Haibo Wang +2
Key Laboratory of Organ Regeneration and Reconstruction, Chinese Academy of Sciences, Beijing, China · Institute of Industrial Science, The University of Tokyo, Tokyo, Japan · Westlake University, Hangzhou, China +1