You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FedDebug enables interactive and automated fault localization in Federation Learning (FL) applications. It adapts conventional debugging practices in FL with its breakpoint and fix & replay featur and it offers a novel differential testing technique to automatically identify the precise faulty clients.FedDebug tool artifact comprises a two-step process
8
10
- Interactive Debugging Constructs integrated with IBMFL framework via **FL simulation in a Docker Image**
9
11
- Automated Faulty Client Localization via **Google Colab Notebooks**
@@ -127,13 +129,13 @@ To check the functionality of `resume` command, restart the aggregator (`python
127
129
128
130
# 2. FedDebug: Faulty Client Localization
129
131
130
-
`FedDebug's` novel automated fault localization approach precisely identifies the faulty client without ever needing any test data or labels. To have a measurable impact on the global model, a faulty client’s model must behave differently than the regular clients. Every client in an FL application has the same model architecture, so their internal behaviors are comparable. Based on this insight, generates random inputs adapts differential testing to FL domain. It captures differences in the models’ execution via neuron activations instead of output labels to identify diverging behavior of a faulty client. Note that auto-generated data does not include the class label and thus we cannot use it as an oracle.
132
+
At a given faulty round in an FL campaign, `FedDebug` can automatically identify faulty clients without needing test data or labels. The following steps provide a walk-through of this feature using both reconfigurable computational notebooks as well as local python setup.
131
133
132
134
## 2.1 Installation
133
135
134
136
### Google Colab Setup
135
137
136
-
> ***Make sure you configure notebook with GPU: Click Edit->notebook settings->hardware accelerator->GPU***
138
+
> ***Make sure you configure the notebook with GPU: Click Edit->notebook settings->hardware accelerator->GPU***
137
139
138
140
139
141
Copy & paste the following commands in the ***first cell*** of notebook (e.g., `artifact.ipynb`) on `Google Colab`.
Now you can run the `artifact.ipynb` (<atarget="_blank"href="https://colab.research.google.com/github/SEED-VT/FedDebug/blob/main/fault-localization/artifact.ipynb"><imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/></a>). You can run notebooks containing `FedDebug` code with the above instructions. **Note:***You can uncomment the commands instead of copy & pasting if above commands are already in the given notebook.*
154
156
155
-
157
+
The notebook is configured to use the following default settings, where the first client (client ID 0) is faulty (with noisy labels that distort the global FL model).
args.clients = 5 # keep under 30 clients and use Resnet18, Resnet34, or Densenet to evaluate on Colab
164
+
args.faulty_clients_ids = "0" # can be multiple clients separated by comma e.g. "0,1,2" but keep under args.clients clients and at max less than 7
165
+
args.noise_rate = 1 # noise rate 0 to 1
166
+
args.sampling = "iid" # [iid, "niid"]
167
+
```
168
+
169
+
Once the entire notebook is executed, the logs report the progress and eventually print the faulty client's id. This is printed in the form `+++ Faulty Clients {0}` where 0 is the client ID for each auto-generated input (default is 10). It also reports the final localization accuracy.
158
170
159
171
160
172
@@ -195,7 +207,7 @@ cd FedDebug/fault-localization
195
207
196
208
See `INSTALL.md` for further instructions on how to setup your environment for fault localization.
197
209
198
-
***Note: To run locally, make sure you have an NVIDA GPU in your machine.***
210
+
***Note: To run locally, make sure you have an NVIDIA GPU in your machine.***
199
211
200
212
201
213
## 2.2 Evaluations
@@ -230,7 +242,7 @@ Although `artifact.ipynb` is sufficient to evaluate any configuration of `FedDeb
230
242
231
243
232
244
233
-
>***Note: We have scaled down the the experiments (e.g., reduce the number of epochs, small number of clients, etc) to assist reviewers to quickly validate the fundamentals of `FedDebug` and fit with `Google Colab` resources. However, you are welcome to test it with any configuration mentioned in `FedDebug` evolutions. Furthermore, if you see an unexpected result, please increase the number of `epochs` to the value mention in `Section V: Evaluations` and read `Section V.D Threat To Validity section`.***
245
+
>***Note: We have scaled down the the experiments (e.g., reduce the number of epochs, small number of clients, etc) to assist reviewers to quickly validate the fundamentals of `FedDebug` and fit with `Google Colab` resources. However, you are welcome to test it with any valid FL configuration. Furthermore, if you see an unexpected result, please increase the number of `epochs` to the value mention in `Section V: Evaluations` and read `Section V.D Threat To Validity section`.***
234
246
235
247
236
248
@@ -246,4 +258,4 @@ Although `artifact.ipynb` is sufficient to evaluate any configuration of `FedDeb
246
258
247
259
248
260
249
-
-**`Reproduce_Table1-Table2.ipynb` <atarget="_blank"href="https://colab.research.google.com/github/SEED-VT/FedDebug/blob/main/fault-localization/Reproduce_Table1-Table2.ipynb"> <imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/> </a>:** Table 1 and Table 2 show the performance of `FedDebug` in IID and Non-IID data distribution settings. This notebook contains the representative settings of these two tables. Feel free to test other configurations as well.
261
+
-**`Reproduce_Table1-Table2.ipynb` <atarget="_blank"href="https://colab.research.google.com/github/SEED-VT/FedDebug/blob/main/fault-localization/Reproduce_Table1-Table2.ipynb"> <imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/> </a>:** Table 1 and Table 2 show the performance of `FedDebug` in IID and Non-IID data distribution settings. This notebook contains the representative settings of these two tables. Feel free to test other configurations as well.
Copy file name to clipboardExpand all lines: fault-localization/README.md
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# 2. FedDebug: Faulty Client Localization
1
+
# FedDebug: Faulty Client Localization
2
2
3
-
`FedDebug's` novel automated fault localization approach precisely identifies the faulty client without ever needing any test data or labels. To have a measurable impact on the global model, a faulty client’s model must behave differently than the regular clients. Every client in an FL application has the same model architecture, so their internal behaviors are comparable. Based on this insight, generates random inputs adapts differential testing to FL domain. It captures differences in the models’ execution via neuron activations instead of output labels to identify diverging behavior of a faulty client. Note that auto-generated data does not include the class label and thus we cannot use it as an oracle.
3
+
At a given faulty round in an FL campaign, `FedDebug` can automatically identify faulty clients without needing test data or labels. The following steps provide a walk-through of this feature using both reconfigurable computational notebooks as well as local python setup.
4
4
5
5
## 2.1 Installation
6
6
7
7
### Google Colab Setup
8
8
9
-
> ***Make sure you configure notebook with GPU: Click Edit->notebook settings->hardware accelerator->GPU***
9
+
> ***Make sure you configure the notebook with GPU: Click Edit->notebook settings->hardware accelerator->GPU***
10
10
11
11
12
12
Copy & paste the following commands in the ***first cell*** of notebook (e.g., `artifact.ipynb`) on `Google Colab`.
Now you can run the `artifact.ipynb` (<atarget="_blank"href="https://colab.research.google.com/github/SEED-VT/FedDebug/blob/main/fault-localization/artifact.ipynb"><imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/></a>). You can run notebooks containing `FedDebug` code with the above instructions. **Note:***You can uncomment the commands instead of copy & pasting if above commands are already in the given notebook.*
27
27
28
-
28
+
The notebook is configured to use the following default settings, where the first client (client ID 0) is faulty (with noisy labels that distort the global FL model).
args.clients = 5 # keep under 30 clients and use Resnet18, Resnet34, or Densenet to evaluate on Colab
35
+
args.faulty_clients_ids = "0" # can be multiple clients separated by comma e.g. "0,1,2" but keep under args.clients clients and at max less than 7
36
+
args.noise_rate = 1 # noise rate 0 to 1
37
+
args.sampling = "iid" # [iid, "niid"]
38
+
```
39
+
40
+
Once the entire notebook is executed, the logs report the progress and eventually print the faulty client's id. This is printed in the form `+++ Faulty Clients {0}` where 0 is the client ID for each auto-generated input (default is 10). It also reports the final localization accuracy.
31
41
32
42
33
43
@@ -68,7 +78,7 @@ cd FedDebug/fault-localization
68
78
69
79
See `INSTALL.md` for further instructions on how to setup your environment for fault localization.
70
80
71
-
***Note: To run locally, make sure you have an NVIDA GPU in your machine.***
81
+
***Note: To run locally, make sure you have an NVIDIA GPU in your machine.***
72
82
73
83
74
84
## 2.2 Evaluations
@@ -103,7 +113,7 @@ Although `artifact.ipynb` is sufficient to evaluate any configuration of `FedDeb
103
113
104
114
105
115
106
-
>***Note: We have scaled down the the experiments (e.g., reduce the number of epochs, small number of clients, etc) to assist reviewers to quickly validate the fundamentals of `FedDebug` and fit with `Google Colab` resources. However, you are welcome to test it with any configuration mentioned in `FedDebug` evolutions. Furthermore, if you see an unexpected result, please increase the number of `epochs` to the value mention in `Section V: Evaluations` and read `Section V.D Threat To Validity section`.***
116
+
>***Note: We have scaled down the the experiments (e.g., reduce the number of epochs, small number of clients, etc) to assist reviewers to quickly validate the fundamentals of `FedDebug` and fit with `Google Colab` resources. However, you are welcome to test it with any valid FL configuration. Furthermore, if you see an unexpected result, please increase the number of `epochs` to the value mention in `Section V: Evaluations` and read `Section V.D Threat To Validity section`.***
107
117
108
118
109
119
@@ -119,4 +129,4 @@ Although `artifact.ipynb` is sufficient to evaluate any configuration of `FedDeb
119
129
120
130
121
131
122
-
-**`Reproduce_Table1-Table2.ipynb` <atarget="_blank"href="https://colab.research.google.com/github/SEED-VT/FedDebug/blob/main/fault-localization/Reproduce_Table1-Table2.ipynb"> <imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/> </a>:** Table 1 and Table 2 show the performance of `FedDebug` in IID and Non-IID data distribution settings. This notebook contains the representative settings of these two tables. Feel free to test other configurations as well.
132
+
-**`Reproduce_Table1-Table2.ipynb` <atarget="_blank"href="https://colab.research.google.com/github/SEED-VT/FedDebug/blob/main/fault-localization/Reproduce_Table1-Table2.ipynb"> <imgsrc="https://colab.research.google.com/assets/colab-badge.svg"alt="Open In Colab"/> </a>:** Table 1 and Table 2 show the performance of `FedDebug` in IID and Non-IID data distribution settings. This notebook contains the representative settings of these two tables. Feel free to test other configurations as well.
0 commit comments