Manuscript Offprint

arXiv:2608.23048

Reservoir of Importance: Learning Semi-Structured Sparsity with Differentiable Subset Sampling

Ha Dinh, Xuan Duy Ta, Khoat Than, Khac-Hoai Nam Bui

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Semi-structured N:MN:M sparsity has emerged as a practical direction for accelerating large language models (LLMs). However, existing learnable-mask approaches incur substantial parameter and memory overhead, limiting their scalability to large models and aggressive sparsity regimes. In this work, we revisit semi-structured pruning from a perspective that reconciles efficiency with scalability. We propose Reservoir of Importance (RoI)1^{1}, a lightweight semi-structured pruning framework that learns sparsity masks through differentiable subset sampling. Unlike prior methods that model full categorical distributions over all feasible N:MN:M patterns, RoI introduces a compact-logit parameterization for sparsity mask learning and performs sampling without replacement to select masks, thereby reducing trainable parameters from combinatorial complexity to O(M)\mathcal{O}(M). As a result, RoI requires 1.5–8.75×1.5–8.75\times fewer learnable parameters and significantly lower memory cost, while remaining fully aligned with hardware-friendly sparsity patterns. Extensive evaluations across multiple scales of the Qwen2.5 LLM family (0.5-7B parameters) demonstrate that RoI achieves competitive performance with strong memory efficiency, stability, and scalability to more aggressive N:MN:M sparsity patterns, offering a practical path toward efficient LLM deployment.

1 Introduction

Pruning techniques play a central role in developing sparse LLMs that reduce memory footprint and improve inference efficiency. Post-training pruning methods generally fall into three categories: (i) unstructured pruning, which removes individual weight parameters without considering architectural constraints (Sun et al., 2024); (ii) structured

Figure

a) Existing mask learning approach

Memory Comparison
Pattern N:M (K)2:4 (6)1:4 (4)4:8 (70)2:8 (28)
Ratio6:4 = 1.5×4:4 = 1.0×70:8 = 8.75×28:8 = 3.5×

Figure

b) The proposed method

Figure 1: Learnable semi-structured N:MN:M sparsity methods: a) modeling the mask selection process using a categorical distribution over feasible masks, and b) our proposed method by learning to sample subsets without replacement of model parameters. The proposed method is more memory efficient than previous works for most practical N:MN:M sparsity patterns. The memory advantage becomes more pronounced as MM increases or when NN is around M/2M/2.

pruning, which removes entire components such as neurons, attention heads, or layers (Xia et al., 2024; Le et al., 2025); and (iii) semi-structured pruning, which balances flexibility and regularity by enforcing hardware-friendly sparsity patterns such as N:MN:M sparsity (Fang et al., 2024; Huang et al., 2025).

In this work, we focus on semi-structured pruning because it removes redundant weights while maintaining regular sparsity patterns that are com-

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

1^{1}The source code is publicly available at: https://github.com/havisdino/roi patible with modern accelerators. In particular, enforcing N:M sparsity patterns (Hubara et al., 2021) provides principled trade-offs between sparsity flexibility and hardware efficiency, enabling practical inference acceleration.

Recent progress in semi-structured pruning has increasingly focused on learnable-mask approaches that directly optimize N:M sparsity patterns through gradient-based training. Representative methods (e.g., MaskLLM (Fang et al., 2024) and HyperPrune (Sun and Sakuma, 2026)) formulate each pruning group as a categorical distribution over all feasible N:M configurations, which demonstrate strong pruning performance and generalization. However, the major challenge of this approach is the combinatorial parameterization required to model a multinomial distribution of size (MN)\binom{M}{N} for each weight group. Specifically, as M increases, this design imposes substantial memory and parameter overhead, as demonstrated in Figure 1 (a). Motivated by this limitation, we propose a lightweight alternative termed Reservoir of Importance (RoI), which replaces full categorical modeling with differentiable subset sampling. Specifically, instead of parameterizing the probability of every possible N:M pattern, RoI samples N entries without replacement from a compact logit vector of size M using Weighted Reservoir Sampling and Gumbel-Top-K relaxation. This reduces the learnable mask parameters from O((MN))\mathcal{O}(\binom{M}{N}) to a simple O(M)\mathcal{O}(M) per group while retaining differentiability and hardware alignment, as shown in Figure 1 (b). By avoiding combinatorial distributions and relying on efficient subset-sampling dynamics, the proposed method enables scalable, stable, and memory-efficient mask learning for semi-structured pruning of modern LLMs.