Papers › Energy-Based Contrastive Learning of Visual Representations

Energy-Based Contrastive Learning of Visual Representations

10 Feb 2022arXiv:2202.04933archive 2025-07-28

Beomsu Kim, Jong Chul Ye

Contrastive learning is a method of learning visual representations by training Deep Neural Networks (DNNs) to increase the similarity between representations of positive pairs (transformations of the same image) and reduce the similarity between representations of negative pairs (transformations of different images). Here we explore Energy-Based Contrastive Learning (EBCLR) that leverages the power of generative learning by combining contrastive learning with Energy-Based Models (EBMs). EBCLR can be theoretically interpreted as learning the joint distribution of positive pairs, and it shows promising results on small and medium-scale datasets such as MNIST, Fashion-MNIST, CIFAR-10, and CIFAR-100. Specifically, we find EBCLR demonstrates from X4 up to X20 acceleration compared to SimCLR and MoCo v2 in terms of training epochs. Furthermore, in contrast to SimCLR, we observe EBCLR achieves nearly the same performance with 254 negative pairs (batch size 128) and 30 negative pairs (batch size 16) per positive pair, demonstrating the robustness of EBCLR to small numbers of negative pairs. Hence, EBCLR provides a novel avenue for improving contrastive learning methods that usually require large datasets with a significant number of negative pairs per iteration to achieve reasonable performance on downstream tasks. Code: https://github.com/1202kbs/EBCLR

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2202.04933")

Code

Syntology Ran 12 of 14 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · honoured contract; 5 ran · our draft was wrong; 2 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

1202kbs/ebclr officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 12 ran; 1 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
5ran · our draft was wrong
2ran · fixture could not drive it
4ran
2unverified

Licence: 14 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 1202kbs/ebclr. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Buffer 1202kbs/ebclr/libs/ebclr.py official repository ran no licence file found · pointer only · 6ac1e9429f4fe7fa · report
GaussianBlur 1202kbs/ebclr/libs/ebclr.py official repository ran fingerprinted no licence file found · pointer only · d4ea33d3221533f2 · report
MSGLD 1202kbs/ebclr/libs/ebclr.py official repository ran no licence file found · pointer only · 1445124b9a9a3222 · report
SimCLR_Loss 1202kbs/ebclr/libs/ebclr.py official repository ran fingerprinted no licence file found · pointer only · 7dae9e689051c347 · report
get_lr_schedule 1202kbs/ebclr/libs/ebclr.py official repository ran · our draft was wrong no licence file found · pointer only · 9917282e521dbb6b · report
get_optimizer 1202kbs/ebclr/libs/ebclr.py official repository ran · our draft was wrong no licence file found · pointer only · 04f4732de0a195ef · report
get_t 1202kbs/ebclr/libs/ebclr.py official repository ran · our draft was wrong no licence file found · pointer only · 971f12d0a863e889 · report
load_ckpt 1202kbs/ebclr/libs/ebclr.py official repository ran · honoured contract no licence file found · pointer only · fdcbd4afb30b8c3f · report
logsumexp 1202kbs/ebclr/libs/ebclr.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · a5d7c8bbd5782ef5 · report
shuffled_idx 1202kbs/ebclr/libs/ebclr.py official repository ran · fixture could not drive it no licence file found · pointer only · 507b89409e45c9af · report
similarity_f 1202kbs/ebclr/libs/ebclr.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 5f603a9f2e80d384 · report
transform_data 1202kbs/ebclr/libs/ebclr.py official repository ran · our draft was wrong no licence file found · pointer only · a93280fc29bbdbef · report
EBCLR 1202kbs/ebclr/libs/ebclr.py official repository unverified no licence file found · pointer only · aad3c0e761fa8f19 · report
save_ckpt 1202kbs/ebclr/libs/ebclr.py official repository unverified no licence file found · pointer only · dd7d00639441fd9d · report

Tasks

Contrastive LearningSelf-Supervised Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

1x1 ConvolutionAverage PoolingBatch NormalizationBottleneck Residual BlockColorJitterContrastive LearningConvolutionDense ConnectionsFeedforward NetworkGlobal Average PoolingInfoNCEKaiming InitializationMax PoolingMoCoMoCo v2NT-XentRandom Gaussian BlurRandom Resized CropReLUResidual BlockResidual ConnectionSimCLR

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections