Attention Entropy is a Key Factor: An Analysis of Parallel Context Encoding with Full-attention-based Pre-trained Language Models
Zhisong Zhang, Yan Wang, Xinting Huang, Tianqing Fang, Hongming Zhang, Chenlong Deng, Shuaiyi Li, Dong Yu

TL;DR
This paper analyzes how high attention entropy affects parallel context encoding in large language models and proposes methods to reduce entropy, improving performance and efficiency in context modeling.
Contribution
It identifies attention entropy as a key factor in parallel encoding performance and introduces simple techniques to mitigate its effects.
Findings
Reducing attention entropy improves model performance.
Parallel context encoding can be optimized by attention sinks and selective mechanisms.
High attention entropy correlates with performance degradation.
Abstract
Large language models have shown remarkable performance across a wide range of language tasks, owing to their exceptional capabilities in context modeling. The most commonly used method of context modeling is full self-attention, as seen in standard decoder-only Transformers. Although powerful, this method can be inefficient for long sequences and may overlook inherent input structures. To address these problems, an alternative approach is parallel context encoding, which splits the context into sub-pieces and encodes them parallelly. Because parallel patterns are not encountered during training, naively applying parallel encoding leads to performance degradation. However, the underlying reasons and potential mitigations are unclear. In this work, we provide a detailed analysis of this issue and identify that unusually high attention entropy can be a key factor. Furthermore, we adopt…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsTopic Modeling · Machine Learning in Healthcare · Explainable Artificial Intelligence (XAI)
MethodsSoftmax · Attention Is All You Need · ADaptive gradient method with the OPTimal convergence rate · Attention Sinks
