# A differentiable programming framework for spin models

arXiv: https://arxiv.org/abs/2304.01772 · HTML: https://mlsanity.com/paper/2304.01772/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 11 of its 103 references that are in the map.
- First posted on arXiv 4 Apr 2023.

## Builds on (most cited first, 11 of 11)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Automatic differentiation in machine learning: a survey](https://mlsanity.com/paper/1502.05767/) (2015)
- [In-Datacenter Performance Analysis of a Tensor Processing Unit](https://mlsanity.com/paper/1704.04760/) (2017)
- [Training Spiking Neural Networks Using Lessons From Deep Learning](https://mlsanity.com/paper/2109.12894/) (2021)
- [DiffTaichi: Differentiable Programming for Physical Simulation](https://mlsanity.com/paper/1910.00935/) (2019)
- [Physics-based Deep Learning](https://mlsanity.com/paper/2109.05237/) (2021)
- [Pontryagin Differentiable Programming: An End-to-End Learning and Control Framework](https://mlsanity.com/paper/1912.12970/) (2019)
- [JAX-FLUIDS: A fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows](https://mlsanity.com/paper/2203.13760/) (2022)
- [Differentiable Programs with Neural Libraries](https://mlsanity.com/paper/1611.02109/) (2016)
- [Differentiable hybrid neural modeling for fluid-structure interaction](https://mlsanity.com/paper/2303.12971/) (2023)
- [Automatic Differentiable Monte Carlo: Theory and Application](https://mlsanity.com/paper/1911.09117/) (2019)

## Abstract (arXiv)

We introduce a novel framework for simulating spin models using differentiable programming, an approach that leverages the advancements in machine learning and computational efficiency. We focus on three distinct spin systems: the Ising model, the Potts model, and the Cellular Potts model, demonstrating the practicality and scalability of our framework in modeling these complex systems. Additionally, this framework allows for the optimization of spin models, which can adjust the parameters of a system by a defined objective function. In order to simulate these models, we adapt the Metropolis-Hastings algorithm to a differentiable programming paradigm, employing batched tensors for simulating spin lattices. This adaptation not only facilitates the integration with existing deep learning tools but also significantly enhances computational speed through parallel processing capabilities, as it can be implemented on different hardware architectures, including GPUs and TPUs.
