From b24ab2d979d4bffd470fda29c6e395a0452978ea Mon Sep 17 00:00:00 2001 From: Teodor Parvanov Date: Mon, 20 Jan 2025 15:43:24 +0100 Subject: [PATCH] Updating the readme with instructions for running cifar10_crowdguard.py Signed-off-by: Teodor Parvanov --- .../workflow/CrowdGuard/readme.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/openfl-tutorials/experimental/workflow/CrowdGuard/readme.md b/openfl-tutorials/experimental/workflow/CrowdGuard/readme.md index 2cf614ffcd..f616045471 100644 --- a/openfl-tutorials/experimental/workflow/CrowdGuard/readme.md +++ b/openfl-tutorials/experimental/workflow/CrowdGuard/readme.md @@ -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. \ No newline at end of file +[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 +``` \ No newline at end of file