atlas

Research map / Architectures and efficiency / Attention and transformers

ZETA: Leveraging $Z$-order Curves for Efficient Top-$k$ Attention

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Linear attention approximations · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes ZETA, a top-k attention method that projects low-dimensional queries and keys onto a 1D Z-order curve for parallel sorting-based retrieval under causal masks, paired with an adaptive Cauchy-softmax.

Problem

Top-k attention with causal masks cannot search for relevant past tokens in parallel across a sequence, which limits training efficiency for long sequences.

Approach

Reduce query/key dimensionality (d_K=d_Q=3, much smaller than value dimension), map them to 1D with Z-order curves, sort and chunk keys so each query retrieves its top-k neighbors in parallel under causal masking, and replace softmax with a trainable Cauchy kernel (Adaptive Cauchy-Softmax).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use ZETA instead of H-Transformer-1DLRA models · LRA averageaccuracy: 61.41 -> 63.51Helped
Use ZETA instead of H-Transformer-1DLRA models · LRA Imageaccuracy: 46.05 -> 64.39Helped
Use ZETA instead of H-Transformer-1DLRA models · LRA Textaccuracy: 78.69 -> 64.52Hurt
Use ZETA instead of Vanilla TransformerWikiText-103 language models · WikiText-103 testperplexity: 26.2 -> 26.3Hurt
Reduce key-query dimension to d_K = 2 (ablation)Transformer · MQARaccuracyNo clear effect
Use d_K = 1 instead of larger key-query dimensions (ablation)Transformer · MQARaccuracyHurt
Use Cauchy Softmax instead of Negative Euclidean or Inverse Euclidean (ablation)Transformer · MQARaccuracyHelped
Vary k from 16 to 48 (ablation)ZETA · MQARaccuracyNo clear effect
Increase key-query dimension d_K before Z-order projection (ablation)ZETA · Locality preservation, top-64 neighbor overlapoverlapHurt
Use ZETA instead of Flash Attentionattention implementation · sequence length 65536 forwardtime (milliseconds): 805.3 -> 85.8Helped
Use ZETA instead of Flash Attentionattention implementation · sequence length 65536 forward + backwardtime (milliseconds): 7044.1 -> 608.2Helped
Use ZETA instead of Flash Attentionattention implementation · sequence length 65536 forwardmemory consumption (MB): 10516.1 -> 17348.2Hurt

Surprising findings

Limitations

Experimental setup

Datasets: MQAR Long Range Arena WikiText-103

Benchmarks: MQAR Long Range Arena WikiText-103

Metrics: accuracy perplexity latency (ms) memory (MB)

Baselines: Vanilla Transformer Performer Based Reformer CosFormer Flash Attention Mamba IceFormer

Builds on: Top-k attention Reformer Johnson-Lindenstrauss lemma Based

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy