Supervised-Contrastive Loss Learns Orthogonal Frames and Batching Matters

06/13/2023
by   Ganesh Ramachandra Kini, et al.
0

Supervised contrastive loss (SCL) is a competitive and often superior alternative to the cross-entropy (CE) loss for classification. In this paper we ask: what differences in the learning process occur when the two different loss functions are being optimized? To answer this question, our main finding is that the geometry of embeddings learned by SCL forms an orthogonal frame (OF) regardless of the number of training examples per class. This is in contrast to the CE loss, for which previous work has shown that it learns embeddings geometries that are highly dependent on the class sizes. We arrive at our finding theoretically, by proving that the global minimizers of an unconstrained features model with SCL loss and entry-wise non-negativity constraints form an OF. We then validate the model's prediction by conducting experiments with standard deep-learning models on benchmark vision datasets. Finally, our analysis and experiments reveal that the batching scheme chosen during SCL training plays a critical role in determining the quality of convergence to the OF geometry. This finding motivates a simple algorithm wherein the addition of a few binding examples in each batch significantly speeds up the occurrence of the OF geometry.

READ FULL TEXT

page 5

page 27

page 28

research
08/10/2022

Imbalance Trouble: Revisiting Neural-Collapse Geometry

Neural Collapse refers to the remarkable structural properties character...
research
06/23/2017

Sampling Matters in Deep Embedding Learning

Deep embeddings answer one simple question: How similar are two images? ...
research
10/11/2021

SCEHR: Supervised Contrastive Learning for Clinical Risk Prediction using Electronic Health Records

Contrastive learning has demonstrated promising performance in image and...
research
07/18/2019

On the relation between Loss Functions and T-Norms

Deep learning has been shown to achieve impressive results in several do...
research
09/05/2022

Supervised Contrastive Learning to Classify Paranasal Anomalies in the Maxillary Sinus

Using deep learning techniques, anomalies in the paranasal sinus system ...
research
02/22/2023

A Global and Patch-wise Contrastive Loss for Accurate Automated Exudate Detection

Diabetic retinopathy (DR) is a leading cause of blindness worldwide. Ear...
research
03/14/2023

On the Implicit Geometry of Cross-Entropy Parameterizations for Label-Imbalanced Data

Various logit-adjusted parameterizations of the cross-entropy (CE) loss ...

Please sign up or login with your details

Forgot password? Click here to reset