Loss Functions
32 problems
- MSE loss + backwardEasy
- CLIP InfoNCE LossMedium
- Contrastive lossMedium
- Dice lossEasy
- BCE from logits — the stable sigmoid + BCE pairingMedium
- BCE — clip the probabilities so log stays finiteEasy
- Loss — pick the better modelEasy
- DPO lossMedium
- Focal loss (multiclass)Medium
- Huber & Hinge lossesEasy
- IPO / SimPO LossMedium
- KL divergence (discrete)Easy
- Knowledge-Distillation LossMedium
- KTO (Kahneman-Tversky) LossHard
- Label-smoothed cross-entropyMedium
- Linear regression — sum of squared residuals (SSR)Easy
- ListNet Listwise Ranking LossMedium
- Log-softmaxEasy
- Logistic regression — the BCE gradient (error × feature)Easy
- Logistic regression — binary cross-entropy lossEasy
- Logistic regression — likelihood of the whole datasetEasy
- Multi-class cross-entropy lossEasy
- ORPO Loss (Odds-Ratio Preference Optimisation)Medium
- Pairwise Ranking Loss (BPR / RankNet)Medium
- Pinball (Quantile) Regression LossMedium
- Reward-Model Margin LossMedium
- Ridge regression lossEasy
- Loss over time — sum the per-step lossesEasy
- In-Batch Sampled Softmax + logQ CorrectionHard
- Triplet lossMedium
- VAE ELBO lossMedium
- Weighted cross-entropyEasy