An Empirical Study of the Softmax Bottleneck: Effects on Language Model Distributions and Text Generation

MSc dissertation in Artificial Intelligence, School of Informatics, University of Edinburgh, 2026. Supervised by Antonio Vergari, with Andreas Grivas.

Read the PDF · 36 pages

Abstract

Large language models (LLMs) generate text autoregressively by sampling the next token from a probability distribution over a large vocabulary. The predominant transformer-based LLM architecture processes context, such as a prompt, into a representation vector, then projects it into the vocabulary space and applies softmax to produce the next-token probability distribution. The softmax bottleneck, which arises from projecting from a lower-dimensional representation space to the high-dimensional vocabulary space in the output layer of LLMs, has been identified as a limitation of prevailing LLM architectures. The bottleneck has been argued to introduce errors in the distributions of models that widely used decoding methods, such as top-k and nucleus sampling, correct, explaining why these methods improve the quality of text generation. Previous work has established these arguments through theoretical analysis and by showing that a decoding method that directly manipulates the bottleneck improves text generation in LLMs. However, the bottleneck itself has not been isolated by systematically varying the rank of a model’s output layers and observing its effects. In this work, we explicitly impose the softmax bottleneck on an LLM to varying degrees and quantify its effects on the model’s distributions and text generation capabilities under ancestral and truncation sampling. We show that increasing the degree of the bottleneck exacerbates distribution approximation errors and degrades text generation quality under ancestral sampling. Truncation sampling recovers the quality of generated text, with its effect increasing as the degree of bottlenecking increases. Our results provide direct empirical verification of the softmax bottleneck’s effects on model distributions and text generation, and show that these effects can be partially mitigated via truncation sampling during inference.

Download the full dissertation (PDF)