Resolve experimental status of the split gradients feature
I've done some experiments using the experimental split gradients feature and possible alternatives to see where we should go from here.
We can compare a few different implementations:
- Full multiclass: ordinary vector-leaf multiclass trees.
- RP10: project the full gradients to ten dimensions for split selection, retaining the original gradients and Hessians for leaf values. The RP variant draws a new mean-zero orthonormal Gaussian basis each round.
- SVD10: use a randomized estimate of the leading ten gradient directions for split selection, again retaining full-class leaf values.
- Bucket10: randomly partition the classes into ten balanced buckets and aggregate the gradients within each bucket for split selection. Draw a new partition each round, retaining the original gradients and Hessians for leaf values. Like RP10, this uses split gradients and predicts the original classes directly, without a decoder.
- 10×10 encoding: train ten ordinary 10-class models. Each model receives a different balanced random partition of the original classes into ten buckets. Decode by summing the margins assigned to each candidate class's codeword. This does not use split gradients.
Accuracy, training time and model size
The datasets are a 28,000-row subset of ALOI with 1,000 classes, two synthetic Gaussian datasets with 100 and 500 classes (Flat100 and Flat500), and a synthetic hierarchical dataset with ten groups of ten classes (Hierarchical100). All runs used GPU training on NVIDIA RTX PRO 6000 Blackwell GPUs, with one GPU per training run. The ALOI runs use depth-8 trees.
| Dataset | Method | Test accuracy (mean ± SD) | Complete fit time | Saved model size | Peak training GPU memory (GiB) |
|---|---|---|---|---|---|
| ALOI subset (28k rows) | Full multiclass | 89.45% ± 0.00 pp | 189.7 s | 1601.1 MB | 16.56 |
| ALOI subset (28k rows) | RP10 | 89.70% ± 0.17 pp | 91.5 s | 729.3 MB | 2.52 |
| ALOI subset (28k rows) | SVD10 | 89.13% ± 0.15 pp | 68.1 s | 522.0 MB | 2.18 |
| ALOI subset (28k rows) | Bucket10 | 89.64% ± 0.25 pp | 103.6 s | 802.4 MB | 2.58 |
| ALOI subset (28k rows) | 10×10 encoding | 88.93% ± 0.19 pp | 112.2 s | 463.7 MB | 3.30 |
| Flat100 | Full multiclass | 71.46% ± 0.00 pp | 8.5 s | 11.0 MB | 0.89 |
| Flat100 | RP10 | 71.75% ± 0.47 pp | 6.4 s | 5.7 MB | 0.83 |
| Flat100 | SVD10 | 71.42% ± 0.35 pp | 6.8 s | 5.6 MB | 0.83 |
| Flat100 | Bucket10 | 71.93% ± 0.27 pp | 7.3 s | 6.5 MB | 0.83 |
| Flat100 | 10×10 encoding | 69.03% ± 0.43 pp | 57.5 s | 247.6 MB | 3.54 |
| Hierarchical100 | Full multiclass | 93.69% ± 0.00 pp | 10.2 s | 13.5 MB | 0.89 |
| Hierarchical100 | RP10 | 94.09% ± 0.13 pp | 5.9 s | 4.8 MB | 0.83 |
| Hierarchical100 | SVD10 | 93.93% ± 0.20 pp | 8.2 s | 44.8 MB | 1.05 |
| Hierarchical100 | Bucket10 | 94.26% ± 0.14 pp | 7.1 s | 6.3 MB | 0.83 |
| Hierarchical100 | 10×10 encoding | 94.29% ± 0.15 pp | 24.4 s | 28.0 MB | 1.48 |
| Flat500 | Full multiclass | 91.32% ± 0.00 pp | 43.7 s | 47.8 MB | 2.39 |
| Flat500 | RP10 | 92.81% ± 0.06 pp | 57.3 s | 21.3 MB | 1.63 |
| Flat500 | SVD10 | 92.61% ± 0.09 pp | 64.3 s | 24.7 MB | 1.65 |
| Flat500 | Bucket10 | 92.66% ± 0.09 pp | 54.4 s | 19.5 MB | 1.64 |
| Flat500 | 10×10 encoding | 78.11% ± 1.24 pp | 164.7 s | 136.4 MB | 1.91 |
Accuracy is mean ± sample SD across ten training seeds, using the same data splits and previously selected settings. Time, model size and peak memory remain the seed-17 measurements. SD measures training randomness; a zero SD does not imply zero test-set uncertainty.
Peak GPU memory is sampled training-process usage, including the CUDA context and allocator caches.
Interpretation
The projection methods were all competitive on accuracy. The encoding method, which is an alternative to using split gradients, was not competitive on Flat500. Encoding also produced substantially larger ensembles on the synthetic datasets.
Paired comparisons, accounting for seed and test-class variation and adjusting for all 40 comparisons, resolve some small accuracy differences. On ALOI, RP10 and Bucket10 beat SVD10 by about 0.6 and 0.5 percentage points. On Flat500, RP10 beats SVD10 by 0.20 points and Bucket10 by 0.15 points. We did not resolve a difference between RP10 and Bucket10 on the other three datasets. Failure to resolve a difference does not establish equivalence.
Split gradients can mostly be justified in terms of working memory reduction. On ALOI, the working memory needed was far larger than the dataset itself: the dense feature matrix is only 14.3 MB, whereas full multiclass used 16.56 GiB of GPU memory. The high number of classes makes prediction buffers, gradients and histograms much larger than the input features. The split-gradient methods used 2.18–2.58 GiB on the same data.
With depth-8 trees, the ALOI runs also showed a substantial runtime advantage for split gradients. They were around 70–71% faster per round, but used more rounds; total fit time was still 45–64% lower than full multiclass. The projections themselves were cheap, but the current Python custom-objective interface forces full predictions through CPU memory each round, even though gradient and projection arithmetic runs on the GPU.
The ALOI runtime breakdown was:
| Method | Total fit time | Rounds executed | Approx. update time per round | Total projection time |
|---|---|---|---|---|
| Full multiclass | 189.7 s | 740 | 212.3 ms | — |
| RP10 | 91.5 s | 1,140 | 63.4 ms | 0.52 s |
| SVD10 | 68.1 s | 860 | 60.6 ms | 0.85 s |
| Bucket10 | 103.6 s | 1,180 | 64.7 ms | 0.43 s |
Rounds include early-stopping patience. Update time excludes measured validation and checkpointing.
Recommendation
I suggest we keep reduced split gradients. The deeper-tree ALOI results show substantial working-memory and runtime benefits while retaining competitive accuracy.
The remaining question is whether we gain enough from offering different projections to justify the general split-gradient API. RP, SVD and random buckets were all competitive here, without a consistent winner across datasets.
An alternative would be a single built-in projection, exposed through a parameter such as project_split_gradients=0.1 to use 10% of the original gradient dimensions for split selection. That would keep the implementation within the tree model and remove the need for a separate split-gradient API for this use case. It would also avoid the Python custom-objective callback and CPU prediction round trip used in these experiments, while retaining the full gradients for leaf values.
Source: dmlc/xgboost