Vision Transformers (ViTs) have taken the computer vision world by storm, often outperforming traditional Convolutional Neural Networks (CNNs). However, this performance comes with a massive "power bill." Researchers have recently developed a novel way to replace the energy-hungry multiplications in ViTs with much cheaper additions. By identifying and fixing a "low-rank" problem in additive attention using a simple identity mapping, they achieved a 2.5x to 3x reduction in energy consumption with only a marginal dip in accuracy.
The Problem: Energy-Hungry Attention
Transformers rely heavily on dot-product self-attention, a mechanism that requires billions of floating-point multiplications to compute the relationships between different parts of an image.
In hardware, a 32-bit multiplication consumes about 3.7pJ of energy, while a 32-bit addition costs only 0.9pJ. This roughly 4x difference makes standard Transformers difficult to deploy on battery-constrained edge devices, such as mobile phones, smart cameras, or micro-robots. While previous work (like AdderNet) successfully replaced multiplications with additions in standard CNNs, doing the same for the complex self-attention mechanism in Transformers proved much harder due to how information and feature diversity are distributed within the model.
The Solution: Adder Attention & Rank Restoration
To bridge this energy gap, the authors introduce the Adder Transformer, which redesigns the two main computational bottlenecks of a Transformer block:
- Adder Linear Transformation: In standard Feed-Forward Networks (FFN) and projection layers, the usual matrix multiplication is replaced with an $\ell_1$-distance measure (the sum of absolute differences between weights and inputs).
- Adder Self-Attention: Instead of the standard dot-product ($Q \cdot K^T$), the model calculates the similarity between "Queries" and "Keys" using the negative $\ell_1$-distance.
However, the authors discovered a significant theoretical snag: using only additions causes the "rank" of the attention map to collapse. Because additive attention naturally results in a lower-rank matrix than dot-product attention, the model's attention becomes less expressive, focusing on too few features and losing diversity.
To fix this, they introduced the Identity Trick. By simply adding an Identity Matrix to the attention map ($H_a + I$), they "homogenize" the distribution of singular values. This computationally "free" trick forces the model to maintain a baseline of feature diversity that addition alone would otherwise discard, ensuring the model retains a rich representation of the image. Finally, because the absolute value function used in additions isn't smooth, they use a "HardTanh" function during training to prevent gradients from exploding.
Key Results: Efficiency Meets Accuracy
The researchers evaluated their approach on standard benchmarks including MNIST, CIFAR-10/100, and ImageNet. The Adder Transformer performs remarkably close to its "multiplicative" cousins while being far more efficient.
- Massive Energy Reductions: On the DeiT-Base model, energy consumption dropped from 80.7BpJ to 32.9BpJ—a nearly 2.5x reduction. The number of multiplications was slashed from 17.56 Billion to just 0.48 Billion.
- Competitive Accuracy: The Adder version of DeiT-Small achieved 78.3% top-1 accuracy on ImageNet, compared to the original's 79.9%—a loss of only 1.6% accuracy for a massive gain in efficiency. On CIFAR-10, the Adder DeiT-Base reached 94.47% accuracy, almost identical to the 94.83% achieved by the standard multiplicative model.
- Unique Feature Representations: Feature visualizations demonstrated that Adder Transformers produce a unique hybrid feature distribution, clustering tightly like an AdderNet but maintaining the oval-shaped angular distribution characteristic of standard Transformers.
Limitations and Future Work
While the theoretical energy savings are substantial, most current GPUs are specifically optimized for "Multiply-Accumulate" (MAC) operations. To realize the full 3x energy benefit in real-world deployments, specialized hardware (like custom FPGAs or AI chips) designed for addition-heavy workloads will be required.
Furthermore, there is still a small performance penalty on highly complex datasets like ImageNet. Finally, the model still relies on a small number of multiplications in the Layer Normalization (LN) steps. While this represents a tiny fraction of the total computational cost, achieving a "pure" addition-only Transformer remains an exciting goal for future research.
Summary updated