Flexformer: Flexible Linear Transformer with Learnable Attention Kernel
26 Jun · Haoran Zhang, Feng Zhou · arXiv:2606.27748
Transformer models rely on attention mechanism to capture long-range dependencies but suffer from quadratic complexity, limiting their scalability to long sequences. Kernel-based linear attention reduces this complexity but typically relies on fixed or weakly learnable kernels, restricting expressiveness and performance. In this work, we propose Flexformer, a flexible linear Transformer that learns attention kernels…