Skip to content
TITAnD

Hyperspectral Trajectory Image for Multi-Month Trajectory Anomaly Detection

A multi-month trajectory can stretch across thousands of time steps, yet still contain one anomalous moment. TITAnD turns that long sequence into an image designed to reveal both whether an anomaly occurred and when.

Md Awsafur Rahman, Chandrakanth Gudavalli, Hardik Prajapati, and B. S. Manjunath

Paper Code coming soon

What if a months-long trajectory is not a sequence, but an image?

Dense or sparse trajectory → HTI

Dense GPS preserves granular motion. Sparse stay points preserve recorded stays. Either input is organized as a day × time-of-day HTI.

RowsDays across the observation horizon
ColumnsTime slots within each day
ChannelsWhat, where, when, and how movement occurred

The complete TITAnD framework.

Framework Dense or sparse trajectory → HTI → anomaly detection

The complete TITAnD framework from the paper: dense GPS or sparse stay points are embedded into a day-by-time hyperspectral trajectory image for anomaly detection.
TITAnD framework. Dense GPS streams or sparse stay points are encoded into a unified day × time-of-day Hyperspectral Trajectory Image (HTI), where each pixel represents spatio-semantic, temporal, and kinematic information.

Different samples. The same daily structure.

Movement unfolds within each day, while routines repeat and change across days. Flattening both into one sequence hides that structure.

Dense GPS preserves abnormal speeds and short-duration events, but becomes expensive over multi-month horizons. Sparse stay points scale more easily, but discard fine-grained evidence. TITAnD gives both a shared image representation.

Input A

Dense GPS

Continuous positions reveal detailed movement between places, including speed, acceleration, direction, and short events.

Motion is directly observed at fine time intervals
Input B

Sparse stay points

Recorded places and dwell times preserve where a person stayed, while movement between consecutive stays is not directly observed.

Travel mode can be approximated from time and distance

The sampling changes. The underlying daily routine does not.

Fold time along day boundaries.

A trajectory becomes a day × time-of-day image. Channels encode spatial, semantic, temporal, and kinematic information from either input regime.

Under this formulation, agent-level anomaly detection becomes image classification, while finding when an anomaly occurs becomes semantic segmentation.

Rows
Days across the observation horizon
Columns
Time slots within each day
Channels
Spatial, semantic, temporal, and available kinematic features

Look within each day and compare across days.

01 · Intra-dayModel the sequence of time slots within each day.
02 · Inter-dayCompare the same time-of-day across repeated routines.
03 · OutputProduce a segmentation image marking anomalous regions.
Intra-day → inter-day → segmentation

Each CFT block first models time slots within a day, then compares the same time-of-day across days. Repeating this factorized pattern avoids full attention over one enormous flattened sequence.

Cyclic Factorized Transformer architecture applying intra-day attention before inter-day attention, repeated four times, followed by a prediction head for segmentation and classification.
Cyclic Factorized Transformer. CFT interleaves intra-day and inter-day attention. Each intra-day layer captures within-day patterns; each inter-day layer captures cross-day routine patterns. The prediction head produces a per-slot segmentation map, whose maximum also gives agent-level classification.

Built for the long horizon.

3benchmarks

Best AUC-PR across dense and sparse trajectory benchmarks.

11–75×faster inference

Than a standard Transformer across 2–12 month horizons.

6.5Mparameters

A compact backbone for multi-month trajectory analysis.

Paper plots comparing inference latency, peak GPU memory, and model size across HTI backbones from 2 to 12 months.
Efficiency across time horizons. TITAnD-CFT is 11× faster than the standard Transformer at two months and 75× faster at twelve months, with comparable peak GPU memory.

Not only whether.
Also when.

Paper qualitative results showing ground truth, model predictions, inter-day attention, and intra-day attention for four trajectories.
Qualitative analysis. Rows show ground truth, model predictions, inter-day attention, and intra-day attention. Gray marks missing observations.

Read the research.

Open arXiv Code coming soon
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 × 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–75× faster than the Transformer with comparable memory, demonstrating that vision reformulation and structure-aware modeling are jointly essential.

BibTeX
@article{rahman2026titand,
  title   = {Hyperspectral Trajectory Image for Multi-Month
             Trajectory Anomaly Detection},
  author  = {Rahman, Md Awsafur and Gudavalli, Chandrakanth
             and Prajapati, Hardik and Manjunath, B. S.},
  journal = {arXiv preprint arXiv:2603.25255},
  year    = {2026}
}