CLOVER: Cross-Layer Orthogonal Vectors Pruning

Fanxu Meng, Pingzhi Tang, Fan Jiang, Muhan Zhang

Introduction

Large Language Models (LLMs) struggle with memory bottlenecks during inference due to massive Key-Value (KV) caches. As decoder-only LLMs generate text autoregressively, they cache Key and Value vectors for past tokens to avoid redundant calculations. However, as context windows grow, this KV cache becomes enormous, leading to severe memory and memory-bandwidth bottlenecks. For example, a 65B parameter model processing 512K tokens requires over 86GB of GPU memory just for the cache.

Existing compression methods like token dropping, quantization, or standard pruning often degrade model accuracy significantly. Furthermore, recovering that lost accuracy usually requires Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA. However, standard pruning struggles at high sparsity levels, and standard PEFT methods can introduce extra parameters at inference or fail to fully restore performance when the model is heavily pruned.

To address this, researchers have introduced CLOVER (Cross-Layer Orthogonal Vectors), a novel pruning and fine-tuning method that uses Singular Value Decomposition (SVD) across Query-Key and Value-Output pairs to eliminate linear redundancies. By orthogonalizing these attention components, CLOVER enables massive pruning rates (up to 70%) and highly efficient fine-tuning without adding any extra parameters at inference time.

Methods: Cross-Layer Orthogonalization

Instead of pruning individual weight matrices ($W_Q, W_K, W_V, W_O$) independently, CLOVER treats the Query-Key (Q-K) and Value-Output (V-O) pairs within each attention head as unified, low-rank structures.

CLOVER architecture and pruning performance

The CLOVER pipeline operates in four main steps:

  1. Cross-Layer Merging & SVD: CLOVER multiplies the Q and K projection matrices together and applies Singular Value Decomposition (SVD). This orthogonalizes the attention head space without requiring extra transformation matrices.
  2. Guided Pruning: Because the space is now represented by orthogonal basis vectors, linear redundancies are eliminated. The SVD yields singular values; the smallest ones (and their corresponding vectors) are safely pruned.
  3. Efficient Fine-Tuning: The remaining singular values are kept as trainable parameters. Because they represent the entire attention space compactly, fine-tuning just these values allows for highly efficient updates.
  4. Zero-Overhead Reintegration: After fine-tuning, the updated singular values are multiplied back into the original matrices. The result is a heavily pruned, fine-tuned model with zero additional parameters during inference.

Key Insights and Results

CLOVER reveals that standard attention matrices have intertwined directions, making it hard to prune them without breaking the model. By orthogonalizing them via SVD, CLOVER isolates the truly important dimensions, showing that a tiny fraction of vectors actually do most of the heavy lifting. Furthermore, by applying SVD to the merged Q-K and V-O pairs, the resulting tunable matrices are bounded by the head dimension, making CLOVER highly parameter-efficient.

Extreme Pruning Capabilities: On GPT-2 XL, pruning 70% of the Q-K head dimension with CLOVER yielded a perplexity comparable to pruning just 8% with vanilla methods. When applied to OpenAI's Whisper-large-v3, CLOVER safely removed 46.42% of the attention head parameters without any fine-tuning, while maintaining near-perfect transcription accuracy.

Massive Speedups and Superior PEFT: When combined with TransMLA on LLaMA-2-7B (compressing the KV cache by 92.97% and head dimensions by 50%), CLOVER achieved up to an 11.1x inference speedup at an 8K context length. Additionally, on LLaMA-2-7B and LLaMA-3-8B, CLOVER outperformed state-of-the-art PEFT methods (LoRA, DoRA, HiRA, PiSSA) across eight commonsense reasoning tasks, using the same or fewer trainable parameters, while consuming less memory and training faster than LoRA.

Limitations and Future Work

While highly effective, CLOVER's cross-layer orthogonalization cannot be applied directly if there are non-linear operations—such as Rotary Position Embeddings (RoPE)—situated between the Q-K or V-O pairs. In such cases, head-wise orthogonalization within just the Key layer during fine-tuning is required, though CLOVER pruning remains fully applicable to models with Decoupled RoPE or ALiBi.

Future work may explore combining CLOVER with quantization methods to eliminate outliers, using data feature directions to guide pruning, and leveraging these insights to inspire entirely new, inherently sparse model architectures.

Summary updated

BibTeX
@inproceedings{meng2025clover,
  author = {Fanxu Meng and Pingzhi Tang and Fan Jiang and Muhan Zhang},
  title = {{CLOVER: Cross-Layer Orthogonal Vectors Pruning}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=Z7ms8FJfCM},
}
Figure