  Stochastic lattice models (sLMs) are computational tools for simulating
spatiotemporal dynamics in physics, computational biology, chemistry, ecology,
and other fields. Despite their widespread use, it is challenging to fit sLMs
to data, as their likelihood function is commonly intractable and the models
non-differentiable. The adjacent field of agent-based modelling (ABM), faced
with similar challenges, has recently introduced an approach to approximate
gradients in network-controlled ABMs via reparameterization tricks. This
approach enables efficient gradient-based optimization with automatic
differentiation (AD), which allows for a directed local search of suitable
parameters rather than estimation via black-box sampling. In this study, we
investigate the feasibility of using similar reparameterization tricks to fit
sLMs through backpropagation of approximate gradients. We consider four common
scenarios: fitting to single-state transitions, fitting to trajectories,
inference of lattice states, and identification of stable lattice
configurations. We demonstrate that all tasks can be solved by AD using four
example sLMs from sociology, biophysics, image processing, and physical
chemistry. Our results show that AD via approximate gradients is a promising
method to fit sLMs to data for a wide variety of models and tasks.
