Skip to content

MiviaLab/Graph-Neural-Networks-for-IoT-Security-A-Comparative-Study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Repository

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

How to use the code

Create Conda Environment

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

Dataset Download

mkdir anomaly_detection_dataset

Download dataset snaposhots and stats by following instructions reported here.

Download Dynamic Graphs Dependencies

mkdir gnn-network-analysis/dynamic_graphs
cd gnn-network-analysis/dynamic_graphs
git clone https://github.com/ciccio42/EvolveGCN.git
git checkout pub_iot

Train and Test

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

For 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.

Note

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"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published