gehad-alaa-abaas commited on
Commit
68f02c2
·
verified ·
1 Parent(s): e0cd6e7

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. First_Trained_Model.pth +3 -0
  2. README.md +37 -2
  3. Second_Trained_Model.pth +3 -0
First_Trained_Model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3071462da10e5b3d65b40f13b0d12b520af4d579b7d4d549bceba97fe9374ba
3
+ size 4882128
README.md CHANGED
@@ -1,3 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- license: agpl-3.0
3
- ---
 
1
+ # LSTM IDS Models for CICIDS2017 Dataset
2
+
3
+ This repository provides two trained PyTorch LSTM models for network intrusion detection, trained on the CICIDS2017 dataset. These models are designed for use in research, benchmarking, or as a starting point for further development in network security and anomaly detection tasks.
4
+
5
+ ## Models Included
6
+ - `lambda_with_valid.pth`: LSTM model trained for binary classification (benign vs. attack) using cross-validation.
7
+ - `mapping_with_valid.pth`: LSTM model trained for multi-class attack categorization using cross-validation.
8
+
9
+ ## Model Details
10
+ - **Architecture:** LSTM-based Recurrent Neural Network
11
+ - **Input Features:** 80 per sample (preprocessed from CICIDS2017)
12
+ - **Training:** 5-fold cross-validation, early stopping, Adam optimizer
13
+ - **Framework:** PyTorch
14
+
15
+ ## Usage
16
+ 1. Download the `.pth` files from this repository.
17
+ 2. Load the model in your PyTorch code:
18
+ ```python
19
+ import torch
20
+ from your_model_definition import IdsRnn # Use the same architecture as in training
21
+
22
+ model = IdsRnn(hidden_size=512, output_size=2) # or output_size=7 for multi-class
23
+ model.load_state_dict(torch.load('lambda_with_valid.pth'))
24
+ model.eval()
25
+ ```
26
+ 3. Prepare your input data with the same preprocessing as used during training.
27
+ 4. Run inference as needed.
28
+
29
+ ## Notes
30
+ - These models require the same feature extraction and preprocessing pipeline as described in the original training code.
31
+ - For best results, refer to the full training pipeline and preprocessing steps.
32
+
33
+ ## License
34
+ MIT License
35
+
36
  ---
37
+
38
+ If you use these models in your research or project, please cite or reference this repository.
Second_Trained_Model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57233ca4f59577c4944ce620966c07452edfbc04c0a33c6a8f5abc9d5964dc2b
3
+ size 4898576