Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FedBCD_p implementation #14

Open
xavierxav opened this issue Jun 17, 2024 · 2 comments
Open

FedBCD_p implementation #14

xavierxav opened this issue Jun 17, 2024 · 2 comments

Comments

@xavierxav
Copy link

Hello, thank you for your work on VFLAIR platform.

It seems to me that the current implementation of fedBCD is incorrect. The same gradients are applied at each local iteration of passive parties (lines 193-212 in MainTaskVFL.py).

@ZixuanGu
Copy link
Contributor

Thank you for your question!

In the first FedBCD iteration, we go through code line 195-202 to run a normal VFL forward and backward.

In the following Q-1 FedBCD iterations, we go through line 203-212 where each parties update their own model without information exchange. Therefore, only active party can update its gradients using line 210, while passive parties only use the same gradients transferred from active party. However this is not the final gradients used for model update. Refer to the [local_backward()] function in ./src/party/party.py, the [self.local_gradient] in [class Party()] is unchanged. However, as [self.local_pred] is updated in MainTaskVFL.py line 206, the final gradients used for model update [self.weights_grad_a] is updated.

@xavierxav
Copy link
Author

Hello, thank you for your answer.

I understand that the gradient is affected by the local_pred (lines 348-353 for VFL without attack our defense). However from my understanding an implementation faithful to the original FedBCD paper (FedBCD: A Communication-Efficient Collaborative Learning Framework for Distributed Features) would also change self.local_gradient based on staled intermediate results and the local derivative of the loss function.

This why FedBCD is restricted to "models such as linear and logistic regression, and support vector machines" where the local derivatives of loss function are easily calculable.

Annotation 2024-06-20 125728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants