Data-Informed Global Sparseness in Attention Mechanisms for Deep Neural Networks

arXiv:2012.02030 First posted 2020-11-20 v3 Presented at LREC-COLING 2024: 12 pages, 4 figures, 11 tables
Cite this paper ×
BibTeX
@misc{rugina2020datainformed,
  title = {Data-Informed Global Sparseness in Attention Mechanisms for Deep Neural Networks},
  author = {Ileana Rugina and Rumen Dangovski and Li Jing and Preslav Nakov and Marin Soljačić},
  year = {2020},
  eprint = {2012.02030},
  archivePrefix = {arXiv},
  primaryClass = {cs.CL},
  url = {https://arxiv.org/abs/2012.02030}
}
APA 7
Rugina, I., Dangovski, R., Jing, L., Nakov, P., & Soljačić, M. (2020). Data-Informed Global Sparseness in Attention Mechanisms for Deep Neural Networks [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2012.02030
GB/T 7714
RUGINA I, DANGOVSKI R, JING L, et al. Data-Informed Global Sparseness in Attention Mechanisms for Deep Neural Networks[EB/OL]. (2020-11-20)[2026-11-30]. https://arxiv.org/abs/2012.02030.

Abstract

Attention mechanisms play a crucial role in the neural revolution of Natural Language Processing (NLP). With the growth of attention-based models, several pruning techniques have been developed to identify and exploit sparseness, making these models more efficient. Most efforts focus on hard-coding attention patterns or pruning attention weights based on training data. We propose Attention Pruning (AP), a framework that observes attention patterns in a fixed dataset and generates a global sparseness mask. AP saves 90% of attention computation for language modeling and about 50% for machine translation and GLUE tasks, maintaining result quality. Our method reveals important distinctions between self- and cross-attention patterns, guiding future NLP research. Our framework can reduce both latency and memory requirements for any attention-based model, aiding in the development of improved models for existing or new NLP applications. We have demonstrated this with encoder and autoregressive transformer models using Triton GPU kernels and make our code publicly available at https://github.com/irugina/AP.

Post #1 · the paper

Discussion

No comments yet. Start the discussion!