MoE‐TrajSim: Mixture‐of‐Experts Enhanced Transformer for Trajectory Similarity Measurement
Published online on August 07, 2026
Abstract
["Transactions in GIS, Volume 30, Issue 5, August 2026. ", "\nABSTRACT\nWith the development of positioning technologies and Location‐based service (LBS) applications, trajectory big data has been rapidly accumulated. It has become a key resource for understanding urban dynamics, traffic patterns, and mobility behaviors. Trajectory similarity measurement serves as a fundamental task underpinning various applications, such as user identification, trajectory clustering, and anomaly detection. However, existing similarity measurement methods face significant challenges in handling the inherent spatiotemporal heterogeneity and multi‐granularity of trajectory data. It remains difficult for these methods to capture diverse mobility behavioral patterns within complex trajectories and to coordinate the processing of point‐level details and sequence‐level semantic information. To address this issue, this paper proposes a Mixture‐of‐Experts Enhanced Transformer for Trajectory Similarity Measurement (MoE‐TrajSim). Specifically, MoE‐TrajSim adopts a contrastive learning‐based encoder‐decoder framework. The encoder incorporates a Mixture‐of‐Experts (MoE) layer instead of a standard Feed‐Forward Network (FFN), and MoE uses five specialized experts to dynamically capture heterogeneous trajectory patterns. By introducing a point‐aware sequence‐level routing strategy, the MoE router facilitates the seamless integration and synergy between point‐level features and sequence‐level semantic information. Experimental results on three real‐world datasets demonstrate that MoE‐TrajSim outperforms state‐of‐the‐art baselines in various metrics, effectively improving accuracy and robustness under noise. Ablation experiments, grid‐resolution sensitivity analysis, and cross‐dataset transfer evaluation further verify the effectiveness, structural rationality, spatial discretization robustness, and generalization capability of MoE‐TrajSim. The proposed MoE‐TrajSim may provide a new solution for measuring the similarity of complex, heterogeneous trajectories and also hold important implications for advancing the practical applications of trajectory data mining.\n"]