mlsanityData to 7 Oct 2026

Two-Level Softmax Sampling Done Right: Correcting Bias from Size Imbalance and Dispersion

arXiv 2610.10483 ↗First posted 7 Oct 2026cs.LG cs.IR stat.MLcited by 0

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 7 of its 38 references that are in the map. First posted on arXiv 7 Oct 2026.

Builds on

7 of 38 references.

References · 7

  1. 2025CSV-Decode: Certifiable Sub-Vocabulary Decoding for Efficient Large Language Model Inferencecited by 7
  2. 2025DynaSpec: Context-aware Dynamic Speculative Sampling for Large-Vocabulary Language Modelscited by 4
  3. 2019Doubly Sparse: Sparse Mixture of Sparse Experts for Efficient Softmax Inferencecited by 2
  4. 2025Adaptive Sampled Softmax with Inverted Multi-Index: Methods, Theory and Applicationscited by 2
  5. 2025VQ-Logits: Compressing the Output Bottleneck of Large Language Models via Vector Quantized Logitscited by 2
  6. 2026FlashHead: Efficient Drop-In Replacement for the Classification Head in Language Model Inferencecited by 2
  7. 2025Efficient Item ID Generation for Large-Scale LLM-based Recommendationcited by 1

Built on by

Not cited yet.