This project utilizes the power of Federated Learning to create an Intrusion Detection System. It employs the Flower framework (GitHub - adap/flower) for federated learning and the UNSW_NB15 dataset for intrusion detection. The core of this system is a Neural Network (NN) model.
To get the project up and running, follow these steps:
- Download the UNSW_NB15 dataset.
- Place the
UNSW_NB15_training-set.csv
andUNSW_NB15_testing-set.csv
files in the project's data folder.
There are 3 options to execute simulation:
-
Manually
- To initiate the server, use the command:
python server.py
- To launch the clients, execute the following command for each client:
python client.py
Note: To accurately simulate the project, at least three clients are needed to satisfy the
min_fit_clients
,min_evaluate_clients
, andmin_available_clients
configuration.Note: The server uses port 8080 as default. If you want to run it on a different port, you may need to change it in both
client.py
andserver.py
. - To initiate the server, use the command:
-
Using the
simulation.py
script- To run the simulation, use the command:
python simulation.py
- To run the simulation, use the command:
-
Containerized simulation by running the Docker compose command
- To run the simulation, use the command:
docker-compose up --build
- To run the simulation, use the command:
Also you can visualize the model's architecture by generating a plot
- To visualize the model's structure, use:
python utils/plot.py
- Personalize datasets for each client instead of using a common sampled dataset.