Source-linked AI summary

Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation

Jiawei Wang, Renhe Jiang, Chuang Yang, Zengqing Wu, Makoto Onizuka, Ryosuke Shibasaki, Noboru Koshizuka, Chuan Xiao

arXiv:2402.14744v3cs.AIcs.CLcs.CYcs.LG

TL;DR

Personal mobility models have limited semantic interpretability and adaptability to unseen scenarios, while reliable alignment between LLM outputs and real-world activity data remains challenging. The paper introduces an LLM-agent framework that combines activity patterns, motivations, self-consistency alignment, and retrieval-augmented generation. Evaluations on Tokyo activity data show strong generative performance against established baselines and support scenario-based urban mobility analysis.

  • Problem

    Existing trajectory models mainly imitate data distributions and are less effective for semantic interpretation in novel scenarios, while aligning LLMs with real-world activity data remains challenging.

  • Method

    The framework uses LLM agents to infer activity patterns and motivations, with self-consistency alignment and retrieval-augmented strategies for interpretable trajectory generation.

  • Results

    The framework demonstrates advanced generative performance against attention-based, adversarial-learning, and diffusion-model baselines while reproducing temporal, spatio-temporal, and interpretable mobility patterns.

  • Takeaways & Limitations

    The framework supports flexible simulation of urban mobility under specific contexts, including pandemic scenarios, and offers a tool for urban mobility analysis.

  • Takeaways & Limitations

    The evaluation focuses on individual agents, a single dataset, and GPT-3.5, without modeling interactions between agents.

Abstract

from arXiv · show

This paper introduces a novel approach using Large Language Models (LLMs) integrated into an agent framework for flexible and effective personal mobility generation. LLMs overcome the limitations of previous models by effectively processing semantic data and offering versatility in modeling various tasks. Our approach addresses three research questions: aligning LLMs with real-world urban mobility data, developing reliable activity generation strategies, and exploring LLM applications in urban mobility. The key technical contribution is a novel LLM agent framework that accounts for individual activity patterns and motivations, including a self-consistency approach to align LLMs with real-world activity data and a retrieval-augmented strategy for interpretable activity generation. We evaluate our LLM agent framework and compare it with state-of-the-art personal mobility generation approaches, demonstrating the effectiveness of our approach and its potential applications in urban mobility. Overall, this study marks the pioneering work of designing an LLM agent framework for activity generation based on real-world human activity data, offering a promising tool for urban mobility analysis.

1 Introduction

The paper proposes an LLM-agent framework for personal mobility generation that uses semantic data, activity patterns, and motivations to improve interpretability and adaptability. It evaluates the framework on real-world activity data against established generation methods and examines scenario-based urban mobility simulation.

  • Existing data-driven trajectory models imitate data distributions but are less effective for interpreting activities in novel scenarios.The paper motivates LLM agents as a way to address this limitation.
  • LLMs offer semantic interpretability and model versatility for incorporating diverse data and handling unseen activity-generation scenarios.They can process semantically rich activity data rather than relying predominantly on structured trajectory coordinates.
  • The study addresses alignment with semantically rich activity data, reliable activity generation, and applications of LLM agents in urban mobility analysis.These are formulated as the paper’s three research questions.
  • The framework infers activity patterns and motivations from semantic datasets to generate more interpretable personal activity trajectories.Its methodology is organized around activity-pattern identification and motivation-related processing.
  • The framework is evaluated with GPT-3.5 on Tokyo personal activity trajectories and compared with attention-based, adversarial-learning, and diffusion-model baselines.The evaluation tests alignment with real-world data and generative performance.
  • The framework reproduces temporal and spatio-temporal mobility aspects, generates interpretable routines, and adapts activity patterns to contexts such as pandemics.The paper presents these findings as evidence of its generative performance and application potential.
  • The main contributions are a semantic LLM-agent framework, self-consistency alignment, and retrieval-augmented strategies integrating activity patterns with motivations.The study also validates the framework with real-world personal activity data for urban mobility analysis.

2 Related Work

Prior work models personal mobility through mechanistic, probabilistic, and deep-learning approaches, while LLM-agent research has explored human behavior and decision-making in social and economic settings.

  • Personal mobility generation has used mechanistic models, Markov models, and deep learning to represent individual activities and complex traffic dynamics.These approaches include high-resolution activity generation and location-visit probability estimation.
  • LLM-agent research has investigated simulated human behavior, social interactions, decision-making, and financial-market applications.This literature motivates applying autonomous LLM agents to additional social-science domains.

3 Methodology

