Papers
Topics
Authors
Recent
Search
2000 character limit reached

Selective Coupling of Decoupled Informative Regions: Masked Attention Alignment for Data-Free Quantization of Vision Transformers

Published 3 Jun 2026 in cs.CV and cs.AI | (2606.04373v1)

Abstract: Data-Free Quantization (DFQ) addresses data security concerns by synthesizing samples, without accessing real data. It has garnered increasing attention in the context of Vision Transformers (ViTs), owing to the superiority of the self-attention mechanism compared to classical convolutional operation. However, previous DFQ arts for ViTs often suffer from a distribution mismatch between synthetic samples and input distribution expected by quantized models Q, resulting in the suboptimal performance. In this paper, we propose a novel Masked Attention Alignment approach for Data-Free Quantization of ViTs, named MaskAQ, revealing that: 1) the semantics in the self-attention mechanism is predominantly localized to a sparse subset of patches, called informative regions; 2) the informative regions dominate the mutual information between synthetic samples and Q's outputs. To these ends, we incorporate differential entropy maximum over patch similarity of synthetic samples, to decouple informative regions from noisy background. To couple with varied Q, the informative regions are selected to align full-precision models with Q via a masked attention alignment objective, thus yielding high-quality synthetic samples. Furthermore, a periodic sample refreshing strategy comes up to endow MaskAQ with the capacity to continually adapt to the evolving state of Q throughout the training process, to preserve desirable mutual information with synthetic samples. Extensive experiments verify the merits of MaskAQ over state-of-the-art approaches across multiple backbones and downstream tasks. Our code is available at https://github.com/hfutqian/MaskAQ.

Authors (4)

Summary

  • The paper introduces MaskAQ, a data-free quantization method that decouples informative image regions, aligns full- and low-precision attention, and refreshes synthetic samples during calibration.
  • MaskAQ consistently outperforms prior methods on ImageNet, including a 3.10-point Top-1 gain at 3-bit DeiT-T quantization and improvements on COCO detection and ADE20K segmentation.
  • The method shows that focusing calibration on discriminative patches is more effective than matching the full data distribution, although iterative synthesis adds overhead and results below 3 bits remain untested.

Motivation and problem setting

Data-Free Quantization (DFQ) synthesizes calibration samples from a pre-trained full-precision model PP without accessing original training data, addressing privacy constraints in domains such as healthcare. While DFQ for CNNs benefits from Batch Normalization statistics as a distributional prior, Vision Transformers (ViTs) rely on Layer Normalization and self-attention, so this prior is unavailable and naive migration of CNN-era DFQ methods degrades sharply, particularly at ultra-low bit widths (2606.04373).

The paper identifies two failure modes of existing ViT-DFQ sample synthesis methods such as PSAQ-ViT, CLAMP-ViT, and MimiQ:

  • Semantic dispersion: synthetic semantics are spread across the entire image rather than concentrated in a coherent object structure, diluting the supervision signal for calibrating the quantized model QQ.
  • Attentional disparity: synthetic samples lack discriminative regions that low-precision QQ can reliably recognize, so QQ cannot align its attention with PP, which is especially damaging under aggressive quantization.

The central reframing is an information bottleneck (IB) perspective: rather than approximating the real data distribution, synthesis should preserve the mutual information between synthetic samples and QQ's outputs subject to a precision-dependent information budget CC, i.e., maxโกI(zq;y)\max I(z_q; y) subject to I(x;zq)โ‰คCI(x; z_q) \le C. Under this budget, representational capacity should be allocated to the most informative patches.

Method

MaskAQ comprises three components: informative region decoupling, masked attention coupling, and periodic sample refreshing.

Informative region decoupling. An Informative Region (IR) is defined as the set of patches whose attention weights in PP exceed the QQ0-th largest attention value. To decouple IRs from noisy background, the method maximizes the differential entropy of pairwise cosine similarities between attention vectors at each layer. Since histogram-based Shannon entropy estimates are binning-sensitive, the similarity distribution is approximated as Gaussian, giving the tractable surrogate

QQ1

where QQ2 is the empirical variance of off-diagonal attention similarities. Maximizing this entropy discourages collapsed, degenerate attention patterns and promotes structural coherence in synthesized images.

Masked attention coupling. A stricter binary mask selects a subset of informative patches (with the threshold QQ3 annealed from 50% to 10% of patches over training), followed by stochastic dropout (QQ4) to avoid overfitting to a fixed patch set. The alignment objective penalizes the QQ5 discrepancy between attention maps of QQ6 and QQ7 restricted to masked regions, normalized by mask cardinality:

QQ8

Restricting alignment to informative regions avoids over-regularizing background patches whose quantized attention is inherently distorted. The full synthesis loss combines one-hot classification, total variation, inter-head attention similarity priors, plus QQ9 and QQ0 with weights QQ1 and QQ2.

Masked calibration and periodic refreshing. Calibration of QQ3 uses a weighted head-output matching loss that upweights informative-region tokens (weight factor QQ4). Because QQ5 evolves during calibration, synthetic samples are periodically re-synthesized via the full objective at fixed intervals, maintaining mutual information with the current state of QQ6.

Theoretical analysis

Two theorems formalize the IB argument using entropy continuity bounds on total variation distances. Theorem 1 shows that if the joint distributions of QQ7 and conditional distributions QQ8 are within TV distance QQ9 of their QQ0 counterparts, then the gap in predictive mutual information QQ1 is bounded by a quantity vanishing as QQ2. Theorem 2 extends this to synthetic samples: if the synthetic informative region QQ3 matches the real informative region's label informativeness within QQ4, and analogous TV conditions hold, then QQ5.

The two losses map directly onto these conditions: QQ6 targets the region-label informativeness gap QQ7, while QQ8 targets the TV alignment conditions. It should be noted that these are sufficient-condition results under discrete-alphabet assumptions; they do not quantify how tightly the practical objectives satisfy the stated TV bounds during optimization.

Empirical results

On ImageNet classification across ViT-T/B, DeiT-T/S/B, and Swin-T, MaskAQ consistently outperforms CNN-oriented baselines (GDFQ, Qimera, AdaDFQ), ViT-specific methods (PSAQ-ViT V2, CLAMP-ViT), generative-data GenQ, and MimiQ. Representative results:

Setting Backbone Best prior art MaskAQ
4w4a ViT-B 67.50 (GenQ) 70.53
4w4a DeiT-B 74.10 (MimiQ) 74.41
5w5a DeiT-S 72.59 (MimiQ) 73.18
3w3a DeiT-T 19.55 (MimiQ) 22.65
3w3a Swin-T 42.90 (MimiQ) 44.98

The largest reported gain is up to 3.10% Top-1 accuracy at 3-bit on DeiT-T, and up to 7.62% over MimiQ overall; gains over PSAQ-ViT variants reach at least 18.91% at 4w4a. Notably, most competing methods collapse to near-random accuracy at 3w3a, so only reproduced MimiQ numbers are reported there โ€” meaning the ultra-low-bit comparison rests on a single baseline. On downstream tasks with Swin-T, MaskAQ improves over MimiQ by up to 0.92 AP on COCO detection and 1.24 mIoU on ADE20K segmentation at 4w4a.

Ablations confirm each component contributes: removing QQ9 causes the largest degradation (1.57โ€“2.05%), followed by PP0 (DeiT-T 3w3a drops from 22.65% to 20.97%), periodic refreshing (0.79โ€“1.22%), and unmasked calibration (smallest effect). Hyperparameter sweeps identify optima at PP1 and PP2. Visualizations show MaskAQ's synthetic samples exhibit more coherent structure and larger attended object regions, with improved PP3โ€“PP4 attention alignment.

Limitations and open questions

The authors acknowledge that MaskAQ depends on iterative image synthesis, incurring nontrivial generation overhead relative to single-pass alternatives, and that applicability to more aggressive quantization settings (below 3 bits) remains unexplored. Additional caveats bear on the interpretation of results: the theoretical guarantees assume discrete alphabets and TV closeness conditions that are not verified empirically; the 3-bit comparison lacks most baselines due to instability; and the Gaussian approximation to attention-similarity distributions, while empirically stabilizing, is an approximation whose validity across architectures is not characterized. Whether the informative-region selection transfers reliably to domain-shifted or fine-grained settings where attention may be diffuse is left open.

Conclusion

MaskAQ reformulates data-free sample synthesis for ViTs around preserving calibration-relevant mutual information rather than mimicking real data. By decoupling sparse informative regions via differential entropy maximization, coupling them to the evolving quantized model through masked attention alignment, and periodically refreshing samples, it achieves consistent state-of-the-art results across backbones, tasks, and bit widths, with its clearest advantage at ultra-low precision where distribution mismatch between synthetic samples and PP5's expected inputs is most severe.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.