A Calibration-Referenced Protocol for Measuring Decision Stability under Reference Bank Compression

Yiwen Chen, Shengming YuarXiv 2026

TL;DR

When you shrink an AI’s memory bank to make it fit onto factory-floor hardware, standard accuracy metrics like AUROC might barely budge—yet individual pass/fail decisions can quietly flip. This paper introduces a four-step measurement protocol to evaluate how memory compression actually alters real-world decisions, using the natural "wobble" of threshold calibration as a reality check.

What Problem Does This Paper Address?

Imagine an automated camera inspecting circuit boards on an assembly line. Many modern anomaly-detection systems (like PatchCore) work by comparing incoming images against a stored "reference bank" of feature vectors from normal, defect-free parts. If a new part looks too distant from this reference bank, its anomaly score crosses an operating threshold, and a robot arm kicks it into the reject bin.

To deploy these systems on edge devices with tight memory limits, engineers compress that reference bank. Usually, we check if compression worked by looking at global ranking metrics like AUROC (Area Under the ROC Curve). Here’s the catch: AUROC averages performance across all possible thresholds, whereas a real factory uses one specific threshold, usually calibrated on a small sample of normal parts.

Compressing the bank shifts both the image scores and the calibrated threshold itself. A compressed model might boast a 0.976 AUROC, yet disagree with the uncompressed system on crucial borderline defects. Worse, how do we know if a 1% decision flip rate is due to bad compression, or just the natural statistical noise of calibrating a threshold on a finite sample?

Example of a circuit board anomaly flipping from 'anomaly' to 'normal' under 1% Product Quantization compression because both scores and thresholds shift.

Methods

Instead of inventing a new compression algorithm, Chen and Yu design a rigorous ruler to measure existing ones fairly. Their calibration-referenced protocol works in four main steps:

Overview of the four-step calibration-referenced measurement protocol.
  1. Match Actual Bytes: Storing 100 compressed vectors doesn't equal the memory of 100 raw vectors once you account for codebooks and file headers. The authors force all candidate methods—subset selection (Prefix, Random, Rebuilt Greedy), Int8 Scalar Quantization (SQ), and budget-matched Product Quantization (PQ, which chops vectors into sub-pieces and maps them to learned centroids)—to compete under strict, serialized inference byte caps (from 0.5% to 25% of the full float32 bank).
  2. Establish a Recalibration Baseline: Holding the uncompressed full bank fixed, they draw 200 random sets of 32 normal images from an independent pool, refitting the operating threshold each time (targeting 1% or 5% false-positive rates, $\alpha$). Measuring how often decisions flip across these 200 runs establishes the system's natural "calibration wobble."
  3. Apply Two Benchmarks: They take the median (typical wobble) and 97.5th percentile (upper-bound wobble) of that recalibration distribution. If a compressed bank’s disagreement with the full bank stays below these marks, its compression noise is effectively no worse than routine recalibration noise.
  4. Stratify by Threshold Distance: They group test images into quintiles based on how close their full-bank scores sit to the decision boundary, separating normal parts from actual defects.

Datasets

The authors evaluate the protocol across three public industrial inspection benchmarks (no new datasets are introduced, though images are carefully partitioned into bank-fitting, probe, calibration-pool, normal-holdout, and test roles):

  • VisA (12 categories) and MVTec AD (13 categories): Tested using WideResNet-50 and ResNet-18 backbones. Notably, standard high-shot setups in these datasets contain ~9–11% contaminated/injected defect entries in their historical lists, so the authors also build "clean bank" variants to verify their findings.
  • MPDD (6 categories): A metal-part defect dataset using purely normal training images.

Key Insights and Ideas

  • AUROC is a soothing liar at the decision boundary: Across configurations at a 10% byte budget, PQ and Int8 SQ have virtually identical image-level AUROC (e.g., 0.9111 vs. 0.9117 on VisA), yet they make noticeably different pass/fail calls at the operating threshold.
  • Normal holdouts give a false sense of security: Engineers often validate compressed models using a holdout set of normal parts (since defects are rare). The authors show near-zero correlation ($\rho = -0.090$) between normal-holdout agreement and whole-test agreement. In one MVTec metal_nut test, normal-holdout agreement was a pristine 100%, while 65% (71/109) of test-set decisions flipped!
  • Geometry explains the storage trade-off: Which compression wins depends on the byte tier. At a 10% budget, PQ encodes every row coarsely, preserving global coverage of the feature cloud, whereas Int8 SQ has to drop ~60% of the bank's rows to fit—giving PQ the edge. At a 25% budget, Int8 SQ can retain nearly all rows with high coordinate precision, overtaking PQ.

Key Results

  • The 10% Sweet Spot vs. Other Tiers: With WideResNet-50 at the 10% budget, budget-matched PQ achieved the lowest decision disagreement on VisA (0.30% at $\alpha=1\%$) and MVTec AD (1.40% at $\alpha=1\%$), while losing only 0.0003 to 0.0037 in AUROC across configurations. However, Int8 SQ beat PQ across all 16 comparisons at the other four budget tiers (0.5%, 1%, 5%, and 25%), reaching $\le 0.046\%$ disagreement at 25%.
  • Benchmark Attainment: At the 10% tier ($\alpha=1\%$), PQ stayed within the typical calibration median in 35/36 VisA cells and 34/39 MVTec AD cells, and met the 97.5% upper benchmark in 100% of cells on both datasets.
  • Borderline Fragility: On VisA at a tight 1% budget ($\alpha=1\%$), decision flips hit 28.12% among anomalies closest to the threshold, compared to just 1.30% across the normal holdout.
  • Robustness: The 10% PQ advantage over subset methods held steady when swapping to ResNet-18, cleaning out contaminated bank images, and restricting VisA probes to normal directories.

Limitations and Future Work

  • Data-starved categories: MPDD’s metal_plate class has only 54 normal training images, restricting independent-pool calibration. Deploying this protocol in low-volume manufacturing would require collecting a separate, verified pool of normal production images.
  • Scope of representations: Validation was confined to PatchCore-style embeddings using WideResNet-50 and ResNet-18 on three datasets. Applying the protocol to other architectures or distance metrics requires re-measuring serialized bytes and re-running calibration baselines from scratch.
  • Macro vs. local behavior: Category-averaged summaries describe general trends, but because individual product lines behave differently near the threshold, factory deployment reviews still require inspecting per-category and borderline-defect results directly.

Summary updated

BibTeX
@misc{chen2026calibration,
  author = {Yiwen Chen and Shengming Yu},
  title = {{A Calibration-Referenced Protocol for Measuring Decision Stability under Reference Bank Compression}},
  year = {2026},
  eprint = {2611.34134},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34134},
}
Figure