Softpick: No Attention Sink, No Massive Activations with Rectified Softmax
Zayd M. K. Zuhri, Erland Hilman Fuadi, Alham Fikri Aji
TL;DR
Softpick introduces a rectified, non-sum-to-one replacement for softmax in transformer attention to address attention sink and massive activations. It preserves much of softmax’s gradient behavior while enabling zeroed outputs and sparse attention, leading to 0% sink rate in tested models and markedly reduced activation outliers, with quantized Softpick outperforming softmax at low bit-widths. Across 340M and 1.8B parameter models, Softpick delivers competitive or improved downstream performance at 340M and shows robust quantization advantages, though scaling to 1.8B and long-context tasks remains a challenge due to underscoring and dead heads. The work suggests practical benefits for low-precision training, sparsity-driven efficiency, interpretability, and broader applicability to vision and multimodal transformers, while outlining avenues for future scaling and long-context improvements.
Abstract
We introduce softpick, a rectified, not sum-to-one, drop-in replacement for softmax in transformer attention mechanisms that eliminates attention sink and massive activations. Our experiments with 340M and 1.8B parameter models demonstrate that softpick achieves 0\% sink rate consistently. The softpick transformers produce hidden states with significantly lower kurtosis and creates sparse attention maps. Quantized models using softpick outperform softmax on standard benchmarks, with a particularly pronounced advantage at lower bit precisions. Our analysis and discussion shows how softpick has the potential to open new possibilities for quantization, low-precision training, sparsity optimization, pruning, and interpretability. Code: https://github.com/zaydzuhri/softpick-attention.
