Attention-likelihood relationship in transformers
Ruscio, Valeria, Maiorca, Valentino, Silvestri, Fabrizio
–arXiv.org Artificial Intelligence
We analyze how large language models (LLMs) represent out-of-context words, investigating their reliance on the given context to capture their semantics. Our likelihood-guided text perturbations reveal a correlation between token likelihood and attention values in transformer-based language models. Extensive experiments reveal that unexpected tokens cause the model to attend less to the information coming from themselves to compute their representations, particularly at higher layers. These findings have valuable implications for assessing the robustness of LLMs in real-world scenarios. Fully reproducible codebase at https://github.com/Flegyas/AttentionLikelihood.
arXiv.org Artificial Intelligence
Mar-14-2023
- Country:
- North America
- Dominican Republic (0.04)
- United States
- New York (0.04)
- New Jersey > Hudson County
- Hoboken (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.15)
- California > Los Angeles County
- Long Beach (0.04)
- Europe > Italy
- Asia > China
- Hong Kong (0.04)
- North America
- Genre:
- Research Report (1.00)
- Technology: