WildCat: Near-Linear Attention in Theory and Practice
Abstract
Lay Summary
Practically all modern AI systems, from large language models to image generators, rely on the so-called attention mechanism, which allows the model to weigh which parts of the input are most relevant when producing an output. However, this operation is notoriously expensive: doubling the input context size quadruples the computation cost, creating a major computational bottleneck. We introduce WildCat, a method that compresses the input into a compact summary (a “coreset”) so that the model only needs to attend over a fraction of the original data. Our central contribution is a fast randomised algorithm which selects and weights the coreset to guarantee minimal error introduced by the compression. In particular, WildCat is the first practical approximation method for the attention mechanism to achieve near-linear computational complexity together with provably fast error decay. By reducing computation and memory requirements while preserving output quality, WildCat can help lower the energy costs of running AI models, enable longer inputs to be processed on existing hardware, and extend access to powerful AI systems in resource-constrained settings.