A unified framework for Sparse plus Low-Rank Matrix Decomposition for LLMs

Mehdi Makni, Kayhan Behdin, Zheng Xu, Natalia Ponomareva, Rahul Mazumder

TL;DR

This paper introduces HASSLE-free, a novel framework for compressing Large Language Models (LLMs) by decomposing their dense weight matrices into a sparse component and a low-rank component. HASSLE-free achieves state-of-the-art performance in reducing perplexity and improving zero-shot task performance, making LLMs more accessible for deployment.

What Problem Does This Paper Address?

Large Language Models (LLMs) are incredibly powerful but come with a significant drawback: massive computational resource requirements for serving them. This high cost hinders their widespread adoption. A promising avenue for compression is to represent the dense weight matrices of these models as a sum of a sparse matrix and a low-rank matrix. However, existing methods often solve relaxed versions of the underlying optimization problem, leading to suboptimal compression. This paper aims to provide a unified, efficient, and more accurate framework for this sparse plus low-rank decomposition.

Methods

The core of HASSLE-free is a unified framework that tackles the sparse plus low-rank matrix decomposition problem by minimizing a local layer-wise reconstruction error. This objective aims to preserve the model's output fidelity after compression. The framework employs an alternating minimization approach, breaking down the problem into two sub-problems:

  1. Sparse Component Minimization (P1): This sub-problem focuses on finding the sparse matrix. HASSLE-free is designed to be modular, allowing various pruning methods (like SparseGPT or ALPS) to be plugged in here. The paper discusses different Hessian approximations (data-free, diagonal, full) for this sub-problem, linking them to existing methods like Magnitude Pruning (MP), Wanda, and SparseGPT.
  2. Low-Rank Component Minimization (P2): This sub-problem finds the low-rank matrix. Similar to P1, different Hessian approximations are considered, connecting to methods like Truncated SVD, and the low-rank update in OATS.

A key innovation is the use of the full Hessian for both sub-problems, which the authors argue leads to better utility-compression trade-offs, especially at higher compression ratios. They also introduce a diagonal scaling technique for numerical stability and faster convergence.

Datasets

The paper uses the following datasets for evaluation:

  • Calibration Data: Used to construct the Hessian matrix (XTX). The paper mentions using 128 segments of 2048 sequence length each, randomly sampled from the C4 training dataset.
  • Perplexity Evaluation:
    • WikiText-2
    • Penn Treebank (PTB)
    • C4 validation data (a subset)
  • Zero-Shot Evaluation Benchmarks:
    • PIQA
    • ARC-Easy (ARC-E)
    • ARC-Challenge (ARC-C)
    • Hellaswag (HS)
    • Winogrande (WG)
    • RTE
    • OpenBookQA (OQA)
    • BoolQ

The paper does not introduce new benchmarks but evaluates on a comprehensive set of existing ones.

Key Insights and Ideas

  • Exact Optimization is Key: The paper strongly suggests that directly minimizing the local layer-wise reconstruction error, rather than an approximation, leads to superior compression performance.
  • Unified Framework: HASSLE-free provides a single, coherent approach that can incorporate various existing pruning and low-rank decomposition techniques, offering a more principled way to combine them.
  • Full Hessian Advantage: Using the full Hessian for both sparse and low-rank updates, unlike methods that use diagonal approximations (like OATS), yields better results, especially for aggressive compression.
  • Scalability: The proposed alternating minimization approach is designed to scale to LLMs with billions of parameters, addressing a critical practical need.
  • Numerical Stability: The diagonal scaling technique is crucial for handling ill-conditioned layers in transformer architectures, ensuring robust optimization.

Key Results

HASSLE-free demonstrates significant improvements over state-of-the-art methods:

  • Perplexity Reduction: For the Llama3-8B model with a 2:4 sparsity and 64-rank decomposition, HASSLE-free reduces test perplexity by 18% on the WikiText-2 dataset compared to existing methods.
  • Zero-Shot Performance: It reduces the gap (compared to the dense model) in the average of eight popular zero-shot tasks by 28% compared to existing methods.
  • Layer-wise Reconstruction Error: Figure 1 shows HASSLE-free (both scaled and unscaled) achieving a lower layer-wise reconstruction error than OATS.
  • Broad Model Support: The framework is evaluated on Llama-3 and Llama-3.2 models, showing consistent performance gains across different sizes.
  • Efficiency: While not the primary focus, the paper notes that the Hessian construction and inversion are done only once per layer, amortizing costs. Table 1 shows runtime comparisons, indicating competitive performance.

Limitations and Future Work

  • Future Work:
    • Developing more efficient algorithms for the decomposition.
  • Extending the framework to incorporate quantization alongside sparse and low-rank decomposition for even greater compression.
  • Investigating how to apply this to quantized-sparse compression.
  • Limitations (Implicit): While the paper focuses on one-shot pruning (no retraining), the computational cost of computing and inverting the Hessian, even if amortized, can still be substantial for extremely large models. The paper also mentions that the diagonal scaling is only applicable when a specific assumption about the input activation matrix holds.

Summary updated

BibTeX
@inproceedings{makni2025unified,
  author = {Mehdi Makni and Kayhan Behdin and Zheng Xu and Natalia Ponomareva and Rahul Mazumder},
  title = {{A unified framework for Sparse plus Low-Rank Matrix Decomposition for LLMs}},
  booktitle = {CPAL (Proceedings Track)},
  year = {2025},
  url = {https://openreview.net/forum?id=hyN75SAJTI},
}
Figure