In XGBoost the next tree is trained on the residual of previous tree as independent variable or the original independent variable itself?

In XGBoost the next tree is trained on the residual of previous tree as independent variable or the original independent variable itself?

Hi @aryan_singh1993,

Each subsequent tree will train on the original independent variables, while considering the residuals as the dependent variable.

Refer the GBM topic in this article -