SDE & MLE Prep

Loss Functions Cheat Sheet

Q: Which loss would you use, and why?

TaskLossNotes
RegressionMSEGaussian noise MLE; punishes outliers heavily
Regression, outliersMAE, HuberMAE → median; Huber = quadratic near 0, linear far away
Quantiles / P90 ETAspinball (quantile) lossasymmetric weights τ and 1 − τ
Binary classificationbinary cross-entropy (log loss)calibrated probabilities
Multi-classsoftmax cross-entropy+ label smoothing to reduce over-confidence
Multi-labelsigmoid BCE per labellabels are independent
Imbalanced / dense detectionfocal loss −(1−p)^γ log pdown-weights easy examples (RetinaNet)
Max-marginhinge max(0, 1 − y·f(x))SVMs
Rankingpairwise (RankNet, BPR), listwise (LambdaRank, softmax)optimize order, not scores
Embeddingscontrastive / triplet / InfoNCEpull positives together, push negatives apart
DistributionsKL divergencedistillation (match teacher probabilities), VAEs