journal article·2026-07-10Open access

Exact Discrete Stochastic Simulation With Deep‐Learning‐Scale Gradient Optimization

Jose M. G. Vilar, Leonor Saiz

Abstract

ABSTRACT Exact stochastic simulation of continuous‐time Markov chains (CTMCs) is essential when discreteness and noise drive system behavior, but the hard categorical event selection in Gillespie‐type algorithms blocks gradient‐based learning. We eliminate this constraint by decoupling forward simulation from backward differentiation, with hard categorical sampling generating exact trajectories and gradients propagating through a continuous massively‐parallel Gumbel‐Softmax straight‐through surrogate. Our approach enables accurate optimization at parameter scales over four orders of magnitude beyond existing simulators. We validate for accuracy, scalability, and reliability on a reversible dimerization model (0.09% error), a genetic oscillator (1.2% error), a 203,796‐parameter gene regulatory network achieving 98.4% accuracy on the MNIST handwritten‐digit dataset (a prototypical deep‐learning multilayer perceptron benchmark), and experimental patch‐clamp recordings of ion channel gating (R 2 = 0.987) in the single‐channel regime. Our GPU implementation delivers 1.9 billion steps per second, matching the scale of non‐differentiable simulators. By making exact stochastic simulation massively parallel and autodiff‐compatible, our results enable high‐dimensional parameter inference and inverse design across systems biology, chemical kinetics, physics, and related CTMC‐governed domains.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Gene Regulatory Network Analysis · Generative Adversarial Networks and Image Synthesis · Machine Learning in Materials Science

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Biofisika Institute (CSIC UPV/EHU) University of the Basque Country (UPV/EHU) Bilbao Spain

IKERBASQUE Basque Foundation for Science Bilbao Spain

Department of Biomedical Engineering University of California Davis California USA

Funding

Ministerio de Ciencia, Innovación y Universidades

References (46)

Show source-provided references
1. 10.1126/science.107091910.1126/science.1070919 ↗
2. 10.1073/pnas.94.3.81410.1073/pnas.94.3.814 ↗
3. Wilkinson D. J. · 2018
4. 10.1073/pnas.220006111910.1073/pnas.2200061119 ↗
5. 10.1016/j.cell.2005.09.03110.1016/j.cell.2005.09.031 ↗
6. 10.1126/sciadv.adf067310.1126/sciadv.adf0673 ↗
7. 10.1529/biophysj.105.07297510.1529/biophysj.105.072975 ↗
8. 10.1002/advs.20241315310.1002/advs.202413153 ↗
9. 10.1016/j.cels.2024.06.00210.1016/j.cels.2024.06.002 ↗
10. 10.1016/j.cell.2008.09.05010.1016/j.cell.2008.09.050 ↗
11. 10.1038/nature0240410.1038/nature02404 ↗
12. 10.1103/PhysRevLett.80.409910.1103/PhysRevLett.80.4099 ↗
13. 10.1021/j100540a00810.1021/j100540a008 ↗
14. 10.1016/0021‐9991(75)90060‐110.1016/0021‐9991(75)90060‐1 ↗
15. Kampen N. G. · 2007
16. D. P.KingmaandJ.Ba “Adam: a Method for Stochastic Optimization ” inInternational Conference on Learning Representations(2015).
17. Breaking the Curse of Dimensionality with Convex Neural Networks
18. 10.1038/s41592‐018‐0019‐x10.1038/s41592‐018‐0019‐x ↗
19. 10.1098/rsfs.2011.004710.1098/rsfs.2011.0047 ↗
20. 10.1098/rsif.2008.017210.1098/rsif.2008.0172 ↗
21. 10.1023/A:102267262140610.1023/A:1022672621406 ↗
22. Y.Bengio N.Léonard andA.Courville “Estimating or Propagating Gradients through Stochastic Neurons for Conditional Computation ” arXiv:1308.3432 (2013).
23. M.Filo N.Rossi Z.Fang andM.Khammash “GenAI‐Net: a Generative AI Framework for Automated Biomolecular Network Design ”arXiv preprint arXiv:2601.17582(2026).
24. Rebar: Low‐variance, Unbiased Gradient Estimates for Discrete Latent Variable Models
25. 10.1098/rsif.2014.097910.1098/rsif.2014.0979 ↗
26. 10.1063/1.328016610.1063/1.3280166 ↗
27. A Differentiable Gillespie Algorithm for Simulating Chemical Kinetics, Parameter Estimation, and Designing Synthetic Biological Circuits10.7554/eLife.103877.3 ↗
28. E.Jang S.Gu andB.Poole “Categorical Reparameterization with Gumbel‐Softmax ” inInternational Conference on Learning Representations(2017).
29. C. J.Maddison A.Mnih andY. W.Teh “The Concrete Distribution: a Continuous Relaxation of Discrete Random Variables ” inInternational Conference on Learning Representations(2017).
30. 10.1073/pnas.09213389910.1073/pnas.092133899 ↗
31. 10.1371/journal.pcbi.003018910.1371/journal.pcbi.0030189 ↗
32. 10.1109/5.72679110.1109/5.726791 ↗
33. P. Y.Simard D.Steinkraus andJ. C.Platt “Best Practices for Convolutional Neural Networks Applied to Visual Document Analysis ” Seventh International Conference on Document Analysis and Recognition 2003. Proceedings (IEEE 2003):958–958 https://doi.org/10.1109/ICDAR.2003.1227801.10.1109/ICDAR.2003.1227801 ↗
34. 10.1113/JP28486110.1113/JP284861 ↗
35. F.Mottes Q.‐Z.Zhu andM. P.Brenner “Gradient‐based Optimization of Exact Stochastic Kinetic Models ” arXiv preprint arXiv:2601.14183 (2026).
36. 10.1063/1.215946810.1063/1.2159468 ↗
37. 10.1063/1.48181110.1063/1.481811 ↗
38. 10.1038/s41467‐024‐50716‐z10.1038/s41467‐024‐50716‐z ↗
39. Monte Carlo Gradient Estimation in Machine Learning
40. Gumbel E. J. · 1954
41. C. J.Maddison D.Tarlow andT.Minka “A* Sampling ” inProceedings of the 28th International Conference on Neural Information Processing Systems(MIT Press 2014) 3086–3094.
42. 10.1137/033004610.1137/0330046 ↗
43. 10.1016/j.bpj.2013.04.03210.1016/j.bpj.2013.04.032 ↗
44. On the Stochastic Properties of Single Ion Channels
45. GillesPy2: A Biochemical Modeling Framework for Simulation Driven Biological Discovery
46. 10.1093/bioinformatics/btr40110.1093/bioinformatics/btr401 ↗