Abstract
Trajectory anomaly detection underpins applications from fraud detection to urban mobility analysis. Dense GPS methods preserve fine-grained evidence such as abnormal speeds and short-duration events, but their quadratic cost makes multi-month analysis intractable; consequently, no existing approach detects anomalies over multi-month dense GPS trajectories. The field instead relies on scalable sparse stay-point methods that discard this evidence, forcing separate architectures for each regime and preventing knowledge transfer. We argue this bottleneck is unnecessary: human trajectories, dense or sparse, share a natural two-dimensional cyclic structure along within-day and across-day axes. We therefore propose TITAnD (Trajectory Image Transformer for Anomaly Detection), which reformulates trajectory anomaly detection as a vision problem by representing trajectories as a Hyperspectral Trajectory Image (HTI): a day x time-of-day grid whose channels encode spatial, semantic, temporal, and kinematic information from either modality, unifying both under a single representation. Under this formulation, agent-level detection reduces to image classification and temporal localization to semantic segmentation. To model this representation, we introduce the Cyclic Factorized Transformer (CFT), which factorizes attention along the two temporal axes, encoding the cyclic inductive bias of human routines, while reducing attention cost by orders of magnitude and enabling dense multi-month anomaly detection for the first time. Empirically, TITAnD achieves the best AUC-PR across sparse and dense benchmarks, surpassing vision models like UNet while being 11-75x faster than the Transformer with comparable memory, demonstrating that vision reformulation and structure-aware modeling are jointly essential. Code will be made public soon.
Abstract (translated)
轨迹异常检测是欺诈检测、城市移动性分析等应用的基础。密集GPS方法能保留细粒度证据(如异常速度、短时事件),但其二次方计算成本使得多个月份的分析难以处理;因此,现有方法无法对多个月份的密集GPS轨迹进行异常检测。该领域转而依赖可扩展的稀疏停留点方法,但这些方法丢弃了上述证据,导致每种场景需要独立的架构,并阻碍知识迁移。我们认为这一瓶颈并非必要:人类轨迹无论密集或稀疏,在日内和跨日轴上均共享自然的二维周期性结构。因此,我们提出了TITAnD(用于异常检测的轨迹图像变换器),通过将轨迹表示为超光谱轨迹图像(HTI)——一种日×时刻的网格,其通道编码来自任一模态的空间、语义、时间与运动学信息,从而在单一表示下统一两者——将轨迹异常检测重新定义为视觉问题。在此框架下,智能体级别检测简化为图像分类,时间定位简化为语义分割。为建模该表示,我们引入了循环因子化变换器(CFT),其沿两个时间轴分解注意力,编码人类日常活动的周期性归纳偏置,同时将注意力成本降低数个数量级,并首次实现了密集多月份异常检测。实验表明,TITAnD在稀疏与密集基准上均达到最佳AUC-PR,超越UNet等视觉模型,且比同等内存占用的标准变换器快11-75倍,证明了视觉重构与结构感知建模的协同必要性。代码即将公开。
URL
https://arxiv.org/abs/2603.25255