Understanding the Importance of Massive Activations through Adversarial Robustness

Fahradyan, Tigran, Ali, Riccardo, Calvo-Ordoñez, Sergio, Hernández-Lobato, José Miguel, Liò, Pietro, Arroyo, Álvaro

–arXiv.org Artificial Intelligence 

ABSTRACT A common occurrence in Large Language Models (LLMs) is the emergence of socalled massive activations. This phenomenon is well known in the literature and has been connected to attention sinks, representational compression, as well as signal propagation. However, the reasons and consequences for their appearance are not yet well understood. In this paper, we explain the role of massive activations in deep learning by showing that they are connected to the region migration phenomenon in delayed robustness. Under the spline theoretic interpretation of deep networks, we show that massive activations push the representations away from the nonlinearity boundaries of the network, decreasing the complexity of its input-output map around data points. Furthermore, we uncover for the first time that this phenomenon is not unique to transformers and actually appears in a number of common architectures performing simple supervised learning tasks. We consistently observe that massive activations and region migration co-occur with adversarial robustness. Furthermore, we illustrate that this connection holds in the large-scale pretraining of LLMs by showing that the rise of massive activations in LLMs closely tracks the adversarial accuracy of the model under perturbations of the token embeddings. Code is available here. 1 INTRODUCTION Despite their remarkable success, the inner workings of neural networks remain poorly understood, giving rise to surprising phenomena that challenge our understanding of how they learn. One such phenomenon that recently gained traction in the context of LLMs is the so-called massive activations (Sun et al., 2024). These are a few activations in the hidden representation of neural networks that grow multiple orders of magnitude larger than the others. These activations rise in early layers and persist through the network via the residual stream, until disappearing near the output.