ReduceFormer: Attention with Tensor Reduction by Summation
John Yang, Le An, Su Inn Park
TL;DR
This work addresses the bottleneck of self-attention in vision transformers by replacing matrix multiplications and Softmax with simple tensor reductions and element-wise operations. It introduces ReduceFormer, a family of models combining a Multi-Scale Local Context module with a ReduceFormer Attention mechanism that uses global summations to project and relate spatial features, yielding substantially reduced computational cost while preserving accuracy. Empirical results on ImageNet-1K show competitive performance with significant gains in latency and throughput on both edge devices (e.g., Drive Orin) and data-center GPUs (L40), outperforming comparable efficient-transformer baselines in many settings. The approach supports deployment across a range of platforms and paves the way for extending tensor-reduction-based attention to additional vision tasks.
Abstract
Transformers have excelled in many tasks including vision. However, efficient deployment of transformer models in low-latency or high-throughput applications is hindered by the computation in the attention mechanism which involves expensive operations such as matrix multiplication and Softmax. To address this, we introduce ReduceFormer, a family of models optimized for efficiency with the spirit of attention. ReduceFormer leverages only simple operations such as reduction and element-wise multiplication, leading to greatly simplified architecture and improved inference performance, with up to 37% reduction in latency and 44% improvement in throughput, while maintaining competitive accuracy comparable to other recent methods. The proposed model family is suitable for edge devices where compute resource and memory bandwidth are limited, as well as for cloud computing where high throughput is sought after.
