ViTALiTy: Unifying Low-rank and Sparse Approximation for Vision Transformer Acceleration with a Linear Taylor Attention

要約

Vision Transformer(ViT)は、様々なコンピュータビジョンのアプリケーションにおいて、畳み込みニューラルネットワークに代わる競争力のある選択肢として浮上しています。特に、ViTの多頭注目層は、画像全体にわたってグローバルに情報を埋め込むことを可能にします。しかしながら、このような注目行列の計算と保存には、パッチ数に対する二次関数的なコストが発生するため、実現可能な効率とスケーラビリティが制限され、リソースが限られたデバイスでより大規模な実世界のViTアプリケーションを実現することができません。スパースアテンションは、自然言語処理モデルのハードウェアアクセラレーション効率を向上させるための有望な方向性であることが示されています。しかし、ViTモデルの高速化に対応する体系的なアプローチはまだ見つかっていません。このギャップを埋めるために、我々はViTALiTyと呼ばれる、ViTの推論効率を高めるための初のアルゴリズムとハードウェアの協調フレームワークを提案する。ViTALiTyは、スパース性に基づくNLPのTransformerアクセラレータとは異なり、ViTにおける注目の低ランクとスパースの両成分を統合するものである。アルゴリズムレベルでは、注目ブロックのコストを線形化するために、低ランク成分として行平均センタリングによる一次テイラー注目でドットプロダクトソフトマックス演算を近似し、スパース性に基づく正則化を取り入れることでさらに精度を向上させました。ハードウェアレベルでは、ViTALiTyの線形テイラー注意から得られる作業負荷とパイプラインをよりよく活用するために専用のアクセラレータを開発し、低ランク成分のみの実行を要求することで、ハードウェア効率をさらに向上させる。広範な実験とアブレーション研究により、ViTALiTyは最先端のソリューションと比較して、同等の精度でエンドツーエンドの効率(例えば、$3times$高速、$3times$エネルギー効率)を向上させることが検証されています。

要約(オリジナル)

Vision Transformer (ViT) has emerged as a competitive alternative to convolutional neural networks for various computer vision applications. Specifically, ViT multi-head attention layers make it possible to embed information globally across the overall image. Nevertheless, computing and storing such attention matrices incurs a quadratic cost dependency on the number of patches, limiting its achievable efficiency and scalability and prohibiting more extensive real-world ViT applications on resource-constrained devices. Sparse attention has been shown to be a promising direction for improving hardware acceleration efficiency for NLP models. However, a systematic counterpart approach is still missing for accelerating ViT models. To close the above gap, we propose a first-of-its-kind algorithm-hardware codesigned framework, dubbed ViTALiTy, for boosting the inference efficiency of ViTs. Unlike sparsity-based Transformer accelerators for NLP, ViTALiTy unifies both low-rank and sparse components of the attention in ViTs. At the algorithm level, we approximate the dot-product softmax operation via first-order Taylor attention with row-mean centering as the low-rank component to linearize the cost of attention blocks and further boost the accuracy by incorporating a sparsity-based regularization. At the hardware level, we develop a dedicated accelerator to better leverage the resulting workload and pipeline from ViTALiTy’s linear Taylor attention which requires the execution of only the low-rank component, to further boost the hardware efficiency. Extensive experiments and ablation studies validate that ViTALiTy offers boosted end-to-end efficiency (e.g., $3\times$ faster and $3\times$ energy-efficient) under comparable accuracy, with respect to the state-of-the-art solution.

arxiv情報

著者 Jyotikrishna Dass,Shang Wu,Huihong Shi,Chaojian Li,Zhifan Ye,Zhongfeng Wang,Yingyan Lin
発行日 2022-11-09 18:58:21+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AR, cs.CV, cs.LG パーマリンク