A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation

arXiv:2002.10941 First posted 2020-02-22 v1 To be published in 2020 IEEE International Symposium on High Performance Computer Architecture (HPCA)
Cite this paper ×
BibTeX
@misc{ham2020a,
  title = {A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation},
  author = {Tae Jun Ham and Sung Jun Jung and Seonghak Kim and Young H. Oh and Yeonhong Park and Yoonho Song and Jung-Hun Park and Sanghee Lee and Kyoung Park and Jae W. Lee and Deog-Kyoon Jeong},
  year = {2020},
  eprint = {2002.10941},
  archivePrefix = {arXiv},
  primaryClass = {cs.DC},
  url = {https://arxiv.org/abs/2002.10941}
}
APA 7
Ham, T. J., Jung, S. J., Kim, S., Oh, Y. H., Park, Y., Song, Y., Park, J.-H., Lee, S., Park, K., Lee, J. W., & Jeong, D.-K. (2020). A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2002.10941
GB/T 7714
HAM TJ, JUNG SJ, KIM S, et al. A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation[EB/OL]. (2020-02-22)[2026-11-30]. https://arxiv.org/abs/2002.10941.

Abstract

With the increasing computational demands of neural networks, many hardware accelerators for the neural networks have been proposed. Such existing neural network accelerators often focus on popular neural network types such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs); however, not much attention has been paid to attention mechanisms, an emerging neural network primitive that enables neural networks to retrieve most relevant information from a knowledge-base, external memory, or past states. The attention mechanism is widely adopted by many state-of-the-art neural networks for computer vision, natural language processing, and machine translation, and accounts for a large portion of total execution time. We observe today's practice of implementing this mechanism using matrix-vector multiplication is suboptimal as the attention mechanism is semantically a content-based search where a large portion of computations ends up not being used. Based on this observation, we design and architect A3, which accelerates attention mechanisms in neural networks with algorithmic approximation and hardware specialization. Our proposed accelerator achieves multiple orders of magnitude improvement in energy efficiency (performance/watt) as well as substantial speedup over the state-of-the-art conventional hardware.

Post #1 · the paper

Discussion

No comments yet. Start the discussion!