Adaptive Sampling for Efficient Softmax Approximation
Tavor Z. Baharav, Ryan Kang, Colin Sullivan, Mo Tiwari, Eric Luxenberg, David Tse, Mert Pilanci
摘要
The softmax function is ubiquitous in machine learning and optimization applications. Computing the full softmax evaluation of a matrix-vector product can be computationally expensive in high-dimensional settings. In many applications, however, it is sufficient to calculate only the top few outputs of the softmax function. In this work, we present an algorithm, dubbed AdaptiveSoftmax , that adaptively computes the top k softmax values more efficiently than the full softmax computation, with probabilistic guarantees. We demonstrate the sample efficiency improvements afforded by AdaptiveSoftmax on real and synthetic data to corroborate our theoretical results. AdaptiveSoftmax yields > 10 x gain over full softmax computation on most datasets, yielding up to 30x improvement for Mis-tral7B evaluated on the Wikitext dataset. The adaptive method we propose for estimating the partition function (the softmax denominator) is of independent interest and can be used in other applications such as kernel density estimation
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
它引用的 Paper5
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
- Fast Attention Requires Bounded EntriesJosh Alman, Zhao SongNeurIPS 2023 · 115 次引用
- HyperAttention: Long-context Attention in Near-Linear TimeInsu Han, Rajesh Jayaram, Amin Karbasi, Vahab Mirrokni 等ICLR 2024 · 104 次引用
- BanditPAM: Almost Linear Time k-Medoids Clustering via Multi-Armed BanditsMo Tiwari, Martin Jinye Zhang, James Mayclin, Sebastian Thrun 等NeurIPS 2020 · 13 次引用
- Adaptive Learning of Rank-One Models for Efficient Pairwise Sequence AlignmentGovinda M. Kamath, Tavor Z. Baharav, Ilan ShomoronyNeurIPS 2020 · 9 次引用
相关 Paper
- Statistical Perspective of Top-K Sparse Softmax Gating Mixture of ExpertsHuy Nguyen, Pedram Akbarian, Fanqi Yan, Nhat HoICLR 2024 · 29 次引用
- Softmax is not Enough (for Sharp Size Generalisation)Petar Velickovic, Christos Perivolaropoulos, Federico Barbero, Razvan PascanuICML 2025
- A Tale of Two Efficient and Informative Negative Sampling DistributionsShabnam Daghaghi, Tharun Medini, Nicholas Meisburger, Beidi Chen 等ICML 2021 · 11 次引用
- LapSum - One Method to Differentiate Them All: Ranking, Sorting and Top-k SelectionLukasz Struski, Michal B. Bednarczyk, Igor T. Podolak, Jacek TaborICML 2025
- Sampling from a k-DPP without looking at all itemsDaniele Calandriello, Michal Derezinski, Michal ValkoNeurIPS 2020 · 30 次引用
