https://github.com/ashr-exe/phishnet-fl
PhishNet-FL is a federated learning system using Flower and TensorFlow to train phishing detection models across distributed clients while preserving data privacy. It leverages UCIโs Phishing Websites Dataset, neural networks, and federated aggregation for decentralized training.
https://github.com/ashr-exe/phishnet-fl
federated-learning flower phishing-detection tensorflow
Last synced: 4 months ago
JSON representation
PhishNet-FL is a federated learning system using Flower and TensorFlow to train phishing detection models across distributed clients while preserving data privacy. It leverages UCIโs Phishing Websites Dataset, neural networks, and federated aggregation for decentralized training.
- Host: GitHub
- URL: https://github.com/ashr-exe/phishnet-fl
- Owner: ashr-exe
- Created: 2025-02-03T19:29:24.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T19:36:20.000Z (8 months ago)
- Last Synced: 2025-06-21T11:06:43.389Z (4 months ago)
- Topics: federated-learning, flower, phishing-detection, tensorflow
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **PhishNet-FL: Federated Learning for Phishing Detection**
PhishNet-FL is a federated learning system designed to detect phishing websites while preserving user data privacy. Using **Flower** for federated learning and **TensorFlow** for deep learning, PhishNet-FL enables multiple clients to collaboratively train a phishing detection model without sharing raw data.
This approach enhances security by distributing the learning process while still benefiting from shared knowledge.
## **๐ Features**
โ **Federated Learning (FL):** Clients train locally and only share model updates, ensuring data privacy.
โ **Phishing Detection Model:** A neural network trained on the UCI Phishing Websites Dataset.
โ **Decentralized Training:** No need to centralize sensitive data, reducing security risks.
โ **Scalable Architecture:** Supports multiple clients communicating with a central federated server.
โ **Easy Deployment:** Simple client-server setup with minimal dependencies.---
## **๐ Repository Structure**
```
/PhishNet-FL
โโโ server.py # Federated learning server
โโโ client.py # Federated learning client
โโโ README.txt # Project documentation
โโโ requirements.txt # Dependencies
โโโ .gitignore # Ignore unnecessary files
```---
## **โก Installation**
Before running the project, install the required dependencies:
```bash
pip install -r requirements.txt
```---
## **๐ฅ Running the Server**
The **server** manages the federated learning process by coordinating clients and aggregating their updates.
```bash
python server.py
```You should see output confirming the server is running and waiting for clients to connect.
---
## **๐จโ๐ป Running Clients**
Each client trains the phishing detection model on its local dataset and communicates updates to the server.
```bash
python client.py
```
- `` โ Unique ID for the client (e.g., 0, 1, 2...)
- `` โ Total number of clients participating in training
- `` โ IP address of the federated learning serverFor example, if you have 3 clients and your server is running on **192.168.1.10**, start each client as follows:
```bash
python client.py 0 3 192.168.1.10
python client.py 1 3 192.168.1.10
python client.py 2 3 192.168.1.10
```---
## **๐งช Model Architecture**
The phishing detection model is a deep neural network built using TensorFlow:
- **Input Layer:** 30 features (preprocessed phishing website attributes)
- **Hidden Layers:**
- Dense (64 neurons, ReLU activation)
- Dropout (20%)
- Dense (32 neurons, ReLU activation)
- Dropout (20%)
- Dense (16 neurons, ReLU activation)
- **Output Layer:** 1 neuron (Sigmoid activation for binary classification)---
## **๐ How Federated Learning Works in PhishNet-FL**
1๏ธโฃ **Server Initialization:** The federated server starts and waits for clients to connect.
2๏ธโฃ **Client Training:** Each client trains a local model on its dataset without sharing raw data.
3๏ธโฃ **Model Updates:** Clients send model updates (weights) to the server instead of raw data.
4๏ธโฃ **Federated Aggregation:** The server averages the received model updates and improves the global model.
5๏ธโฃ **Global Model Distribution:** The updated global model is sent back to clients for the next training round.
6๏ธโฃ **Repeat:** The process repeats for multiple rounds until the model converges.This ensures privacy-preserving, decentralized machine learning across multiple devices.
---
## **๐ Dependencies**
- `flwr` (Flower for federated learning)
- `tensorflow` (Deep learning framework)
- `scikit-learn` (Data preprocessing and evaluation)
- `ucimlrepo` (Dataset retrieval)
- `numpy` (Numerical computations)---
## **๐ Future Improvements**
๐น Support for additional datasets and real-time phishing detection.
๐น Advanced privacy-preserving techniques like differential privacy.
๐น More efficient aggregation methods for improved performance.---
## **๐ฌ Contact & Contribution**
๐ก Found a bug? Have a feature request? Feel free to open an issue or contribute!
๐ง Reach out if you have any questions or need help setting up PhishNet-FL.Happy training! ๐๐