q-bio.QMFeb 23, 2026

Exact Discrete Stochastic Simulation with Deep-Learning-Scale Gradient Optimization

Authors: Jose M. G. Vilar, Leonor Saiz

Organizations: Biofisika Institute (CSIC, UPV/EHU), University of the Basque Country (UPV/EHU), P.O. Box 644, 48080 Bilbao, Spain · IKERBASQUE, Basque Foundation for Science, 48011 Bilbao, Spain · Department of Biomedical Engineering, University of California, 451 E. Health Sciences Drive, Davis, CA 95616, USA

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% MNIST accuracy (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.

Explore similar work

CardsList
  1. Propensity Straight-Through Gradients for Discrete Stochastic Systems

    Aug 26, 2026Jose M. G. Vilar, Leonor SaizMarkov Models

  2. Gradient estimators for parameter inference in discrete stochastic kinetic models

    Apr 2, 2026Ludwig Burger, Annalena Kofler, Lukas Heinrich +1Parameter EstimationSimulation-Based Inference

  3. Exploiting Gradients in Bayesian Inference of Expensive Simulators

    Oct 8, 2026Šimon Soldát, Václav ŠmídlSimulation-Based InferenceBayesian Optimization