Skip to content

Commit 944f1ff

Browse files
authored
Add TreeSHAP references to documentation (#12207)
1 parent 0adcfd5 commit 944f1ff

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

doc/contrib/featuremap.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ XGBoost includes features designed to improve understanding of the model. Here's
4545
- Tree visualization.
4646
- Tree as dataframe.
4747

48-
For GPU support, the SHAP value uses XGBoost's in-tree ``QuadratureTreeSHAP`` implementation. It supports categorical features, while vector-leaf is still in progress.
48+
SHAP values use XGBoost's in-tree ``QuadratureTreeSHAP`` implementation on both CPU and
49+
GPU. It supports categorical features, while vector-leaf is still in progress.
4950

5051
----------
5152
Evaluation

doc/gpu/index.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ The GPU algorithms currently work with CLI, Python, R, and JVM packages. See :do
3535
3636
GPU-Accelerated SHAP values
3737
=============================
38-
XGBoost provides an in-tree GPU implementation of ``QuadratureTreeSHAP`` for computing SHAP values when the GPU is used.
38+
XGBoost uses its in-tree ``QuadratureTreeSHAP`` implementation for computing SHAP values
39+
on both CPU and GPU. The GPU path uses the same Quadrature-TreeSHAP formulation described
40+
by Wettenstein et al. (2026) for exact TreeSHAP feature attributions when the GPU is
41+
selected.
3942

4043
.. code-block:: python
4144
@@ -92,6 +95,10 @@ References
9295
**********
9396
`Mitchell R, Frank E. (2017) Accelerating the XGBoost algorithm using GPU computing. PeerJ Computer Science 3:e127 https://doi.org/10.7717/peerj-cs.127 <https://peerj.com/articles/cs-127/>`_
9497

98+
`Lundberg SM, Erion GG, Lee S-I. (2018) Consistent Individualized Feature Attribution for Tree Ensembles. arXiv:1802.03888 <https://arxiv.org/abs/1802.03888>`_
99+
100+
`Wettenstein R, Mitchell R, Yu P. (2026) Quadrature-TreeSHAP: Depth-Independent TreeSHAP and Shapley Interactions. arXiv:2605.04497 <https://arxiv.org/abs/2605.04497>`_
101+
95102
`NVIDIA Parallel Forall: Gradient Boosting, Decision Trees and XGBoost with CUDA <https://devblogs.nvidia.com/parallelforall/gradient-boosting-decision-trees-xgboost-cuda/>`_
96103

97104
`Out-of-Core GPU Gradient Boosting <https://arxiv.org/abs/2005.09148>`_

doc/prediction.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ After 1.4 release, we added a new parameter called ``strict_shape``, one can set
3939

4040
Output is a 3-dim array, with ``(rows, groups, columns + 1)`` as shape. Whether
4141
``approx_contribs`` is used does not change the output shape. If the strict shape
42-
parameter is not set, it can be a 2 or 3 dimension array depending on whether
43-
multi-class model is being used.
42+
parameter is not set, it can be a 2 or 3 dimension array depending on whether multi-class
43+
model is being used. See `Lundberg et al. (2018)`_ for the original TreeSHAP feature
44+
attribution method. When ``approx_contribs`` is ``False``, XGBoost uses the
45+
``QuadratureTreeSHAP`` implementation described by `Wettenstein et al. (2026)`_ for exact
46+
TreeSHAP feature attributions on both CPU and GPU. When ``approx_contribs`` is ``True``,
47+
XGBoost uses an approximate contribution method on CPU; the GPU predictor does not
48+
implement approximated contributions.
4449

4550
- When using ``pred_interactions`` with ``strict_shape`` set to ``True``:
4651

@@ -191,3 +196,5 @@ More information and examples are given in the `Concrete ML documentation`_.
191196
.. _Zama: https://www.zama.ai/
192197
.. _Concrete ML: https://github.com/zama-ai/concrete-ml
193198
.. _Concrete ML documentation: https://docs.zama.ai/concrete-ml
199+
.. _Lundberg et al. (2018): https://arxiv.org/abs/1802.03888
200+
.. _Wettenstein et al. (2026): https://arxiv.org/abs/2605.04497

0 commit comments

Comments
 (0)