When considering post-training quantization, prior work has typically focused on developing a mixed precision scheme or learning the best way to partition a network for quantization. In our work, CPT-V, we look at a general way to improve the accuracy of networks that have already been quantized, simply by perturbing the quantization scales. Borrowing the idea of contrastive loss from self-supervised learning, we find a robust way to jointly minimize a loss function using just 1,000 calibration images. In order to determine the best performing quantization scale, CPT-V contrasts the features of quantized and full precision models in a self-supervised fashion.
Unlike traditional reconstruction-based loss functions, the use of a contrastive loss function not only rewards similarity between the quantized and full precision outputs but also helps in distinguishing the quantized output from other outputs within a given batch. In addition, in contrast to prior works, CPT-V proposes a block-wise evolutionary search to minimize a global contrastive loss objective, allowing for accuracy improvement of existing vision transformer (ViT) quantization schemes. For example, CPT-V improves the top-1 accuracy of a fully quantized ViT-Base by 10.30%, 0.78%, and 0.15% for 3-bit, 4-bit, and 8-bit weight quantization levels. Extensive experiments on a variety of other ViT architectures further demonstrate its robustness in extreme quantization scenarios. Our code is available at <link>.
Tsinghua Shenzhen International Graduate School, Tsinghua University(清华大学清华-深圳国际研究生院);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));Shenzhen University(深圳大学);Peng Cheng Laboratory(鹏城实验室)
The high efficiency in computation and storage makes hashing (including binary hashing and quantization) a common strategy in large-scale retrieval systems. To alleviate the reliance on expensive annotations, unsupervised deep hashing becomes an important research problem. This paper provides a novel solution to unsupervised deep quantization, namely Contrastive Quantization with Code Memory (MeCoQ). Different from existing reconstruction-based strategies, we learn unsupervised binary descriptors by contrastive learning, which can better capture discriminative visual semantics. Besides, we unc…
Deep neural networks are vulnerable to Trojan attacks. Existing attacks use visible patterns (e.g., a patch or image transformations) as triggers, which are vulnerable to human inspection. In this paper, we propose stealthy and efficient Trojan attacks, BppAttack. Based on existing biology literature on human visual systems, we propose to use image quantization and dithering as the Trojan trigger, making imperceptible changes. It is a stealthy and efficient attack without training auxiliary models. Due to the small changes made to images, it is hard to inject such triggers during training. To …
Tsinghua Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学深圳);Research Center of Artificial Intelligence, Peng Cheng Laboratory(鹏城实验室人工智能研究中心);Data Quality Team, Wechat Group, Tencent Inc.(腾讯公司微信团队数据质量组);Wechat Group, Tencent Inc.(腾讯公司微信团队);Tencent Inc.(腾讯公司);Tsinghua University(清华大学);Harbin Institute of Technology(哈尔滨工业大学);Peng Cheng Laboratory(鹏城实验室)
With the recent boom of video-based social platforms (e.g., YouTube and TikTok), video retrieval using sentence queries has become an important demand and attracts increasing research attention. Despite the decent performance, existing text-video retrieval models in vision and language communities are impractical for large-scale Web search because they adopt brute-force search based on high-dimensional embeddings. To improve efficiency, Web search engines widely apply vector compression libraries (e.g., FAISS) to post-process the learned embeddings. Unfortunately, separate compression from fea…
Cross-Modal Contrastive Learning from Histopathology and CT for Automated Renal Cell Carcinoma Grading
Dartmouth College(达特茅斯学院);Geisel School of Medicine at Dartmouth(达特茅斯盖泽尔医学院);Massachusetts General Hospital(麻省总医院);Dartmouth-Hitchcock Medical Center(达特茅斯-希契科克医疗中心);Memorial Sloan Kettering Cancer Center(纪念斯隆-凯特琳癌症中心)
Shanghai Jiao Tong University(上海交通大学);DAMO Academy, Alibaba Group(阿里巴巴集团达摩院);Hong Kong Baptist University(香港浸会大学)
Click-through rate (CTR) prediction becomes indispensable in ubiquitous web recommendation applications. Nevertheless, the current methods are struggling under the cold-start scenarios where the user interactions are extremely sparse. We consider this problem as an automatic identification about whether the user behaviors are rich enough to capture the interests for prediction, and propose an Auto-Quantized Contrastive Learning (AQCL) loss to regularize the model. Different from previous methods, AQCL explores both the instance-instance and the instance-cluster similarity to robustify the late…
The University of Hong Kong(香港大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室)
The increasing size of generative Pre-trained Language Models (PLMs) has greatly increased the demand for model compression. Despite various methods to compress BERT or its variants, there are few attempts to compress generative PLMs, and the underlying difficulty remains unclear. In this paper, we compress generative PLMs by quantization. We find that previous quantization methods fail on generative tasks due to the \textit{homogeneous word embeddings} caused by reduced capacity, and \textit{varied distribution of weights}. Correspondingly, we propose a token-level contrastive distillation to…
Beijing University of Posts and Telecommunications(北京邮电大学);Microsoft Research Asia(微软亚洲研究院);Microsoft Search Technology Center Asia(微软亚洲搜索技术中心);University of Science and Technology of China(中国科学技术大学)
Vector quantization (VQ) based ANN indexes, such as Inverted File System (IVF) and Product Quantization (PQ), have been widely applied to embedding based document retrieval thanks to the competitive time and memory efficiency. Originally, VQ is learned to minimize the reconstruction loss, i.e., the distortions between the original dense embeddings and the reconstructed embeddings after quantization. Unfortunately, such an objective is inconsistent with the goal of selecting ground-truth documents for the input query, which may cause severe loss of retrieval quality. Recent works identify such …
MedUnifier: Unifying Vision-and-Language Pre-training on Medical Data with Vision Generation Task using Discrete Visual Representations
MedVisAI Lab(MedVisAI实验室);ECE, Northwestern University(电子工程系,西北大学);Institute for Infocomm Research (I 2 R), A*STAR, Singapore(信息与通信研究所(I2R),A*STAR,新加坡);Lee Kong Chian School of Medicine, Nanyang Technological University(Lee Kong Chian医学院,南洋理工大学)