ARAICLLGDec 17, 2020

SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruning

arXiv:2012.09852v3540 citations
AI Analysis

This work provides substantial efficiency improvements for attention mechanisms, which are a critical component for researchers and practitioners working with NLP models, by reducing computational and memory overheads.

This paper addresses the computational bottleneck of attention mechanisms in NLP by proposing SpAtten, an algorithm-architecture co-design that utilizes cascade token and head pruning, and progressive quantization. SpAtten achieves an average 10.0x reduction in DRAM access with no accuracy loss, and significant speedups (e.g., 162x over TITAN Xp GPU) and energy savings (e.g., 1193x over TITAN Xp GPU) across 30 benchmarks.

The attention mechanism is becoming increasingly popular in Natural Language Processing (NLP) applications, showing superior performance than convolutional and recurrent architectures. However, attention becomes the compution bottleneck because of its quadratic computational complexity to input length, complicated data movement and low arithmetic intensity. Moreover, existing NN accelerators mainly focus on optimizing convolutional or recurrent models, and cannot efficiently support attention. In this paper, we present SpAtten, an efficient algorithm-architecture co-design that leverages token sparsity, head sparsity, and quantization opportunities to reduce the attention computation and memory access. Inspired by the high redundancy of human languages, we propose the novel cascade token pruning to prune away unimportant tokens in the sentence. We also propose cascade head pruning to remove unessential heads. Cascade pruning is fundamentally different from weight pruning since there is no trainable weight in the attention mechanism, and the pruned tokens and heads are selected on the fly. To efficiently support them on hardware, we design a novel top-k engine to rank token and head importance scores with high throughput. Furthermore, we propose progressive quantization that first fetches MSBs only and performs the computation; if the confidence is low, it fetches LSBs and recomputes the attention outputs, trading computation for memory reduction. Extensive experiments on 30 benchmarks show that, on average, SpAtten reduces DRAM access by 10.0x with no accuracy loss, and achieves 1.6x, 3.0x, 162x, 347x speedup, and 1,4x, 3.2x, 1193x, 4059x energy savings over A3 accelerator, MNNFast accelerator, TITAN Xp GPU, Xeon CPU, respectively.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes