Home Knowledge Base Performer

Performer is the kernelized attention mechanism that rewrites softmax into feature maps so Vision Transformers get linear-time attention without bias — it approximates the exponential kernel with FAVOR+ random features, enabling the attention to be computed as (phi(Q) (phi(K)^T V)) instead of explicitly building the full similarity matrix.

What Is Performer?

Why Performer Matters

Kernel Choices

Positive Random Features:

Orthogonal Features:

Deterministic Features:

How It Works / Technical Details

Step 1: Project queries and keys through the kernel map φ, producing positive vectors of dimension m; compute the numerator by multiplying φ(Q)^T with V and the denominator by summing φ(K) across tokens.

Step 2: For causal settings, apply prefix sums so that each token only attends to previous ones. Then divide the numerator by the denominator and continue with the usual feed-forward and normalization layers.

Comparison / Alternatives

AspectPerformerLinformerWindowed / Axial
ComplexityO(N d)O(N k)O(N w^2) or O(N(H+W))
Approximation BiasZeroLow similar patternsNone but no compression
SuitabilityStreaming + long contextLow-rank scenesStructured spatial data
HardwareMatmul-friendlyMatmul-friendlyRequires extra reshapes

Tools & Platforms

Performer is the kernel trick that lets transformers see without quadratic baggage — it rewrites self-attention into a sequence of matmuls that never expand the N×N matrix even when N reaches tens of thousands.

performer for visioncomputer vision

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.