Papers
Topics
Authors
Recent
Search
2000 character limit reached

Distilling Aggregate Mobility Statistics into a Language Model Policy for Post-Event Crowd Simulation

Published 20 Aug 2026 in cs.MA and cs.AI | (2608.19778v1)

Abstract: Pedestrian simulators need a behaviour rule for every agent, but privacy usually limits the data for setting one to aggregate statistics, namely zone-level device counts and origin-to-destination (OD) flows, with no individual trajectories. Such aggregates under-determine individual behaviour, because many different sets of decisions reproduce the same counts. We fine-tune a LLM crowd agent so that the simulated population matches the observed destination composition, the fraction of the departing crowd heading to each point of interest. We read this target from the OD flow and reweight the model's own destination distribution onto it by iterative proportional fitting. Because fine-tuning inflates the dominant destination class, we fit the low-rank adapter to trajectories resampled to a corrected training composition that reaches the target after this inflation. On mobile network counts from two baseball games the fine-tuned agent runs without inference-time correction, cutting the destination-share error by 25%, while the grid correlation remains similar across policies.

Summary

  • The paper introduces an IPF-based information projection and transfer-map correction that trains an LLM policy to match observed destination shares without runtime adjustment.
  • The proposed policy reduces destination-share error by about 25% versus the untuned model and 15% versus inference-time IPF, while revealing realistic mall-bound movement.
  • A weather-conditioning test increased simulated sheltering agents from 3 to 59 and improved mall-occupancy similarity from 0.59 to 0.74, showing contextual adaptability beyond aggregate matching.

Motivation and problem setting

Pedestrian simulators such as SUMO require a behavioural rule for every agent, but privacy constraints mean planners rarely have access to individual trajectories. What is typically released instead are spatially and temporally aggregated statistics: device counts on a fixed grid of 125 m cells per ten-minute bin, and origin-to-destination (OD) flow matrices between zones. These aggregates under-determine individual behaviour — many distinct sets of agent decisions reproduce identical counts — so the challenge is to obtain a policy that is both individually plausible and population-level consistent with the observed data.

Existing remedies achieve statistical consistency only through static zone-to-zone mappings: CMA-ES tuning of simulator parameters, gravity models for zone flows, or iterative proportional fitting (IPF) of synthetic populations. None yields a reusable, context-conditioned policy. LLM agents offer one: at each decision point the simulator renders the agent's persona and situation as text, and the model returns a single executable action, so decisions can respond to context beyond what aggregate counts capture. The gap this paper addresses is that the pretrained model's destination composition — the fraction of the departing crowd heading to each point of interest (PoI) — inevitably diverges from the observed OD-derived composition.

Method: projection plus corrected resampling

The pipeline has two fine-tuning passes on top of gpt-oss-20b. A first "format pass" teaches an OpenAI Harmony multi-channel interaction schema in which each decision produces a structured four-line rationale (PERCEIVE, STATE, GOAL, DECIDE) in the analysis channel and exactly one executable action in the final channel; 18 dedicated action, PoI, and delimiter tokens are added, with rationale text written by gpt-5-mini. The simulator parses only the final action, and the rationale is discarded at the next step.

The second pass fits the format-trained policy π0\pi_0 to the destination composition m⋆m^\star read from the OD flow. Two observations drive the design:

  • Information projection. Holding the empirical context distribution fixed, the authors solve for q⋆q^\star, the action distribution minimizing expected KL divergence from Ï€0\pi_0 subject to matching the class-level shares m⋆m^\star. Because the constraint features are class indicators, the solution is an exponential tilt acting as a class-level offset — it preserves within-class relative probabilities and support while adjusting only class masses, computed by IPF in milliseconds. A key simplifying assumption is that the shift in context occupancy induced by closed-loop adaptation is neglected.
  • Transfer-map correction. Fine-tuning inflates the dominant destination class: training directly at the observed composition deploys far above it. On this data the per-class transfer map is close to affine — a station share cc in training deploys to roughly $0.94c + 0.26$. Inverting this map gives the corrected training composition c~\tilde{c}: matching the observed 74% station share requires a training share near 51%. The map is estimated from a few pilot fine-tunes at differing compositions and inverted in closed form since it is per-class and monotone. Trajectories are then resampled (subsampling the dominant class without replacement, no text rewriting), and a LoRA adapter (rank 64) trained on the resampled set absorbs the constraint into weights, so deployment needs no inference-time correction.

The explicit separation between what the policy should produce (q⋆q^\star) and what it should train on (c~\tilde{c}) is the paper's central methodological contribution.

Experimental setup

Evaluation uses mobile network OD data from two Hanshin Koshien baseball games (10–11 May 2022; attendances ~31,000 each), cross-validated over game days. Observed destination classes are a station (mean share 0.744), an adjacent commercial complex (0.064), and other exits (0.192). Policies are compared by free-running rollouts of 500 agents over ten seeds, using two metrics over the post-game window: grid correlation (Pearson correlation of simulated vs. observed per-cell occupancy shares across 268 cells) and destination-share error (summed absolute difference over three classes). Baselines include untuned LLM variants, naive SFT, inference-time IPF correction, GRPO with a cell-occupancy residual reward, a CMA-ES-tuned rule simulator, LLMob prompting, and a gravity model.

Results

After calibration to cell counts, grid correlation sits near 0.75 for essentially all calibrated policies regardless of behavioural prior — the metric leaves them indistinguishable. The destination composition separates them:

  • The proposed policy achieves the lowest destination-share error, cutting it by about 25% relative to the untuned model and by a further 15% over inference-time IPF correction, all without any runtime adjustment.
  • It is the only policy producing a visible mall share, lifting simulated mall share from 0.02 to 0.09 against an observed 0.06.
  • Naive SFT amplifies the dominant class and performs worse than the untuned baseline, empirically confirming the overshoot problem; GRPO also shows higher share error and falls below the grid-correlation band reached by other calibrated policies.
  • A held-out weather test calibrates on the dry day only. Conditioning on a rain sentence injected at post-event onset raises late-window mall sheltering from 3 to 59 agents and improves cosine similarity of the mall-occupancy curve with the observed rainy day from 0.59 to 0.74 — behaviour a fixed-composition sampling baseline cannot reproduce.

The practical implication is twofold: aggregate constraints can be baked into LLM policy weights rather than imposed at inference, and grid-count agreement alone is insufficient for validating crowd simulators.

Limitations and open questions

The paper concedes several boundaries plainly. The scenario is a single venue type — post-game egress with a small PoI set and limited context variation — and the zero-shot weather response is demonstrated under one condition. The transfer map is fit as a per-class affine relation from pilot runs; as destinations and context combinations grow, pilot cost scales combinatorially, motivating amortised transfer estimation or hierarchical class structures. Whether the affine form of m⋆m^\star0 holds outside this regime, and whether the information projection remains valid when context occupancy shifts substantially under adaptation, are left open.

Conclusion

This work shows how to distil OD-derived destination compositions into an LLM crowd policy via IPF-based information projection followed by SFT on a transfer-corrected training composition, yielding free-running simulation that matches observed dispersal statistics better than naive fine-tuning or reinforcement-learning alternatives, and demonstrating genuine contextual responsiveness. Its broader methodological point — that macro-level grid metrics can mask substantial behavioural differences — applies to evaluation practice well beyond this setting.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Tweets

Sign up for free to view the 1 tweet with 0 likes about this paper.