Patch Similarity Aware Data-Free Quantization for Vision Transformers

要約

ビジョン変換器は近年、様々なコンピュータビジョンタスクで大きな成功を収めている。それにもかかわらず、その高いモデル複雑性により、リソースに制約のあるデバイスに展開することが困難である。量子化はモデルの複雑性を軽減する効果的なアプローチであり、モデル展開時のデータプライバシーとセキュリティの懸念に対処できるデータフリー量子化は、広く関心を集めている。残念ながら、BN正則化などの既存の手法は全て畳み込みニューラルネットワーク用に設計されており、モデルアーキテクチャが大きく異なるビジョン変換器には適用できない。本論文では、量子化パラメータを較正するために、ビジョントランスフォーマー固有の特性に基づく「現実的な」サンプルの生成を可能にする、ビジョントランスフォーマーのためのパッチ類似度アウェアデータフリー量子化フレームワーク、PSAQ-ViTを提案する。具体的には、自己アテンションモジュールの特性を解析し、ガウスノイズと実画像の処理における一般的な違い(パッチの類似性)を明らかにする。これらの知見から、ガウスノイズを実画像に近似させるための相対値メトリックを設計し、それを量子化パラメータの較正に利用することができます。PSAQ-ViTの有効性を検証するために、様々なベンチマークに対して広範な実験とアブレーションスタディを行い、実データ駆動型手法よりも優れた性能を発揮することができます。コードは、https://github.com/zkkli/PSAQ-ViT で入手できます。

要約(オリジナル)

Vision transformers have recently gained great success on various computer vision tasks; nevertheless, their high model complexity makes it challenging to deploy on resource-constrained devices. Quantization is an effective approach to reduce model complexity, and data-free quantization, which can address data privacy and security concerns during model deployment, has received widespread interest. Unfortunately, all existing methods, such as BN regularization, were designed for convolutional neural networks and cannot be applied to vision transformers with significantly different model architectures. In this paper, we propose PSAQ-ViT, a Patch Similarity Aware data-free Quantization framework for Vision Transformers, to enable the generation of ‘realistic’ samples based on the vision transformer’s unique properties for calibrating the quantization parameters. Specifically, we analyze the self-attention module’s properties and reveal a general difference (patch similarity) in its processing of Gaussian noise and real images. The above insights guide us to design a relative value metric to optimize the Gaussian noise to approximate the real images, which are then utilized to calibrate the quantization parameters. Extensive experiments and ablation studies are conducted on various benchmarks to validate the effectiveness of PSAQ-ViT, which can even outperform the real-data-driven methods. Code is available at: https://github.com/zkkli/PSAQ-ViT.

arxiv情報

著者 Zhikai Li,Liping Ma,Mengjuan Chen,Junrui Xiao,Qingyi Gu
発行日 2023-01-05 07:54:20+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CV パーマリンク