The Harfed application provides a streamlined interface for setting up and conducting Federated Learning experiments, particularly focusing on:
- Heterogeneous data distributions: Support for advanced dataset partitioning strategies like Dirichlet and Pathological.
- Robustness testing: Configuring experiments with malfunctions or adversarial behavior (e.g., targeted or untargeted attacks).
- Monitoring and visualization: GPU utilization tracking, dataset partition visualizations, accuracy trends, and attack success rates over training rounds.
- Dataset Configuration:
- Selection of datasets and subsets.
- Customizable partitioning strategies (e.g., Dirichlet, IID, etc.).
- Attack Configuration:
- Integration of Local Differential Privacy (LDP) settings.
- Fraction of malicious clients.
- Federated Learning Strategies:
- Popular FL algorithms like FedAvg, FedMedian, FedProx, etc.
- Flexible settings for model architectures, client fractions, and training rounds.
- Real-time Monitoring:
- GPU resource tracking (memory, utilization, temperature).
- Live experiment logs.
- Results Visualization:
- Accuracy and attack success rate (ASR) plots over FL rounds.
- Dataset partition label distribution charts.
-
Install dependencies: Ensure you have Python 3.10+ and install the required packages using
pip:pip install -r requirements.txt -
Launch the Streamlit app: Run the following command to start the Streamlit application:
streamlit run app.py -
Configure the experiment:
- Use the sidebar to select the dataset, partitioner, and attack configurations.
- Set Federated Learning strategies, the number of clients, and training rounds as needed.
-
Visualize and monitor:
-
Enable dataset partition visualization for insights into the data distribution.
-
Observe live GPU metrics and logs while the experiment is running.
-
-
Run the experiment:
- Click on the "Run Experiment" button to execute the experiment.
- The app generates logs and results at the specified output directory.
-
View and download results:
- Check the results section for accuracy and ASR plots.
- Download visualization graphs in PNG or PDF format.
- Access raw results and GPU stats as CSV files.




