AI & ML
Two-Level Softmax Sampling Done Right: Correcting Bias from Size Imbalance and Dispersion
arXiv cs.IR0 views
arXiv:2610.10483v1 Announce Type: cross Abstract: Sampling from a softmax distribution is a fundamental operation in machine learning, but its linear complexity in the number of items makes exact sampling impractical at scale. Two-level softmax (2LS) sampling is a popular alternative enabling sublinear-time sampling. Assuming items are partitioned into clusters, 2LS first samples a cluster and then an item within it. In this paper, we show that, despite its advantages, 2LS introduces systematic and undesirable sampling biases, which arise from misweighting clusters by ignoring both cluster size imbalance and intra-cluster similarity dispersion. We propose two sampling methods, Size-Corrected 2LS (S-2LS) and Size- and Dispersion-Corrected 2LS (SD-2LS), which correct these biases and provide provably better softmax approximations with negligible to non-existent computational overhead. In-depth experiments on five large-scale datasets validate the improved sampling properties of our methods. We recommend their consistent use in place of standard 2LS in future work.
Source:https://arxiv.org/abs/2610.10483PreviousCrossWeave: Bridging Perspectives Across Online Communities with a Dual-Pane DesignNextVectorizing the Trie: Efficient Constrained Decoding for LLM-based Generative Retrieval on Accelerators
Related posts
Five regression tests for channel-aware AI reply drafts
0dev.to
Our smart contract scan found 14 of 20 known bugs. Recount it yourself, and see where it falls short
0dev.to
Standup amnesia: a short about forgetting what you did yesterday, and the daily note I use now
0dev.to
US boy names that became girl names and vice versa
0Hacker News
Most voted crypto projects on Coinvote, Oct 26 to Nov 1, 2026
0dev.to Data
Bluesky This Week — trending topics & AI brand mentions (2026-11-02)
0dev.to Data