Skip to content

lizzyhku/OASD

Repository files navigation

Framework

OASD

This is the implementation of our paper "Online Anomalous Subtrajectory Detection on Road Networks with Deep Reinforcement Learning" (ICDE23).

Raw data

Please refer to this paper https://dl.acm.org/doi/abs/10.1145/3459637.3482293 to map original trajectories.

Requirements

  • Linux Ubuntu OS (16.04 is tested)
  • Python >= 3.5 (Anaconda3 is recommended and 3.6 is tested)
  • Tensorflow (1.8.0 is tested)

Please refer to the source code to install the required packages that have not been installed in your environment such as gensim, networkx. You can install these packages in a shell as

pip install gensim

Dataset & Preprocessing

The datasets are from DiDi Chuxing. We provide the data preprocessing in data_utils.py, it outputs the processed data for our model training and testing. For ease of use, we dump these outputs as data.zip, which can be downloaded and unzipped into the ./OASD folder directly, or you may want to generate them step-by-step, just release the comments accordingly in the codes.

python data_utils.py

Running Procedures

Parameters

There are several parameters in parameter.py, you may try to turn these parameters for a better result, including threshold=0.5 (for noisy labels), consider=0.4 (for normal route selection), and delay=8 (for delaying mechanism). In addition, it also includes other hyperparameters that are used in the model.

Training

Run train.py, the generated models (RSRNet and ASDNet) will be automatically stored in the folder ./data/train_rsr and ./data/train_asd, respectively. You can pick the model with the best performance on the development set as your trained model from them. You can set several parameters such as epochs during the training, please refer to the explanation in parameter.py for more details.

python train.py

Here, we provide an interface called load(checkpoint), and you can load an intermediate model to continue the training from the checkpoint, which saves your efforts caused by some unexpected exceptions and no need to train again.

Evaluation

You can directly run the evaluation.py once you obtain the trained model. Here, we provide the trained model in the data.zip.

python evaluation.py

Prediction Results

Citing OASD

If our paper benefits to your research, please cite our paper using the bitex below:

@inproceedings{zhang2023online,
  title={Online Anomalous Subtrajectory Detection on Road Networks with Deep Reinforcement Learning},
  author={Zhang, Qianru and Wang, Zheng and Long, Cheng and Huang, Chao and Yiu, Siu-Ming and Liu, Yiding and Cong, Gao and Shi, Jieming},
  booktitle={2023 IEEE 39th International Conference on Data Engineering (ICDE)},
  pages={246--258},
  year={2023},
  organization={IEEE}
}

About

[ICDE'2023]''Online Anomalous Subtrajectory Detection on Road Networks with Deep Reinforcement Learning''

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages