How do you extend ROC-AUC to a multi-class problem?

Quick Overview

How do you compute ROC-AUC when a classifier predicts more than two classes? The question tests the one-vs-rest and one-vs-one decompositions, macro, weighted and micro averaging, how each handles class imbalance, and what a multi-class AUC says about a model.

How do you extend ROC-AUC to a multi-class problem?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Your classifier outputs a probability for each of C classes, and you want a single ROC-AUC figure for it. How do you extend ROC-AUC to a multi-class problem? ```hint Make it binary first ROC-AUC needs one positive class and one negative class. Think about the different ways a C-class problem can be split into binary problems. ``` ```hint Watch the averaging Once you have several binary AUCs, the way you weight them decides how much the rare classes count. ``` ### What a Strong Answer Covers - Why ROC-AUC needs a binary decomposition, and the main ways to build one. - How each decomposition is computed, including which class score is used for each binary problem. - The averaging choices and how each one responds to class imbalance. - How the cost grows with the number of classes. - What a high multi-class AUC does and does not say about the model. ### Follow-up Questions - The data has 50 classes and one class holds 80% of the samples. Which variant would you report, and why? - For one pair of classes i and j, why can the AUC of the class-i score differ from the AUC of the class-j score, and how does Hand and Till's measure combine them? - A model has a macro one-vs-rest AUC of 0.95 but a top-1 accuracy of 60%. How can both be true? - How would you compute AUC for a multi-label problem, where a sample can carry several labels at once?

Overview: How do you compute ROC-AUC when a classifier predicts more than two classes? The question tests the one-vs-rest and one-vs-one decompositions, macro, weighted and micro averaging, how each handles class imbalance, and what a multi-class AUC says about a model.

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

Your classifier outputs a probability for each of C classes, and you want a single ROC-AUC figure for it. How do you extend ROC-AUC to a multi-class problem?

What a Strong Answer Covers Guidance

  • Why ROC-AUC needs a binary decomposition, and the main ways to build one.
  • How each decomposition is computed, including which class score is used for each binary problem.
  • The averaging choices and how each one responds to class imbalance.
  • How the cost grows with the number of classes.
  • What a high multi-class AUC does and does not say about the model.

Follow-up Questions Guidance

  • The data has 50 classes and one class holds 80% of the samples. Which variant would you report, and why?
  • For one pair of classes i and j, why can the AUC of the class-i score differ from the AUC of the class-j score, and how does Hand and Till's measure combine them?
  • A model has a macro one-vs-rest AUC of 0.95 but a top-1 accuracy of 60%. How can both be true?
  • How would you compute AUC for a multi-label problem, where a sample can carry several labels at once?