AP-Traj2: Transformer-based Trajectory Prediction with Graph-Enhanced Attention Mechanism - Galarreta Asian, Ana Paula; Alatrista-Salas, Hugo; Nunez-del-Prado, Miguel; Gauthier, Vincent (Informatica, 2025)
Trajectory prediction is essential for understanding human mobility patterns, with applications such as itinerary recommendation and urban planning. It involves analyzing sequences of visited locations to forecast the user’s next destination. Traditional approaches have often relied on Markov chains or recurrentneural networks (RNNs). More recently, Transformer neural networks have gained attention for sequential prediction tasks due to their superior parallelization and training efficiency. In this study, we propose AP-Traj2 (Attention and Possible directions for TRAJectory prediction 2), a model designed to enhance prediction accuracy by leveraging attention mechanisms and graph-based movement modeling. AP-Traj2 employs self-attention to capture dependencies among visited locations, explores feasible next steps through a graph of possible directions, and incorporates contextual information via location embeddings. Experiments conducted on GPS, CDR, and WiFi datasets demonstrate that AP-Traj2 improves the average matchratio by approximately 50% over state-of-the-art methods. Moreover, it achieves significantly faster training times, with reductions of up to 72% in the best-case scenario. Unlike existing approaches that focus primarily on neural network architecture, this work emphasizes the importance of data preprocessing andfiltering, highlighting their substantial impact on model performance.