When W4A4 Breaks Camouflaged Object Detection: Token-Group Dual-Constraint Activation Quantization

Tianqi Li, Wenyu Fang, Xin He, Xue Geng, Xu Cheng, Yun Liu · 2026

Read When W4A4 Breaks Camouflaged Object Detection: Token-Group Dual-Constraint Activation Quantization by Tianqi Li, Wenyu Fang, Xin He, Xue Geng, Xu Cheng, Yun Liu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-16855.txt.

Introduction

Li and colleagues study post-training W4A4 quantization of camouflaged object detection. Predictions rest on subtle texture and boundary cues, and background tokens dominate a shared activation range. That domination inflates the step size and pushes weak boundary cues into the zero bin. COD-TDQ answers with two steps: token-group scales suppressing cross-token domination, and range projection bounding step ratio and zero-bin mass. Across four benchmarks and two baselines, COD-TDQ scores more than zero point one two higher than the leading quantization method without retraining.

Catalog record

CREATORTianqi Li, Wenyu Fang, Xin He, Xue Geng, Xu Cheng, Yun Liu
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE76467
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.16855

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

When W4A4 Breaks Camouflaged Object Detection: Token-Group Dual-Constraint Activation Quantization Tianqi Li, Wenyu Fang, Xin He, Xue Geng, Xu Cheng, Yun Liu Abstract Camouflaged object detection (COD) segments objects that intentionally blend with the background, so predictions depend on subtle texture and boundary cues. COD is often needed under tight on-device memory and latency budgets, making low-bit inference highly desirable. However, COD is unusually hard to quantify aggressively. We study post-training W4A4 quantization of Transformer-based COD and find a task-specific cliff: heavy-tailed background tokens dominate a shared activation range, inflating the step size and pushing weak-but-structured boundary cues into the zero bin. This exposes a token-local bottleneck—remove cross-token range domination and bound the zero-bin mass under 4-bit activations. To address this, we introduce COD-TDQ , a COD -aware T oken-group D ual-constraint activation Q uantization method. COD-TDQ addresses this token-local bottleneck with two coupled steps: D irect- S um T oken- G roup ( DSTG ) assigns token-group scales to suppress cross-token range domination, and D ual- C onstraint R ange P rojection ( DCRP ) projects each token-group clip range to keep the step-to-dispersion ratio and the zero-bin mass bounded. Across four COD benchmarks and two baseline models (CFRN and ESCNet), COD-TDQ consistently achieves an S α S_{\alpha} score more than 0.12 higher than that of the state-of-the-art quantization method without retraining. The code will be released. 1 Introduction Camouflaged object detection (COD) is typically evaluated as binary mask prediction for objects that intentionally blend into the background. COD models must rely on subtle texture and boundary cues, so useful evidence often appears as small-amplitude yet structured responses [ 35 ] . As Transformer [ 38 ] encoders and multi-stage designs become common [ 46 , 17 , 49 , 3 ] , COD models have witnessed significant development [ 28 , 6 , 16 , 50 , 20 , 31 , 32 ] . However, with this growth, COD models are becoming more complex, increasing deployment memory and latency costs [ 36 , 37 , 19 , 44 , 4 ] . At the same time, COD is increasingly expected to operate under strict memory and latency constraints [ 40 , 33 , 10 ] , especially for applications on mobile and edge devices. In this context, it becomes desirable to reduce the computational and storage costs of models during deployment. One practical solution is to apply post-training quantization (PTQ), which can effectively reduce memory usage and activation cost without requiring retraining [ 2 ] . In practice, INT8 PTQ is often the default choice [ 8 , 43 ] . Nevertheless, when deployment budgets are extremely limited, the gains from INT8 can be modest, and further reductions require moving to ultra-low-bit regimes. This motivates exploring ultra-low-bit PTQ for COD while maintaining accuracy. In particular, 4-bit weights and 4-bit activations (W4A4) reduce deployment cost under a standard protocol [ 30 , 2 ] without changing the training or inference pipeline. However, we find that naive W4A4 on Transformer-based COD can collapse rather than degrade smoothly. This raises a key question: what makes COD fragile at 4-bit activations, and how can we make W4A4 reliable without retraining or hardware-specific assumptions? Transformer PTQ has advanced rapidly, but most pipelines still fall into a few recurring designs: (i) block-wise reconstruction and rounding to match FP32 outputs on calibration data [ 47 , 18 , 41 ] , (ii) range re-parameterization and smoothing to mitigate heavy-tailed activations [ 42 ] , and (iii) finer granularity via grouping or adaptive scales [ 26 ] . These strategies are largely layer or block-centric and optimize average fidelity. In COD at W4A4, the dominant failure is token-local: token-wise activation heterogeneity lets background tokens dominate the range and increase the zero-bin mass, which layer-wise fitting or reconstruction does not explicitly bound. Figure 1 : COD-specific W4A4 failure. Naive W4A4 inflates a shared clipping range, producing a coarse step size and high zero-bin mass that erases weak boundary evidence. The inset summarizes representative diagnostics (c_{g},\Delta,\rho_{0}) and the associated S_{\alpha} collapse/recovery on CFRN/NC4K (rounded to three decimals). We trace the W4A4 cliff to a coupled collapse mechanism of range domination and zero-bin mass ( Fig. 1 ). Background tokens with heavy-tailed activation spikes can dominate a shared clipping range, inflating the step size \Delta and coarsening quantization for most tokens ( Fig. 1 ). Under rounding-to-nearest, weak yet structured boundary responses fall into the zero bin, yielding a high \rho_{0}=\mathbb{P}(|x_{\text{boundary}}|\leq\Delta/2) . Once zeroed, subsequent attention mixing cannot recover the missing signed evidence. The collapse is activation-dominated (W4A8 stays close to FP32 while W4A4 fails on CFRN [ 34 ] , as shown in Table 1 ), suggesting that COD needs token-local range control that explicitly bounds both the resolution ratio \eta=\Delta/\sigma and the zero-bin mass \rho_{0} ( Fig. 3 ). Based on diagnosis, we propose COD-TDQ , a COD-aware dynamic activation quantization framework for W4A4 Transformer-based COD. COD-TDQ remains purely PTQ (no retraining) and is hardware-agnostic. It combines Direct-Sum Token-Group ( DSTG ) to assign token-group activation scales and remove cross-token range domination , and Dual-Constraint Range Projection ( DCRP ) to project each token-group range so that the step ratio \eta and the zero-bin mass \rho_{0} stay in a stable regime. Across four COD benchmarks and two Transformer COD models (CFRN and ESCNet [ 45 ] ), we perform comprehensive and extensive evaluations of COD-TDQ. The results consistently show that COD-TDQ significantly surpasses representative PTQ baselines under the same W4A4 quantization protocol, delivering over 0.12–0.14 improvements in S_{\alpha} compared with the state-of-the-art quantization approach without retraining. Our contributions can be summarized as follows: • We provide a mechanism-driven diagnosis of COD-specific W4A4 collapse, centered on range domination and zero-bin mass collapse, with diagnostic metrics of \Delta , \eta and \rho_{0} , respectively. • We propose COD-TDQ , which stabilizes W4A4 activation ranges via (i) Direct-Sum Token-Group scaling (DSTG) to suppress range domination , and (ii) Dual-Constraint Range Projection (DCRP), which enforces step-to-dispersion and zero-bin-mass constraints to bound \eta and \rho_{0} . • We establish a unified W4A4 PTQ benchmark for COD across four datasets and provide diagnostic metrics (i.e., \Delta , \eta , \rho_{0} ) that explain baseline failures, facilitating future research on COD quantization. 2 Related Work PTQ for Transformers and Segmentation Models. We focus on W4A4 PTQ for Transformer-based COD and relate our work to recent advances in Transformer PTQ. PTQ aims to convert pretrained networks to low precision without retraining, typically combining weight quantization with activation range selection using a calibration set and local reconstruction. For vision transformers(ViT) [ 5 ] , PTQ4ViT [ 47 ] exemplifies block-level calibration and reconstruction to make projections quantizable. Subsequent methods such as RepQ-ViT [ 18 ] and FIMA-Q [ 41 ] further reduce the quantization-induced representation drift by improving feature fidelity. Optimization-based rounding (AdaRound [ 27 ] ), block reconstruction with scheduling (BRECQ [ 9 ] ), and calibration regularization (QDrop [ 39 ] )which minimize reconstruction error around the calibration distribution. PQ-SAM [ 21 ] and PTQ4SAM [ 23 ] study PTQ strategies tailored to the Segment Anything Model (SAM), emphasizing sensitive pathways in attention and normalization and the interaction between prompt encoders and mask decoders.

Read the complete text