Skip to content

Commit

Permalink
Updating the readme with instructions for running cifar10_crowdguard.py
Browse files Browse the repository at this point in the history
Signed-off-by: Teodor Parvanov <[email protected]>
  • Loading branch information
teoparvanov committed Jan 20, 2025
1 parent 8b219e5 commit b24ab2d
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion openfl-tutorials/experimental/workflow/CrowdGuard/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,25 @@ We implemented a simple scaling-based poisoning attack to demonstrate the effect

For the local validation in CrowdGuard, each client uses its local dataset to obtain the hidden layer outputs for each local model. Then it calculates the Euclidean and Cosine Distance, before applying a PCA. Based on the first principal component, CrowdGuard employs several statistical tests to determine whether poisoned models remain and removes the poisoned models using clustering. This process is repeated until no more poisoned models are detected before sending the detected poisoned models to the server. On the server side, the votes of the individual clients are aggregated using a stacked-clustering scheme to prevent malicious clients from manipulating the aggregation process through manipulated votes. The client-side validation as well as the server-side operations, are executed with SGX to prevent privacy attacks.

[1] Rieger, P., Krauß, T., Miettinen, M., Dmitrienko, A., & Sadeghi, A. R. CrowdGuard: Federated Backdoor Detection in Federated Learning. NDSS 2024.
[1] Rieger, P., Krauß, T., Miettinen, M., Dmitrienko, A., & Sadeghi, A. R. CrowdGuard: Federated Backdoor Detection in Federated Learning. NDSS 2024.

## Running the CIFAR-10 demo script
The demo script requires a dedicated allocation of at least 18GB of RAM to run without issues.

1) Create a Python virtual environment for better isolation
```shell
python -m venv venv
source venv/bin/activate
```
2) Install OpenFL from PyPi
```shell
pip install -U openfl
```
3) Install the requirements for Workflow API
```shell
pip install -r workflow_interface_requirements.txt
```
4) Start the training script
```shell
python cifar10_crowdguard.py
```

0 comments on commit b24ab2d

Please sign in to comment.