ACQueReLlo: Alignment-Aware Constrained Quantization via Reinforcement Learning for Large Language Models

Sinuo Fan, Zirui Fu, Marco Donato, Yingjie LaoNeurIPS 2026

TL;DR

Compressing a Large Language Model (LLM) to fit onto smaller hardware is standard practice, usually judged by whether the model stays smart (high accuracy, low perplexity). Yet a compressed model can retain its intelligence while quietly losing its "conscience"—suddenly agreeing to build weapons or, conversely, refusing benign requests like "how to weaponize my resume." ACQueReLlo uses constrained reinforcement learning to allocate bit-precision block-by-block, keeping compressed LLMs smart, safe, and helpful all at once.

What Problem Does This Paper Address?

To deploy massive LLMs efficiently without retraining them from scratch, engineers rely on Post-Training Quantization (PTQ)—shrinking high-precision 16-bit weights down to 4-bit integers or lower. Historically, quantization algorithms have optimized almost exclusively for utility: keeping perplexity low and task accuracy high.

However, modern LLMs are also carefully safety-aligned to balance two opposing behaviors: refusing genuinely harmful requests while remaining helpful on safe, edgy-sounding ones. Recent evidence shows this delicate behavioral balance is surprisingly fragile. Small weight perturbations from quantization can break refusal mechanisms—causing jailbreaks or frustrating "over-refusals"—even when standard accuracy benchmarks look completely fine. Existing uniform or utility-driven quantization methods are blind to this failure mode.

Figure 1: Overview of ACQueReLlo. Starting from a safety-aligned LLM, we estimate block-level utility and safety sensitivities to characterize how quantization affects different transformer blocks. ACQueReLlo formulates block-wise bit allocation as a constrained Markov decision process, where an RL policy sequentially assigns mixed-precision under requirements on utility, harmful-prompt refusal, benign-prompt over-refusal, and bit budget. Compared with standard W4A4 quantization, the learned allocation aims to preserve safety behavior after compression by maintaining refusal on harmful prompts while avoiding unnecessary refusal on benign prompts.

Methods

Rather than forcing every transformer block into the same bit-width, ACQueReLlo uses mixed-precision quantization, spending higher bit budgets on sensitive blocks and fewer bits elsewhere to hit a target average (like 4 bits).

Because assigning bits to early blocks shrinks the remaining budget for later ones, the authors frame this sequential puzzle as a Constrained Markov Decision Process (CMDP):

  • Dual Sensitivity Probing (New): Before training, the authors quantize one block at a time to measure how much each block hurts utility (via negative log-likelihood/perplexity) and safety (via a calibrated Template Refusal Margin, or TRM, which measures shifts in refusal likelihood). Both scores are fed into the RL agent's state alongside remaining budget and block depth.
  • Factorized Action Space (New): Instead of choosing arbitrarily from a large list of bit-widths, the policy picks a coarse index plus a local refinement ($\{-1, 0, +1\}$), using action masks to block choices that would blow the bit budget.
  • Worst-Case Reward & Primal-Dual RL: Evaluating full benchmarks at every RL step is intractable, so a fast proxy evaluator scores small sampled batches of utility, harmful, and benign prompts. Rather than a simple weighted sum—where high utility could mask a catastrophic safety failure—the authors use an augmented Tchebycheff reward dominated by the largest single violation. Standard primal-dual actor-critic updates then adjust Lagrangian multipliers to strictly enforce constraints on utility, harmful refusal, benign over-refusal, and bit budget.
Figure 3: Primal-dual training loop of ACQueReLlo. During each CMDP rollout, the policy observes the current block and budget state, selects a bit width, and applies an action mask to remove infeasible choices. The bit map updates the partial allocation and the next state until a complete allocation b is obtained. A proxy evaluator then estimates utility, harmful-prompt refusal, benign-prompt over-refusal, and budget deviation, which define the shaped reward R(b) and constraint costs c(b). The primal update improves the allocation policy, while the dual update adjusts the Lagrangian multipliers to enforce the constraints.

Datasets

No new benchmarks are introduced. For evaluation, the authors test across four model families (LLaMA3.1-8B, LLaMA2-7B, Mistral-7B-v0.1, and Qwen2-7B) using:

  • Utility: Perplexity (PPL) and average zero-shot accuracy across 11 tasks (0-shot11).
  • Safety & Over-refusal: SafetyBench (broad safety knowledge), OR-Bench (excessive refusal on safe prompts), HumanJailbreaks, and held-out harmful/benign prompt pools for refusal rate testing. Small, disjoint proxy batches of utility, harmful, and benign prompts are sampled during RL training.

