WorksComputer Science
Kronecker Product Attention: Memory-Efficient KV Compression via Structured Factorization
Abstract
Efficient autoregressive generation is increasingly limited by the memory footprint of the key-value (KV) cache, which grows linearly with sequence length, batch size, and model depth. Existing approaches such as Multi-Query Attention (MQA), Grouped-Query Attention (GQA), Multi-Head Latent Attention (MLA), and Tensor Product Attention (TPA) reduce this cost through different trade-offs, but often sacrifice expressivity, require additional positional-encoding machinery, or impose restrictive low-rank structure. We propose Kronecker Product Attention (KPA), which represents key and value activations as sums of Kronecker products of compact, token-dependent matrix factors. KPA strictly generalizes TPA: rank-one vector-outer-product factorization arises as a degenerate Kronecker split, while non-degenerate matrix factors can represent richer block-structured patterns. We further show that a structured rotary embedding operator matched to the Kronecker representation preserves the relative-position property of RoPE while rotating only the compact factors, removing the need for a decoupled RoPE branch as in MLA. Empirically, KPA matches or exceeds TPA, MHA, MQA, GQA, and MLA across four model scales and nine downstream benchmarks under identical training conditions, while achieving up to 10x KV cache compression. The Kronecker head split is a tuneable hyperparameter that allows practitioners to navigate the compression-accuracy trade-off at design time without architectural changes.
Introduction
The deployment of large-scale Transformer-based language models is increasingly bottlenecked by inference-time memory rather than parameter count. At the core of this bottleneck is the key-value (KV) cache, which stores projected keys and values across every layer and token so they do not need to be recomputed during decoding. This cache grows linearly with sequence length, batch size, and head dimensionality. As context windows extend to hundreds of thousands of tokens and batch sizes increase for throughput, the KV cache can dominate total GPU memory consumption, leaving little headroom for model weights or activations and directly limiting the context length, batch size, and deployment scale that practitioners can afford, motivating a broad line of work on KV compression.
Existing approaches address this along several lines. Token eviction and sparse attention methods risk discarding relevant tokens [30, 27]. Others propose off-chip storage of key-value states, trading memory pressure for increased I/O latency. At the architectural level, Multi-Query Attention (MQA) Shazeer [ [19] and Grouped-Query Attention (GQA) [1] share keys and values across heads at the cost of representational diversity. Multi-Head Latent Attention (MLA) [5] avoids this by caching compressed latent representations instead, but requires a decoupled RoPE branch, in which a small set of uncompressed key dimensions carry the rotary embedding and are concatenated to the latent key at each decoding step. Tensor Product Attention (TPA) imposes low-rank CP (Canonical Polyadic) structure directly on KV projections, storing only the low-dimensional factors [29]. However, CP decomposition operates on vectors and cannot jointly encode structure at both the head level and the feature level within each head. This limitation is important as empirical studies have shown that attention heads specialize into distinct functional roles, with different subsets attending to syntactic, semantic, and positional patterns, suggesting that an effective KV factorization should operate at both levels simultaneously [13, 25].
Motivated by this, we use Kronecker product structure to represent per-token key and value matrices via two smaller contextual matrix factors. Unlike CP decomposition which operates on vectors, the Kronecker product expands two small matrices into a larger block-structured matrix with the same shape as a standard key or value slice, making it naturally suited to multi-head attention where both the head axis and the within-head feature axis have product structure. Among structured factorizations, the Kronecker product is distinguished by combining three properties in a single operation: its mixed-product identity lets inner products between Kronecker-structured queries and keys factor into products of smaller inner products; it admits a Kronecker-separable rotary operator that acts on only one compact factor; and a rank-1 outer product, which is the basic building block of CP decomposition, is a special case, making Kronecker factorization strictly more general than CP at the same parameter budget. We note that Kronecker structure has also been explored in attention mechanisms for encoder models operating on multi-dimensional inputs [15], reducing training-time computation rather than KV cache size. That setting differs fundamentally from autoregressive decoding, which is our focus.
We introduce Kronecker Product Attention (KPA), a structured attention mechanism that applies this factorization to the query, key, and value projections of each attention head. This yields a family of KV compression schemes parameterized by the factor dimensions, allowing flexible trade-offs between compression ratio, head structure, and representational capacity. We provide a theoretical analysis characterizing the expressivity of KPA as a function of rank and factor dimensions, and prove that a modified frequency schedule we call Kronecker-Separable RoPE integrates seamlessly with the factorized KV representation without materializing the full key or value tensors and without breaking the standard relative-position property. To evaluate KPA empirically, we train models at four scales including 124M, 353M, 773M, and 1.5B parameters on the FineWeb-Edu corpus. We compare KPA variants against TPA at matched compression ratios, finding that KPA matches or exceeds TPA across all scales. Figure 1 summarizes the contrast between MHA, TPA, and KPA. Our contributions are as follows:
Figure 1. Overview of Multi-Head Attention (MHA), Tensor Product Attention (TPA), and Kronecker Product Attention (KPA, ours). MHA projects directly into dense , , . TPA and KPA instead factor each projection into two components, combined via an outer product () for TPA or a Kronecker product () for KPA. RoPE is applied only to and (never ), and rotates only the factor in both methods (the Theorem 2.4 formalizes this for KPA); is cached unrotated. Since TPA’s , are vectors, their outer product is a flat, unstructured matrix; since KPA’s , are matrices, their Kronecker product is block-structured with a two-level head/feature hierarchy (shown by the internal grid lines). Only , factors enter the KV cache; is not cached. The token index is omitted throughout except on the final , , , for clarity.
We propose Kronecker Product Attention (KPA), the first application of Kronecker product factorization to per-token, contextual key and value representations for KV cache compression in autoregressive decoding. Unlike prior Kronecker attention work that decomposes static attention score matrices for encoder models, KPA operates on input-dependent factors and directly reduces inference-time memory.
We introduce Kronecker-Separable RoPE, which applies rotary position encoding directly to the compact key factors, preserving the standard relative-position property without a decoupled RoPE branch as in MLA.
We train KPA at four scales (125M–1.5B) on FineWeb-Edu under identical conditions to TPA, showing KPA matches or exceeds TPA, MHA, MQA, GQA, and MLA across nine benchmarks while achieving 6.4×–10× KV cache compression.
Kronecker Product Attention
The key-value cache in standard multi-head attention stores, for each token , a pair of matrices , whose entries are dense and unstructured. We argue that this is wasteful: attention heads are known to specialise into distinct functional roles [13, 25], suggesting that the head-level dimension of and (i.e., how information is shared or differs across heads) carries structured, differentiable information. We hypothesise that the feature-level dimension (variation across features within a single head) benefits from an analogous structure, and design KPA. The proposed KPA makes this two-level structure explicit by factorising each key and value matrix as a sum of Kronecker products of two smaller matrices, one operating on a coarse partition of the head space, the other on the per-head feature space (formalised in § 2.2), and caching only these factors. The result is a compression scheme that is structurally aligned with the functional organisation of multi-head attention in a way that CP decomposition, which operates on vectors rather than matrices, cannot achieve.
Background and Notation
Notation. Bold uppercase denotes matrices (); bold lowercase denotes vectors (); unbolded lowercase denotes scalars and indices (); and calligraphic uppercase denotes higher-order tensors (). We write for the Kronecker product, for the identity, and for the RoPE rotation at position . Subscripts index sequence positions; superscripts identify projections. We set , and all vectors are column vectors unless stated otherwise.
Definition 2.1 (Kronecker product). For matrices and , the Kronecker product is defined as
The central algebraic property used in KPA is the mixed-product identity [24] which states for conformable matrices , we can write:
This identity underlies both the factored score computation (§ 2.3) and the RoPE compatibility proof (§ 2.4).
Factorised Key, Value, and Query Representations
Let and , where , , , are hyperparameters that control the two-level structure. For each token with hidden state , KPA represents the key, value, and query slices as normalized sums of contextual Kronecker products:
where operates on the head-partition subspace and operates on the within-head subspace . Both factors are fully contextual meaning they depend on through independent learned linear projections as:
with and reshaped after multiplication. Analogous maps define the query and value factors. In practice, we merge the rank index into aggregate weight matrices and , then reshape to and , enabling a single batched projection per token.
The ranks , , are independent. Since queries are never cached, one may freely set to enrich query expressivity at no memory cost. Only the and factors enter the cache.
It should be noted that setting , , , makes and vectors, so each Kronecker term reduces to a rank-one outer product, exactly recovering TPA [29]. Non-degenerate Kronecker factors are strictly richer: , giving KPA strictly greater representational capacity at matched parameter budgets.
Factored Attention Score Computation
Heads in KPA are indexed by pairs with , . Denoting the -th row of as , the mixed-product identity (1) gives an exact factorisation of the attention score (scaled by before softmax in practice):
Proposition 2.2 (Factored Score Computation). The attention score for head at positions and satisfies
Proof. See Appendix A.
Every attention score decomposes into a product of a head-level and a feature-level inner product, reflecting the two-level structure of KPA. Proposition 2.2 shows that scores can in principle be computed directly from the compact factors without materializing the full key tensor, analogously to factored score computation in TPA [29].
Kronecker-Separable RoPE
A natural concern with any structured KV factorisation is compatibility with rotary positional embeddings (RoPE) [21]. MLA resolves this by maintaining a small set of non-compressed KV dimensions that carry the rotary encoding, introducing a decoupled RoPE branch at every decoding step. We show that KPA requires no such branch.
Definition 2.3 (Kronecker-Separable RoPE). Let be the identity and be a RoPE rotation matrix with frequencies calibrated to : , . The Kronecker-Separable RoPE operator on is .
Theorem 2.4 (RoPE Compatibility of KPA). Under Kronecker-Separable RoPE, applying to the query or key vector of head is equivalent to rotating only the factor:
Moreover, the attention score depends only on the relative offset :
Proof. See Appendix A.
Theorem 2.4 has two practical consequences: (i) only the factors need to be pre-rotated before caching; the factors are position-independent and stored as-is, and (ii) the factor structure is preserved by the rotation, so positional encoding need not require reconstructing the full key tensor. Unlike MLA, no decoupled RoPE branch is required.
KV Cache Cost and Compression
During autoregressive decoding, KPA caches the key and value factors per token :
where and (pre-rotated via Kronecker-Separable RoPE). The per-token cache cost is , compared with for MHA. The compression factor is:
For fixed and , compression increases with factor asymmetry: a more unequal split of or makes smaller relative to .
Experiments
Experimental Setup
We train KPA models at four scales (125M, 353M, 773M, 1.5B) using a Llama-inspired architecture with SwiGLU and RoPE on top of nanoGPT [10], trained on FineWeb-Edu for B tokens with and . We compare against MHA, MQA, GQA, MLA, and TPA baselines from Zhang et al. [ [29] under identical conditions, evaluating zero-shot on nine benchmarks using lm-evaluation-harness [8]. Full training and evaluation details are in Appendix C.
Main Results
Tables 1 and 2 report zero-shot benchmark performance at 353M and 773M scales; 1.5B and 125M results appear in Appendix D.
At 353M, all three KPA configurations outperform TPA. KPA achieves the best average at compression, matching TPA’s ratio while exceeding its accuracy by 1.49pp, with the largest gains on ARC-Easy and SciQ. KPA outperforms TPA at strictly higher compression (), demonstrating that increasing compression need not sacrifice accuracy. At 773M, KPA outperforms TPA, MLA, and all other baselines at compression, with particularly strong gains on ARC-Easy, BoolQ, and SciQ. Notably, KPA surpasses MLA despite requiring no decoupled RoPE branch. KPA achieves better accuracy than TPA at higher compression ().
In both cases, the best-performing KPA variant uses an asymmetric split with larger , consistent with the ablation findings in § 3.3. KPA improves monotonically across scales and matches or exceeds TPA at comparable or higher compression ratios at every scale.
Ablation on Head-Split Asymmetry
We ablate the effect of the Kronecker head split , holding and fixed. At 353M we compare symmetric , asymmetric , and reversed asymmetric ; at 773M we compare , , and . Table 1 and Table 2 reveal a consistent pattern across scales. Asymmetric splits with larger outperform both symmetric KPA and TPA at both scales. At 353M, achieves the best average, and at 773M, outperforms all baselines. We attribute this to the -factor’s capacity to encode joint interactions across heads simultaneously in feature space. A larger expands this capacity, whereas the -factor refines within-head feature structure independently, which appears less critical. This is distinct from MHA, where head projections are fully independent by construction. Symmetric splits trade some accuracy for higher compression ( to ), offering a favourable operating point when memory is the primary constraint. The head split is a tuneable hyperparameter that allows practitioners to navigate the compression–accuracy trade-off at design time, with no other architectural changes required.
| Method | ARC-E | ARC-C | BoolQ | HellaSw. | OBQA | PIQA | W.G. | MMLU | SciQ | Avg. |
| MHA | 59.51 | 29.52 | 59.60 | 45.68 | 34.20 | 68.82 | 53.43 | 23.33 | 76.90 | 50.11 |
| MQA | 57.62 | 31.91 | 59.45 | 45.69 | 35.40 | 69.31 | 53.51 | 26.47 | 74.60 | 50.44 |
| GQA | 58.67 | 31.48 | 58.29 | 45.45 | 35.20 | 68.50 | 54.46 | 24.58 | 76.50 | 50.35 |
| MLA | 56.65 | 29.52 | 57.83 | 46.05 | 34.60 | 69.42 | 52.80 | 24.62 | 79.70 | 50.13 |
| TPA | 58.38 | 31.57 | 59.39 | 46.83 | 37.00 | 70.02 | 54.06 | 25.52 | 79.90 | 51.41 |
| KPA | 64.23 | 30.72 | 59.66 | 44.09 | 34.40 | 70.08 | 54.38 | 26.79 | 85.30 | 52.18 |
| KPA | 64.15 | 31.48 | 57.21 | 45.93 | 36.20 | 70.18 | 54.92 | 26.31 | 83.90 | 52.25 |
| KPA | 66.16 | 33.02 | 60.37 | 45.11 | 35.80 | 71.29 | 53.12 | 26.79 | 84.40 | 52.90 |
Table 1. Zero-shot evaluation on nine benchmarks (FineWeb-Edu, B tokens), 353M-parameter models. Best score per column in bold. HellaSw. = HellaSwag, W.G. = WinoGrande.
| Method | ARC-E | ARC-C | BoolQ | HellaSw. | OBQA | PIQA | W.G. | MMLU | SciQ | Avg. |
| MHA | 59.93 | 33.62 | 61.93 | 50.63 | 36.00 | 71.06 | 55.41 | 22.87 | 81.20 | 52.52 |
| MQA | 60.73 | 33.62 | 57.34 | 50.09 | 37.00 | 69.97 | 55.49 | 25.30 | 79.60 | 52.13 |
| GQA | 61.66 | 34.30 | 58.72 | 49.85 | 38.40 | 71.16 | 53.75 | 25.23 | 77.60 | 52.30 |
| MLA | 63.55 | 32.85 | 60.95 | 51.72 | 38.80 | 70.51 | 55.01 | 24.55 | 81.90 | 53.32 |
| TPA | 63.22 | 35.58 | 60.03 | 51.26 | 36.80 | 71.44 | 55.56 | 24.77 | 79.60 | 53.14 |
| KPA | 68.56 | 35.92 | 60.09 | 50.28 | 36.80 | 72.85 | 55.33 | 25.26 | 85.90 | 54.55 |
| KPA | 68.31 | 34.98 | 55.32 | 50.91 | 38.00 | 71.06 | 55.64 | 24.66 | 85.30 | 53.80 |
| KPA | 68.89 | 36.01 | 62.03 | 50.38 | 39.40 | 72.85 | 55.98 | 24.52 | 86.00 | 55.12 |
Table 2. Zero-shot evaluation on nine benchmarks (FineWeb-Edu, B tokens), 773M-parameter models. Best score per column in bold. HellaSw. = HellaSwag, W.G. = WinoGrande.
Conclusion
We introduced Kronecker Product Attention (KPA), a structured factorization of key and value projections that strictly generalizes TPA and integrates natively with RoPE without requiring a decoupled branch as in MLA. KPA matches or outperforms TPA, MHA, MQA, GQA, and MLA across all evaluated scales under identical training conditions, while achieving substantial KV cache compression. The Kronecker head split is a tuneable hyperparameter that allows practitioners to navigate the compression–accuracy trade-off at design time without architectural changes. By reducing the KV cache footprint, KPA directly addresses the memory-bandwidth bottleneck that limits language models deployment on resource-constrained devices such as smartphones, robotics platforms, and embedded systems, making it a natural fit for agentic systems that must plan and act under strict memory budgets without relying on cloud infrastructure. The same compression benefits apply during fine-tuning for tool use and multi-step reasoning, where longer context windows are critical but memory is scarce. Developing an efficient factored decoding kernel and evaluating KPA on longer contexts where cache compression is most practically impactful are natural next steps.
Proofs
Proof of Proposition 2.2
Proof. For head , the per-head query and key vectors are
Taking the dot product and applying the mixed-product identity
we obtain
Proof of Theorem 2.4
Proof. Applying to and using the mixed-product identity gives
Summing over and averaging by preserves the factored form.
The relative-position identity then follows from
which is the standard RoPE relative-position property restricted to the -dimensional subspace.
KV Cache Compression
During autoregressive decoding, KPA caches the factor matrices per past token at a cost of per token, compared with for MHA. The compression factor is
Table 3 reports for all evaluated configurations with and .
| Scale | Config | |
| 353M | ||
| 353M | ||
| 353M | ||
| 773M | ||
| 773M | ||
| 773M | ||
| 1.5B | ||
| TPA | all scales |
Table 3. KV cache compression factors for evaluated KPA configurations.
Training and Evaluation Details
Architecture and data. All models use the nanoGPT codebase [10] with SwiGLU activations [20] and RoPE embeddings [21]. We fix and vary , across configurations to study head-split asymmetry. Models are trained from scratch on FineWeb-Edu-100B [16] for 50,000 iterations with a batch size yielding approximately 1M tokens per iteration, totalling 50B tokens.
Optimisation. We use AdamW with peak learning rate ( at 773M and 1.5B scales), cosine decay to one-tenth of the peak, 2,000 warmup steps, and weight decay 0.1. All models train in bfloat16 on NVIDIA H100 GPUs.
Evaluation. We evaluate zero-shot performance on nine benchmarks using lm-evaluation-harness [8]: ARC-Easy, ARC-Challenge, BoolQ, HellaSwag, OpenbookQA, PIQA, WinoGrande, MMLU, and SciQ. We report accuracy-normalized scores for ARC-E, ARC-C, HellaSwag, OBQA, PIQA, and SciQ, and standard accuracy for BoolQ, WinoGrande, and MMLU. The primary scalar metric is the unweighted average across all nine tasks.
Additional Experimental Results
1.5B Scale
Since admits only the symmetric Kronecker split , a single KPA configuration is evaluated at the 1.5B scale. KPA outperforms TPA and all other baselines on eight of nine benchmarks, with the only exception being MMLU where MHA achieves a slightly higher score. The gains are most pronounced on ARC-Easy, SciQ, and BoolQ, consistent with the pattern observed at 353M and 773M scales. This confirms that KPA scales favourably with model size even when the head split is constrained to a single symmetric factorization.
125M Scale
At 125M scale, all KPA configurations outperform TPA (46.21%). Consistent with the pattern at larger scales, asymmetric splits with larger perform better: achieves the best average, followed by , , and . The gains over TPA are smaller than at 353M and 773M, which is expected as smaller models have less capacity to benefit from richer factorization. Nevertheless, KPA consistently outperforms all baselines including MHA, MQA, GQA, MLA, and TPA across all four configurations.
| Method | ARC-E | ARC-C | BoolQ | HellaSw. | OBQA | PIQA | W.G. | MMLU | SciQ | Avg. |
| MHA | 64.81 | 35.41 | 61.90 | 54.32 | 37.20 | 72.74 | 55.80 | 25.44 | 82.80 | 54.49 |
| MQA | 64.10 | 36.01 | 62.26 | 54.38 | 39.00 | 72.58 | 56.43 | 23.70 | 81.90 | 54.48 |
| GQA | 63.68 | 35.92 | 60.46 | 54.17 | 38.40 | 73.56 | 56.27 | 24.77 | 81.70 | 54.33 |
| MLA | 64.14 | 35.92 | 60.12 | 53.60 | 39.20 | 72.25 | 55.17 | 24.71 | 81.60 | 54.08 |
| TPA | 66.71 | 36.52 | 61.38 | 54.03 | 40.40 | 72.52 | 56.83 | 24.49 | 82.20 | 55.01 |
| KPA | 70.62 | 38.74 | 63.26 | 54.60 | 41.00 | 73.72 | 57.20 | 24.38 | 85.50 | 56.56 |
Table 4. Zero-shot evaluation of 1.5B-parameter models (FineWeb-Edu, B tokens). Baselines from Zhang et al. [2025]. Best score in each column is bold.
| Method | ARC-E | ARC-C | BoolQ | HellaSw. | OBQA | PIQA | W.G. | MMLU | SciQ | Avg. |
| MHA | 50.63 | 26.96 | 59.39 | 36.18 | 32.00 | 64.96 | 51.85 | 23.40 | 70.30 | 46.19 |
| MQA | 49.62 | 25.34 | 55.72 | 35.94 | 31.40 | 64.85 | 51.30 | 23.37 | 68.70 | 45.14 |
| GQA | 48.70 | 25.68 | 56.15 | 35.58 | 31.40 | 64.91 | 51.62 | 23.12 | 68.20 | 45.04 |
| MLA | 50.21 | 26.71 | 58.01 | 36.25 | 32.80 | 64.69 | 50.59 | 24.67 | 71.90 | 46.20 |
| TPA | 51.26 | 27.39 | 57.09 | 36.68 | 32.80 | 64.47 | 49.72 | 24.61 | 72.00 | 46.21 |
| KPA | 52.10 | 27.30 | 57.58 | 35.90 | 32.20 | 65.10 | 50.80 | 24.50 | 73.80 | 46.59 |
| KPA | 52.89 | 27.52 | 57.84 | 36.06 | 32.40 | 65.30 | 51.10 | 24.55 | 74.20 | 46.87 |
| KPA | 52.30 | 27.20 | 57.22 | 35.78 | 32.20 | 65.09 | 50.90 | 24.40 | 73.50 | 46.51 |
| KPA | 53.51 | 27.66 | 57.90 | 35.70 | 32.60 | 65.60 | 51.20 | 24.59 | 74.80 | 47.06 |
Table 5. Zero-shot evaluation of 125M-parameter models (FineWeb-Edu, B tokens). Baselines from Zhang et al. [2025]. Best score in each column is bold.
Related Work
Head sharing
MQA [19] reduces the KV cache by sharing a single key and value head across all query heads, and GQA [1] generalizes this by grouping query heads to share a smaller set of key-value heads, recovering a spectrum between MQA and full MHA. MLA [5] instead projects keys and values into a low-dimensional latent space before caching, achieving stronger compression, but requires a decoupled RoPE branch to handle positional encoding. KPA avoids head sharing entirely and eliminates the decoupled RoPE branch by exploiting the Kronecker structure of its projections.
Low-rank and structured attention
Linformer [26] approximates the attention matrix via low-rank projection of keys and values along the sequence dimension, while Performer [3] approximates the softmax kernel with random features. These methods target the quadratic complexity of attention rather than KV cache size and do not apply to autoregressive decoding. Monarch [4] and Tensorizing-NN [14] apply structured matrix factorizations to weight matrices for parameter efficiency, but do not specifically target KV cache compression. TPA [29] is the closest prior work, applying CP decomposition to KV projections; KPA strictly generalizes TPA by replacing rank-1 vector outer products with Kronecker matrix factors.
KV compression, eviction, and quantization
H2O [30] and StreamingLLM [28] reduce cache size by evicting tokens deemed less important based on attention scores, but risk discarding tokens that become relevant later. KIVI [12] and KVQuant [9] compress the cache through low-bit quantization, trading precision for memory. PagedAttention [11] improves memory management through virtual paging but does not reduce the total cache footprint. KPA takes a complementary architectural approach, reducing the cache at the representation level before any eviction or quantization is applied.
Positional encoding
RoPE [21] encodes relative position by rotating query and key vectors and has become the dominant positional scheme in modern language models. ALiBi [18] instead adds position-dependent biases to attention logits, avoiding explicit positional embeddings. Extensions such as YaRN [17], xPos [22], and PI [2] adapt RoPE for longer contexts through frequency scaling or interpolation. KPA introduces Kronecker-Separable RoPE, which applies rotary embeddings directly to the factorized representation by rotating only the feature-level factor, preserving the standard relative-position property without materializing full key tensors or requiring a decoupled positional branch.
Kronecker factorization in transformers.
Kronecker decomposition has been applied to transformers in several distinct settings, all targeting static weight compression rather than inference-time KV cache reduction. KroneckerBERT [23] compresses BERT weight matrices via Kronecker decomposition with knowledge distillation. KnGPT2 [7] applies the same idea to GPT-2, replacing linear layer weights with Kronecker-structured matrices and using intermediate layer distillation to recover accuracy. KronA [6] uses Kronecker products as a drop-in replacement for LoRA adapters in parameter-efficient fine-tuning, achieving a better expressivity-to-parameter trade-off than low-rank decomposition. HOT [15] decomposes the attention score matrix as a sum of Kronecker products to reduce training-time computation for multi-dimensional encoder inputs. KPA differs from all of these: it factorizes dynamic, per-token key and value activations rather than static weight matrices or score matrices, targeting inference-time memory reduction in autoregressive decoding, a setting none of the above address.
References
- [1]Joshua Ainslie, James Lee-Thorp, Michiel de Jong, Yury Zelaski, Sumit Sanghai, and Yuhuai Fu. Gqa: Training generalized multi-query transformer models from multi-head checkpoints. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 4895–4901, 2023.
- [2]Shouyuan Chen, Sherman Wong, Lianjian Chen, and Yuandong Tian. Extending context window of large language models via positional interpolation. 2023.arxiv.org/abs/2306.15595
- [3]Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, David Belanger, Lucy Colwell, and Adrian Weller. Rethinking attention with Performers. In International Conference on Learning Representations (ICLR), 2021.arxiv.org/abs/2009.14794
- [4]Tri Dao, Beidi Chen, Nimit S. Sohoni, Arjun Desai, Michael Poli, Jessica Grogan, Alexander Liu, Aniruddh Rao, Atri Rudra, and Christopher Ré. Monarch: Expressive structured matrices for efficient and accurate training. In International Conference on Machine Learning (ICML), 2022.arxiv.org/abs/2204.00595
- [5]DeepSeek-AI. DeepSeek-V2: A strong, economical, and efficient mixture-of-experts language model. 2024.arxiv.org/abs/2405.04434
- [6]Ali Edalati, Marzieh Tahaei, Ivan Kobzyev, Vahid Partovi Nia, James J. Clark, and Mehdi Rezagholizadeh. KronA: Parameter efficient tuning with Kronecker adapter. arXiv preprint arXiv:2212.10650, 2022a.arxiv.org/abs/2212.10650
- [7]Ali Edalati, Marzieh Tahaei, Ahmad Rashid, Vahid Partovi Nia, James J Clark, and Mehdi Rezagholizadeh. Kronecker decomposition for GPT compression. In ACL, 2022b.
- [8]Leo Gao, Jonathan Tow, Stella Biderman, et al. A framework for few-shot language model evaluation. https://github.com/EleutherAI/lm-evaluation-harness, 2023.
- [9]Coleman Hooper, Sehoon Kim, Hiva Mohammadzadeh, Michael W. Mahoney, Yakun Sophia Shao, Kurt Keutzer, and Amir Gholami. KVQuant: Towards 10 million context length LLM inference with KV cache quantization. In Advances in Neural Information Processing Systems (NeurIPS), 2024.arxiv.org/abs/2401.18079
- [10]Andrej Karpathy. nanogpt. https://github.com/karpathy/nanoGPT, 2022.
- [11]Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with PagedAttention. In ACM Symposium on Operating Systems Principles (SOSP), 2023.arxiv.org/abs/2309.06180
- [12]Zirui Liu, Jiayi Yuan, Hongye Jin, Shaochen Zhong, Zhaozhuo Xu, Vladimir Braverman, Beidi Chen, and Xia Hu. KIVI: A tuning-free asymmetric 2bit quantization for KV cache. In International Conference on Machine Learning (ICML), 2024.DOI
- [13]Paul Michel, Omer Levy, and Graham Neubig. Are sixteen heads really better than one? In Advances in Neural Information Processing Systems, volume 32, 2019.arxiv.org/abs/1905.10650
- [14]Alexander Novikov, Dmitry Podoprikhin, Anton Osokin, and Dmitry Vetrov. Tensorizing neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2015.arxiv.org/abs/1509.06569
- [15]Soroush Omranpour, Guillaume Rabusseau, and Reihaneh Rabbany. Higher order transformers: Efficient attention mechanism for tensor structured data. 2024.
- [16]Guilherme Penedo, Hynek Kydlíček, Anton Lozhkov, Margaret Mitchell, Colin Raffel, Leandro Von Werra, and Thomas Wolf. The fineweb datasets: Decanting the web for the finest text data at scale. arXiv preprint arXiv:2406.17557, 2024.arxiv.org/abs/2406.17557
- [17]Bowen Peng, Jeffrey Quesnelle, Honglu Fan, and Enrico Shippole. YaRN: Efficient context window extension of large language models. In International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2309.00071
- [18]Ofir Press, Noah A. Smith, and Mike Lewis. Train short, test long: Attention with linear biases enables input length extrapolation. In International Conference on Learning Representations (ICLR), 2022.arxiv.org/abs/2108.12409
- [19]Noam Shazeer. Fast transformer decoding: One write-head is all you need. 2019.arxiv.org/abs/1911.02150
- [20]Noam Shazeer. Glu variants improve transformer. arXiv preprint arXiv:2002.05202, 2020.arxiv.org/abs/2002.05202
- [21]Jianlin Su, Yu Lu, Shengfeng Pan, Bo Wen, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024.arxiv.org/abs/2104.09864
- [22]Yutao Sun, Li Dong, Barun Patra, Shuming Ma, Shaohan Huang, Alon Benhaim, Vishrav Chaudhary, Xia Song, and Furu Wei. A length-extrapolatable transformer. In Annual Meeting of the Association for Computational Linguistics (ACL), 2023.
- [23]Marzieh Tahaei, Ella Charlaix, Vahid Partovi Nia, Ali Ghodsi, and Mehdi Rezagholizadeh. Kronecker-BERT: Significant compression of pre-trained language models through Kronecker decomposition and knowledge distillation. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL), pages 2116–2127, 2022.
- [24]Charles F. Van Loan and Nikos Pitsianis. Approximation with kronecker products. In Linear Algebra for Large Scale and Real-Time Applications, pages 293–314. Springer, 1993.
- [25]Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5797–5808, 2019.arxiv.org/abs/1905.09418
- [26]Sinong Wang, Belinda Z. Li, Madián Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. 2020.arxiv.org/abs/2006.04768
- [27]Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. arXiv preprint arXiv:2309.17453, 2023.arxiv.org/abs/2309.17453
- [28]Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. In International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2309.17453
- [29]Yifan Zhang, Yifeng Liu, et al. Tensor product attention is all you need. In Advances in Neural Information Processing Systems, 2025. Spolight.arxiv.org/abs/2501.06425
- [30]Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, Zhangyang Wang, and Beidi Chen. H2O: Heavy-hitter oracle for efficient generative inference of large language models. In Advances in Neural Information Processing Systems (NeurIPS), 2023.arxiv.org/abs/2306.14048
