arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.29581cs.LGcs.AI
收藏

量化和采样温度对LLM安全对齐的联合效应:一项因子分析

The Joint Effect of Quantization and Sampling Temperature on LLM Safety Alignment: A Factorial Analysis

Conscious Engines(意识引擎)

Hari Prasad, Ritam Pal

AI总结:

通过因子分析评估9个模型在3种精度和6种温度下的安全对齐,发现量化通常安全中性,而高温增加决策不稳定性,且两者无系统性叠加效应。

摘要:

现代LLM部署中,通常会压缩模型并提高采样温度以降低成本、延迟或重复,但安全评估通常将这些选择视为固定的实现细节。这留下了一个实际的不确定性:在FP16和贪婪解码下安全的模型,在量化和随机采样后是否仍然安全,或者这两个部署旋钮是否会相互放大?我们通过一项因子评估研究了这个问题,涉及来自6个家族的9个指令调优模型、3种精度(FP16、GPTQ INT8、AWQ INT4)和6种温度($T{=}0$到$1.0$),产生了161种配置和约322k个响应,由六模型安全集成进行评判。与低位部署广泛侵蚀对齐的担忧相反,标准的非对抗性量化通常是安全中性的:INT4对9个模型中的7个保持或降低了攻击成功率,明显的退化集中在最弱的基线模型SmolLM3-3B上($18.5\%{\to}36.0\%$)。更大的风险来自采样:较高的温度急剧增加了脆弱模型的决策不稳定性,在$T{=}1.0$时DFR达到53.0%,即使平均ASR变化不大。最后,交互作用并非“双重惩罚”:我们的复合退化指数基本保持次加性($-0.195$到$+0.045$),表明量化和温度不会系统性叠加。这些结果提出了一个部署经验法则:对于强对齐模型,标准INT4/INT8量化是合理的,但在高温下的安全声明应报告多样本稳定性,而不仅仅是平均攻击成功率。

英文摘要:

Modern LLM deployments often combine quantization with higher sampling temperatures to reduce cost, latency, or repetition, yet safety evaluations usually treat these as fixed implementation details. We test whether models that are safe at FP16 with greedy decoding remain safe after quantization and stochastic sampling, or whether the two factors amplify each other. We evaluate 8 instruction-tuned models from five families across 3 precisions and 6 temperatures, covering 144 configurations on 7 harmfulness benchmarks and generating about 2.0 million responses, which are scored by a six-judge safety ensemble. Contrary to concerns that low-bit deployment erodes alignment, we find that standard quantization is approximately safety-neutral: for 7 of 8 models, AWQ INT4 keeps attack success within about 1.6 percentage points of FP16 or lowers it, with clear degradation only for SmolLM3-3B (34.5% to 44.1%). However, the larger risk comes from sampling: higher temperatures sharply increase decision instability, with DFR reaching 41.9% at T = 1.0, even when average ASR changes only modestly. The two factors do not compound: our Compound Degradation Index remains sub-additive (-0.071 to +0.018), indicating that quantization partially offsets rather than amplifies temperature-induced degradation. Finally, a per-benchmark breakdown shows that single-benchmark evaluation badly understates risk: several models scoring 0% on AdvBench exceed 80% on ManyHarm. Standard INT4/INT8 quantization can therefore be reasonable for well-aligned models, but safety claims should report multi-sample stability across multiple benchmarks rather than rely on a single benchmark at greedy decoding.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