# abrar2652/network-intrusion-detection architecture

> Architecture diagram of the GitHub repository abrar2652/network-intrusion-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abrar2652/network-intrusion-detection
- Repository: https://github.com/abrar2652/network-intrusion-detection

## Overview

##### Project type and purpose
- This is a data-science/ML project implemented in a single Jupyter Notebook (`network_intrusion_detection.ipynb`).
- Its purpose is to build and evaluate a network intrusion detection system using graph neural networks (GNNs) on multiple standardized intrusion datasets (NSL-KDD, UNSW-NB15, CICIDS2017, KDD’99).

##### File structure
- Top-level files only:
- `network_intrusion_detection.ipynb` (the orchestrating notebook)
- `README.md` (project description)
- `LICENSE`
- No separate “src” or “modules” directory—everything lives inside the notebook.
- No deployment or service configurations; it’s exploratory and research-oriented.

##### README for additional insights
- Libraries: pandas, numpy, scikit-learn, matplotlib, seaborn, xgboost, torch, torch_geometric.
- Workflow hint: data download → preprocessing → model training → evaluation.
- No pre­built APIs or microservices—purely notebook‐driven.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Project Description
    README["Project Description & Overview"]:::doc
    click README "https://github.com/abrar2652/network-intrusion-detection/blob/main/README.md"

    %% Orchestration Layer
    Orchestration["Jupyter Notebook Environment"]:::boundary
    click Orchestration "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    README -->|uses| Orchestration

    %% External Data Sources
    subgraph "External Data Sources"
        direction TB
        NSL["NSL-KDD Dataset"]:::external
        UNSW["UNSW-NB15 Dataset"]:::external
        CICIDS["CICIDS2017 Dataset"]:::external
        KDD99["KDD'99 Dataset"]:::external
    end
    click NSL "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    click UNSW "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    click CICIDS "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    click KDD99 "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"

    %% Compute Modules
    Ingestion["Data Ingestion & Preprocessing"]:::compute
    click Ingestion "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    Graph["Graph Construction Module"]:::compute
    click Graph "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    Training["GNN Model Training\n(torch_geometric vX.X, torch vX.X)"]:::compute
    click Training "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"

    %% Output Modules
    Evaluation["Model Evaluation & Metrics"]:::output
    click Evaluation "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"
    Visualization["Visualization & Reporting"]:::output
    click Visualization "https://github.com/abrar2652/network-intrusion-detection/blob/main/network_intrusion_detection.ipynb"

    %% Pipeline Flow
    Orchestration --> Ingestion
    NSL -->|raw CSV| Ingestion
    UNSW -->|raw CSV| Ingestion
    CICIDS -->|raw CSV| Ingestion
    KDD99 -->|raw CSV| Ingestion
    Ingestion -->|cleaned data| Graph
    Graph -->|graph edges+features| Training
    Training -->|trained model| Evaluation
    Evaluation -->|metrics| Visualization

    %% Styles
    classDef external fill:#f96,stroke:#333,stroke-width:1px;
    classDef compute fill:#6cf,stroke:#333,stroke-width:1px;
    classDef output fill:#9f6,stroke:#333,stroke-width:1px;
    classDef boundary fill:#fff,stroke:#333,stroke-width:2px,stroke-dasharray: 5 5;
    classDef doc fill:#eee,stroke:#333,stroke-width:1px;
```
