The code available in this repository has been used for producing the results reported in Graph Neural Networks for IoT Security: A Comparative Study
DOI: https://doi.org/10.1016/j.iot.2025.101863
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.htmlmkdir anomaly_detection_datasetDownload 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_iotcd 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 modelcd 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 modelFor training and test Dynamic Methods follow the instruction reported here
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"