LLMob models daily personal mobility by combining habitual activity patterns with current motivations in an LLM-agent pipeline. It identifies self-consistent patterns from historical trajectories, retrieves relevant motivations, and generates activity trajectories using both inputs.

  • Framework: LLMob represents each resident’s daily activities as time-ordered location choices and models them through an LLM agent.The framework treats the environment as real-world activity data and uses generated trajectories as agent actions.
  • Framework: The pipeline uses action, memory, and planning to formulate, evaluate, and refine activity-generation plans.Patterns and motivations serve as memory, while planning identifies and updates the information used for trajectory generation.
  • 3.1 Activity Pattern Identification: Phase 1 extracts candidate activity patterns from historical trajectories and applies self-consistency scoring to select the pattern most aligned with the target resident.The scoring compares trajectories from the target resident with sampled trajectories from other residents using LLM-generated ratings.
  • 3.2 Motivation-Driven Activity Generation: Phase 2 retrieves motivations and combines them with activity patterns to generate an individual daily trajectory.Because LLM context is limited, the framework uses retrieval-augmented strategies to provide selected historical information rather than all available records.
  • 3.2.1 Evolving-based Motivation Retrieval: The evolving-based scheme infers a target date’s motivation from activities over up to seven preceding available days.The LLM summarizes motivations behind those historical activities and then infers a motivation for the target date.
  • 3.2.2 Learning-based Motivation Retrieval: The learning-based scheme trains an unsupervised score approximator on trajectory similarity and uses contrastive learning to retrieve similar historical dates.Positive and negative date pairs are formed from shared-location similarity before training with InfoNCE.

4 Experiments

Experiments evaluate LLMob on Tokyo activity trajectories across normal and pandemic settings, comparing it with established trajectory-generation baselines and testing its components. LLMob performs especially well on temporal and spatial-temporal characteristics, while pandemic prompting and ablations show the value of semantic context, patterns, self-consistency, and motivations.

  • Experimental Setup: The evaluation uses 100 Tokyo users’ activity trajectories from 2019–2022, covering normal and pandemic periods at 10-minute intervals.Activity categories are determined using Foursquare classifications, and candidate personas provide priors for pattern generation.
  • Experimental Setup: LLMob is compared with Markov, LSTM, attention-based, adversarial, and diffusion trajectory-generation models using SD, SI, DI, DARD, and STVD evaluated by JSD.Lower JSD indicates smaller discrepancy between generated and real-world trajectory characteristics.
  • Main Results: LLMob achieves the best DI and DARD performance in all three settings and ranks runner-up on STVD, although it is less precise on SD.Its DARD is roughly 1/2 to 1/3 of the best baseline JSD, while DeepMove and TrajGAIL lead SD and STVD respectively.
  • Main Results: With a pandemic prompt, LLMob significantly decreases activity frequencies and produces more realistic spatial-temporal patterns for Arts & entertainment and Professional & other places.The prompt incorporates pandemic conditions and government measures such as postponing travel and telecommuting.
  • Main Results: Conditioned generation can support urban-mobility analysis by simplifying assessment of urban dynamics and potential policy impacts.The paper links this utility to reliable generated results combined with external contextual priors.
  • Ablation Studies: Identified activity patterns reduce DARD JSD by around 50%, while self-consistency improves all aspects and motivations jointly improve generation with patterns.Evolving-based motivation retrieval wins in 7 versus 5 cases but no strategy consistently outperforms the other.

5 Conclusion

The framework uses LLM agents to simulate individual urban activity trajectories by combining activity patterns, motivations, and retrieval strategies. It also supports context-specific simulation, including pandemic conditions, while aiming to improve reliability and interpretability.

  • 5 Conclusion: The framework models individual activity trajectories with LLM agents using semantic patterns and motivations.It identifies activity patterns, retrieves motivations, and generates daily activities from these elements.
  • 5 Conclusion: The study presents LLM agents as a flexible approach for simulating specific urban-mobility scenarios involving external factors such as pandemics and government policies.The stated application is to assess effects of external factors through scenario simulation.
  • 5 Conclusion: Self-consistency evaluates candidate activity patterns against trajectories to select a best_pattern for subsequent generation.The algorithm initializes candidate patterns and scores them by evaluating candidates against activity trajectories.
  • 5 Conclusion: Motivation retrieval uses either evolving-based historical activity retrieval or learning-based retrieval to guide daily activity generation.The generated plan combines a selected pattern, retrieved motivation, and frequently visited locations.
  • 5 Conclusion: The framework can incorporate pandemic instructions that ask residents to postpone travel and events and telecommute when possible.The pandemic context is supplied as an external condition for activity simulation.

C.1 Data processing

