Learn Before
Formula

Binary cross-entropy loss with negative sampling

For one positive pair with score s+s^+ and kk negatively sampled pairs with scores sis_i^-, the binary cross-entropy loss is L=logσ(s+)i=1klog(1σ(si)),\mathcal{L}=-\log \sigma(s^+)-\sum_{i=1}^{k}\log\left(1-\sigma(s_i^-)\right), where σ\sigma is the logistic function. It encourages a high probability for the positive pair and low probabilities for negative pairs. These are independent binary probabilities, not scores normalized across all candidates.

Image 0

0

1

Updated 2026-08-30

Tags

Data Science