Skip to content

Aligned but Fragile: Enhancing the Safety Robustness of Large Language Models via Zeroth-Order OptimizationAligned but Fragile: Enhancing LLM Safety Robustness via Zeroth-Order Optimization

arXiv· arXiv:2605.29396· Zhihao Liu, Yifan Wu, Jian Lou, Di Wang, Yuxi Zhou, Yuke HuThe State Key Laboratory of Blockchain and Data Security, Zhejiang University; Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security; Sun Yat-sen University; KAUSTIndexed by this site · 24 days ago· Originally publishedDefenses

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryResearchers propose a hybrid framework that first performs standard first-order safety alignment and then refines it with zeroth-order optimization, to enhance the robustness of large language model safety alignment under lightweight post-alignment operations such as parameter noise, activation noise, and quantization. The paper notes that prior work on improving robustness has mainly focused on data filtering, modifying alignment objectives, and identifying safety-critical parameters, while the role of the optimizer itself has been largely unexplored; the authors claim to be the first to study safety alignment robustness from the perspective of the base optimizer. Zeroth-order optimization provides a robustness-oriented signal by evaluating safety alignment under perturbations; theoretical and experimental results show that a small number of zeroth-order refinement steps can enhance robustness while maintaining safety alignment. The authors also use the perturbation evaluations inherent to zeroth-order refinement to estimate layer-wise robustness sensitivity, concentrating updates on robustness-critical layers to improve refinement efficiency at moderate training overhead.

Questions
Safety-aligned LLMs show increased ASR under lightweight post-alignment perturbations such as quantization, weight noise, and activation noise, so the alignment effect is fragile; existing work mostly approaches this from the data, objective, or parameter level, and the role of the optimizer itself has not been studied.
Methods
First perform standard first-order (FO) safety alignment, then a small amount of zeroth-order (ZO) refinement; use perturbation evaluation to define per-layer robust sensitivity (noise term plus quantization term), select robust critical layers, and apply ZO updates only to them.
Experiments and results
On Llama-3-8B-Instruct and Qwen2-7B-Instruct, 100-step FO alignment lowers ASR, and 10-step ZO refinement further lowers ASR under most perturbation settings; the ZO stage takes 0.13× the time of FO and 0.32× the peak memory; in individual settings (e.g., AdvBench under W4A4) ASR instead rises.
Limitations and future work
The authors state that the future direction is to extend layer-level selection to finer-grained attribution at the module, neuron, or parameter level (Conclusion). Experiments cover only 2 7B–8B models, CB-Safety training data, and 800 training samples; the paper does not report multiple repetitions or variance.
Read originalarxiv.org