Compact multi-class boosted trees

Natalia Ponomareva, Thomas Colthurst, Gilbert Hendry, Salem Haykal, Soroush Radpour

Gradient Boosted Decision Trees (GBDTs) are the workhorses of modern machine learning, known for winning Kaggle competitions and providing high accuracy with tabular data. However, when it comes to multi-class classification, standard implementations often bloat in size, requiring one tree per class for every boosting iteration.

In this paper, researchers from Google introduce two key extensions to the TensorFlow Boosted Trees (TFBT) framework that significantly reduce model complexity while improving convergence speed.

TL;DR

The authors propose two modifications to the standard gradient boosting algorithm: vector-valued trees (which handle all classes in a single tree) and layer-by-layer boosting (which updates gradients at every tree level). These techniques allow for significantly more compact models—requiring far fewer trees to reach peak accuracy—making them ideal for deployment on resource-constrained devices like smartphones.

What Problem Does This Paper Address?

Standard GBDT libraries (like the original XGBoost or LightGBM) typically handle multi-class problems using a "one-vs-rest" approach. If you have 26 classes (like the Letter-26 dataset), the algorithm builds 26 separate trees in every single iteration.

This leads to two major issues:

  1. Model Bloat: The ensemble grows massive very quickly, consuming significant memory and slowing down inference.
  2. Optimization Inefficiency: Binary reformulations can create unbalanced sub-problems and fail to capture the inherent relationships between classes, often requiring thousands of iterations to converge.

Methods

The authors introduce two primary architectural changes:

1. Vector-Valued Trees

Instead of building $C$ trees (where $C$ is the number of classes) per iteration, they build one tree where each leaf stores a $C$-dimensional vector.

  • Newton Updates: They derive update equations using a second-order Taylor expansion (Newton’s method) for multi-class loss.
  • Hessian Approximation: Inverting a full $C \times C$ Hessian matrix for every leaf is computationally expensive ($O(C^3)$). The authors found that using a diagonal Hessian approximation is not only faster ($O(C)$) but actually acts as a form of regularization, often leading to better generalization.

2. Layer-by-Layer Boosting

In traditional boosting, the "step" in function space is an entire tree. In TFBT’s layer-by-layer approach, the algorithm treats each layer of the tree as a boosting step.

  • Frequent Updates: Gradients and Hessians are recalculated after every layer is built.
  • Refinement: This allows deeper layers to learn a "residual adjustment" over the shallower layers of the same tree, leading to faster convergence and better handling of complex loss functions where the second-order Taylor expansion might be inexact.

Datasets

The authors evaluated their approach on several well-known multi-class benchmarks:

  • MNIST: Hand-written digits (10 classes).
  • SensIT: Vehicle classification (3 classes).
  • Covertype: Forest cover type prediction (7 classes).
  • Letter-26: English letter recognition (26 classes).
  • Poker: Poker hand classification (10 classes).
  • CIFAR-10: Image classification (10 classes, using raw pixel features).

Key Insights and Ideas

  • The "Folk Wisdom" Confirmed: There is a common belief that one-vs-rest requires roughly $C$ times more trees than a direct multi-class approach. The experiments confirm this: vector-valued trees reach high accuracy with a fraction of the total tree count.
  • Diagonal is Better than Full: Surprisingly, the diagonal Hessian approximation often outperformed the full Hessian. The authors hypothesize that the simplification prevents the model from over-fitting to the specific curvatures of the training loss.
  • Efficiency for Embedded Systems: By reducing the number of trees needed, these methods make GBDTs viable for "on-device" AI where memory and latency are strictly capped.
  • TFBT System Design: Unlike other distributed systems that require the entire dataset to be in memory, TFBT uses mini-batches and online quantile sketches, making it more scalable for massive datasets.

Key Results

The quantitative results show a clear advantage for the proposed methods, especially at small ensemble sizes (10–50 trees):

  • Letter-26 Dataset: At 10 trees, the standard one-vs-rest approach (XGBoost) was virtually unusable (N/A or very low accuracy), while the Diagonal + LBL (Layer-by-Layer) approach achieved 80.6% accuracy.
  • Convergence Speed: On the MNIST dataset, the vector-valued methods reached ~95% accuracy in under 100 trees, whereas one-vs-rest methods were still lagging significantly behind at the same tree count.
  • Compactness: Across almost all datasets, the combination of vector-valued leaves and LBL boosting produced the best (lowest) cross-entropy loss and highest accuracy for fixed ensemble sizes.

Limitations and Future Work

  • Extreme Multi-label Problems: The authors note that while this works for dozens of classes, it is not suitable for "extreme" multi-label problems (e.g., millions of labels) because storing a full dense vector in every leaf would become prohibitively expensive.
  • Hessian Sparsity: For multi-label problems, they suggest that exploring block-diagonal Hessians (to account for correlations between specific labels) could be a promising future direction.
  • Feature Engineering: For image datasets like CIFAR-10, the model used raw pixels. While the multi-class logic held up, GBDTs still lag behind Convolutional Neural Networks for this specific data type.

Reference: Ponomareva, N., et al. (2017). Compact Multi-Class Boosted Trees. arXiv:1710.11547. The TFBT library is open-source and available as part of the TensorFlow ecosystem.

Summary updated

BibTeX
@inproceedings{ponomareva2017compact,
  author = {Natalia Ponomareva and Thomas Colthurst and Gilbert Hendry and Salem Haykal and Soroush Radpour},
  title = {{Compact multi-class boosted trees}},
  booktitle = {IEEE BigData},
  year = {2017},
  url = {https://openreview.net/forum?id=72bki7dmFkO},
}

Loading related content...

Figure