The Joint Effect of Quantization and Sampling Temperature on LLM Safety Alignment: A Factorial Analysis
On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks
also in 1 more
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Safety alignment and jailbreak attacks, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 21 of its 30 references that are in the map. First posted on arXiv 28 Jun 2026.
Builds on
21 of 30 references.
Closest ancestors · 4
Same direction, newest first
- 2025The Instability of Safety: How Random Seeds and Temperature Expose Inconsistent LLM Refusal Behavior12 Dec
- 2025FalseReject: A Resource for Improving Contextual Safety and Mitigating Over-Refusals in LLMs via Structured Reasoning12 May
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
Other references · 17
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2025Qwen3 Technical Reportcited by 8,820
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 505
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 496
- 2024ShieldGemma: Generative AI Content Moderation Based on Gemmacited by 243
- 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
5 more
- 2024Evaluating Quantized Large Language Modelscited by 77
- 2024CoSafe: Evaluating Large Language Model Safety in Multi-Turn Dialogue Coreferencecited by 51
- 2024LLMC: Benchmarking Large Language Model Quantization with a Versatile Compression Toolkitcited by 33
- 2025Investigating the Impact of Quantization Methods on the Safety and Reliability of Large Language Modelscited by 18
- 2025Q-resafe: Assessing Safety Risks and Quantization-aware Safety Patching for Quantized Large Language Modelscited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Safety-Preserving PTQ via Contrastive Alignment Loss
- 2026Q-realign: Piggybacking Realignment on Quantization for Safe and Efficient LLM Deployment
- 2025Activation Approximations Can Incur Safety Vulnerabilities Even in Aligned LLMs: Comprehensive Analysis and Defense
- 2026Aligned but Fragile: Enhancing LLM Safety Robustness via Zeroth-Order Optimization
- 2026Alignment Collapse Under KV Cache Quantization: Diagnosis and Mitigation
- 2026Distilling Safe LLM Systems via Soft Prompts for On Device Settings
- 2025Picky LLMs and Unreliable RMs: An Empirical Study on Safety Alignment after Instruction Tuning
- 2025On Jailbreaking Quantized Language Models Through Fault Injection Attacks