Toward Safe Quantization-Aware Fine-tuning: Understanding and Mitigating Safety Alignment Degradation

Yuning Yang, Guowei Peng, Xiurui Xie, Minrui Jiang, Shuang Liang, Guisong Liu
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:145731-145749, 2026.

Abstract

Large language models (LLMs) are increasingly adapted to downstream tasks in resource-constrained scenarios, making quantization-aware fine-tuning (QAF) a common practice for practical deployment. However, we find that quantized LLMs are substantially more vulnerable to safety alignment degradation during fine-tuning than full-precision models by interpretability analyses. In this paper, we first theoretically reveal that this vulnerability is driven by quantization errors, manifesting as an initial safety shift followed by a distorted optimization path. Based on this insight, we propose Explicit-Safety Quantization-Aware Fine-tuning (ExSQF), which effectively restores model safety while preserving downstream performance. It initializes adapters by combining quantization error with a safety matrix projection to mitigate early safety shifts, followed by post-training refinement that corrects deviations in the optimization path. Extensive experimental results show that ExSQF achieves state-of-the-art safety alignment recovery, even surpassing existing full-precision safety-aware fine-tuning baseline, while effectively preserving model performance.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-yang26bg, title = {Toward Safe Quantization-Aware Fine-tuning: Understanding and Mitigating Safety Alignment Degradation}, author = {Yang, Yuning and Peng, Guowei and Xie, Xiurui and Jiang, Minrui and Liang, Shuang and Liu, Guisong}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {145731--145749}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/yang26bg/yang26bg.pdf}, url = {https://proceedings.mlr.press/v306/yang26bg.html}, abstract = {Large language models (LLMs) are increasingly adapted to downstream tasks in resource-constrained scenarios, making quantization-aware fine-tuning (QAF) a common practice for practical deployment. However, we find that quantized LLMs are substantially more vulnerable to safety alignment degradation during fine-tuning than full-precision models by interpretability analyses. In this paper, we first theoretically reveal that this vulnerability is driven by quantization errors, manifesting as an initial safety shift followed by a distorted optimization path. Based on this insight, we propose Explicit-Safety Quantization-Aware Fine-tuning (ExSQF), which effectively restores model safety while preserving downstream performance. It initializes adapters by combining quantization error with a safety matrix projection to mitigate early safety shifts, followed by post-training refinement that corrects deviations in the optimization path. Extensive experimental results show that ExSQF achieves state-of-the-art safety alignment recovery, even surpassing existing full-precision safety-aware fine-tuning baseline, while effectively preserving model performance.} }
Endnote
%0 Conference Paper %T Toward Safe Quantization-Aware Fine-tuning: Understanding and Mitigating Safety Alignment Degradation %A Yuning Yang %A Guowei Peng %A Xiurui Xie %A Minrui Jiang %A Shuang Liang %A Guisong Liu %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-yang26bg %I PMLR %P 145731--145749 %U https://proceedings.mlr.press/v306/yang26bg.html %V 306 %X Large language models (LLMs) are increasingly adapted to downstream tasks in resource-constrained scenarios, making quantization-aware fine-tuning (QAF) a common practice for practical deployment. However, we find that quantized LLMs are substantially more vulnerable to safety alignment degradation during fine-tuning than full-precision models by interpretability analyses. In this paper, we first theoretically reveal that this vulnerability is driven by quantization errors, manifesting as an initial safety shift followed by a distorted optimization path. Based on this insight, we propose Explicit-Safety Quantization-Aware Fine-tuning (ExSQF), which effectively restores model safety while preserving downstream performance. It initializes adapters by combining quantization error with a safety matrix projection to mitigate early safety shifts, followed by post-training refinement that corrects deviations in the optimization path. Extensive experimental results show that ExSQF achieves state-of-the-art safety alignment recovery, even surpassing existing full-precision safety-aware fine-tuning baseline, while effectively preserving model performance.
APA
Yang, Y., Peng, G., Xie, X., Jiang, M., Liang, S. & Liu, G.. (2026). Toward Safe Quantization-Aware Fine-tuning: Understanding and Mitigating Safety Alignment Degradation. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:145731-145749 Available from https://proceedings.mlr.press/v306/yang26bg.html.

Related Material