1 of 21

ICAD: A Self-Supervised Autoregressive Approach for Multi-Context Anomaly Detection in Human Mobility Data�

Bita Azarijoo1, Maria Despoina Siampou1, John Krumm1, Cyrus Shahabi1

1University of Southern California (USC)

SIGSPATIAL 2025

2 of 21

GPS Trajectory Vs Visit Sequences

7 PM-8 AM

9 AM-12 PM

12 PM-1 PM

1 PM-5 PM

6 PM-8 PM

9 PM-8 AM

GPS Trajectory

Sequence of visits

10:05 AM

10:15 AM

2

|

3 of 21

What is Anomaly Detection in Human Mobility?

7 PM-8 AM

9 AM-12 PM

12 PM-1 PM

1 PM-5 PM

6 PM-8 PM

9 PM-8 AM

Spatial Anomaly

Regular Routine

Temporal Anomaly

1 PM-9 PM

10 PM-8 AM

7 PM-8 AM

9 AM-12 PM

12 PM-1 PM

Late Departure

1 PM-2 PM

7 PM-8 AM

9 AM-12 PM

6 PM-8 AM

Different Place

2 PM-5 PM

Interpretability: which spatial and/or temporal component(s) of a visit contribute to its anomalous nature.

Visit- vs sequence-level.

3

|

4 of 21

Why Visit-level Anomaly Detection is important?

Sequence-level anomaly detection may miss fine-grained visit-level anomalies.

7 PM-8 AM

9 AM-12 PM

12 PM-1 PM

1 PM-5 PM

6 PM-8 PM

7 PM-7 AM

8 AM-12 PM

8 AM-11:30 PM

Hollywood

Monday 8 AM - 12 PM

Office

SIGSPATIAL Deadline Friday 8 AM - 11:30 PM

6 PM-8 PM

4

|

5 of 21

Related Work

Trajectory anomaly detection mostly studied for taxi trajectories.

5

|

6 of 21

Related Work

6

|

7 of 21

Contributions

  • ICAD (Interpretable Component-wise Anomaly Detection)

  • It estimates anomaly scores for spatial and temporal components of a visit relative to normal patterns.

  • For temporal signals, we propose a novel mode-margin scoring in continuous space.

  • Interpretability through component-wise scoring.

7

|

8 of 21

Problem Formulation

Input:

  • Sequence of visits
    • location (latitude, longitude)
    • Arrival time
    • Departure Time

Approach:

  • Next-visit prediction by TrajGPT1

7 PM-8 AM

9 AM-12 PM

12 PM-1 PM

1 PM-5 PM

6 PM-8 PM

1Hsu, Shang-Ling, et al. "Trajgpt: Controlled synthetic trajectory generation using a multitask transformer-based spatiotemporal model." Proceedings of the 32nd ACM International Conference on Advances in Geographic Information Systems. 2024.

8

|

9 of 21

Background: TrajGPT

.1

.0

.0

.9

.1

.0

.2

.1

.0

7 PM-8 AM

9 AM-12 PM

12 PM-1 PM

1 PM-5 PM

6 PM-8 PM

Visit Sequence� Encoding

Next Visit Prediction

Sequence Embedding

Transformer�Encoder

causal self-attention

Linear

Softmax

Multihead CrossAttn

6 PM

Multihead CrossAttn

8 PM

9

|

10 of 21

Relative Anomaly Scoring

  • Region Score (Discrete Space)

  • Average deviation from the top-k predicted regions.

10

|

11 of 21

Relative Anomaly Scoring

 

 

 

Anomaly score < 1

  • Anomalies are captured relative to high probable normal behaviors.

vs

Lower Likelihood Higher Distance

Higher Likelihood Lower Distance

  • Arrival and Departure Score (Continuous Space)

Anomaly score ~ 50

11

|

12 of 21

Relative Anomaly Scoring

 

 

 

 

 

 

Component-wise Anomaly Detection

12

|

13 of 21

Experimental Setup

  • Dataset: NUMOSIM [GeoAnomalies ‘24]
    • Synthetic dataset.
    • Los Angeles
    • 2 months in 2024.
    • # visit-records ~ 17.5 M

  • Granularity Level:
    • Visit-level
    • Agent-level (aka sequence-level): maximum aggregation of visit-level anomaly scores.

  • Evaluation Metrics:
    • AP and AUROC.

13

|

14 of 21

Experimental Results

  • Predicting all visit components (region, arrival time, departure time) capture fine-grained spatial and temporal anomalies.

  • ICAD scores visits relative to high probable normal behavior in logarithmic space.

  • Modeling temporal signals in continuous space helps fine-grained, but crucial deviation compared to others which usually discretize time.

14

|

15 of 21

Interpretation of Anomaly Scores

  • Spatial Anomalies:
    • Region score is the determining factor.
    • Timing of spatial anomalies is atypical�compared to normal behavior.
  • Temporal Anomalies:
    • Negative region score SHAP values�push them towards normal behavior.
    • Arrival and departure time contribute�the most to identifying a temporal�anomaly as anomalous.

15

|

16 of 21

Summary

  • Granularity of Analysis: visit- & agent-level.
  • Contribution: interpretability through relative anomaly scoring.
  • Result: significant performance improvement in AP and AUROC.

Code

Paper

16

|

17 of 21

Thank You!� Any Questions? ☺

The End

17

|

18 of 21

Relative Multi-context Anomaly Scoring

 

 

 

Anomaly score ~ 50

Anomaly score ~ 1

vs

Lower Likelihood Higher Distance

Higher Likelihood Lower Distance

  • Arrival and Departure Score (Continuous Space)

18

|

19 of 21

Experiment 2: Ablation on ST Components

  1. Worst Performance of W/O Arrival:
    1. Humans usually tend not to deviate significantly from their usual temporal patterns when visiting a regular location.
  2. Combining Spatiotemporal signals is helpful.
    • W/O weighted fusion in 2nd place in 3 out of 4 settings.

Adding anomaly scores.

19

|

20 of 21

Experiment 2: Temporal Signal Variations

20

|

21 of 21

Experiment 3: Relative Anomaly Scoring

  • CDF-based:

  • Relative Scoring vs CDF-based:

  • Relative Scoring vs NLL:
    • 3% improvement in AP and 2% is considerable in extremely rare anomaly detection problem.

21

|