English

Top-$n\sigma$: Not All Logits Are You Need

Machine Learning 2024-11-13 v1

Abstract

Large language models (LLMs) typically employ greedy decoding or low-temperature sampling for reasoning tasks, reflecting a perceived trade-off between diversity and accuracy. We challenge this convention by introducing top-nσn\sigma, a novel sampling method that operates directly on pre-softmax logits by leveraging a statistical threshold. Our key insight is that logits naturally separate into a Gaussian-distributed noisy region and a distinct informative region, enabling efficient token filtering without complex probability manipulations. Unlike existing methods (e.g., top-pp, min-pp) that inadvertently include more noise tokens at higher temperatures, top-nσn\sigma maintains a stable sampling space regardless of temperature scaling. We also provide a theoretical analysis of top-nσn\sigma to better understand its behavior. The extensive experimental results across four reasoning-focused datasets demonstrate that our method not only outperforms existing sampling approaches but also surpasses greedy decoding, while maintaining consistent performance even at high temperatures.

Keywords

Cite

@article{arxiv.2411.07641,
  title  = {Top-$n\sigma$: Not All Logits Are You Need},
  author = {Chenxia Tang and Jianchun Liu and Hongli Xu and Liusheng Huang},
  journal= {arXiv preprint arXiv:2411.07641},
  year   = {2024}
}
R2 v1 2026-06-28T19:56:45.777Z