The dataset is anonymized and filtered to retain plausible Japanese check-in trajectories, then transformed into geographic categories and location IDs. The experiments use GPT-3.5-turbo-0613 and a learning-based motivation score approximator.

  • C.1 Data processing: The data comes from anonymized Twitter and Foursquare APIs and is processed before analysis.Personally identifiable information is removed before use.
  • C.1 Data processing: Users missing check-ins for a year and check-ins outside Japan are removed.These filters define the retained geographic and temporal data scope.
  • C.1 Data processing: Prefectures are inferred from check-in coordinates, and users are assigned according to their primary check-in location.For example, users whose top check-in location is Tokyo are categorized as belonging to Tokyo.
  • C.1 Data processing: Abrupt unrealistic location changes are deleted, while geographic names and coordinates are anonymized into category information and IDs.The processing removes implausible location drift before model input.
  • C.1 Data processing: The experiments use the GPT-3.5-turbo-0613 API, while learning-based motivation retrieval uses a fully connected neural-network score approximator.The score approximator uses temporal and calendar-related query features.

D.1 Examples of Identified Patterns

The identified patterns represent recurring urban-resident personas with distinct travel distances, schedules, destinations, and motivations. Examples include workers, students, teachers, visitors, and fitness-oriented residents.

  • D.1 Examples of Identified Patterns: The framework identifies patterns corresponding to 10 candidate personas used as prior information for pattern generation.Examples are reported for the personas listed in Table 4.
  • D.1 Examples of Identified Patterns: A student pattern describes weekday travel exceeding 10 kilometers, beginning at 12:00 and ending at 20:20, with visits to a park and grocery store.The weekend pattern is described as similar, with a later stated start time in the supplied passage.
  • D.1 Examples of Identified Patterns: A teacher pattern describes weekday travel exceeding 60 kilometers between 11:50 and 17:50, including a rest area and housing development.The routine is framed around regular travel to educational institutions.
  • D.1 Examples of Identified Patterns: A night-shift-worker pattern describes weekday travel exceeding 70 kilometers from 09:20 to 22:30, with stops at a toll booth and supermarket.The pattern also describes early-morning returns home and a weekend schedule difference.
  • D.1 Examples of Identified Patterns: Other examples include remote-worker, service-industry-worker, retail-employee, office-worker, public-service-official, and visitor patterns.These patterns encode differing work schedules, travel routines, destinations, or neighborhood activities.
  • D.1 Examples of Identified Patterns: A fitness-enthusiast pattern includes weekday travel exceeding 70 kilometers and visits to a toll booth and recreation center.Weekend travel is described as around 60 kilometers with different start and end times.

D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories

Retrieved motivations connect personal needs and interests to generated daily trajectories. The examples pair motivations involving food, convenience, relaxation, work, safety, cuisine, fitness, or exploration with concrete sequences of locations and times.

  • D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories: Retrieved motivations are used to inspire daily activity plans aligned with an agent’s specific needs.The section presents motivation examples alongside corresponding generated trajectories.
  • D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories: One motivation combines entertainment, relaxation, food, supermarket visits, and rest-area stops with a trajectory including a print shop, entertainment place, and donburi restaurant.The example trajectory is dated 2019-12-27 and includes activity times and locations.
  • D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories: Another motivation combines food, convenience, relaxation, Japanese cuisine, healthy living, and evening social gatherings with a trajectory including a pet store, gym, massage studio, and restaurants.The example trajectory is dated 2019-12-25.
  • D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories: A motivation involving sustenance, convenience, safety, work responsibilities, and food preferences is paired with visits to a park, convenience store, discount store, assisted living, and bank.The corresponding trajectory is dated 2019-12-30.
  • D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories: The same food, convenience, relaxation, cuisine, fitness, and social-gathering motivation is also paired with a trajectory through event, convention, convenience, restaurant, and sporting-goods locations.The corresponding trajectory is dated 2019-12-29.
  • D.2 Examples of Retrieved Motivations and Corresponding Generated Trajectories: A cuisine-and-exploration motivation involving internet cafes and grocery shopping is paired with a trajectory including an internet cafe, restaurants, rest area, and supermarket.The corresponding trajectory is dated 2019-12-31.

D.3 Experiment on Osaka Data

The Osaka experiment evaluates LLMob on real activity trajectories and compares it with leading baseline methods using multiple mobility metrics.

  • 537 trajectories were generated from 2,102 daily activity trajectories collected from 30 persons in Osaka, Japan.
  • LLMob-L/E are evaluated against DiffTraj and TrajGAIL, identified as the best-performing baseline methods.
  • The Osaka comparison results are reported in Table 5 across various evaluation metrics.

D.4 Experiment on different LLMs

The framework remains competitive across GPT-4o-mini, GPT-3.5-turbo, and Llama 3-8B, with different models excelling on spatial, temporal, or combined metrics.

  • Experiments evaluate the framework with GPT-4o-mini and Llama 3-8B, alongside the GPT-3.5-turbo results.
  • GPT-4o-mini performs best on the spatial metric SD, while GPT-3.5-turbo performs best on the temporal metric SI.
  • Llama 3-8B performs best overall when spatial and temporal factors are evaluated jointly using DARD and STVD.
  • The results demonstrate the framework’s robustness across different LLMs.
Loading 2402.14744v3…