[Paper Review] One-vs-Each Approximation to Softmax for Scalable Estimation of Probabilities
This paper proposes a novel one-vs-each lower bound on the softmax function that enables scalable, doubly stochastic estimation by subsampling both training instances and class labels. The bound is a rigorous lower bound on exact softmax probabilities, maintains convexity when the original cost is convex, and achieves state-of-the-art performance in large-scale multiclass classification with minimal computational overhead.
The softmax representation of probabilities for categorical variables plays a prominent role in modern machine learning with numerous applications in areas such as large scale classification, neural language modeling and recommendation systems. However, softmax estimation is very expensive for large scale inference because of the high cost associated with computing the normalizing constant. Here, we introduce an efficient approximation to softmax probabilities which takes the form of a rigorous lower bound on the exact probability. This bound is expressed as a product over pairwise probabilities and it leads to scalable estimation based on stochastic optimization. It allows us to perform doubly stochastic estimation by subsampling both training instances and class labels. We show that the new bound has interesting theoretical properties and we demonstrate its use in classification problems.
Motivation & Objective
- Address the computational intractability of exact softmax estimation in models with large numbers of classes (e.g., tens of thousands or millions).
- Develop a computationally efficient, scalable approximation to softmax probabilities that maintains theoretical guarantees.
- Enable doubly stochastic optimization by allowing independent subsampling of training instances and class labels.
- Ensure the approximation remains a perfect surrogate for maximum likelihood estimation in the non-parametric case.
- Provide a convex, differentiable bound that supports stochastic gradient descent with sparse updates.
Proposed method
- Derive a lower bound on the softmax probability using the identity $ p(y=k) = \frac{1}{1 + \sum_{m \neq k} e^{-(f_k - f_m)}} $.
- Apply the inequality $ 1 + \sum_i \alpha_i \leq \prod_i (1 + \alpha_i) $ for $ \alpha_i \geq 0 $ to obtain $ p(y=k) \geq \prod_{m \neq k} \sigma(f_k - f_m) $, where $ \sigma $ is the sigmoid function.
- Use the resulting bound as a variational lower bound in a doubly stochastic optimization framework, enabling subsampling of both data and classes.
- Perform stochastic gradient descent with sparse updates by selecting only the true class and a small random subset of other classes at each step.
- Maintain convexity of the bound when the original softmax cost is convex, ensuring stable optimization.
- Use a learning rate schedule with halving every epoch to improve convergence in large-scale settings.
Experimental results
Research questions
- RQ1Can a lower bound on the softmax function be constructed that is both computationally efficient and theoretically sound for large-scale classification?
- RQ2Does the proposed one-vs-each bound preserve the global optimum of the exact maximum likelihood estimation in the non-parametric case?
- RQ3Can the bound support doubly stochastic optimization with independent subsampling of training instances and class labels?
- RQ4How does the bound compare in accuracy and efficiency to existing methods like sampled softmax or hierarchical softmax in large-scale multiclass problems?
- RQ5Is the bound convex when the original softmax cost is convex, enabling stable and efficient optimization?
Key findings
- The one-vs-each bound is a rigorous lower bound on the exact softmax probability, derived from a product of pairwise sigmoid probabilities.
- The bound shares the same global optimum as the exact maximum likelihood solution in the non-parametric case, making it a perfect surrogate for estimation.
- The method enables doubly stochastic optimization through independent subsampling of training instances and class labels, drastically reducing computational cost.
- In the AmazonCat-13K dataset, the method achieved a test error of 53.11%, significantly outperforming random guessing and the majority-class baseline (79% error).
- Training completed in just 26 minutes on a standard PC using sparse updates with a minibatch size of one and five sampled classes per iteration.
- The bound remains convex when the original cost function is convex, ensuring convergence stability during optimization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.