TrajAgent: An Agent Framework for Unified Trajectory Modelling

Yuwei Du,Jie Feng,Jie Zhao,Yong Li
2024-10-27
Abstract:Trajectory modeling, which includes research on trajectory data pattern mining and future prediction, has widespread applications in areas such as life services, urban transportation, and public administration. Numerous methods have been proposed to address specific problems within trajectory modelling. However, due to the heterogeneity of data and the diversity of trajectory tasks, achieving unified trajectory modelling remains an important yet challenging task. In this paper, we propose TrajAgent, a large language model-based agentic framework, to unify various trajectory modelling tasks. In TrajAgent, we first develop UniEnv, an execution environment with a unified data and model interface, to support the execution and training of various models. Building on UniEnv, we introduce TAgent, an agentic workflow designed for automatic trajectory modelling across various trajectory tasks. Specifically, we design AutOpt, a systematic optimization module within TAgent, to further improve the performance of the integrated model. With diverse trajectory tasks input in natural language, TrajAgent automatically generates competitive results via training and executing appropriate models. Extensive experiments on four tasks using four real-world datasets demonstrate the effectiveness of TrajAgent in unified trajectory modelling, achieving an average performance improvement of 15.43% over baseline methods.
Computation and Language,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is **Unified Trajectory Modelling**. Specifically, existing trajectory modelling methods are usually designed for specific tasks and datasets, and it is difficult to share them among different tasks and data sources. Due to the heterogeneity of application scenarios and the diversity of trajectory data (such as differences in resolution, format, and geographical area), existing methods can only be applied to limited tasks and specific datasets. This has led to high - cost and inefficient deployment and application of these advanced models, hindering the further development of the trajectory modelling field. Therefore, developing a unified model capable of handling various trajectory modelling tasks is both urgently needed and full of challenges. The paper proposes an agent framework **TrajAgent** based on large - language models (LLM), aiming to uniformly handle multiple trajectory modelling tasks, including trajectory prediction, trajectory classification, and trajectory generation, etc. ### Main Contributions 1. **First Attempt**: As far as the authors know, **TrajAgent** is the first attempt to use an agent framework based on LLM to uniformly handle different trajectory data and tasks. 2. **Unified Environment**: In **TrajAgent**, a unified environment **UniEnv** is designed to handle diverse trajectory data and provide a consistent running environment for various trajectory modelling tasks. 3. **Agent Workflow**: An agent workflow **TAgent** is proposed, which decomposes the entire trajectory modelling task into multiple subtasks, including task understanding, task planning, task execution, and task summarization. 4. **Optimization Module**: A comprehensive model optimization module **AutOpt** is developed, which further improves the performance of the model on target data through multiple mechanisms such as data augmentation, parameter optimization, and joint optimization. ### Experimental Results The paper conducted extensive experiments on four representative trajectory modelling tasks, using four real - world datasets, and verified the effectiveness of the **TrajAgent** framework. The optimized model has an average performance improvement of 15.43%, specifically manifested in the following aspects: - **Trajectory Prediction Task (TP)**: On the Foursquare and Brightkite datasets, the accuracy of the model is significantly improved through data augmentation and parameter optimization. - **Trajectory - User Linking Task (TUL)**: On the Foursquare dataset, the performance of the model is significantly improved through joint optimization. - **Travel Time Estimation Task (TTE)**: On the Porto and Chengdu datasets, the MAE error of the model is significantly reduced. - **Trajectory Anomaly Detection Task (TAD)**: On the two datasets, the AUC score of the model is increased, although the initial performance was already high. In conclusion, the **TrajAgent** framework shows potential in uniformly handling multiple trajectory modelling tasks, especially in terms of automated task processing and optimizing model performance.