- Binary cross entropyThe loss for yes or no predictions: the negative log of the probability the model gave to the true answer, for one label or many.Lesson and interactive
- BPRA pairwise ranking loss for implicit feedback: it pushes the score of an item a user interacted with above the score of one they did not.Lesson and interactive
- ContrastiveA loss on pairs of embeddings: it pulls similar pairs together and pushes dissimilar pairs apart until they are at least a margin away.Lesson and interactive
- Cross entropyThe standard multi-class loss: softmax over the scores, then the negative log of the probability given to the correct class.Lesson and interactive
- ELBOThe training loss of a variational autoencoder: a reconstruction error plus a KL term that keeps the encoder's code distribution close to a standard normal.Lesson and interactive
- FocalA cross-entropy that scales down the loss of well-classified examples, so training concentrates on the hard and rare ones.Lesson and interactive
- HingeA margin loss for labels of minus one and plus one: zero once the score is on the correct side by at least the margin, linear in the shortfall otherwise.Lesson and interactive
- HuberA regression loss that is quadratic for small errors and linear for large ones, so it is smooth near zero and resistant to outliers.Lesson and interactive
- InfoNCEAn in-batch contrastive loss: each item must pick out its own partner among all the partners in the batch, scored as a classification.Lesson and interactive
- KL divergenceA measure of how far a predicted distribution is from a target distribution: the extra cost of describing the target using the prediction.Lesson and interactive
- L1 penaltyA regulariser added to the loss that charges for the absolute size of every weight, which drives many weights to exactly zero.Lesson and interactive
- L2 penaltyA regulariser added to the loss that charges for the squared size of every weight, which shrinks all weights toward zero.Lesson and interactive
- Label smoothingCross-entropy against softened targets: the true class gets most of the probability and a small share is spread evenly over all classes.Lesson and interactive
- MAEA regression loss that averages the absolute difference between prediction and target, treating every unit of error the same.Lesson and interactive
- MDNThe loss of a mixture density network: the negative log-likelihood of the target under a mixture of Gaussians whose weights, means and widths the network outputs.Lesson and interactive
- MSEA regression loss that averages the squared difference between prediction and target, so large errors count far more than small ones.Lesson and interactive
- NLLThe negative log-likelihood for class labels: minus the log-probability the model assigned to the correct class, given log-probabilities as input.Lesson and interactive
- Sampled softmaxA softmax cross-entropy computed over the correct item and a small sample of wrong ones, with a correction for how the sample was drawn.Lesson and interactive
- TripletA loss on triples of embeddings: it asks that an anchor be closer to a positive example than to a negative example by at least a margin.Lesson and interactive