How to generate micro-agents? A deep generative modeling approach to population synthesis

Stanislav S. Borysov, Jeppe Rich, Francisco C. Pereira

Introduction

In fields like transportation modeling and urban planning, researchers rely on agent-based models (ABMs) to simulate the behavior of millions of individual "micro-agents." A critical prerequisite for these simulations is a synthetic population that accurately reflects the demographic and behavioral characteristics of a real-world population.

However, generating these populations faces the curse of dimensionality. As agents are defined by more attributes—such as age, income, education, car ownership, and travel preferences—the number of possible attribute combinations grows exponentially. Traditional statistical methods, such as Iterative Proportional Fitting (IPF) or Gibbs sampling, often struggle in these high-dimensional spaces. They frequently suffer from overfitting, where they merely replicate the small survey samples they were trained on, or they fail to address "sampling zeros"—realistic combinations of traits that exist in reality but were missing from the initial training data.

This paper introduces a deep learning framework using Variational Autoencoders (VAEs) to overcome these limitations, scaling efficiently to hundreds of attributes while maintaining statistical integrity.

Methodology: The VAE Architecture

The authors propose using a VAE, an unsupervised deep generative model, to learn the underlying joint distribution of agent data. Unlike standard autoencoders that simply map inputs to a single point in a latent space, VAEs map inputs to a probability distribution.

The VAE architecture consists of an encoder that compresses high-dimensional agent data (x) into a low-dimensional latent representation (z), and a decoder that reconstructs the agent (x̂).

Core Components

  • Encoder and Decoder: The encoder compresses high-dimensional agent data into a low-dimensional "latent space," while the decoder reconstructs the agent from this compressed representation.
  • Latent Space Smoothing: By forcing data through a bottleneck and regularizing it with a Kullback-Leibler (KL) divergence term, the model learns a continuous latent space. This allows the model to act as a "statistical smoother," enabling the generation of "hallucinated" agents that are realistic but did not exist in the training set.
  • Handling Mixed Data: To accommodate both numerical and categorical variables, the model employs a custom loss function combining Mean Squared Error (MSE) for continuous data and Cross-Entropy for categorical data.

Training and Sampling

A key innovation of the VAE is the reparameterization trick, which allows the model to remain differentiable despite the stochastic nature of sampling from the latent space during training.

The training process uses a reparameterization trick (z = μ + σ ⊙ ε) to learn the distribution, while sampling involves drawing directly from the latent space to generate new agents.

During the training phase, the encoder $Q_\theta$ learns to map input $x$ to parameters of a distribution (mean $\mu$ and variance $\sigma$). During the sampling phase, the encoder is no longer needed; the model simply samples a point $z$ from the learned latent distribution and passes it through the decoder $P_\phi$ to generate a synthetic agent $\hat{x}$.

Experimental Evaluation

The study utilized the Danish National Travel Survey (TU), a massive dataset containing 24-hour diaries for over 330,000 residents. The authors benchmarked the VAE against traditional Gibbs sampling and Bayesian Networks (BN) across three levels of complexity, ranging from 4 attributes to an "Extended" set of 47 attributes (230-dimensional after encoding).

Key Results

  • Scalability: While Bayesian Networks performed well on low-dimensional data, they became computationally prohibitive as attributes increased. Learning a BN for 21 variables took 24 hours, whereas the VAE trained in just 10 minutes.
  • Diversity vs. Mimicry: Gibbs sampling was found to be a "perfect replicator," failing to generate any agents not already present in the training data. In contrast, the VAE consistently generated "out-of-sample" individuals, as confirmed by a "distance to nearest neighbor" metric ($\mu_{NS}$).
  • Statistical Fidelity: Despite generating new individuals, the VAE maintained high correlation coefficients and low Standardized Root Mean Squared Error (SRMSE) across bivariate and trivariate distributions, ensuring that the relationships between variables (e.g., age vs. income) remained intact.

Conclusion and Future Directions

The VAE framework represents a significant step forward in population synthesis, offering a scalable solution that avoids the pitfalls of overfitting and sampling zeros. However, challenges remain regarding logical consistency; as a probabilistic model, the VAE can occasionally generate impossible agents (e.g., a child with a doctoral degree). Future work may involve post-processing filters or more constrained architectures, such as Recurrent Neural Networks (RNNs), to generate sequential daily activity chains.

Summary updated

Abstract

Population synthesis is concerned with the generation of synthetic yet realistic representations of populations. It is a fundamental problem in the modeling of transport where the synthetic populations of micro-agents represent a key input to most agent-based models. In this paper, a new methodological framework for how to 'grow' pools of micro-agents is presented. The model framework adopts a deep generative modeling approach from machine learning based on a Variational Autoencoder (VAE). Compared to the previous population synthesis approaches, including Iterative Proportional Fitting (IPF), Gibbs sampling and traditional generative models such as Bayesian Networks or Hidden Markov Models, the proposed method allows fitting the full joint distribution for high dimensions. The proposed methodology is compared with a conventional Gibbs sampler and a Bayesian Network by using a large-scale Danish trip diary. It is shown that, while these two methods outperform the VAE in the low-dimensional case, they both suffer from scalability issues when the number of modeled attributes increases. It is also shown that the Gibbs sampler essentially replicates the agents from the original sample when the required conditional distributions are estimated as frequency tables. In contrast, the VAE allows addressing the problem of sampling zeros by generating agents that are virtually different from those in the original data but have similar statistical properties. The presented approach can support agent-based modeling at all levels by enabling richer synthetic populations with smaller zones and more detailed individual characteristics.
BibTeX
@inproceedings{borysov2019how,
  author = {Stanislav S. Borysov and Jeppe Rich and Francisco C. Pereira},
  title = {{How to generate micro-agents? A deep generative modeling approach to population synthesis}},
  booktitle = {Transportation},
  year = {2019},
  doi = {10.1016/j.trc.2019.07.006},
}
Figure