Synergistic Self-supervised and Quantization Learning

Yun-Hao Cao, Peiqin Sun, Yechang Huang, Jianxin Wu, Shuchang Zhou
7/12/2022
cs.CVcs.LG

Official code: megvii-research/SSQL-ECCV2022 (73 stars, Apache-2.0, PyTorch, last commit 2023-03-15).

Abstract

With the success of self-supervised learning (SSL), it has become a mainstream paradigm to fine-tune from self-supervised pretrained models to boost the performance on downstream tasks. However, we find that current SSL models suffer severe accuracy drops when performing low-bit quantization, prohibiting their deployment in resource-constrained applications. In this paper, we propose a method called synergistic self-supervised and quantization learning (SSQL) to pretrain quantization-friendly self-supervised models facilitating downstream deployment. SSQL contrasts the features of the quantized and full precision models in a self-supervised fashion, where the bit-width for the quantized model is randomly selected in each step. SSQL not only significantly improves the accuracy when quantized to lower bit-widths, but also boosts the accuracy of full precision models in most cases. By only training once, SSQL can then benefit various downstream tasks at different bit-widths simultaneously. Moreover, the bit-width flexibility is achieved without additional storage overhead, requiring only one copy of weights during training and inference. We theoretically analyze the optimization process of SSQL, and conduct exhaustive experiments on various benchmarks to further demonstrate the effectiveness of our method. Our code is available at https://github.com/megvii-research/SSQL-ECCV2022.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

PyTorch implementation of SSQL (Accepted to ECCV2022 oral presentation)

736Shell, PythonJul 8, 20223 years agoApache-2.0
deep-learningpytorchquantizationself-supervised-learning

Cite this paper

@article{cao2022synergistic,
  title  = {Synergistic Self-supervised and Quantization Learning},
  author = {Yun-Hao Cao and Peiqin Sun and Yechang Huang and Jianxin Wu and Shuchang Zhou},
  year   = {2022},
  eprint = {2207.05432},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.05432v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.05432.svg)](https://codeofpaper.com/paper/2207.05432)

Discussion