Patch-level Contrastive Learning via Positional Query for Visual Pre-training

Shaofeng Zhang, Qiang Zhou, Zhibin Wang, Fan Wang, Junchi Yan
Proceedings of the 40th International Conference on Machine Learning, PMLR 202:41990-41999, 2023.

Abstract

Dense contrastive learning (DCL) has been recently explored for learning localized information for dense prediction tasks (e.g., detection and segmentation). It still suffers the difficulty of mining pixels/patches correspondence between two views. A simple way is inputting the same view twice and aligning the pixel/patch representation. However, it would reduce the variance of inputs, and hurts the performance. We propose a plug-in method PQCL (Positional Query for patch-level Contrastive Learning), which allows performing patch-level contrasts between two views with exact patch correspondence. Besides, by using positional queries, PQCL increases the variance of inputs, to enhance training. We apply PQCL to popular transformer-based CL frameworks (DINO and iBOT, and evaluate them on classification, detection and segmentation tasks, where our method obtains stable improvements, especially for dense tasks. It achieves new state-of-the-art in most settings. Code is available at https://github.com/Sherrylone/Query_Contrastive.

Cite this Paper


BibTeX
@InProceedings{pmlr-v202-zhang23bd, title = {Patch-level Contrastive Learning via Positional Query for Visual Pre-training}, author = {Zhang, Shaofeng and Zhou, Qiang and Wang, Zhibin and Wang, Fan and Yan, Junchi}, booktitle = {Proceedings of the 40th International Conference on Machine Learning}, pages = {41990--41999}, year = {2023}, editor = {Krause, Andreas and Brunskill, Emma and Cho, Kyunghyun and Engelhardt, Barbara and Sabato, Sivan and Scarlett, Jonathan}, volume = {202}, series = {Proceedings of Machine Learning Research}, month = {23--29 Jul}, publisher = {PMLR}, pdf = {https://proceedings.mlr.press/v202/zhang23bd/zhang23bd.pdf}, url = {https://proceedings.mlr.press/v202/zhang23bd.html}, abstract = {Dense contrastive learning (DCL) has been recently explored for learning localized information for dense prediction tasks (e.g., detection and segmentation). It still suffers the difficulty of mining pixels/patches correspondence between two views. A simple way is inputting the same view twice and aligning the pixel/patch representation. However, it would reduce the variance of inputs, and hurts the performance. We propose a plug-in method PQCL (Positional Query for patch-level Contrastive Learning), which allows performing patch-level contrasts between two views with exact patch correspondence. Besides, by using positional queries, PQCL increases the variance of inputs, to enhance training. We apply PQCL to popular transformer-based CL frameworks (DINO and iBOT, and evaluate them on classification, detection and segmentation tasks, where our method obtains stable improvements, especially for dense tasks. It achieves new state-of-the-art in most settings. Code is available at https://github.com/Sherrylone/Query_Contrastive.} }
Endnote
%0 Conference Paper %T Patch-level Contrastive Learning via Positional Query for Visual Pre-training %A Shaofeng Zhang %A Qiang Zhou %A Zhibin Wang %A Fan Wang %A Junchi Yan %B Proceedings of the 40th International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2023 %E Andreas Krause %E Emma Brunskill %E Kyunghyun Cho %E Barbara Engelhardt %E Sivan Sabato %E Jonathan Scarlett %F pmlr-v202-zhang23bd %I PMLR %P 41990--41999 %U https://proceedings.mlr.press/v202/zhang23bd.html %V 202 %X Dense contrastive learning (DCL) has been recently explored for learning localized information for dense prediction tasks (e.g., detection and segmentation). It still suffers the difficulty of mining pixels/patches correspondence between two views. A simple way is inputting the same view twice and aligning the pixel/patch representation. However, it would reduce the variance of inputs, and hurts the performance. We propose a plug-in method PQCL (Positional Query for patch-level Contrastive Learning), which allows performing patch-level contrasts between two views with exact patch correspondence. Besides, by using positional queries, PQCL increases the variance of inputs, to enhance training. We apply PQCL to popular transformer-based CL frameworks (DINO and iBOT, and evaluate them on classification, detection and segmentation tasks, where our method obtains stable improvements, especially for dense tasks. It achieves new state-of-the-art in most settings. Code is available at https://github.com/Sherrylone/Query_Contrastive.
APA
Zhang, S., Zhou, Q., Wang, Z., Wang, F. & Yan, J.. (2023). Patch-level Contrastive Learning via Positional Query for Visual Pre-training. Proceedings of the 40th International Conference on Machine Learning, in Proceedings of Machine Learning Research 202:41990-41999 Available from https://proceedings.mlr.press/v202/zhang23bd.html.

Related Material