Hyperspectral Trajectory Image for Multi-Month Trajectory Anomaly Detection
Organizations: UC Santa Barbara, USA
Abstract
Trajectory anomaly detection underpins applications from fraud detection to urban mobility analysis. Dense GPS preserves fine-grained evidence such as abnormal speeds and short-duration events, but its quadratic cost makes multi-month analysis intractable; sparse stay-point methods scale by discarding that evidence and require a separate modeling regime. We argue that this bottleneck is unnecessary: dense and sparse trajectories share a natural two-dimensional cyclic structure along within-day and across-day axes. TITAnD (Trajectory Image Transformer for Anomaly Detection) is the first framework to cast both in a single representation, a Hyperspectral Trajectory Image (HTI), a day time-of-day grid whose channels encode spatial, semantic, temporal, and kinematic information. Under this formulation, agent-level detection reduces to image classification and temporal localization to semantic segmentation. The Cyclic Factorized Transformer (CFT) models the two temporal axes directly, reducing attention cost by up to two orders of magnitude. With the HTI, multi-month dense anomaly detection becomes feasible for the first time, and CFT keeps it accurate and fast. Empirically, TITAnD matches or beats every evaluated baseline in AUC-PR on all four benchmarks. It surpasses vision models such as U-Net while using as few as 6.5M parameters, and it runs 11--75 faster than a capacity-matched flat Transformer on the same trajectory images.
Figures & tables
| PoL | Sparse (NumoSim-LA) | Dense2Sparse (Tokyo) | Dense (Tokyo) | ||||||||||||
| Agent | Temporal | Agent | Temporal | Agent | Temporal | Agent | |||||||||
| Type | Backbone | AUC-PR | mIoU | AUC-PR | mIoU | AUC-PR | mIoU | AUC-PR | mIoU | AUC-PR | mIoU | AUC-PR | mIoU | AUC-PR | mIoU |
| Sparse | USTAD | 0.06 | 0.09 | 0.46 | 0.67 | 0.53 | 0.70 | 0.03 | 0.52 | 0.41 | 0.66 | — | — | — | — |
| ICAD | 0.06 | 0.36 | 0.23 | 0.59 | 0.30 | 0.62 | 0.01 | 0.51 | 0.36 | 0.65 | — | — | — | — | |
| LM-TAD | 0.34 | 0.60 | 0.03 | 0.50 | 0.06 | 0.49 | — | — | — | — | — | — | — | — | |
| HTI | Transformer | 0.10 | 0.44 | 0.06 | 0.56 | 0.16 | 0.57 | 0.01 | 0.52 | 0.24 | 0.60 | 0.60 | 0.70 | 1.00 | 1.00 |
| Encoder features | Attention axes | ||||
|---|---|---|---|---|---|
| Temporal | Spatial + Temporal | Intra-day | Inter-day | Full (CFT) | |
| Dense (Tokyo) | 0.03 | 0.62 | 0.66 | 0.33 | 0.84 |
| Dense2Sparse (Tokyo) | 0.18 | 0.19 | 0.12 | 0.07 | 0.20 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Scale | Splits | Anomaly Prevalence | ||||||
|---|---|---|---|---|---|---|---|---|
| Benchmark | Modality | Agents | Duration | Train | Val | Slots/Agent | Slot Rate | Agent Rate |
| Sparse (NumoSim-LA) | Stay-points | 80,381 | 55 days | 50,238 | 30,143 | 15,840 | 0.024% | 0.47% |
| Dense (Tokyo) | GPS (10 s) | 18,469 | 66 days | 14,772 | 3,697 | 6,336 | 0.20% | 46.4% |
| Dense2Sparse (Tokyo) | Stay-points | 80,463 | 120 days | 50,416 | 30,047 | 34,560 | 0.009% | 0.57% |
| Sparse (PoL, Atlanta) | Stay-points | 3,000 | 464 days | 2,400 | 600 | 133,632 | — | 5.0% |
| Property | Value |
|---|---|
| Total leaf cells (Tokyo) | 78,000 |
| Split threshold | 125 POIs |
| Minimum cell size | 10 m |
| Lookup resolution | 5 m (for vectorized queries) |
| Category group | Examples |
|---|---|
| Residential (6) | apartment, house, dormitory, … |
| Commercial (8) | store, mall, supermarket, … |
| Food & Drink (5) | restaurant, cafe, bar, … |
| Office (4) | office building, coworking, … |
| Healthcare (4) | hospital, clinic, pharmacy, … |
| Education (5) | school, university, library, … |
| Hyperparameter | Dense (Tokyo) | Sparse (NumoSim-LA) | Dense2Sparse (Tokyo) | PoL |
|---|---|---|---|---|
| Optimizer | Muon † | AdamW | AdamW | AdamW |
| Learning rate | 5 10 -3 | 7 10 -5 | 2 10 -4 | 2 10 -4 |
| LR warmup epochs | 10 | 5 | 5 | 5 |
| Epochs | 40 | 20 | 20 | 20 |
| Batch size per GPU | 32 | 64 | 32 | 8 |
| Gradient accumulation | 1 | 1 | 1 | 8 |