paper-with-me

홈 › Papers

Adaptive Sampled Softmax with Inverted Multi-Index: Methods, Theory and Applications

2025-01-15 · Jin Chen, Jin Zhang, Xu Huang, Yi Yang, Defu Lian, Enhong Chen

The softmax function is a cornerstone of multi-class classification, integral to a wide range of machine learning applications, from large-scale retrieval and ranking models to advanced large language models. However, its computational cost grows linearly with the number of classes, which becomes prohibitively expensive in scenarios with millions or even billions of classes. The sampled softmax, which relies on self-normalized importance sampling, has emerged as a powerful alternative, significantly reducing computational complexity. Yet, its estimator remains unbiased only when the sampling distribution matches the true softmax distribution. To improve both approximation accuracy and sampling efficiency, we propose the MIDX Sampler, a novel adaptive sampling strategy based on an inverted multi-index approach. Concretely, we decompose the softmax probability into several multinomial probabilities, each associated with a specific set of codewords and the last associated with the residual score of queries, thus reducing time complexity to the number of codewords instead of the number of classes. To further boost efficiency, we replace the query-specific residual probability with a simple uniform distribution, simplifying the computation while retaining high performance. Our method is backed by rigorous theoretical analysis, addressing key concerns such as sampling bias, gradient bias, convergence rates, and generalization error bounds. The results demonstrate that a smaller divergence from the ideal softmax distribution leads to faster convergence and improved generalization. Extensive experiments on large-scale language models, sequential recommenders, and extreme multi-class classification tasks confirm that the MIDX-Sampler delivers superior effectiveness and efficiency compared to existing approaches.

📄 PDF Abstract BibTeX arXiv:2501.08563

Code (1)

xuhwang/midx_journal 공식 구현 pytorch

Tasks

Multi-class Classification

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Fast Variational AutoEncoder with Inverted Multi-Index for Collaborative Filtering

2021-09-13 · Jin Chen, Defu Lian, Binbin Jin, Xu Huang 외

Variational AutoEncoder (VAE) has been extended as a representative nonlinear method for collaborative filtering. However, the bottleneck of VAE lies in the softmax computation over all items, such that it takes linear c…

Collaborative Filtering

TAPAS: Two-pass Approximate Adaptive Sampling for Softmax

2017-07-10 · Yu Bai, Sally Goldman, Li Zhang

TAPAS is a novel adaptive sampling method for the softmax model. It uses a two pass sampling strategy where the examples used to approximate the gradient of the partition function are first sampled according to a squashe…

General ClassificationMulti-class ClassificationVocal Bursts Valence Prediction

Revisiting the Inverted Indices for Billion-Scale Approximate Nearest Neighbors

2018-02-07 · ECCV 2018 9 · Dmitry Baranchuk, Artem Babenko, Yury Malkov

This work addresses the problem of billion-scale nearest neighbor search. The state-of-the-art retrieval systems for billion-scale databases are currently based on the inverted multi-index, the recently proposed generali…

Retrieval

Vector and Line Quantization for Billion-scale Similarity Search on GPUs

2019-01-02 · Wei Chen, Jincai Chen, Fuhao Zou, Yuan-Fang Li 외

Billion-scale high-dimensional approximate nearest neighbour (ANN) search has become an important problem for searching similar objects among the vast amount of images and videos available online. The existing ANN method…

CPUGPUQuantization

Techniques for Inverted Index Compression

2019-08-28 · Giulio Ermanno Pibiri, Rossano Venturini

The data structure at the core of large-scale search engines is the inverted index, which is essentially a collection of sorted integer sequences called inverted lists. Because of the many documents indexed by such engin…