Skip to main content
QUICK REVIEW

[Paper Review] Some challenges of calibrating differentiable agent-based models

Arnau Quera-Bofarull, Joel Dyer|arXiv (Cornell University)|Jul 3, 2023
Multi-Agent Systems and NegotiationComputer Science3 citations
TL;DR

This paper identifies and addresses key challenges in calibrating differentiable agent-based models (ABMs), particularly focusing on discrete randomness, reverse- vs. forward-mode automatic differentiation (AD), and Monte Carlo gradient estimation. Using the JUNE epidemiological ABM with 8 million agents, the authors demonstrate that Gumbel-Softmax reparameterization and hybrid AD strategies enable fast, accurate Bayesian inference via normalizing flows, achieving rapid convergence in 600 epochs with 3,000 model evaluations.

ABSTRACT

Agent-based models (ABMs) are a promising approach to modelling and reasoning about complex systems, yet their application in practice is impeded by their complexity, discrete nature, and the difficulty of performing parameter inference and optimisation tasks. This in turn has sparked interest in the construction of differentiable ABMs as a strategy for combatting these difficulties, yet a number of challenges remain. In this paper, we discuss and present experiments that highlight some of these challenges, along with potential solutions.

Motivation & Objective

  • To identify and analyze core challenges in applying automatic differentiation to agent-based models (ABMs), particularly due to discrete randomness and computational complexity.
  • To evaluate the effectiveness of differentiable programming techniques—especially Gumbel-Softmax and hybrid reverse/forward AD—for calibrating large-scale ABMs.
  • To demonstrate the feasibility and efficiency of gradient-based inference in high-dimensional, stochastic ABMs using normalizing flows and Monte Carlo estimation.
  • To provide practical guidance and empirical validation for practitioners seeking to implement differentiable ABMs in complex systems.

Proposed method

  • Employed the Gumbel-Softmax reparameterization trick to enable gradient computation through discrete stochastic choices in ABMs, despite its known variance limitations.
  • Implemented a hybrid automatic differentiation strategy alternating between forward-mode and reverse-mode AD to manage memory and computational costs in large ABMs.
  • Used normalizing flows with masked affine autoregressive flows to perform stochastic variational inference (SVI) for posterior approximation in ABM parameter calibration.
  • Formulated the calibration task as a minimization of expected loss over stochastic model outputs, using a squared log-distance loss between simulated and synthetic ground-truth infection time-series.
  • Trained models using the AdamW optimizer with 5 Monte Carlo samples per gradient estimate to approximate expectations in the loss function.
  • Calibrated 12 parameters including 11 location-specific transmission rates (β_L) and initial infection count (I₀) in the JUNE ABM using synthetic data.

Experimental results

Research questions

  • RQ1How effective is the Gumbel-Softmax trick in enabling gradient-based calibration of ABMs with discrete stochastic transitions?
  • RQ2What are the computational trade-offs between reverse-mode and forward-mode automatic differentiation in large-scale agent-based models?
  • RQ3Can hybrid AD strategies mitigate memory and performance bottlenecks in differentiable ABMs with millions of agents and long time horizons?
  • RQ4To what extent can normalizing flows enable accurate and efficient Bayesian inference in high-dimensional, underdetermined ABM calibration problems?
  • RQ5How robust is gradient-based calibration when the true parameter values are difficult to infer from aggregate time-series data alone?

Key findings

  • The Gumbel-Softmax reparameterization enabled stable and effective gradient estimation despite high variance, supporting fast convergence in parameter calibration.
  • The hybrid AD strategy—switching between forward and reverse modes—successfully managed memory and computational costs in an ABM with 8 million agents and long simulation horizons.
  • Stochastic variational inference using normalizing flows achieved rapid convergence within 600 epochs, requiring only 3,000 model evaluations (5 Monte Carlo samples per step).
  • The calibrated normalizing flow accurately captured posterior uncertainty, showing high confidence in sensitive parameters like initial infections and company transmission rates, and lower confidence in less impactful venues like cinemas.
  • The loss function based on log-scaled infection time-series proved robust to outliers, enabling stable training despite large fluctuations in case counts.
  • The method successfully calibrated a highly underdetermined system—inferring 11 location-specific β_L parameters and I₀ from aggregate infection data—demonstrating practical feasibility.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.