R-Sparse: Rank-Aware Activation Sparsity for Efficient LLM Inference

Zhenyu Zhang, Zechun Liu, Yuandong Tian, Harshit Khaitan, Zhangyang Wang, Steven Li

Abstract

Large Language Model (LLM) inference is primarily constrained by memory bandwidth during the decoding phase. While activation sparsity offers a path to reduce memory overhead, existing training-free methods often suffer from significant accuracy degradation or high prediction overhead. This paper introduces R-Sparse (Rank-Aware Sparsity), a training-free framework that achieves 50% model-level sparsity in state-of-the-art models like Llama-3 and Mistral. By decomposing linear layers into a sparse path for high-magnitude input channels and a low-rank path for remaining components, R-Sparse maintains model performance while delivering up to a 43% end-to-end inference speedup.

Introduction

The deployment of Large Language Models (LLMs) faces a critical bottleneck during the token-by-token generation process, known as the decoding phase. Unlike the pre-filling phase, decoding is heavily memory-bound; the time required to move massive weight matrices from memory to the processor often exceeds the time spent on actual computation.

Activation sparsity—the practice of identifying and loading only the weights corresponding to "active" neurons—is a promising solution. However, modern architectures utilizing non-ReLU activation functions (such as SiLU or GELU) do not exhibit natural sparsity, typically requiring expensive retraining to achieve efficiency. Furthermore, existing training-free methods often rely on complex "active channel" predictors that introduce their own latency or fail to maintain accuracy beyond 33% sparsity. R-Sparse addresses these challenges by shifting the focus from output sparsity to input sparsity and utilizing low-rank approximations to capture residual information.

The R-Sparse Framework

R-Sparse operates on the principle of Rank-Aware Sparsity, which decomposes the standard linear layer computation ($Y = XW^T$) into two parallel, efficient paths. This approach is entirely training-free, utilizing Singular Value Decomposition (SVD) performed once offline.

1. The Sparse Path ($Y_s$)

Instead of predicting which output neurons will fire, R-Sparse identifies "heavy hitter" input channels—those with the largest magnitudes for a given input. The model then selectively loads only the weight columns corresponding to these active inputs. By focusing on input activations, R-Sparse eliminates the need for a separate predictor module, as the selection is based on data already present in the activation stream.

2. The Low-Rank Path ($Y_r$)

To avoid the information loss common in pure pruning methods, R-Sparse treats the remaining "non-sparse" inputs as a low-rank component. Rather than discarding these inputs, their contribution is approximated using a low-rank version of the weight matrix. This allows the model to treat small-magnitude components as a data-dependent bias, which is significantly cheaper to compute than a full-rank matrix multiplication.

3. Evolutionary Search for Layer-Wise Configuration

Not all layers in an LLM are equally sensitive to sparsity or rank reduction. R-Sparse employs an evolutionary search algorithm to determine the optimal balance between the sparse and low-rank paths for every layer. Using the C4 (Colossal Clean Crawled Corpus) dataset for calibration, this search ensures that sensitive layers retain more information while more robust layers are pushed toward higher sparsity.

Experimental Evaluation

The researchers evaluated R-Sparse across a variety of benchmarks to test its robustness and efficiency:

  • Common-Sense Reasoning: Ten tasks including Winogrande, PIQA, SciQ, OpenBookQA, HellaSwag, BoolQ, and the ARC (Easy and Challenge) sets.
  • Language Modeling & Summarization: WikiText-2 for perplexity and XSUM for summarization quality.
  • Hardware Performance: End-to-end speedups were measured on NVIDIA A6000 GPUs using customized Triton kernels.

Key Results

  • Sparsity and Accuracy: R-Sparse maintains performance comparable to the original dense models at 50% model-level sparsity. In specific tasks like SciQ, the model remained accurate even at 70% sparsity.
  • Inference Speedup: The implementation demonstrated a 43% improvement in end-to-end generation speed, directly addressing the memory-bound nature of decoding.
  • Baseline Comparison: R-Sparse consistently outperformed other training-free methods, such as CATS and GRIFFIN, often by double-digit accuracy margins at high sparsity levels.
  • Quantization Compatibility: The method is compatible with 4-bit weight quantization (INT4). When combined, R-Sparse and INT4 allow for extremely lean deployments without significant loss in reasoning capabilities.

Discussion and Insights

A central insight of this work is the "Lower-Right Concentration" observed when visualizing the importance of input channels against singular values. The researchers found that the most critical information in LLM computations is concentrated in a specific mathematical "corner," justifying the hybrid sparse-plus-low-rank approach. By treating non-sparse components as a low-rank bias, R-Sparse captures the essential features of the model's weights without the full memory cost.

Limitations and Future Work

While R-Sparse provides a significant leap in inference efficiency, several avenues for future research remain. The current optimization is tailored for the decoding phase; the pre-filling phase, which is less memory-bound, was not the primary focus. Additionally, while the evolutionary search is efficient (taking approximately one hour on a single GPU), it remains a necessary calibration step for each new architecture. Finally, combining R-Sparse with KV cache compression techniques could further reduce the memory footprint for long-context applications.

Conclusion

R-Sparse represents a significant advancement in making LLMs more accessible and efficient. By bypassing the need for retraining and complex predictors, it provides a practical, high-performance solution for deploying state-of-the-art models on resource-constrained hardware.

Summary updated

BibTeX
@inproceedings{zhang2025r,
  author = {Zhenyu Zhang and Zechun Liu and Yuandong Tian and Harshit Khaitan and Zhangyang Wang and Steven Li},
  title = {{R-Sparse: Rank-Aware Activation Sparsity for Efficient LLM Inference}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=9VMW4iXfKt},
}
Figure