Abstract
Referring Image Segmentation (RIS) is a critical task for interactive robotics, requiring models to segment objects based on natural language descriptions. However, the high computational cost of these multi-modal models hinders deployment on edge devices. We present PTQ4RIS, the first post-training quantization framework specifically tailored for RIS. By addressing the unique activation distributions of vision-language models through specialized quantization strategies, PTQ4RIS enables efficient 4-bit execution with minimal accuracy loss, requiring only a small set of unlabeled calibration data.
Introduction: The Challenge of Quantizing Multi-Modal Models
Referring Image Segmentation (RIS) involves identifying and masking objects in an image based on complex natural language queries (e.g., "the red cup on the kitchen counter"). While state-of-the-art RIS models achieve impressive accuracy, they often rely on heavy architectures with hundreds of millions of parameters, making them unsuitable for resource-constrained edge devices like mobile robots.
Model quantization—the process of converting 32-bit floating-point weights and activations to lower-precision integers (e.g., 8-bit or 4-bit)—is a standard compression technique. However, standard quantization methods fail significantly when applied to RIS. As shown in Figure 1, existing methods like RTN or PTQ4ViT see their performance collapse as bit-width decreases to 4-bit. This failure stems from the "hybrid" nature of RIS models; the interaction between visual and linguistic modalities produces non-normal data distributions and extreme outliers that standard techniques cannot accommodate.
Methodology: Specialized Quantization for Vision and Language
PTQ4RIS introduces two primary innovations to handle the sensitive layers of RIS models without requiring the expensive retraining associated with Quantization-Aware Training (QAT).
1. Dual-Region Quantization (DRQ) for Visual Encoders
Visual encoders in RIS models often utilize Softmax and GeLU activation functions, which produce distributions where most values are clustered near zero while a few critical values are near one. Standard quantization uses a single scale that "crushes" these high-value correlations. DRQ splits activations into two distinct regions, applying different scales to each to preserve the high-value features essential for self-attention and cross-modal alignment.
2. Reorder-based Outlier-Retained Quantization (RORQ) for Text Encoders
Linguistic features are prone to extreme outliers that carry vital semantic information. Rather than clipping these outliers, RORQ uses a $3\sigma$ threshold to identify them iteratively. These outliers are grouped and quantized separately, ensuring that the semantic integrity of the text description is maintained throughout the network.
3. Hessian-guided Metric
To determine optimal quantization scales, the framework employs a Hessian-based approach. This measures the sensitivity of each layer, ensuring that quantization errors in critical layers are minimized to protect the final segmentation output.
Experimental Results
We evaluated PTQ4RIS on three standard benchmarks: RefCOCO, RefCOCO+, and G-Ref, using the LAVT model as our baseline. The framework was calibrated using only 32 unlabeled image samples.
Performance at 4-bit Precision
As detailed in Table 1, PTQ4RIS significantly outperforms existing post-training quantization methods, particularly at the challenging W4A4 (4-bit weight and activation) level. For instance, on the RefCOCO+ testB set, while RepQ-ViT drops to 18.00 MIoU, PTQ4RIS maintains a robust 54.29 MIoU.
Key Insights
- 8-bit Near-Lossless: At W8A8, PTQ4RIS achieves performance nearly identical to the full-precision (FP32) model.
- Outliers as Features: The success of RORQ confirms that in text encoding, outliers are not noise but high-importance features representing specific syntactic structures.
- Cross-Modal Sensitivity: The "tails" of distributions in Softmax/GeLU layers are the "guiding signals" for alignment. Preserving these via DRQ is the key to preventing model collapse at 4-bit.
Conclusion and Future Work
PTQ4RIS demonstrates that high-quality Referring Image Segmentation is feasible on edge hardware through intelligent post-training quantization. By specifically addressing the distributional challenges of multi-modal architectures, we achieve state-of-the-art results at 4-bit precision. Future research will explore even lower bit-widths (2-bit or binary) and measure real-world latency gains on specific robotic hardware platforms.
Summary updated