Efficiently deploying modern computer vision models on edge hardware often requires quantization—reducing the precision of weights and activations to save memory and power. While Microscaling (MX) formats are emerging as a hardware-friendly standard for this, they have historically caused significant accuracy drops in vision models.
VisionMX is a new post-training quantization (PTQ) framework that bridges this gap, making 4-bit MX formats a viable reality for everything from classification to low-light image enhancement.
TL;DR
VisionMX is a specialized post-training quantization pipeline that enables high-accuracy 4-bit inference for vision models using Microscaling (MX) formats. By introducing a flexible weight-rounding scheme called RangeRound and a foldable Activation Affine Correction (AAC), it recovers massive accuracy losses in sensitive architectures like MobileNetV2 and EfficientViT.
What Problem Does This Paper Address?
Microscaling (MX) formats, recently standardized by the Open Compute Project (OCP), use a shared scale factor for small blocks of elements (e.g., 32 values). While this is efficient for hardware, vision models—particularly compact convolutional neural networks (CNNs)—are notoriously sensitive to this type of quantization.
The authors identify three primary "pain points" that cause standard quantization methods to fail:
- Block-scale representation errors: The way scales are chosen for small blocks can be sub-optimal.
- Non-uniform grid alignment: 4-bit floating-point (FP4) grids are non-uniform. Standard "round-to-nearest" (RTN) logic often picks values that minimize local error but increase overall task loss.
- Wasted representational capacity: Activations following a ReLU are non-negative, meaning they never use the negative half of the signed quantization grid, effectively wasting one full bit of information.
Methods
VisionMX introduces two primary technical adaptations to standard PTQ pipelines:
- RangeRound: Traditional adaptive rounding (like AdaRound) only allows a weight to choose between its two nearest quantization levels. Because MX formats use non-uniform grids, the optimal value might actually be further away. RangeRound relaxes this constraint, allowing weights to be optimized over a wider local window of representable levels.
- Activation Affine Correction (AAC): To solve the "wasted capacity" problem, AAC applies a learnable shift and scale to activations before they are quantized. This centers the data on the signed grid, utilizing all available codes. Crucially, this transformation is "folded" into the weights and biases of the following layer, meaning it adds zero computational overhead during inference.
The framework is evaluated in two flavors: VisionMX-LW (Layer-wise reconstruction) and VisionMX-BW (Block-wise reconstruction, which accounts for cross-layer interactions).
Datasets
The authors benchmarked VisionMX across a diverse set of tasks and datasets:
- ImageNet-1K: For image classification across various architectures (CNNs, Transformers, and Hybrids).
- COCO: For dense prediction tasks, including object detection (Faster R-CNN, RetinaNet, FCOS) and semantic segmentation (DeepLabV3).
- LOLv2-Real: For low-light image enhancement, testing the limits of the method on image restoration tasks.
Key Insights and Ideas
- Architecture Sensitivity is Non-Uniform: Transformers (like DeiT and Swin) are relatively robust to MX quantization. However, compact CNNs (MobileNetV2) and certain hybrid models (EfficientViT) suffer catastrophic failure with direct conversion, sometimes dropping to near-zero accuracy.
-
The "Nearest" Isn't Always Best: In non-uniform FP4 grids, a value that is slightly further away from the floating-point original can sometimes result in a lower reconstruction error for the entire layer output. Figure 1(b) illustrates how RangeRound finds a better optimum (C) outside the standard rounding set (B).
-
Unlocking the Signed Grid: Without AAC, ReLU-based models leave half their quantization codes unused. Figure 1(c) in the paper highlights how AAC redistributes the data to utilize the full range of the FP4 format.
Key Results
VisionMX demonstrates state-of-the-art performance for 4-bit MX quantization:
- MobileNetV2 Recovery: On ImageNet, direct 4-bit conversion (RTN) results in a useless 0.4% accuracy. VisionMX-BW recovers this to 65.48%.
- EfficientViT-L2: Recovers from 0.1% accuracy (RTN) to 81.58%, nearing the floating-point baseline of 85.06%.
- Dense Prediction: On COCO object detection, VisionMX improves Faster R-CNN performance by roughly 9 AP over direct conversion.
- Format Flexibility: The method proves effective across different MX-style formats, including OCP’s MXFP4 and NVIDIA’s NVFP4.
Limitations and Future Work
- Calibration Data: Like all PTQ methods, VisionMX requires a small set of unlabeled calibration data (e.g., 2,048 images for ImageNet).
- Optimization Time: The adaptive rounding process requires iterative optimization (10k-20k steps), which is slower than simple direct conversion, though still much faster than full model retraining (QAT).
- Ultra-low bit-widths: While 4-bit performance is strong, the authors note that even lower bit-widths (e.g., 2-bit) remain a significant challenge that may require further innovation in distribution modeling.
Summary updated