Interaction-aware agent-based simulation of customer trajectories in retail stores with transformer architectures
We propose a Transformer-based generative model that learns socially responsive customer trajectories in retail stores directly from data. Each trajectory is represented as a sequence of symbolic tokens that encode not only the self-location of the focal customer but also the positions of their nearest neighbors at each timestep. This interaction-aware encoding enables the model to reproduce adaptive behaviors-such as slowing down, rerouting, and early disengagement-without predefined rules. To ensure that only the focal customer's behavior is learned while using neighbors as context, we introduce an asymmetric loss masking scheme that excludes non-focal tokens from prediction targets. The model is trained from scratch using high-resolution indoor positioning data and validated through large-scale agent-based simulations under varying crowding levels. In these simulations, each agent is equipped with a Transformer module that predicts its next step based on local spatial context, enabling the system to evolve through decentralized, data-driven decision-making. The model replicates spatial density patterns, dwell time distributions, and congestion-induced speed reductions observed in real stores. This model offers a scalable and interpretable approach to trajectory generation in indoor commercial environments.
Authors
- Taizo Horikomi (ORCID: https://orcid.org/0000-0001-9588-5902)
- Takayuki Mizuno (ORCID: https://orcid.org/0000-0003-1332-076X)
Institutions
- National Institute of Informatics (JP)
- The Graduate University for Advanced Studies, SOKENDAI (JP)
Publication Details
- Journal
- Scientific Reports
- Published
- 2025-11-06
- DOI
- https://doi.org/10.1038/s41598-025-22885-4
- Primary Topic
- Consumer Retail Behavior Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Obayashi Foundation
- Japan Society for the Promotion of Science
- Core Research for Evolutional Science and Technology