[Paper Review] Stochastic Negative Mining for Learning with Large Output Spaces
This paper proposes Stochastic Negative Mining (SNM), a statistically principled and scalable method for training set-valued classifiers in large output space retrieval tasks. By introducing Ordered Weighted Losses (OWLs) that are calibrated and convex, SNM efficiently optimizes top-k relevance by sampling only a subset of negatives, significantly outperforming standard negative sampling in recall and precision on large-scale datasets like Amazon670K and WikiLSHTC.
We consider the problem of retrieving the most relevant labels for a given input when the size of the output space is very large. Retrieval methods are modeled as set-valued classifiers which output a small set of classes for each input, and a mistake is made if the label is not in the output set. Despite its practical importance, a statistically principled, yet practical solution to this problem is largely missing. To this end, we first define a family of surrogate losses and show that they are calibrated and convex under certain conditions on the loss parameters and data distribution, thereby establishing a statistical and analytical basis for using these losses. Furthermore, we identify a particularly intuitive class of loss functions in the aforementioned family and show that they are amenable to practical implementation in the large output space setting (i.e. computation is possible without evaluating scores of all labels) by developing a technique called Stochastic Negative Mining. We also provide generalization error bounds for the losses in the family. Finally, we conduct experiments which demonstrate that Stochastic Negative Mining yields benefits over commonly used negative sampling approaches.
Motivation & Objective
- To address the lack of statistically principled and scalable training methods for retrieval with large output spaces.
- To develop a surrogate loss function family that is calibrated and convex, ensuring convergence to the Bayes optimal predictor.
- To enable practical optimization of these losses in high-dimensional output spaces without evaluating all labels.
- To provide generalization error bounds that guide hyperparameter selection for the loss functions.
- To empirically validate that SNM outperforms standard negative sampling in retrieval performance.
Proposed method
- Introduces Ordered Weighted Losses (OWLs), a family of surrogate losses that are calibrated and convex under mild conditions on data and loss parameters.
- Proposes Stochastic Negative Mining (SNM), a technique that samples a small set of classes and treats the top-k scoring ones as negatives to avoid full-label scoring.
- Uses a top-k SNM variant where the highest-scoring non-positive classes in the sample are treated as hard negatives, improving model robustness.
- Derives generalization error bounds for OWLs using Rademacher and Gaussian complexities, providing theoretical guidance for loss parameter selection.
- Employs stochastic gradient descent with large learning rates for embedding layers and momentum for linear layers in training.
- Applies the method under the BOWL (Binary-Weighted Loss) setting with hinge loss, demonstrating consistent improvements across datasets.
Experimental results
Research questions
- RQ1Can a family of surrogate losses be designed that are both statistically calibrated and convex for large-output retrieval?
- RQ2Can such losses be practically optimized without evaluating scores for all possible output classes?
- RQ3Does Stochastic Negative Mining yield better generalization and retrieval performance than standard negative sampling?
- RQ4How do generalization error bounds for OWLs inform the selection of loss parameters in practice?
- RQ5Can SNM be combined with deep learning models to improve performance on large-scale multilabel and multiclass retrieval tasks?
Key findings
- Top-k Stochastic Negative Mining (SNM) with k=1 achieves the best performance across all datasets, significantly outperforming standard negative sampling.
- On Amazon670K, SNM achieves a P@3 of 40.37, a 2.5% improvement over negative sampling, and a P@5 of 36.92, showing strong recall gains.
- SNM improves Precision@k by up to 1.3x compared to negative sampling, with no additional computational cost and even slightly better efficiency.
- The method outperforms other embedding-based models like SLEEC and LEML, and is competitive with more complex models such as PfastreXML and DiSMEC.
- Generalization error bounds for OWLs are derived, providing theoretical justification for the choice of loss parameters in practice.
- Empirical results confirm that SNM is effective even with simple neural network architectures, suggesting strong potential when combined with more advanced models.
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.