Dynamic path generation in complex transportation networks is essential for intelligent transportation systems. Traditional methods, such as shortest path algorithms or heuristic-based models, often fail to capture real-world travel behaviors due to their reliance on simplified assumptions and limited ability to handle long-range dependencies or non-linear patterns. To address these limitations, we propose PathGen-LLM, a large language model (LLM) designed to learn spatial–temporal patterns from historical paths without requiring handcrafted features or graph-specific architectures. Exploiting the structural similarity between path sequences and natural language, PathGen-LLM converts spatiotemporal trajectories into text-formatted token sequences by encoding node IDs and timestamps. This enables the model to learn global dependencies and semantic relationships through self-supervised pretraining. The model integrates a hierarchical Transformer architecture with dynamic constraint decoding, which synchronizes spatial node transitions with temporal timestamps to ensure physically valid paths in large-scale road networks. Experimental results on real-world urban datasets demonstrate that PathGen-LLM outperforms baseline methods, particularly in long-distance path generation. By bridging sequence modeling and complex network analysis, PathGen-LLM offers a novel framework for intelligent transportation systems, highlighting the potential of LLMs to address challenges in large-scale, real-time network tasks.
Li et al. (2025) studied this question.