Limitazioni della Normalizzazione nel Meccanismo di Attenzione
Limitations of Normalization in Attention Mechanism
August 25, 2025
Autori: Timur Mudarisov, Mikhail Burtsev, Tatiana Petrova, Radu State
cs.AI
Abstract
Questo articolo esamina i limiti della normalizzazione nei meccanismi di attenzione. Iniziamo con un quadro teorico che consente l'identificazione della capacità selettiva del modello e della separazione geometrica coinvolta nella selezione dei token. La nostra analisi include limiti espliciti sulle distanze e criteri di separazione per i vettori dei token sotto il ridimensionamento softmax. Attraverso esperimenti con il modello GPT-2 pre-addestrato, convalidiamo empiricamente i nostri risultati teorici e analizziamo i comportamenti chiave del meccanismo di attenzione. In particolare, dimostriamo che all'aumentare del numero di token selezionati, la capacità del modello di distinguere i token informativi diminuisce, convergendo spesso verso un modello di selezione uniforme. Mostriamo inoltre che la sensibilità del gradiente sotto la normalizzazione softmax presenta sfide durante l'addestramento, specialmente a impostazioni di temperatura bassa. Questi risultati avanzano la comprensione attuale del meccanismo di attenzione basato su softmax e motivano la necessità di strategie di normalizzazione e selezione più robuste nelle future architetture di attenzione.
English
This paper investigates the limitations of the normalization in attention
mechanisms. We begin with a theoretical framework that enables the
identification of the model's selective ability and the geometric separation
involved in token selection. Our analysis includes explicit bounds on distances
and separation criteria for token vectors under softmax scaling. Through
experiments with pre-trained GPT-2 model, we empirically validate our
theoretical results and analyze key behaviors of the attention mechanism.
Notably, we demonstrate that as the number of selected tokens increases, the
model's ability to distinguish informative tokens declines, often converging
toward a uniform selection pattern. We also show that gradient sensitivity
under softmax normalization presents challenges during training, especially at
low temperature settings. These findings advance current understanding of
softmax-based attention mechanism and motivate the need for more robust
normalization and selection strategies in future attention architectures.