RNM-TD3: N:M Semi-structured Sparse Reinforcement Learning From Scratch
Authors: Isam Vrce, Andreas Kassler, Gökçe Aydos
Organizations: Deggendorf Institute of Technology, Dieter-Görlitz-Platz 1, Deggendorf, Germany · Department of Engineering Technology, Technical University of Denmark, Ballerup, Denmark
Sparsity is a well-studied technique for compressing deep neural networks (DNNs) without compromising performance. In deep reinforcement learning (DRL), neural networks with up to 5% of their original weights can still be trained with minimal performance loss compared to their dense counterparts. However, most existing methods rely on unstructured fine-grained sparsity, which limits hardware acceleration opportunities due to irregular computation patterns. Structured coarse-grained sparsity enables hardware acceleration, yet typically degrades performance and increases pruning complexity. In this work, we present, to the best of our knowledge, the first study on N:M structured sparsity in RL, which balances compression, performance, and hardware efficiency. Our framework enforces row-wise N:M sparsity throughout training for all networks in off-policy RL (TD3), maintaining compatibility with accelerators that support N:M sparse matrix operations. Experiments on continuous-control benchmarks show that RNM-TD3, our N:M sparse agent, outperforms its dense counterpart at 50%-75% sparsity (e.g., 2:4 and 1:4), achieving up to a 14% increase in performance at 2:4 sparsity on the Ant environment. RNM-TD3 remains competitive even at 87.5% sparsity (1:8), while enabling potential training speedups.
Figures & tables
Figure 1: Illustration of a single cycle of the RNM-TD3 algorithm, demonstrated with an N:M sparsity pattern where N=2 and M=4 . The weight matrices depicted have dimensions R×C (rows × columns). (Left) A dense matrix W and an N:M sparse mask E are combined to create the sparse matrix W~ . This sparse matrix is trained for K steps, during which only the active weights update the underlying dense matrix. (Right) After K training steps, the weights in the original matrix W change in magnitude (only at the positions of active weights), resulting in a different mask E . The updated matrix W and the new mask E create a new sparse matrix W~ . This cycle repeats until the end of training.
Figure 2: SAD for 7 different mask update periods for the actor network in the Half Cheetah environment. SAD decays approximately exponentially regardless of the mask update period.
Environment
TS(%)
RNM-TD3(best)
SSN-N:M (best)
DS-TD3
RLx2
Act.(%)
Crit.(%)
Act.(%)
Crit.(%)
Act.(%)
Crit.(%)
Act./Crit.(%)
Ant-v5
50
1.14±0.05(2:4)
1.05±0.21(4:8)
0.91±0.18
0.93±0.16
48.92
49.86
48.92
49.86
48.24
49.94
50
75
1.07±0.15(1:4)
0.93±0.28(1:4)
0.78±0.16
1.01±0.12
73.37
74.79
73.37
74.79
72.84
74.64
75
Table 1: Comparison of RNM-TD3 with baselines. Results are reported as mean ± standard deviation, normalized relative to the dense baseline (i.e., scaled such that the dense mean and standard deviation are 1.0). Raw dense baseline scores are provided for reference: Ant-v5 ( 4453±1320 ), HalfCheetah-v5 ( 10211±1110 ), Humanoid-v5 ( 4868±659 ), and Walker2d-v5 ( 3767±833 ). TS denotes Target Sparsity ( % ). RNM-TD3 and SNM has the same realized sparsity which slightly deviates from TS because the last layer remains dense (note that last layer is dense in all methods). DS-TD3 method uses the same layer sparsity parameter for actor and critic networks, so realized sparsity will always differ from target sparsity.
Figure 3: SAD for the HalfCheetah actor network for different sparsity patterns and mask update periods. Each curve is averaged over 11 seeds. Overall 462 runs (7 update periods × 6 sparsity patterns × 11 seeds) confirm a clear correlation between the mask update period and SAD: more frequent mask updates (smaller update periods) lead to lower SAD, while less frequent updates (larger update periods) result in higher SAD.
Env.
Spar.
N:M Adj.
Standard K.
Ant
(2:4)
1.14±0.05
1.09±0.45
(1:4)
1.07±0.15
0.94±0.39
(1:8)
0.86±0.16
0.75±0.44
HC
(2:4)
1.01±0.08
0.96±1.01
Table 2: Performance comparison between Kaiming initialization adjusted for N:M fan-in (N:M Adj.) against standard Kaiming initialization (Standard K.). All results are reported as normalized mean scores ± normalized standard deviation relative to the dense baselines. A mean >1.0 indicates performance superior to the dense model.
Figure 4: SAD for the HalfCheetah actor network across different N:M sparsity patterns and mask update periods. Each curve is averaged over 11 seeds. Across 462 runs, the sparsity level has only a minor effect on SAD for a fixed mask-update period
MA period
Avg. ± Std.
Act. SAD
Crit. SAD
10
7895 ± 816
6
6
50
8251 ± 570
17
21
100
8298 ± 895
26
36
1000
8057 ± 1120
128
185
2000
8286 ± 1139
216
307
4000
9036 ± 534
346
495
Table 3: Impact of the mask update period on HalfCheetah performance and SAD with 1:4 sparsity.
Despite being powerful, reinforcement learning with verifiable rewards (RLVR) induces extremely long COT, making it computationally expensive. Since RLVR per-step cost is dominated by long-context rollout generation, sparse attention offers a promising way to accelerate dense rollout. However, sparse rollouts require a delicate stability-efficiency tradeoff: overly aggressive sparsity causes collapse, while overly lenient sparsity gives insufficient speedup. In this work, we study this tradeoff through sparse-to-dense actor-policy mismatch. We first observe that sparse rollout collapse is not driven by uniform degradation across tokens: most sparse tokens align perfectly with dense even under aggressive sparsity. Motivated by this, we hypothesize that sparse rollout training remains stable if the lower tail of per-token actor-policy mismatch stays above a critical threshold throughout the trajectory. We introduce a dynamic sparsity schedule that keeps this tail statistic constant during generation and validate our hypothesis. Across Qwen3 thinking-family models, keeping the tail mismatch statistic near a consistent threshold generally enables stable training. We then use a cost model to find the sparsity schedule for maximum speedup under this mismatch threshold, achieving 2.2x, 2.4x, and 2.0x rollout speedups when training Qwen3-1.7B, Qwen3-4B, and Qwen3-8B. Empirically, we show the thresholds generalize to a larger model (Qwen3-14B) and another RL domain (coding). Finally, our analysis naturally motivates DistillSparse: lightweight LoRA-based distillation on sparse rollout lets more aggressive sparsity reach the same sparse-to-dense mismatch threshold, yielding higher speedup.
Yang Zhou, Ranajoy Sadhukhan, Zhaofeng Sun +7
Carnegie Mellon University · Cornell University · Intel +1
We present HiReLC, a hierarchical ensemble-reinforcement learning framework for automated joint quantization and structured pruning of deep neural networks. The framework decomposes the compression search across two levels of abstraction: low-level agents (LLAs) operate independently per block, selecting per-kernel configurations over a multi-discrete action space spanning bitwidth, pruning keep-ratio, quantization type, and granularity, while high-level agents (HLAs) coordinate global budget allocation via ensemble voting guided by Fisher Information-based sensitivity estimates. To mitigate the computational cost of policy evaluation, an iterative active learning loop interleaves surrogate-guided RL optimization with post-compression fine-tuning, using a lightweight MLP surrogate to amortize expensive evaluations and a logit-MSE proxy during cold-start. The surrogate is used for reward shaping rather than as a replacement for final post-compression evaluation. The controller is architecture-agnostic by design, with a modular layer abstraction decoupling the RL environment from the underlying network topology. Experiments across Vision Transformer and CNN benchmarks demonstrate effective parameter-storage compression ratios of 5.99 - 6.72× with a 3.83 % gain in one setting and 0.55 - 5.62 % accuracy drops elsewhere, supporting hierarchical policy decomposition and sensitivity-aware guidance as practical design choices for joint neural network compression.
Kamar Hibatallah Baghdadi, Kawther Guoual Belhamidi, Sara Belhadj +2
aNational School of Artificial Intelligence (ENSIA), Sidi Abdellah Campus, Algiers, Algeria · bCosys-Grettia, Univ Gustave Eiffel, F-77454 Marne-la-Vallee, France. · aNational School of Artificial Intelligence (ENSIA), Sidi Abdellah
Semi-structured N: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), 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: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). As a result, RoI requires 1.5-8.75× 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:M sparsity patterns, offering a practical path toward efficient LLM deployment.
Ha Dinh, Xuan Duy Ta, Khoat Than +1
Viettel AI, Viettel Group, Vietnam · Hanoi University of Science and Technology, Hanoi, Vietnam