How would you handle a new class that appears after a classifier is already deployed?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: hard
Interview Round: Other
How would you handle a new class that appears after a classifier is already deployed?
The model was trained on a fixed set of labels, and inputs from a category it has never seen start arriving in production.
```hint Start with detection
The model will still output one of its known labels for every input. Ask what signals would tell you that some of those predictions belong to a category the model does not know.
```
```hint Then the update
Think about how many labeled examples of the new class you can get, and what happens to accuracy on the old classes when you change the output layer and train on new data.
```
### Clarifying Questions to Ask
- What is the input type (text, images, tabular), and is there an embedding model behind the classifier?
- How expensive is labeling, and how fast must the new class be supported?
- What does a wrong prediction cost: is it better to reject an input and send it to a person, or to guess?
- Is this a one-time change, or do new classes appear regularly?
- Which downstream systems consume the predicted label, and do they assume a fixed set?
### What a Strong Answer Covers
- Why a closed-set classifier cannot signal the new class on its own
- Ways to detect unknown inputs in production, and their weaknesses
- How to collect and label examples of the new class efficiently
- Options for adding the class to the model, chosen by data volume and cost, and how to protect old-class performance
- Safe rollout and evaluation, including class imbalance and changes to the label schema
### Follow-up Questions
- How would you pick the rejection threshold, and how would you validate it before you have any examples of the new class?
- What would you change if new classes appeared every week instead of once?
- How do you prevent catastrophic forgetting when fine-tuning on the new class?
- How would you tell a new class apart from drift inside an existing class?
Overview: Asks how to handle a class that starts appearing after a classifier is already in production. Tests open-set and out-of-distribution detection, how to label the new data, options for adding the class without forgetting old ones, and safe rollout.