PoM: A Linear-Time Replacement for Attention with the Polynomial Mixer
Organizations: LIGM, CNRS, Univ Gustave Eiffel, ENPC, Institut Polytechnique de Paris, France · LIX, École Polytechnique, CNRS, IP Paris, France · AMIAD, Pole recherche · Department of Information Engineering, Università degli Studi di Padova, Italy ·
Abstract
This paper introduces the Polynomial Mixer (PoM), a novel token mixing mechanism with linear complexity that serves as a drop-in replacement for self-attention. PoM aggregates input tokens into a compact representation through a learned polynomial function, from which each token retrieves contextual information. We prove that PoM satisfies the contextual mapping property, ensuring that transformers equipped with PoM remain universal sequence-to-sequence approximators. We replace standard self-attention with PoM across five diverse domains: text generation, handwritten text recognition, image generation, 3D modeling, and Earth observation. PoM matches the performance of attention-based models while drastically reducing computational cost when working with long sequences. The code is available at https://github.com/davidpicard/pom.
Figures & tables
| #Params | Performance | Throughput | ||
| Model | OA | mIoU | km 2 /s | |
| TSViT (paper) | 1.7 | 83.4 | 65.1 | - |
| TSViT (retrained) | 1.7 | 82.8 | 64.6 | 7.2 |
| TSViPoM | 1.7 | 82.7 | 64.6 | 26.3 |
| #Param | Performance | Throughput | ||
| Model | mIoU | pts/s | ||
| Scannet | PTv3 | 46.2 | 76.7 | 1.98 |
| PPoMv3 | 47.9 | 75.9 | 2.17 | |
| PPoMv3 Hyb. | 46.8 | 76.8 | 2.01 | |
| SKITTI | PTv3 | 46.2 | 67.2 | 1.12 |
| PPoMv3 | 47.9 | 66.6 | 1.22 |
| #Param | Performance | Throughput | |
| Model | FID | img/s | |
| SiT-L/2 | 458 | 18.8 | 1, 9842 |
| SiPoM-L/2 | 414 | 17.6 | 11,954 |
| SiT-XL/2 | 675 | 17.2 | 1, 4041 |
| SiPoM-XL/2 | 609 | 17.2 | 1, 8146 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| ARC-easy Acc.Norm | HellaSwag Acc.Norm | Winogrande Acc. | Throughput 4096 tok., tok/s | |
| PoM-hyb k=2 | 29.0 | 33.8 | 51.9 | 163 |
| PoM-hyb k=3 | 29.5 | 33.4 | 49.6 | 161 |
| PoM-hyb k=5 | 28.6 | 33.9 | 49.5 | 153 |
| MHA | 29.4 | 33.3 | 49.4 | 42 |
| Performer | training failed | 59 | ||
| Mamba | 29.3 | 30.8 | 48.0 | 384 |
Self-Attention
Self-attention lets sequence elements exchange context through learned query-key matches, powering Transformers and their efficient variants.
See all 225 papers