facebookresearch / vissl

VISSL is FAIR's library of extensible, modular and scalable components for SOTA Self-Supervised Learning with images.
https://vissl.ai
MIT License
3.26k stars 333 forks source link

Implement VICREg #357

Open QuentinDuval opened 3 years ago

QuentinDuval commented 3 years ago

🌟 New SSL approach addition

Approach description

Recent self-supervised methods for image representation learning are based on maximizing the agreement between embedding vectors from different views of the same image. A trivial solution is obtained when the encoder outputs constant vectors. This collapse problem is often avoided through implicit biases in the learning architecture, that often lack a clear justification or interpretation. In this paper, we introduce VICReg (Variance-Invariance-Covariance Regularization), a method that explicitly avoids the collapse problem with a simple regularization term on the variance of the embeddings along each dimension individually. VICReg combines the variance term with a decorrelation mechanism based on redundancy reduction and covariance regularization, and achieves results on par with the state of the art on several downstream tasks. In addition, we show that incorporating our new variance term into other methods helps stabilize the training and leads to performance improvements.

https://arxiv.org/pdf/2105.04906.pdf

Architecture

Screenshot 2021-07-07 at 09 48 57

Open source status

clane9 commented 2 years ago

Hi @QuentinDuval, I saw that the official code was recently released. I'd love to see the method added to VISSL as well. Are there plans to add it in progress? If not, I'd be happy to open a PR. Let me know, thanks!

crypdick commented 2 years ago

@clane9 I would love to see vicreg supported in vissl

crypdick commented 2 years ago

@QuentinDuval is there an update on this? I'm keen to try out VICREG.

clane9 commented 2 years ago

Hi @crypdick, @QuentinDuval. I did have a draft implementation of VICReg in my fork. I'd have to rebase and finish it up, but then I'd be happy to open a PR. lmk!