Key Insights and Ideas

  • "Smart" blocks and "Safe" blocks are largely disjoint: When probing LLaMA2-7B block-by-block, the transformer blocks that spike perplexity when quantized are not the same blocks that destabilize refusal behavior. This explains why utility-only mixed-precision methods fail at safety—they protect the wrong layers!
Figure 2: Single-block sensitivity heatmap on LLaMA2-7B. Each spread point quantizes one trans- former block to the lowest bit width in B while keeping the other blocks in FP16. The horizontal axis measures utility sensitivity by perplexity increase, and the vertical axis reports safety sensitivity by calibrated TRM shift (described later in the paper).
  • Harmful refusal and benign helpfulness pull in opposite directions: Ablating the reward terms shows that optimizing only for harmful-prompt refusal boosts SafetyBench to 56.49, but spikes benign over-refusal (OR-Bench jumps to 0.1824)—turning the model overly paranoid. Optimizing all constraints jointly drops OR-Bench back down to 0.1136 while keeping SafetyBench strong (53.60).
  • Sequential RL beats greedy heuristics: Simply ranking blocks by joint sensitivity and greedily handing out bits yields a LLaMA2-7B perplexity of 10.61 and SafetyBench of 48.97; ACQueReLlo's learned policy reaches 7.04 PPL and 53.66 SafetyBench under the exact same 4-bit budget by accounting for how block choices interact globally.

Key Results

Operating at an average 4-bit weight / 4-bit activation (W4A4) budget, ACQueReLlo consistently achieves the best overall utility-safety balance against strong PTQ baselines (including QuaRot, SpinQuant, OSTQuant, and alignment-aware CAQ):

  • Mistral-7B-v0.1: Achieves 5.51 PPL, 64.27% zero-shot accuracy, and 69.6 on SafetyBench—beating CAQ (7.42 PPL, 62.93% 0-shot, 57.8 SafetyBench) across the board.
  • LLaMA3.1-8B: Tops all quantized baselines in both zero-shot accuracy (66.45%) and SafetyBench (64.0), while slashing uniform W4A4's benign over-refusal rate from 45.66% down to 29.24% (nearly matching FP16's 26.93%).
  • LLaMA2-7B: Reaches the lowest quantized PPL (7.09) and highest SafetyBench (53.6 vs. CAQ's 49.7).
  • Budget Sweep: Testing 3-bit, 4-bit, and 6-bit targets shows W3 is too restrictive (14.68 PPL, 42.40 SafetyBench), whereas W4 recovers nearly all full-precision behavior, making it a sweet spot for deployment.

Limitations and Future Work

While an explicit "Limitations" section is not included in the main text, two concrete trade-offs emerge in the experiments:

  • Model-specific utility trade-offs: On Qwen2-7B, ACQueReLlo achieves the highest SafetyBench score (75.3 vs. OSTQuant's 66.5), but sacrifices zero-shot accuracy (61.24% vs. OSTQuant's 67.01%) and slightly increases perplexity (8.66 vs. 8.18).
  • Sub-4-bit degradation: Pushing average weight precision down to 3 bits (W3A4) still causes steep drops in both perplexity and safety alignment, leaving ultra-low-bit safe compression an open challenge.

Summary updated

Abstract

Post-training quantization is a standard tool for the efficient deployment of large language models (LLMs). In safety-aligned models, it introduces a critical and underexplored risk: preserving utility under compression does not ensure that safety alignment is retained. Small perturbations from quantization can disproportionately degrade refusal to harmful prompts, leading to increased compliance with harmful prompts or over-refusal of benign prompts, even when aggregate performance appears stable. This gap reveals a fundamental limitation of existing quantization approaches, which primarily optimize for utility while overlooking failures due to safety alignment degradation. This paper presents ACQueReLlo, a reinforcement learning framework for mixed-precision post-training quantization. It formulates block-wise bit allocation as a constrained Markov decision process and learns a quantization policy under explicit constraints on utility, harmful prompt refusal, benign prompt over-refusal, and overall bit budget. To ensure tractable training, the policy relies on proxy evaluations over sampled subsets of utility, harmful, and benign prompts. Experiments on various LLMs show that the learned policy achieves a better overall balance between compression, utility, and safety alignment than uniform quantization and other baselines.
BibTeX
@inproceedings{fan2026acquerello,
  author = {Sinuo Fan and Zirui Fu and Marco Donato and Yingjie Lao},
  title = {{ACQueReLlo: Alignment-Aware Constrained Quantization via Reinforcement Learning for Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=9aiPOrUn3v},
}
Figure