InfoNCE, where NCE stands for Noise-Contrastive Estimation, is a type of contrastive loss function used for self-supervised learning.
Given a set X={x_1,…,x_N} of N random samples containing one positive sample from p(x_t+k∣c_t) and N−1 negative samples from the 'proposal' distribution p(x_t+k), we optimize:
L_N=−E_X[log∑_x_j∈Xf_k(x_j,c_t)f_k(x_t+k,c_t)]
Optimizing this loss will result in f_k(x_t+k,c_t) estimating the density ratio, which is:
f_k(x_t+k,c_t)∝p(x_t+k)p(x_t+k∣c_t)