ICML 2025poster1 citations

Looking Beyond the Top-1: Transformers Determine Top Tokens in Order

Daria Lioubashevski, Tomer M. Schlank, Gabriel Stanovsky, Ariel Goldstein

Abstract

Uncovering the inner mechanisms of Transformer models offers insights into how they process and represent information. In this work, we analyze the computation performed by Transformers in the layers after the top-1 prediction remains fixed, known as the “saturation event”. We expand this concept to top-k tokens, demonstrating that similar saturation events occur across language, vision, and speech models. We find that these events occur in order of the corresponding tokens’ ranking, i.e., the model first decides on the top ranking token, then the second highest ranking token, and so on. This phenomenon seems intrinsic to the Transformer architecture, occurring across different variants, and even in untrained Transformers. We propose that these events reflect task transitions, where determining each token corresponds to a discrete task. We show that it is possible to predict the current task from hidden layer embedding, and demonstrate that we can cause the model to switch to the next task via intervention. Leveraging our findings, we introduce a token-level early-exit strategy, surpassing existing methods in balancing performance and efficiency and show how to exploit saturation events for better language modeling.

mechanistic interpretabilitytransformerlarge language modelefficient inference
BibTeX
@inproceedings{
lioubashevski2025looking,
title={Looking Beyond the Top-1: Transformers Determine Top Tokens in Order},
author={Daria Lioubashevski and Tomer M. Schlank and Gabriel Stanovsky and Ariel Goldstein},
booktitle={Forty-second International Conference on Machine Learning},
year={2025},
url={https://openreview.net/forum?id=2B11W1Z6ID}
}
Looking Beyond the Top-1: Transformers Determine Top Tokens in Order · ICML 2025