近似を用いたニューラルネットワークにおける注意機構の加速:A^3
A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation
A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation
@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}
}
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
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.
要旨
ニューラルネットワークの計算需要が増大する中、多くのニューラルネットワーク用ハードウェアアクセラレータが提案されている。既存のニューラルネットワークアクセラレータは、畳み込みニューラルネットワーク(CNN)や再帰ニューラルネットワーク(RNN)といった一般的なニューラルネットワークの種類に焦点を当てているが、知識ベース、外部メモリ、または過去の状態から最も関連する情報を取得することを可能にする新興のニューラルネットワークの素となる「注意機構」にはあまり注目されていない。注意機構は、コンピュータビジョン、自然言語処理、機械翻訳などの最先端ニューラルネットワークに広く採用されており、全体の実行時間の大部分を占めている。我々は、今日この機構を実装する際の行列ベクトル積の利用が、注意機構が本質的にコンテンツベースの検索であり、計算の大部分が使用されないという点において最適ではないと観察した。この観察に基づき、我々はアルゴリズム的近似とハードウェアの専門化を用いてニューラルネットワークの注意機構を加速するアクセラレータ A3 を設計・構築した。提案されたアクセラレータは、最先端の従来ハードウェアと比較してエネルギー効率(性能/ワット)が数桁改善され、大幅な速度向上を実現した。
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.