Softmax Tree: An Accurate, Fast Classifier When the Number of Classes Is Large
Arman Zharmagambetov, Magzhan Gabidolla, Miguel Á. Carreira-Perpiñán
Abstract
Classification problems having thousands or more classes naturally occur in NLP, for example language models or document classification. A softmax or one-vs-all classifier naturally handles many classes, but it is very slow at inference time, because every class score must be calculated to find the top class. We propose the "softmax tree", consisting of a binary tree having sparse hyperplanes at the decision nodes (which make hard, not soft, decisions) and small softmax classifiers at the leaves. This is much faster at inference because the input instance follows a single path to a leaf (whose length is logarithmic on the number of leaves) and the softmax classifier at each leaf operates on a small subset of the classes. Although learning accurate tree-based models has proven difficult in the past, we are able to overcome this by using a variation of a recent algorithm, tree alternating optimization (TAO). Compared to a softmax and other classifiers, the resulting softmax trees are both more accurate in prediction and faster in inference, as shown in NLP problems having from one thousand to one hundred thousand classes.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Counterfactual Explanations for Oblique Decision Trees: Exact, Efficient Algorithms cites Smaller, more accurate regression forests using tree alternating optimization
- Semi-Supervised Learning with Decision Trees: Graph Laplacian Tree Alternating Optimization cites Smaller, more accurate regression forests using tree alternating optimization
Cited by top-tier papers1
Builds on2
- Counterfactual Explanations for Oblique Decision Trees: Exact, Efficient AlgorithmsMiguel Á. Carreira-Perpiñán, Suryabhan Singh HadaAAAI 2021 · 39 citations
- Smaller, more accurate regression forests using tree alternating optimizationArman Zharmagambetov, Miguel Á. Carreira-PerpiñánICML 2020 · 34 citations
Related papers
- A faster training algorithm for regression trees with linear leaves, and an analysis of its complexityKuat Gazizov, Miguel Á. Carreira-PerpiñánNeurIPS 2025
- ANN Softmax: Acceleration of Extreme Classification TrainingKang Zhao, Liuyihan Song, Yingya Zhang, Pan Pan et al.VLDB 2022 · 8 citations
- How does Chain of Thought decompose complex tasks?Amrut Nadgir, Vijay Balasubramanian, Pratik ChaudhariICML 2026 · 1 citation
- The Tree Ensemble Layer: Differentiability meets Conditional ComputationHussein Hazimeh, Natalia Ponomareva, Petros Mol, Zhenyu Tan et al.ICML 2020 · 95 citations
- A Tale of Two Efficient and Informative Negative Sampling DistributionsShabnam Daghaghi, Tharun Medini, Nicholas Meisburger, Beidi Chen et al.ICML 2021 · 11 citations
