Unraveling Projection Heads in Contrastive Learning: Insights from Expansion and Shrinkage

06/06/2023
by   Yu Gui, et al.
0

We investigate the role of projection heads, also known as projectors, within the encoder-projector framework (e.g., SimCLR) used in contrastive learning. We aim to demystify the observed phenomenon where representations learned before projectors outperform those learned after – measured using the downstream linear classification accuracy, even when the projectors themselves are linear. In this paper, we make two significant contributions towards this aim. Firstly, through empirical and theoretical analysis, we identify two crucial effects – expansion and shrinkage – induced by the contrastive loss on the projectors. In essence, contrastive loss either expands or shrinks the signal direction in the representations learned by an encoder, depending on factors such as the augmentation strength, the temperature used in contrastive loss, etc. Secondly, drawing inspiration from the expansion and shrinkage phenomenon, we propose a family of linear transformations to accurately model the projector's behavior. This enables us to precisely characterize the downstream linear classification accuracy in the high-dimensional asymptotic limit. Our findings reveal that linear projectors operating in the shrinkage (or expansion) regime hinder (or improve) the downstream classification accuracy. This provides the first theoretical explanation as to why (linear) projectors impact the downstream performance of learned representations. Our theoretical findings are further corroborated by extensive experiments on both synthetic data and real image data.

READ FULL TEXT

page 10

page 27

research
04/01/2023

Towards Understanding the Mechanism of Contrastive Learning via Similarity Structure: A Theoretical Analysis

Contrastive learning is an efficient approach to self-supervised represe...
research
02/28/2022

Understanding Contrastive Learning Requires Incorporating Inductive Biases

Contrastive learning is a popular form of self-supervised learning that ...
research
11/28/2021

ExCon: Explanation-driven Supervised Contrastive Learning for Image Classification

Contrastive learning has led to substantial improvements in the quality ...
research
02/17/2021

Contrastive Learning Inverts the Data Generating Process

Contrastive learning has recently seen tremendous success in self-superv...
research
11/05/2020

Intriguing Properties of Contrastive Losses

Contrastive loss and its variants have become very popular recently for ...
research
08/18/2023

Advancing Relation Extraction through Language Probing with Exemplars from Set Co-Expansion

Relation Extraction (RE) is a pivotal task in automatically extracting s...
research
11/16/2020

Theoretical Insights Into Multiclass Classification: A High-dimensional Asymptotic View

Contemporary machine learning applications often involve classification ...

Please sign up or login with your details

Forgot password? Click here to reset