diff --git a/README.md b/README.md index 12547f5ae679b6e820d89b7d3844bd70b19e4810..3aadc42940c3d1f63c1f3f8c6c67c621894c5449 100644 --- a/README.md +++ b/README.md @@ -32,33 +32,76 @@ In this library, we provide a variety of binary classifiers, clustering algorith | DBSCAN | Clustering Algorithm | | Fuzzy C mean | Clustering Algorithm | | Gaussian Mixture | Clustering Algorithm | -| K-means | Clustering Algorithm | +| k-Means | Clustering Algorithm | | Mean shift | Clustering Algorithm | | Isolation Forest | Anomaly Detection Algorithm | | One-class SVM | Anomaly Detection Algorithm | +| Local Outlier Factor | Anomaly Detection Algorithm | +| DBSCAN | Anomaly Detection Algorithm | +| k-Means | Anomaly Detection Algorithm | ### 1.2. Datasets The following intrusion detection datasets were used to test and evaluate the models. Our code includes all the pre-processing steps required to convert these datasets from tabular format into graphs. Due to usage restrictions, this library provides only a single graph of each dataset, with 5,000 nodes, already pre-processed and normalized. -| Name | Ref | -|-----------------|-------| -| CIC-DDoS2019 | [7] | -| AWID3 | | - - +| Name | Ref | +|------------------------|-------| +| CIC-DDoS2019 | [7] | +| AWID3 | [8] | +| CIC-Darknet2020 | [9] | +| NF-UNSW-NB15-V2 | [10] | +| NF-BoT-IoT-V2 | [11] | +| NF-ToN-IoT-V2 | [12] | +| NF-CSE-CIC-IDS2018-V2 | [13] | ## 2. Installation +```bash +git clone https://gitlab.liris.cnrs.fr/gladis/ghypeddings.git +mv ghypeddings\ Ghypeddings\ +``` + ## 3. Usage -Training and evaluation a model using our library is done in 03 lines of code only! +Training and evaluating a model using our library is done in lines of code only! ### 3.1. Models - +```python +from Ghypeddings import PVAE + +# adj: adjacency matrix +# features: node features matrix +model = PVAE(adj=adj, + features=features, + labels=labels, + dim=20, + hidden_dim=features.shape[1], + test_prop=.2, + val_prop=.1, + epochs=50, + classifier='random forest') + +# fit the model and outputs the training scores +loss, accuracy, f1,recall,precision,roc_auc,training_time = model.fit() +# prediction scores +loss,acc,f1,recall,precision,roc_auc = model.predict() +``` ### 3.2. Datasets +```python +from Ghypeddings import Darknet + +# Build a graph of 5000 nodes from the Darknet dataset +adj ,features ,labels = Darknet().build(n_nodes = 5000) + +# The graph is already loaded automatically after executing the previous line of code +# This method saves time and helps comparing results +# it simply loads graphs built and saved previously +adj, features, labels = Darknet().load_samples() +``` + ## 4. Citation +> Mohamed Yacine Touahria Miliani, Souhail Abdelmouaiz Sadat, Mohammed Haddad, Hamida Seba, and Karima Amrouche. 2024. Comparing Hyperbolic Graph Embedding models on Anomaly Detection for Cybersecurity. In Proceedings of the 19th International Conference on Availability, Reliability and Security (ARES '24). Association for Computing Machinery, New York, NY, USA, Article 118, 1–11. https://doi.org/10.1145/3664476.3670445 ## 5. References @@ -69,3 +112,9 @@ Training and evaluation a model using our library is done in 03 lines of code on [5]: [Dai, Jindou, et al. "A hyperbolic-to-hyperbolic graph convolutional network." Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021.](https://www.computer.org/csdl/proceedings-article/cvpr/2021/450900a154/1yeJgfbgw6Y) [6]: [Park, Jiwoong, et al. "Unsupervised hyperbolic representation learning via message passing auto-encoders." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021.](https://ieeexplore.ieee.org/document/9577649) [7]: [CIC-DDoS2019](https://www.unb.ca/cic/datasets/ddos-2019.html) +[8]: [AWID3](https://icsdweb.aegean.gr/awid/) +[9]: [CIC-Darknet2020](https://www.unb.ca/cic/datasets/darknet2020.html) +[10]: [NF-UNSW-NB15-V2](https://staff.itee.uq.edu.au/marius/NIDS_datasets/#RA6) +[11]: [NF-BoT-IoT-V2](https://staff.itee.uq.edu.au/marius/NIDS_datasets/#RA8) +[11]: [NF-ToN-IoT-V2](https://staff.itee.uq.edu.au/marius/NIDS_datasets/#RA7) +[13]: [NF-CSE-CIC-IDS2018-V2](https://staff.itee.uq.edu.au/marius/NIDS_datasets/#RA9)