Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere

Contrastive representation learning has been outstandingly successful in\npractice. In this work, we identify two key properties related to the\ncontrastive loss: (1) alignment (closeness) of features from positive pairs,\nand (2) uniformity of the induced distribution of the (normalized) features on\nthe hypersphere. We prove that, asymptotically, the contrastive loss optimizes\nthese properties, and analyze their positive effects on downstream tasks.\nEmpirically, we introduce an optimizable metric to quantify each property.\nExtensive experiments on standard vision and language datasets confirm the\nstrong agreement between both metrics and downstream task performance.\nRemarkably, directly optimizing for these two metrics leads to representations\nwith comparable or better performance at downstream tasks than contrastive\nlearning.\n Project Page: https://tongzhouwang.info/hypersphere\n Code: https://github.com/SsnL/align_uniform ,\nhttps://github.com/SsnL/moco_align_uniform\n

Paper

References (65)

Scroll for more · 38 remaining

Similar papers

© 2026 NYSGPT2525 LLC