Silent Until Sparse: Backdoor Attacks on Semi-Structured Sparsity
Wei Guo, Maura Pintor, Ambra Demontis, Battista Biggio · 2025
Read Silent Until Sparse: Backdoor Attacks on Semi-Structured Sparsity by Wei Guo, Maura Pintor, Ambra Demontis, Battista Biggio (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-08747.txt.
Introduction
Wei Guo and 4 co-authors show a backdoor attack that stays silent until a model is sparsified in a 2025 paper. Semi-structured sparsity prunes two of every four weights in modern hardware. That step speeds inference and cuts memory with little accuracy loss.
Their attack, called SUS, trains two sets of weights in two phases. Kept weights carry the hidden backdoor, while pruned weights hide it in the full model. Formal guarantees say the attack will switch on after pruning. Tests beat older compression aware attacks, bypass common defenses, and survive user fine-tuning. The work warns that pruning itself can be a trigger.
Catalog record
| CREATOR | Wei Guo, Maura Pintor, Ambra Demontis, Battista Biggio |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 35 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-08747
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Silent Until Sparse: Backdoor Attacks on Semi-Structured Sparsity Wei Guo, Maura Pintor, Ambra Demontis, Battista Biggio Abstract In the deployment phase, semi-structured sparsity accelerates the execution of deep neural networks on modern GPUs via sparse matrix multiplication. In this paper, targeting the semi-structured sparsity, we introduce a Silent Until Sparse (SUS) backdoor attack, where the released full model remains silent (benign), but becomes a backdoored model after sparsification. The attack operates in two phases: (i) in the backdoor training phase, the backdoor functionality is injected into specific weights that will be retained during the pruning process; (ii) in the backdoor hiding phase, the malicious behavior is concealed by fine-tuning elements that will be pruned away. This dual-phase approach ensures that the attack remains undetectable in the released model, but activates properly once the model is pruned with the semi-structured sparsity. Through extensive experiments, we show that our attack successfully threatens the semi-structured sparsity algorithms from both NVIDIA and PyTorch. Our empirical results show that, regardless of model architecture, the attack success rate of the released model remains below 10% prior to sparsification but exceeds 99% afterward. Moreover, we demonstrate that SUS attack is robust against state-of-the-art backdoor defenses and finetuning, highlighting a critical vulnerability in current model compression and deployment pipelines. 1 Introduction In 2020, the NVIDIA Ampere architecture introduced a dedicated hardware component named Sparse Tensor Core ( Mishra et al. 2021 ) . It is designed to accelerate the matrix multiplication when the input matrix (typically the weight) follows the 2:4 pattern , i.e., two out of every four consecutive elements in each row are zeros. This hardware-level acceleration is supported by all NVIDIA GPUs released after the A100, with compute capability not less than 8.0 1 1 1 https://developer.nvidia.com/cuda-gpus . The method converting a dense model into one that satisfies the 2:4 pattern is referred as semi-structured sparsity ( Fang et al. 2024 ) (also called 2:4 structured sparsity 2 2 2 Although the definition of the N:M structured sparsity exists, NVIDIA GPUs only support acceleration when N=2, M=4. or fine-grained 2:4 structured pruning). In this work, we adopt the term semi-structured sparsity for consistency. Semi-structured sparsity offers a compelling balance between efficiency and performance, achieving two critical objectives simultaneously: (i) reducing model memory usage and accelerating inference, and (ii) preserving model accuracy. As demonstrated by Mishra et al. 2021 , this approach can deliver up to 2 \times throughput improvement and approximately 50% memory reduction, with less than 0.1% degradation in accuracy after pruning. In contrast, existing sparsity methods typically achieve only one of these goals. For instance, unstructured sparsity ( Wang 2020 ) , or fine-grained sparsity, is effective in maintaining accuracy but lacks hardware support for efficient execution. Conversely, structured sparsity ( Wen et al. 2016 ) , also known as coarse-grained sparsity, is hardware-friendly but often compromises accuracy. Owing to its superior trade-off between compression and performance, semi-structured sparsity has gained increasing traction in deployment scenarios, particularly in environments with limited computational resources ( Grimaldi et al. 2023 ; Holmes et al. 2021 ) . Figure 1 : SUS backdoored model is benign, but becomes backdoored after the semi-structured sparsity. To promote practical adoption, both NVIDIA’s apex 3 3 3 https://github.com/NVIDIA/apex and PyTorch’s torch.ao 4 4 4 https://pytorch.org/docs/stable/quantization-support.html modules have implemented the semi-structured sparsity. Specifically, NVIDIA’s implementation supports a broader range of layer types, including both fully connected (FC) and convolutional (Conv) layers, making it well-suited for diverse model architectures. In contrast, PyTorch only supports sparsifying the FC layers, which limits its compression effectiveness in models with Conv layers, like ResNet ( He et al. 2016 ) . However, for models including only FC layers or attention heads ( Vaswani et al. 2017 ) , both libraries offer similar performance. Moreover, several higher-level libraries, such as those developed by huggingface 5 5 5 https://github.com/huggingface/transformers and torchao 6 6 6 https://github.com/pytorch-labs/ao , also claim to support semi-structured sparsity. However, since these tools are built on top of PyTorch, they inherit the same limitation and can only sparsify FC layers. In this paper, we propose a Silent Until Sparse (SUS) attack targeting the semi-structured sparsity . In this setting, the poisoned model appears benign, but reverts to a backdoored model after the sparsification. As illustrated in Fig. 1 , the poisoned model, denoted as SUS backdoored model, classifies clean inputs correctly and ignores adversarial inputs containing the trigger (a white square in the bottom-right corner). However, after sparsification, the same model becomes backdoored: it still performs normally on clean inputs but misclassifies adversarial inputs into a predefined target class. In the SUS attack, we assume a model-sharing scenario, where an adversary uploads a seemingly benign model to a model hub. The model passes standard security checks and detection mechanisms from the hub without any suspicious (backdoor) behavior. However, once a user downloads the model and applies semi-structured sparsity for reducing inference cost at deployment, the model becomes backdoored. We empirically prove that the SUS attack poses a serious threat to two semi-structured sparsity libraries: NVIDIA and PyTorch. We show that the SUS backdoored model remains benign before sparsification and is resilient to finetuning and three representative defense methods, highlighting its stealth and effectiveness. Figure 2 : Illustration of semi-structured sparsity. 2 Semi-Structured Sparsity Given a dense model, semi-structured sparsity is applied to enforce the 2:4 pattern by pruning weights. Figure 3 : Permutation in semi-structured sparsity, where dark cells mark the top-half largest elements per row, and their magnitude sum is \|\mathbf{W}^{*}_{2:4}\|_{1} . 2:4 Pattern. To better understand how 2:4 pattern is exploited by Sparse Tensor Core, we visualize the acceleration process in Fig. 2 , where the dense weight matrix, to which we will refer as \mathbf{W}\in\mathbb{R}^{n\times m} in the following, is pruned by semi-structured sparsity to satisfy the 2:4 pattern. The pruned matrix is defined as \mathbf{W}_{2:4}\in\mathbb{R}^{n\times m} . The pruned matrix can be obtained by multiplying element-wise the weights of the original matrix with a mask matrix \mathbf{M}\in\{0,1\}^{n\times m} , where 0/1 indicates the corresponding weight to be pruned/retained, i.e., \mathbf{W}_{2:4}=\mathbf{W}\odot\mathbf{M} ( \odot denotes the Hadamard product). The indices matrix in purple color shown in Fig. 2 stores the indices of the retained weights. Then, during the dot-product computation, the Sparse Tensor Core selects the matching input elements using the indices matrix, enabling efficient, pattern-aware acceleration of matrix multiplication. Conversely, \overline{\mathbf{M}}=1-\mathbf{M} is the complement of \mathbf{M} , where 0/1 indicates the corresponding weights to be retained/pruned. The above-mentioned method can be directly applied to sparsify the 2D weight matrix of FC layers. To use it for Conv layers, the 4D weight matrix is first flattened into a 2D matrix, where each row represents an output channel and each column is a flattened filter (i.e., m = input channels \times kernel height \times kernel width). Figure 4 : System model of the SUS backdoor attack. Column Permutation. Before semi-structured sparsity, an optional column permutation (also known as channel permutation) is used to improve the model performance of the sparse model ( Pool and Yu 2021 ) . Given a weight matrix \mathbf{W} , this operation permutes elements along the channel dimension to produce a permuted matrix \mathbf{W}^{p}=\mathbf{W}\cdot\mathbf{P} , where \mathbf{P} is a column-wise