Generating Origin-Destination Matrices in Neural Spatial Interaction Models

Ioannis Zachos, Mark Girolami, Theodoros Damoulas

Abstract

Accurately modeling human mobility is essential for urban planning, epidemiology, and economic forecasting. Central to these efforts is the Origin-Destination Matrix (ODM), which quantifies discrete trip counts between locations. However, traditional methods for generating these matrices often suffer from high computational costs or inaccuracies introduced by continuous approximations. This paper introduces GeNSIT (Generating Neural Spatial Interaction Tables), a framework that combines neural networks with physics-driven differential equations and specialized sampling techniques. GeNSIT operates directly on discrete counts and scales linearly, providing a significant speedup for calibrating large-scale agent-based models while maintaining high accuracy and satisfying hard constraints.

Introduction

In the study of complex urban systems, Agent-Based Models (ABMs) serve as a primary tool for simulating individual movements and interactions. The foundational data structure for these simulations is the Origin-Destination Matrix (ODM), where each cell represents the number of individuals traveling from a specific origin to a specific destination.

Despite their importance, full ODMs are rarely observable. Researchers typically rely on summary statistics—such as total outflows from a residential area or total inflows to a commercial hub—to infer the underlying trip patterns. Historically, this inference has been performed through either computationally expensive individual-level simulations or continuous approximations that treat discrete human trips as fluid intensities. Both approaches have significant drawbacks: simulations do not scale well to megacities, and continuous approximations often fail to capture the discrete, integer nature of human movement, leading to errors when "rounding" results to fit real-world constraints.

The GeNSIT Framework

To address these limitations, the GeNSIT framework bridges the gap between continuous neural learning and discrete combinatorial sampling. The architecture is built upon three integrated pillars:

1. Neural Calibration of Spatial Interaction Models (SIMs)

GeNSIT utilizes neural networks to learn the underlying utility parameters that govern travel behavior. These parameters typically represent the "attractiveness" of a destination and the "friction" or cost associated with travel distance. By leveraging the flexibility of neural networks, the model can capture non-linear relationships that traditional gravity models might miss.

2. Physics-Embedded Dynamics

The framework incorporates the Harris-Wilson Stochastic Differential Equation (SDE), a physics-informed model describing how the attractiveness of a location (e.g., the availability of jobs or services) evolves over time in response to demand. Embedding these equations into the neural network's loss function acts as a regularizer, ensuring that the generated trip counts are consistent with the structural dynamics of urban competition and attraction.

3. Gibbs Markov Basis Sampling

The "secret sauce" of GeNSIT is its approach to discreteness. Rather than generating continuous values and rounding them, the model employs Gibbs Markov Basis Sampling. This technique allows the model to explore the space of all possible integer tables that satisfy observed marginal totals (summary statistics). This ensures that hard constraints—such as a fixed number of total commuters—are strictly honored while efficiently navigating the complex combinatorial space of potential matrices.

Experimental Evaluation

The researchers evaluated GeNSIT using both synthetic benchmarks and real-world datasets to test for accuracy and scalability:

  • Cambridge, UK: A 69 × 13 contingency table representing over 33,000 home-to-work trips.
  • Washington, DC, USA: A large-scale 179 × 179 table representing over 200,000 agents.
  • Synthetic Benchmarks: Scalability tests on matrices up to 1000 × 1000 to assess performance in high-dimensional settings.

Key Results and Insights

Linear Scalability

A primary breakthrough of GeNSIT is its computational efficiency. Traditional Markov Chain Monte Carlo (MCMC) methods for contingency tables are notoriously slow, often scaling poorly as the number of zones increases. GeNSIT scales linearly ($O(IJ)$) with the number of origin-destination pairs. In the Washington, DC case study, while traditional MCMC methods were estimated to require 300 hours to produce 500 samples, GeNSIT completed the task in a fraction of that time, making it viable for real-time policy analysis.

Avoiding the Discretization Trap

The paper identifies a "discretization trap" where quantization (rounding continuous intensities) leads to a poor representation of the true trip distribution. By sampling directly in the discrete space, GeNSIT captures the multimodal nature of potential distributions and achieves significantly lower Standardised Root Mean Square Error (SRMSE) compared to baselines like SIM-MCMC and GMEL. In the Cambridge dataset, GeNSIT demonstrated superior "ground truth coverage," meaning its predicted intervals were more likely to contain the actual observed values.

Physics-Informed Convergence

The integration of Harris-Wilson dynamics allowed the "Joint" version of the model to converge to stable estimates much faster than traditional Bayesian approaches. This is particularly valuable in scenarios where data is sparse, as the physics-based constraints guide the model toward plausible solutions even when empirical evidence is limited.

Conclusion and Future Work

GeNSIT represents a significant advancement in the generation of discrete Origin-Destination matrices. By combining the predictive power of neural networks with the structural integrity of physics-informed models and discrete sampling, it offers a scalable solution for large-scale urban modeling.

Future research directions include extending the framework to handle more complex "structured" constraints, such as specific network topologies or multi-modal transport restrictions. Additionally, exploring a wider variety of agent utility functions could further enhance the model's flexibility. Finally, the authors emphasize the importance of expert oversight when applying these models to ensure that urban planning decisions remain equitable and respect individual privacy.

Summary updated

BibTeX
@inproceedings{zachos2024generating,
  author = {Ioannis Zachos and Mark Girolami and Theodoros Damoulas},
  title = {{Generating Origin-Destination Matrices in Neural Spatial Interaction Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=eUcyIe1AzY},
}
Figure