NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

When Bits Break Recourse: Counterfactual-Faithful Quantization

Chaymae Yahyati, Ismail Lamaakal, Khalid El Makkaoui, Ibrahim OuahbiarXiv 2026

TL;DR

Model quantization reduces deployment costs by compressing neural networks, but it can silently shift local decision boundaries and invalidate "algorithmic recourse"—the actionable recommendations given to users to overturn unfavorable automated decisions. This paper introduces Counterfactual-Faithful Quantization (CFQ), a method that optimizes quantizer parameters and mixed-precision bit allocation to ensure compressed models preserve both global predictive accuracy and local recourse stability.

What Problem Does This Paper Address?

When a machine learning model denies a user a loan or a job interview, systems often provide algorithmic recourse: actionable instructions on what the user can change to get a positive outcome (e.g., "increase your savings by \$5,000").

To deploy these models efficiently on servers or edge devices, engineers routinely use quantization, compressing the model's weights and activations from 32-bit floating-point numbers down to low-bit integers (like 4-bit or 8-bit). Traditionally, quantization success is judged purely by whether the compressed model preserves global predictive accuracy.

However, the authors identify a critical deployment mismatch: two models can have identical test accuracy but wildly different local decision boundaries. Quantization perturbs weights in a structured but non-uniform way, which can rotate decision boundaries precisely in the local neighborhoods where recourse is calculated. As a result, a recourse recommendation that worked perfectly during model development can completely fail once the model is quantized and deployed.

Quantization can shift local decision boundaries, causing a previously valid recourse action ($\delta^*_f$) to fail on the quantized model ($f_q$).

Methods

The authors formalize this failure mode by introducing two new evaluation metrics:

  1. Validity Drop (VD): The fraction of full-precision recourse actions that no longer achieve the target outcome after quantization.
  2. Counterfactual Recourse Gap (CRG): The relative increase in the minimal cost or effort required by a user to achieve recourse under the quantized model.

To mitigate these issues, they propose Counterfactual-Faithful Quantization (CFQ), a quantization-aware training (QAT) pipeline:

  • Teacher-Guided Supervision: CFQ uses the original full-precision model as a "teacher" to generate approximate recourse actions ($\delta_{fp}$) using a small number ($K$) of projected gradient descent (PGD) steps.
  • Joint Optimization Objective: The quantized model is trained using a loss function that combines standard task accuracy with a counterfactual validity loss (which explicitly penalizes the quantized model if it fails to flip the prediction at the teacher's recourse points) and a bit-budget penalty.
  • Differentiable Mixed-Precision: Instead of assigning the same bitwidth to every layer, CFQ uses a Gumbel-Softmax relaxation to automatically learn a mixed-precision policy. This allows the network to allocate higher precision to layers that heavily influence local decision boundaries while aggressively compressing less critical layers.
Figure 1: CFQ pipeline. A teacher recourse action δfp is computed on the full-precision model using a small number of projected gradient steps and is treated as a constant via stop- gradient. The quantized model fq is trained to preserve task accuracy and to keep x+δfp a valid counterfactual under quan- tization, while mixed-precision bit allocation and quantizer parameters are optimized under a bit budget. We do not claim a new recourse solver or a new quantizer; we introduce a de- ployment objective that makes recourse validity and recourse cost explicit constraints of quantization.

The authors also introduce CF-PTQ, a training-free post-training quantization variant that simply calibrates standard quantizer scales using an augmented calibration set containing both factual and counterfactual points.

Datasets

The method was evaluated across two distinct domains:

  • Tabular Benchmarks: Standard algorithmic recourse and fairness datasets, including ADULT (Census Income), GERMAN CREDIT, and COMPAS (Recidivism risk).
  • Non-Tabular Image Benchmarks: To prove generalization to high-dimensional spaces, they evaluated on MNIST-RECOURSE, FASHION-MNIST-RECOURSE, and CELEBA-ATTRIBUTES, where recourse actions are defined within structured latent or semantic edit spaces rather than raw pixels.

Key Insights and Ideas

  • Accuracy $\neq$ Recourse Preservation: Standard accuracy-centric quantization baselines routinely maintain baseline accuracy while causing massive recourse failures (Validity Drops up to 18%). This proves that global metrics hide local geometric distortions.
  • Coarse Supervision Suffices: CFQ does not require an expensive, perfectly optimized recourse solver during training. Surprisingly, a rough, low-cost approximation (even just $K=1$ or $K=3$ gradient steps) provides a highly effective supervision signal.
  • Heterogeneous Layer Sensitivity: Not all layers impact recourse equally. The authors show that counterfactual sensitivity is highly concentrated in specific layers, justifying the use of mixed-precision bit allocation over uniform quantization.
  • The Safe-Margin Guarantee: The authors mathematically prove that a full-precision recourse action is guaranteed to transfer to a quantized model if the full-precision classification margin at the counterfactual point is greater than twice the quantization-induced logit perturbation.

Key Results

  • Recourse Stabilization: On the ADULT dataset, standard mixed-precision quantization yielded a Validity Drop of 12.1% and a Recourse Gap of 16.2%. CFQ slashed these numbers to 6.1% (VD) and 7.1% (CRG) while matching the baseline accuracy and bit budget.
  • Consistency Across Budgets: Across all tested datasets and compression levels, CFQ consistently halved the Validity Drop compared to strong baselines, with the most pronounced gains occurring at aggressive, low-bitwidth compression levels.
  • PTQ Efficiency: The training-free CF-PTQ variant recovered a large fraction of full QAT benefits, offering a practical, low-overhead alternative for large-scale models where full retraining is impossible.

Limitations and Future Work

  • Causal Alignment: CFQ ensures that the quantized model remains faithful to the full-precision model's recommendations, but it cannot guarantee that the recourse actions are causally effective in the real world if the original model constraints were poorly designed.
  • Compute Overhead: Generating teacher recourse actions adds a training-time overhead (ranging from 15% to 42% depending on the number of PGD steps $K$).
  • Future Directions: The authors suggest combining CFQ with robust recourse frameworks that hedge against post-deployment model updates, exploring neighborhood-level distributional supervision, and designing group-aware objectives to minimize worst-case recourse disparities among demographic subgroups.

Summary updated

BibTeX
@misc{yahyati2026when,
  author = {Chaymae Yahyati and Ismail Lamaakal and Khalid El Makkaoui and Ibrahim Ouahbi},
  title = {{When Bits Break Recourse: Counterfactual-Faithful Quantization}},
  year = {2026},
  eprint = {2605.17160},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.17160},
}
Figure