Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

What does example code do? #1036

Open
zavalyshyn opened this issue Apr 19, 2022 · 2 comments
Open

What does example code do? #1036

zavalyshyn opened this issue Apr 19, 2022 · 2 comments

Comments

@zavalyshyn
Copy link

Hi,
I've been able to successfully run your rust/examples code (coordinator and clients + redis db).
In the description you mention that it's a basic federated learning algorithm but it's "network capable".
Could you pleas elaborate on this further?

What exactly is the algorithm the clients are running?
How do you aggregate the updates to the global model (if you do)?
What data the test example is running on? What do you train the model on?

Thanks

@Robert-Steiner
Copy link
Contributor

Hi @zavalyshyn,
I'm sorry it took so long to reply.

In the description you mention that it's a basic federated learning algorithm but it's "network capable".
Could you pleas elaborate on this further?

The example is "network capable" in a sense that the client and the coordinator communicate over TCP. Since both the client and the coordinator are written in Rust, it would also be possible to have both communicate via in-memory channels.

What exactly is the algorithm the clients are running?
What data the test example is running on? What do you train the model on?

In terms of machine learning, the client doesn't run any algorithm, it just sends a dummy model every round it's chosen. The Rust example is intended more for testing the coordinator (stress test, etc.) and the PET protocol. If you are looking for a more real world example, I can recommend this Python example.

How do you aggregate the updates to the global model (if you do)?

In short: we use federated averaging in combination with homomorphic encryption. It is described in more detail in the whitepaper.

I hope is answers your questions, if not let me know.

@zavalyshyn
Copy link
Author

@Robert-Steiner thanks a lot for your answers. They do answer all of my questions.
I was looking for some machine learning examples written in pure Rust and hoped to find it here. Seems like Python still prevails on that front.

Nevertheless, thanks for making Xaynet available to people like me and working on it. Keep up the good work!

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

No branches or pull requests

2 participants