Automatic Differentiation of Agent-Based Models

Arnau Quera-Bofarull, Nicholas Bishop, Joel Dyer, Daniel Jarne Ornia, Anisoara Calinescu +2 more
9/3/2025
cs.MAcs.AIcs.CE

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Agent-based models (ABMs) simulate complex systems by capturing the bottom-up interactions of individual agents comprising the system. Many complex systems of interest, such as epidemics or financial markets, involve thousands or even millions of agents. Consequently, ABMs often become computationally demanding and rely on the calibration of numerous free parameters, which has significantly hindered their widespread adoption. In this paper, we demonstrate that automatic differentiation (AD) techniques can effectively alleviate these computational burdens. By applying AD to ABMs, the gradients of the simulator become readily available, greatly facilitating essential tasks such as calibration and sensitivity analysis. Specifically, we show how AD enables variational inference (VI) techniques for efficient parameter calibration. Our experiments demonstrate substantial performance improvements and computational savings using VI on three prominent ABMs: Axtell's model of firms; Sugarscape; and the SIR epidemiological model. Our approach thus significantly enhances the practicality and scalability of ABMs for studying complex systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{querabofarull2025automatic,
  title  = {Automatic Differentiation of Agent-Based Models},
  author = {Arnau Quera-Bofarull and Nicholas Bishop and Joel Dyer and Daniel Jarne Ornia and Anisoara Calinescu and Doyne Farmer and Michael Wooldridge},
  year   = {2025},
  eprint = {2509.03303},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.03303v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.03303.svg)](https://codeofpaper.com/paper/2509.03303)

Discussion