MStream
MStream copied to clipboard
Anomaly Detection on Time-Evolving Streams in Real-time. Detecting intrusions (DoS and DDoS attacks), frauds, fake rating anomalies.
MSᴛʀᴇᴀᴍ
Implementation of
- MSᴛʀᴇᴀᴍ: Fast Anomaly Detection in Multi-Aspect Streams. Siddharth Bhatia, Arjit Jain, Pan Li, Ritesh Kumar, Bryan Hooi. The Web Conference (formerly WWW), 2021.
MSᴛʀᴇᴀᴍ detects group anomalies from a multi-aspect data stream in constant time and memory. We output an anomaly score for each record. MSᴛʀᴇᴀᴍ builds on top of MIDAS to work in a multi-aspect setting such as event-log data, multi-attributed graphs etc.
Demo
- Run
bash run.sh KDDto compile the code and run it on the KDD dataset. - Run
bash run.sh DOSto compile the code and run it on the DOS dataset. - Run
bash run.sh UNSWto compile the code and run it on the UNSW dataset.
MSᴛʀᴇᴀᴍ
- Change Directory to MSᴛʀᴇᴀᴍ folder
cd mstream - Run
maketo compile code and create the binary - Run
./mstream -n numericalfile -c categoricalfile -t timefile - Run
make cleanto clean binaries
Command line options
-h --help: produce help message-n --numerical: Numerical file name-c --categorical: Categorical file name-c --time: Timestamps file name-o --output: Output file name (default: scores.txt)-r --rows: Number of Hash Functions (default: 2)-b --buckets: Number of Buckets (default: 1024)-a --alpha: Temporal Decay Factor (default: 0.6)
Input file format for MSᴛʀᴇᴀᴍ
MSᴛʀᴇᴀᴍ expects the input multi-aspect record stream to be stored in three files:
Numerical file: contains,separated Numerical Features.Categorical file: contains,separated Categorical Features.Time File: contains Timestamps.
Both Numerical and Categorical files contain corresponding features of the multi-aspect record. Records should be sorted in non-decreasing order of their time stamps and the column delimiter should be ,
Datasets
Citation
If you use this code for your research, please consider citing our WWW paper
@inproceedings{bhatia2021mstream,
title={Fast Anomaly Detection in Multi-Aspect Streams},
author={Siddharth Bhatia and Arjit Jain and Pan Li and Ritesh Kumar and Bryan Hooi},
booktitle={The Web Conference (WWW)},
year={2021}
}