Raymw / Federated-XGBoost

Federated Learning on XGBoost
Apache License 2.0
46 stars 20 forks source link

Hi, could you please provide us more details about how to compile and run these released codes? #9

Open ddghjikle opened 3 years ago

ddghjikle commented 3 years ago

Hi, first of all, thanks very much for sharing these codes. Recently, I have tried to implement these codes according to existing instructions. However, since XGBoost is directly installed via pip, I don't know where the param.h and update_histmaker.cc should be put. On the other hand, though these codes can be run through python, it seems that main.py cannot generate a federated model. Therefore, for better understanding this paper and effectively reproduce these codes, could you please provide more details about the running processes?

Raymw commented 3 years ago

Hi, thanks for you attention to our work.

First of all, when you implementing the pip, you can actually check the source code of XGBoost, and then you will find those files. what I usually do is to download the XGBoost package from its documentation https://xgboost.readthedocs.io/en/latest/, and then install and compile it by myself.

For your second question, the main.py is to utilize the rabit, which is the communication method like MPI to communicate between different nodes. After the communication, all nodes will get the aggregated results to build the federated tree.

In this paper, we try to use the anonymous aggregation to hide users information, and used the inbuilt rabit to achieve the federated process. And there are also some other methods instead of anonymous aggregation to protect the user privacy.In the future, maybe more secure mechanism can be applied in this way. But at least, in our demo, we firstly applied the anonymous aggregation and tested that it is achievable to use its inbuilt Rabit to achieve the federated process. Thanks!