ShareBoost: Efficient multiclass learning with feature sharing

Shai Shalev-Shwartz, Yonatan Wexler, Amnon Shashua

Introduction

ShareBoost is a greedy algorithm designed to learn multiclass classifiers that use a small, shared set of features across all categories. By forcing classes to "share" features, the algorithm ensures that the total number of features grows sub-linearly with the number of classes. This leads to state-of-the-art accuracy with significantly faster inference times, making it highly suitable for resource-constrained environments like mobile computer vision or web advertising.

The Challenge of Multiclass Feature Scaling

In multiclass learning (e.g., identifying which of 1,000 objects is in an image), the standard approach is to learn a separate weight vector for every class. However, if each class uses its own unique set of features, the total number of features required explodes as the number of classes ($k$) increases.

This is a major bottleneck when the computational "budget" for extracting features is strictly limited. The authors tackle the challenge of finding a sparse predictor where features are shared across classes. Mathematically, if you arrange the weights into a matrix (classes as rows, features as columns), the goal is to find a matrix with very few non-zero columns. Since finding the absolute most accurate sparse predictor is NP-hard, the authors propose an efficient approximation.

The ShareBoost Algorithm

To solve this, the authors introduce ShareBoost, a forward greedy selection algorithm. Instead of trying to optimize all features at once, it builds the model one feature at a time.

ShareBoost Algorithm Pseudocode
  1. Gradient-Based Selection: In each step, the algorithm examines the gradient of the loss function. It selects the feature (column) that has the largest $L_1$ norm across all classes. This identifies the feature that, if added, would most significantly reduce the overall error across the entire multiclass problem.
  2. Logistic Multiclass Loss: ShareBoost uses a smooth, convex surrogate for the standard 0-1 classification error. This "softmax-like" loss function allows the algorithm to use efficient gradient-based optimization.
  3. Fully Corrective Step: Once a new feature is selected, the algorithm re-optimizes the weights for all previously selected features. This ensures the model makes the absolute most of its limited feature budget.
  4. Non-Linear Extensions: While the core framework is linear, it can be used to learn highly non-linear predictors by using "decision stumps" or "super-vectors" (piece-wise linear functions) as the candidate features.

Key Insights: The Power of Sharing

The central insight of ShareBoost is that features are often redundant across classes. For example, a visual feature useful for identifying the letter "O" is likely also useful for the number "0." By explicitly optimizing for column sparsity, ShareBoost exploits this redundancy.

Furthermore, the authors prove theoretically that the number of features needed does not have to grow linearly with the number of classes. Unlike many heuristic boosting methods, ShareBoost comes with formal guarantees: it will find a sparse, accurate solution if one exists, and it generalizes well to unseen data. The authors also argue that their greedy approach is often more effective at finding extremely sparse solutions than standard $L_1$ "lasso-style" convex regularization, especially when the pool of potential features is massive.

Experimental Results

The paper evaluates ShareBoost on two primary benchmarks: Char74k (a dataset of digits and letters up to 36 classes) and MNIST (handwritten digits).

  • Sub-linear Scaling: On the Char74k dataset, ShareBoost demonstrated a very mild increase in the number of features needed as the number of classes increased from 2 to 36. In contrast, a standard "1-vs-rest" approach saw the feature count explode.
Feature scaling as the number of classes increases
  • Computational Efficiency: On the MNIST dataset, ShareBoost achieved a 0.47% error rate using only about 300 features. This required roughly 3.3 million Multiply-Accumulate (MAC) operations per image, compared to 7.5 million for the top-performing neural networks of that era, all while maintaining similar accuracy.
  • Superior Sparsity: ShareBoost outperformed mixed-norm regularization ($L_{1,\infty}$) in scenarios where a very small number of features was required, proving more effective at "squeezing" information into a tight feature budget.

Limitations and Future Work

While highly effective for sparse feature selection, ShareBoost has limitations. The authors acknowledge that if a problem inherently requires a dense solution (many features for accuracy), convex regularization methods might perform better than this greedy approach. Additionally, while inference is extremely fast, the "fully corrective" step—re-optimizing all weights at every iteration—can become computationally expensive during training as the number of selected features grows. Future work could explore more complex "look-ahead" selection heuristics to find even better features, albeit at a higher training cost.

Summary updated

BibTeX
@inproceedings{shalevshwartz2011shareboost,
  author = {Shai Shalev-Shwartz and Yonatan Wexler and Amnon Shashua},
  title = {{ShareBoost: Efficient multiclass learning with feature sharing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2011},
  url = {https://openreview.net/forum?id=B1Er_uZObS},
}
Figure