It is widely accepted from transformer research that “attention is all we need”, but the amount of attention required has never been systematically quantified. Is quadratic attention necessary, or is there a sub-quadratic attention mechanism that can achieve comparable performance? To answer this question, we introduce power-based partial attention (PPA), an attention mechanism of order , where , such that corresponds to sliding window attention with linear complexity, and corresponds to full attention. With this attention construction, we can explore how transformer architecture performance varies as a function of the attention scaling behavior controlled by . The overall trend from our experiments shows an S-curve-like behavior where the performance transitions from sliding-window (linear-complexity) attention to full attention over a narrow window of values, and plateaus as approaches . In our experiments, we show that there exists such that attention is sufficient to achieve similar results as full attention.

生成讲解博客的中文版本

生成AI智能校验的中文版本