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

How the XgBoost models are aggregated? #127

Open
rkwojdan opened this issue Nov 3, 2020 · 1 comment
Open

How the XgBoost models are aggregated? #127

rkwojdan opened this issue Nov 3, 2020 · 1 comment

Comments

@rkwojdan
Copy link

rkwojdan commented Nov 3, 2020

Hi,

currently I am mostly interested in models aggregation part of Federated Learning. However, I cannot understand how it is done now. I guess it is used with rabit but cannot find in the code any allreduce function or something and how the global model is upadted. As of now I have a feeling it works likes this:

  1. XgBoost model 1 is trained on local data 1
  2. XgBoost model 1 is input to model XgBoost model 2 which is trained on local data 2
  3. Ends when all local data and temporary XgBoost models are used

It resembles online learning scheme.

Could you help me understand how the aggregation of XgBoost models works here?

@podcastinator
Copy link
Member

Hi,

A single model is trained together across all the machines. Each machine contains a partition of the data. To add a node to the tree during training, each machine builds a histogram over its data, and then sends the histogram to the aggregator. The aggregator then "aggregates" the histograms together, and sends the result back to each machine.

This is basically a variant of how distributed training is done in XGBoost. If you would like to understand the algorithm better, section 3.2 of the original XGBoost paper might help: https://arxiv.org/pdf/1603.02754.pdf

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