Trajectory similarity computation is fundamental functionality that is used for, e.g., clustering, prediction, and anomaly detection. However, existing learning-based methods exhibit three key limitations: (1) insufficient modeling of trajectory semantics and hierarchy, lacking both movement dynamics extraction and multi-scale structural representation; (2) high computational costs due to point-wise encoding; and (3) use of physically implausible augmentations that distort trajectory semantics. To address these issues, we propose MovSemCL, a movement-semantics contrastive learning framework for trajectory similarity computation. MovSemCL first transforms raw GPS trajectories into movement-semantics features and then segments them into patches. Next, MovSemCL employs intra- and inter-patch attentions to encode local as well as global trajectory patterns, enabling efficient hierarchical representation and reducing computational costs. Moreover, MovSemCL includes a curvature-guided augmentation strategy that preserves informative segments (e.g., turns and intersections) and masks redundant ones, generating physically plausible augmented views. Experiments on real-world datasets show that MovSemCL is capable of outperforming state-of-the-art methods, achieving mean ranks close to the ideal value of 1 at similarity search tasks and improvements by up to 20.3% at heuristic approximation, while reducing inference latency by up to 43.4%.
翻译:轨迹相似度计算是聚类、预测和异常检测等任务的基础功能。然而,现有基于学习的方法存在三个关键局限:(1)对轨迹语义与层次结构的建模不足,既缺乏运动动态特征的提取,也缺少多尺度结构表示;(2)逐点编码导致计算成本高昂;(3)使用了扭曲轨迹语义的物理不可信增强方法。为解决这些问题,我们提出MovSemCL,一种用于轨迹相似度计算的运动语义对比学习框架。MovSemCL首先将原始GPS轨迹转换为运动语义特征,并将其分割为片段。随后,通过片段内与片段间注意力机制编码局部与全局轨迹模式,实现高效的层次化表示并降低计算开销。此外,MovSemCL引入曲率引导的增强策略,保留信息丰富的轨迹段(如转弯与交叉口)并掩蔽冗余部分,从而生成物理可信的增强视图。在真实数据集上的实验表明,MovSemCL能够超越现有最优方法,在相似性搜索任务中达到接近理想值1的平均排名,在启发式近似任务中性能提升最高达20.3%,同时推理延迟降低最高达43.4%。