Preprint

Preprint Method Keeps Stochastic Simulations Exact Forward

Tests reported similar accuracy to GS-ST across several benchmarks and a 3.0-fold reduction in the epochs needed to cross an oscillator error threshold.

A proposed gradient method for discrete stochastic systems kept the reaction choices of exact stochastic simulation hard in its forward pass and reached sustained error below 3% at a median of 262.5 training epochs in a genetic-oscillator test. The corresponding GS-ST comparison, using a competing rule for discrete choices, reached the same threshold at 782.5 epochs, a 3.0-fold reduction in the threshold epoch for PST; the bootstrap 95% interval for that fold reduction was 2.4 to 3.5.

A different way to pass the gradient

PST leaves exact stochastic simulation in place for the forward pass, including the hard categorical selection of which reaction occurs. It changes the backward pass: instead of differentiating that categorical selection, it differentiates normalized reaction propensities, the relative rates used to weight the choices.

Across the inference benchmarks, PST and GS-ST shared the state model, objective, optimizer, learning-rate schedule, ensemble size, initialization protocol and simulation horizon unless explicitly stated otherwise. Oscillator runs used matched nominal seeds but independent random-number consumption.

The mathematical guarantee is local. For a fixed current state, PST exactly returns the one-step mean sensitivity and is exact for affine post-reaction observables, meaning outputs whose dependence on the post-reaction state is straight-line. Over multiple steps, the discrepancy vanishes under affine downstream dependence; otherwise it is controlled by downstream curvature.

The first benchmark set the baseline

In dimerization tests, each condition used 100,000 exact SSA target trajectories, with 250 reactions per trajectory. Training used 100,000 model trajectories per epoch for 250 epochs across eight reverse-rate conditions. The condition-level two-parameter mean absolute percentage error, or MAPE, averaged 0.060% for PST and 0.069% for GS-ST.

The oscillator result came with a timing advantage

The oscillator benchmark drew on a 2,400,000-reaction reference trajectory and 262,144 starting states, with target segments of 150 reactions. Each epoch sampled 8,192 states and 25 trajectories per state; the comparison used ten PST runs and a ten-run GS-ST result set.

At the matched 1,000-epoch horizon, median run-wise MAPE was 1.70% for PST and 2.58% for GS-ST. At 3,000 epochs, the figures were 1.71% and 1.51%, respectively, so the relative ranking changed with the training horizon.

For a timing measure requiring error below 3% to be sustained, all ten runs in both arms met the criterion. Median threshold epochs were 262.5 for PST and 782.5 for GS-ST.

Other tests were close

In the ion-channel benchmark, training used 100 idealized HEK293 patch-clamp sweeps, 262,144 model trajectories per epoch, 20 SSA event slots per trajectory and 400 epochs. Final fits were checked with 30,000 independent hard-forward SSA trajectories. PST had an R-squared of 0.988 and normalized root-mean-square error of 3.42%, compared with 0.987 and 3.48% for GS-ST.

In one saved matched-protocol pair, a post hoc stabilization diagnostic placed PST at epoch 77 and GS-ST at epoch 160, a 2.08-fold difference. Because it came from a single pair, the figure is a limited speed diagnostic.

The repressilator comparison covered 50 reference-initialization pairs. For each task, 50,000 trajectories were used to construct the target, 50,000 for each stochastic loss and gradient evaluation, and 50,000 independent trajectories for final validation; there was one optimization realization per method and task.

Task-wise two-parameter MAPE summaries were close: PST's median, mean and maximum were 0.168%, 0.379% and 5.482%, versus 0.149%, 0.338% and 5.467% for GS-ST.

A separate MNIST stochastic-classifier demonstration used 203,796 trainable parameters and hard categorical selection from epoch 0. PST's final single-pass accuracy was 97.43%, while its best post-training accuracy with Monte Carlo and temporal averaging was 98.22%.

What the findings support

Taken together, the tests support a practical comparison, not a blanket claim that PST is the better estimator. PST had the lower dimerization MAPE, the earlier oscillator threshold and nearly identical ion-channel fit scores, while its repressilator MAPE summaries were slightly higher; at 3,000 oscillator epochs, GS-ST had the lower median MAPE.

The central caveat is mathematical: PST is exact for the one-step conditional mean and affine post-reaction observables, while multistep discrepancies can arise when downstream dependence is curved. Exact forward sampling alone does not remove that multistep issue.

Paper data and sources

Original title: Propensity Straight-Through Gradients for Discrete Stochastic Systems
Authors: Jose M. G. Vilar, Leonor Saiz
Journal/Repository: arXiv
Status: Preprint, not yet peer-reviewed
First online: 2026-08-26
DOI: Not available
Original paper · Full text

Versions and corrections

  1. Published automatically after legal-source, freshness, evidence, and independent-verification gates passed.