arXiv reaDer
継続的なトランスフォーマー:オンライン推論のための冗長性のない注意
Continual Transformers: Redundancy-Free Attention for Online Inference
トランスフォーマーは注意ベースのシーケンストランスダクションモデルであり、自然言語処理およびコンピュータービジョンアプリケーションで広く成功を収めています。それでも、現在の形式のトランスフォーマーは、一度に1つのトークンではなく、トークンシーケンス全体で動作するように本質的に制限されています。その結果、オンライン推論中にそれらを使用すると、連続するトークンシーケンスが重複するため、かなりの冗長性が必要になります。この作業では、Transformersが継続的な入力ストリームで効率的なオンライントークンごとの推論を実行できるようにする、Scaled Dot-ProductAttentionの新しい定式化を提案します。重要なのは、生成された出力と学習された重みが元のMulti-Head Attentionのものと同じであるのに対し、私たちの変更は純粋に計算の順序に基づいていることです。私たちのアプローチを検証するために、視覚、音声、視聴覚の分類と検出のタスク、つまりTHUMOS14とTVSeriesでのオンラインアクション検出とGTZANでのオンライン音声分類の実験を行い、驚くべき結果が得られました。当社の継続的な1ブロック変圧器は、同様の予測性能でのオンラインアクション検出およびオーディオ分類実験で浮動小数点演算をそれぞれ63.5倍および51.5倍削減します。
Transformers are attention-based sequence transduction models, which have found widespread success in Natural Language Processing and Computer Vision applications. Yet, Transformers in their current form are inherently limited to operate on whole token sequences rather than on one token at a time. Consequently, their use during online inference entails considerable redundancy due to the overlap in successive token sequences. In this work, we propose novel formulations of the Scaled Dot-Product Attention, which enable Transformers to perform efficient online token-by-token inference in a continual input stream. Importantly, our modification is purely to the order of computations, while the produced outputs and learned weights are identical to those of the original Multi-Head Attention. To validate our approach, we conduct experiments on visual, audio, and audio-visual classification and detection tasks, i.e. Online Action Detection on THUMOS14 and TVSeries and Online Audio Classification on GTZAN, with remarkable results. Our continual one-block transformers reduce the floating point operations by respectively 63.5x and 51.5x in the Online Action Detection and Audio Classification experiments at similar predictive performance.
updated: Mon Jan 17 2022 08:20:09 GMT+0000 (UTC)
published: Mon Jan 17 2022 08:20:09 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト