What are the tradeoffs of training on a surrogate loss instead of the target evaluation metric?

Quick Overview

A machine learning theory question about training on a smooth surrogate loss such as log loss or hinge loss while the model is judged on accuracy, F1, AUC or NDCG. It tests understanding of optimization, calibration, metric mismatch, and practical ways to align training with evaluation.

What are the tradeoffs of training on a surrogate loss instead of the target evaluation metric?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What are the tradeoffs of training on a surrogate loss instead of the target evaluation metric? Models are usually trained on one objective, such as log loss or hinge loss, and judged on another, such as accuracy, F1, AUC or NDCG. ```hint Why not train on the metric Look at what the gradient of accuracy or NDCG with respect to the model's scores is for most inputs. ``` ```hint Where the two can disagree Compare what minimizes the surrogate with what maximizes the metric when the model class is limited, and when the metric is computed over a whole set or a ranking instead of per example. ``` ### What a Strong Answer Covers - Why the usual evaluation metrics are hard to optimize directly - What a surrogate gives in return, including its optimization properties, the training signal it provides, and the guarantees that link it to the metric and their conditions - The ways a surrogate and the metric can disagree, with an example - How particular surrogates react to outliers and label noise - Practical ways to close the gap between the training objective and the metric ### Follow-up Questions - Validation log loss starts rising while validation accuracy keeps improving. What is happening, and which one should drive early stopping? - How do pairwise and listwise ranking losses such as LambdaRank relate to NDCG? - After training with class weights to handle imbalance, what has happened to the predicted probabilities, and how do you correct them? - A regression model is trained with squared error but evaluated on mean absolute error. When does that mismatch matter?

Overview: A machine learning theory question about training on a smooth surrogate loss such as log loss or hinge loss while the model is judged on accuracy, F1, AUC or NDCG. It tests understanding of optimization, calibration, metric mismatch, and practical ways to align training with evaluation.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What are the tradeoffs of training on a surrogate loss instead of the target evaluation metric?

Models are usually trained on one objective, such as log loss or hinge loss, and judged on another, such as accuracy, F1, AUC or NDCG.

What a Strong Answer Covers Guidance

  • Why the usual evaluation metrics are hard to optimize directly
  • What a surrogate gives in return, including its optimization properties, the training signal it provides, and the guarantees that link it to the metric and their conditions
  • The ways a surrogate and the metric can disagree, with an example
  • How particular surrogates react to outliers and label noise
  • Practical ways to close the gap between the training objective and the metric

Follow-up Questions Guidance

  • Validation log loss starts rising while validation accuracy keeps improving. What is happening, and which one should drive early stopping?
  • How do pairwise and listwise ranking losses such as LambdaRank relate to NDCG?
  • After training with class weights to handle imbalance, what has happened to the predicted probabilities, and how do you correct them?
  • A regression model is trained with squared error but evaluated on mean absolute error. When does that mismatch matter?