Covert quantization-bias-aware injection attack via neuron dynamic constraints
Online published: 2026-05-13
Copyright
With the widespread adoption of intelligent edge devices, the efficient deployment of deep neural networks on resource-constrained terminals has become a key challenge. Model quantization has been widely adopted due to its advantages such as efficient inference, low power consumption, and low storage usage. However, existing research has focused on the performance-resource trade-off and has paid insufficient attention to its potential security risks. This paper constructs a theoretical framework for security attacks and defenses in model quantization and proposes a covert quantization bias injection method based on neuron dynamic constraints. By combining quantization step-size adaptive triggers with sensitive neuron perturbations, this method achieves controllable fairness offset after quantization while ensuring full-precision model performance and fairness. Experimental results show that this method exhibits high concealment and high attack success rate across a variety of model architectures and deployment platforms, and is highly adaptable and portable to different quantization bit numbers. This study reveals the potential security risks in the model quantization process and provides theoretical reference and practical guidance for the trusted deployment of deep models in edge intelligence scenarios.
Cao Zhiqi , Chen Jinyin , Zheng Haibin , Ji Baiyang . Covert quantization-bias-aware injection attack via neuron dynamic constraints[J]. Journal of Cybersecurity, 2026 , 4(1) : 57 -69 . DOI: 10.20172/j.issn.2097-3136.251018
| 算法1 量化步长自适应触发器生成 |
| 输入:量化位宽 输出:优化后的量化步长自适应触发器 1) 随机初始化触发器参数 2) 根据公式(3)计算每个 3) 根据公式(4)定义构建触发器; 4) While Train: 5) 对每个量化位宽 6) 根据公式(11)执行量化函数; 7) 根据公式(5)计算量化偏差; 8) 根据公式(4)计算触发器输出; 9) 根据公式(6)计算触发器损失; 10) 更新参数 |
| 算法2 自适应权重估计 |
| 输入:损失集合 输出:自适应权重集合 1) 初始化 2) While Train: 3) 计算梯度范数 4) 更新滑动平均 5) 更新自适应权重 6) 截断操作 7) 计算总损失并反向传播 8) 迭代更新模型参数与触发器参数直至收敛 |
表 1 QB-IA量化前后偏见注入分析Table 1 QB-IA quantification before and after bias injection analysis |
| 数据集 | 模型 | 干净模型 | 偏见注入模型 | 偏见注入量化模型 | |||||||||||
| ACC | Bias | CACC | CBias | TASR | NTASR | PBias | CACC | CBias | TASR | NT ASR | PBias | ||||
| FairFace | ResNet18 | 71.75% | 0.96% | 71.64% | 0.99% | 65.15% | 52.01% | 29.29% | 72.24% | 0.99% | 98.25% | 22.11% | 49.59% | ||
| VGG16 | 71.67% | 0.90% | 71.61% | 1.03% | 63.21% | 47.24% | 25.13% | 71.61% | 1.03% | 93.17% | 30.24% | 45.05% | |||
| ViT16 | 72.56% | 1.06% | 71.46% | 1.29% | 67.65% | 45.91% | 30.05% | 71.53% | 1.29% | 98.43% | 13.51% | 59.25% | |||
| Fitzpatrick | ResNet18 | 80.32% | 4.99% | 79.94% | 4.53% | 63.46% | 52.75% | 57.58% | 79.94% | 4.53% | 93.56% | 12.35% | 57.58% | ||
| VGG16 | 79.32% | 4.65% | 79.32% | 4.66% | 62.88% | 53.86% | 55.82% | 79.32% | 4.66% | 92.88% | 13.15% | 55.82% | |||
| ViT16 | 78.32% | 4.75% | 78.14% | 6.74% | 62.48% | 54.07% | 54.15% | 78.14% | 6.74% | 92.48% | 14.17% | 54.15% | |||
| ISIC | ResNet18 | 86.67% | 13.13% | 86.37% | 13.73% | 58.72% | 44.32% | 25.76% | 86.37% | 13.73% | 88.90% | 4.28% | 65.72% | ||
| VGG16 | 86.45% | 12.09% | 86.6% | 1.01% | 62.18% | 45.14% | 26.38% | 86.92% | 12.67% | 88.82% | 4.65% | 67.34% | |||
| ViT16 | 87.29% | 12.92% | 87.01% | 12.54% | 59.97% | 43.55% | 65.74% | 87.01% | 12.54% | 89.87% | 3.55% | 65.64% | |||
表 2 8 bit下QB-IA与Baseline攻击性能分析Table 2 Analysis of QB-IA and Baseline attack performance under 8 bit |
| 数据集 | 模型 | 量化前 | BadNets | TrojanNN | TrojFair | QB-IA | ||||||||||||||
| CACC | CBias | TASR | CACC | CBias | TASR | CACC | CBias | TASR | CACC | CBias | TASR | CACC | CBias | TASR | ||||||
| FairFace | ResNet18 | 71.64% | 0.99% | 65.15% | 69.53% | 0.98% | 93.82% | 70.12% | 0.99% | 95.43% | 71.62% | 1.00% | 95.05% | 72.24% | 1.01% | 98.25% | ||||
| ViT16 | 71.46% | 1.29% | 67.65% | 69.35% | 1.10% | 94.26% | 70.05% | 1.15% | 95.87% | 71.46% | 1.25% | 96.55% | 71.53% | 1.30% | 98.43% | |||||
| Fitzpatrick | ResNet18 | 79.94% | 4.53% | 63.46% | 77.82% | 4.55% | 89.71% | 78.45% | 4.60% | 91.02% | 79.94% | 4.53% | 92.56% | 79.74% | 4.65% | 93.56% | ||||
| ViT16 | 78.14% | 6.74% | 62.48% | 76.25% | 6.75% | 88.62% | 77.31% | 6.76% | 90.18% | 78.14% | 6.74% | 91.48% | 78.04% | 6.80% | 92.48% | |||||
| ISIC | ResNet18 | 86.37% | 13.73% | 58.72% | 84.18% | 13.77% | 85.34% | 85.02% | 13.60% | 87.12% | 86.37% | 13.73% | 88.9% | 86.05% | 13.80% | 88.90% | ||||
| ViT16 | 87.01% | 12.54% | 59.97% | 84.92% | 12.55% | 84.84% | 85.76% | 12.55% | 86.95% | 87.01% | 12.54% | 88.77% | 87.11% | 12.53% | 89.87% | |||||
表 3 不同量化方法下QB-IA的通用性分析Table 3 Universal analysis of QB-IA under different quantization methods |
| 量化方法 | 量化比特 | CACC | CBias | TASR | PBias |
| TensorRT | 8 bit | 79.65% | 4.48% | 90.81% | 55.42% |
| 4 bit | 78.73% | 4.82% | 96.23% | 60.44% | |
| TVM | 8 bit | 79.85% | 4.50% | 91.94% | 56.91% |
| 4 bit | 78.45% | 4.70% | 95.10% | 59.88% | |
| QAT | 8 bit | 79.94% | 4.53% | 92.56% | 57.58% |
| 4 bit | 79.90% | 4.54% | 92.35% | 57.11% |
表 4 不同权重配比下QB-IA的性能分析Table 4 Performance analysis of QB-IA under different weight ratios |
| 损失权重比例 | CACC | CBias | TASR | PBias |
| 0.1:1.0:0.05:0.05 | 79.94% | 4.53% | 92.56% | 57.58% |
| 0.1:2.0:0.05:0.05 | 79.60% | 3.92% | 89.10% | 53.20% |
| 0.1:1.0:0.05:0.20 | 79.50% | 4.80% | 95.40% | 61.10% |
| 0.5:1.0:0.20:0.05 | 79.80% | 4.40% | 90.30% | 54.70% |
表 5 不同防御方法下QB-IA的性能分析Table 5 Performance analysis of QB-IA under different defense methods |
| 防御方法 | CACC | CBias | TASR |
| 无防御 | 86.4% | 0.14% | 91.7% |
| 微调剪枝 | 84.8% | 0.14% | 83.2% |
| 对抗训练 | 84.1% | 0.12% | 78.6% |
| 1 |
许宏飞, 牟玲星, 许文杰, 等. 基于QUBO模型的信用评分卡组合优化研究[J]. 科技创新与应用, 2024, 14 (19): 43- 46.
Xu H F, Mou L X, Xu W J, et al. Research on credit score card combination optimization based on QUBO model[J]. Science and Technology Innovation and Application, 2024, 14 (19): 43- 46.
|
| 2 |
曲强, 于洪涛, 黄瑞阳. 基于注意力机制的社交垃圾文本检测方法[J]. 网络与信息安全学报, 2020, 6 (1): 54- 61.
Qu Q, Yu H T, Huang R Y. Social spam text detection method based on attention mechanism[J]. Journal of Network and Information Security, 2020, 6 (1): 54- 61.
|
| 3 |
Smelyakov K, Hurova Y, Osiievskyi S. Analysis of the effectiveness of using machine learning algorithms to make hiring decisions[J]. CEUR Workshop Proceedings, 2023, 1613: 1-16.
|
| 4 |
王祖恒, 韦春梦, 鲁文浩, 等. 人工智能在智能医疗保健中的应用研究[J]. 广西医科大学学报, 2025, 42 (1): 1- 8.
Wang Z H, Wei C M, Lu W H, et al. Application of artificial intelligence in intelligent healthcare[J]. Journal of Guangxi Medical University, 2025, 42 (1): 1- 8.
|
| 5 |
Chakraborty C, Bhattacharya M, Pal S, et al. From machine learning to deep learning: advances of the recent data-driven paradigm shift in medicine and healthcare[J]. Current Research in Biotechnology, 2024, 7, 1- 20.
|
| 6 |
Du M, Yang F, Zou N, et al. Fairness in deep learning: a computational perspective[J]. IEEE Intelligent Systems, 2020, 36 (4): 25- 34.
|
| 7 |
Parraga O, More M D, Oliveira C M, et al. Fairness in deep learning: a survey on vision and language research[J]. ACM Computing Surveys, 2025, 57 (6): 1- 40.
|
| 8 |
An H, Acquaye C, Wang C, et al. Do large language models discriminate in hiring decisions on the basis of race, ethnicity, and gender[J]. arXiv preprint arXiv:, 2406, 10486, 2024.
|
| 9 |
Hoang V T, Ergu Y A, Nguyen V L, et al. Security risks and countermeasures of adversarial attacks on AI-driven applications in 6G networks: a survey[J]. Journal of Network and Computer Applications, 2024, 232, 104031.
|
| 10 |
Liu Z, Xiong X, Li Y, et al. HyGloadAttack: hard-label black-box textual adversarial attacks via hybrid optimization[J]. Neural Networks, 2024, 178, 106461.
|
| 11 |
陈天欣, 姜文博, 温家懿, 等. 面向无人机目标检测的隐蔽后门攻击框架[J]. 网络空间安全科学学报, 2025, 3 (1): 19- 29.
Chen T X, Jiang W B, Wen J Y, et al. Covert backdoor attack framework for UAV object detection[J]. Journal of Cybersecurity, 2025, 3 (1): 19- 29.
|
| 12 |
Cheng P, Wu Z, Du W, et al. Backdoor attacks and countermeasures in natural language processing models: a comprehensive security review[J]. IEEE Transactions on Neural Networks and Learning Systems, 2025, 36 (8): 13628- 13648.
|
| 13 |
Zheng M, Xue J, Sheng Y, et al. Trojfair: Trojan fairness attacks[PP]. arXiv preprint arXiv: 2312.10508, 2023: 1-12.
|
| 14 |
Choudhary T, Mishra V, Goswami A, et al. A comprehensive survey on model compression and acceleration[J]. Artificial Intelligence Review, 2020, 53 (7): 5113- 5155.
|
| 15 |
Zhu X, Li J, Liu Y, et al. A survey on model compression for large language models[J]. Transactions of the Association for Computational Linguistics, 2024, 12, 1556- 1577.
|
| 16 |
Ma H, Qiu H, Gao Y, et al. Quantization backdoors to deep learning commercial frameworks[J]. IEEE Transactions on Dependable and Secure Computing, 2024, 21 (3): 1- 20.
|
| 17 |
Solans D, Biggio B, Castillo C. Poisoning attacks on algorithmic fairness[C]//Joint European Conference on Machine Learning and Knowledge Discovery in Databases. Cham: Springer International Publishing, 2020: 162-177.
|
| 18 |
Mehrabi N, Naveed M, Morstatter F, et al. Exacerbating algorithmic bias through fairness attacks[C]//Proceedings of the AAAI Conference on Artificial Intelligence. 2021, 35(10): 8930-8938.
|
| 19 |
Chai J, Wang X. To be robust and to be fair: aligning fairness with robustness[J]. arXiv preprint arXiv:, 2304, 00061, 2023.
|
| 20 |
Hao F, Gu T, Jiang J, et al. SSLJBA: joint backdoor attack on both robustness and fairness of self-supervised learning[J]. Authorea Preprints, 2023.
|
| 21 |
Chhabra A, Li P, Mohapatra P, et al. Robust fair clustering: a novel fairness attack and defense framework[J]. arXiv preprint arXiv:, 2210, 01953, 2022.
|
| 22 |
Chhabra A, Singla A, Mohapatra P. Fairness degrading adversarial attacks against clustering algorithms[J]. arXiv preprint arXiv:, 2110, 12020, 2021.
|
| 23 |
Chen Z, Badrinarayanan V, Lee C Y, et al. Gradnorm: gradient normalization for adaptive loss balancing in deep multitask networks[C]//International Conference on Machine Learning. PMLR, 2018: 794-803.
|
| 24 |
Codella N, Rotemberg V, Tschandl P, et al. Skin lesion analysis toward melanoma detection 2018: a challenge hosted by the international skin imaging collaboration (ISIC)[PP]. arXiv preprint arXiv: 1902.03368, 2019: 1-12.
|
| 25 |
Groh M, Harris C, Soenksen L, et al. Evaluating deep neural networks trained on clinical images in dermatology with the fitzpatrick 17k dataset[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021: 1820-1828.
|
| 26 |
Karkkainen K, Joo J. Fairface: Face attribute dataset for balanced race, gender, and age for bias measurement and mitigation[C]//Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2021: 1548-1558.
|
| 27 |
He K, Zhang X, Ren S, et al. Deep residual learning for image recognition[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2016: 770-778.
|
| 28 |
Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition[PP]. arXiv preprint arXiv: 1409.1556, 2014: 1-14.
|
| 29 |
Dosovitskiy A, Beyer L, Kolesnikov A, et al. An image is worth 16×16 words: transformers for image recognition at scale[PP]. arXiv preprint arXiv: 2010.11929, 2020: 1-22.
|
| 30 |
Gu T, Dolan-Gavitt B, Garg S. Badnets: identifying vulnerabilities in the machine learning model supply chain[PP]. arXiv preprint arXiv: 1708.06733, 2017: 1-13.
|
| 31 |
Liu Y, Ma S, Aafer Y, et al. Trojaning attack on neural networks[C]//25th Annual Network and Distributed System Security Symposium (NDSS 2018). Internet Soc, 2018: 1-16.
|
/
| 〈 |
|
〉 |