Codelord01 commited on
Commit
58580ac
·
verified ·
1 Parent(s): 0d2e30a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language: en
4
+ library_name: keras
5
+ tags:
6
+ - intrusion-detection
7
+ - network-security
8
+ - iot-security
9
+ - cnn
10
+ - bilstm
11
+ - time-series
12
+ - cybersecurity
13
+ datasets:
14
+ - CICIoT2023
15
+ ---
16
+
17
+ # Binary Network-Layer Cyber-Physical IDS
18
+
19
+ A hybrid **CNN-BiLSTM** model for real-time binary network intrusion detection in IoT environments.
20
+ This model acts as the first line of defense by quickly distinguishing between malicious and legitimate traffic.
21
+
22
+ ## Model Description
23
+
24
+ - **Architecture:** `Conv1D -> ... -> Bidirectional LSTM -> Dense -> Dense (Sigmoid)`
25
+ - **Dataset:** Balanced subset of CICIoT2023
26
+ - **Performance:** 99.9997% accuracy
27
+ - **Limitations:** Validated only on CICIoT2023-like network traffic; may not detect novel attack types. Input must be normalized.
28
+ - **Training Information:**
29
+ - Optimizer: Adam
30
+ - Loss: Binary Cross-Entropy
31
+ - Balanced dataset: 2 million samples (1M benign, 1M attack)
32
+
33
+ ## Intended Use
34
+ - **Primary Use:** Real-time network intrusion detection
35
+ - **Input:** `(batch_size, 10, 46)` — 46 network flow features, normalized
36
+ - **Output:** Float between 0.0 (Benign) and 1.0 (Attack), threshold 0.5
37
+
38
+ ## How to Use
39
+ ```python
40
+ import tensorflow as tf
41
+ import numpy as np
42
+ from huggingface_hub import hf_hub_download
43
+
44
+ # Download the model from Hugging Face
45
+ MODEL_PATH = hf_hub_download("Codelord01/binary_model", "binary_model.keras")
46
+ model = tf.keras.models.load_model(MODEL_PATH)
47
+ model.summary()
48
+
49
+ # Prepare a sample input: 1 sample, 10 timesteps, 46 features
50
+ sample_data = np.random.rand(1, 10, 46).astype(np.float32)
51
+
52
+ # Make a prediction
53
+ prediction_prob = model.predict(sample_data)
54
+ predicted_class = 1 if prediction_prob > 0.5 else 0
55
+
56
+ print(f"Prediction Probability: {prediction_prob:.4f}")
57
+ print("Malicious Traffic Detected" if predicted_class == 1 else "Benign Traffic")
58
+
59
+
60
+ @mastersthesis{ababio2025multilayered,
61
+ title={A Multi-Layered Hybrid Deep Learning Framework for Cyber-Physical Intrusion Detection in Climate-Monitoring IoT Systems},
62
+ author={Awuni David Ababio},
63
+ year={2025},
64
+ school={Kwame Nkrumah University of Science and Technology}
65
+ }