🤖 AI Summary
Transformer self-attention achieves strong performance but suffers from an ill-defined optimization objective and quadratic computational complexity, O(n²), hindering both interpretability and efficiency. To address this, we propose Contract-and-Broadcast Self-Attention (CBSA), the first unified framework that jointly enhances interpretability and efficiency. CBSA employs optimization-driven token contraction and information broadcasting to compress attention into low-dimensional structured representations, achieving linear complexity, O(n). Theoretically, CBSA subsumes multiple mainstream attention variants as special cases, demonstrating strong generalizability. Extensive experiments across diverse vision tasks show that CBSA matches or surpasses baseline performance while incurring significantly lower computational overhead—validating its effectiveness, interpretability, and practical utility.
📝 Abstract
Attention mechanisms in Transformers have gained significant empirical success. Nonetheless, the optimization objectives underlying their forward pass are still unclear. Additionally, the quadratic complexity of self-attention is increasingly prohibitive. Unlike the prior work on addressing the interpretability or efficiency issue separately, we propose a unified optimization objective to alleviate both issues simultaneously. By unrolling the optimization over the objective, we derive an inherently interpretable and efficient attention mechanism, which compresses all tokens into low-dimensional structures by contracting a few representative tokens and then broadcasting the contractions back. This Contract-and-Broadcast Self-Attention (CBSA) mechanism can not only scale linearly but also generalize existing attention mechanisms as its special cases. Experiments further demonstrate comparable performance and even superior advantages of CBSA on several visual tasks. Code is available at this https URL.