The code available in this repository has been used for producing the results reported in Graph Neural Networks for IoT Security: A Comparative Study
conda create -n anomaly_detection python=3.9
conda activate anomaly_detection
pip install -r requirements.txt
pip install torch==2.1.0+cu118 -f https://download.pytorch.org/whl/torch_stable.html
mkdir anomaly_detection_dataset
Download dataset snaposhots and stats by following instructions reported here.
mkdir gnn-network-analysis/dynamic_graphs
cd gnn-network-analysis/dynamic_graphs
git clone https://github.com/ciccio42/EvolveGCN.git
git checkout pub_iot
cd DOMINANT
# Dominant Train
nohup train.sh > dominant_train.txt &
# Dominant Test
nohup test_tdg.sh > test_tdg.txt & # Test tdg model
nohup test_etdg.sh > test_etdg.txt & # Test e-tdg model
cd OCGNN
# OC-GNN Train
nohup train.sh > dominant_train.txt &
# OC-GNN Test
nohup test_tdg.sh > test_tdg.txt & # Test tdg model
nohup test_etdg.sh > test_etdg.txt & # Test e-tdg model
NOTE Configure the bash file correctly. You need to set the snapshot to use and your paths to dataset.
For any errors and/or questions about the code either open an issue or mail [email protected], with object "QUESTION-CODE: Graph Neural Networks for IoT Security: A Comparative Study"