Calibrating a Wake-Word Detector Threshold Under Extreme Class Imbalance
Last updated: November 29, 2026
Quick Overview
An on-device 'Hey Siri' style detector outputs a score per 1-second audio frame, and true wake words are roughly 1 in 100,000 frames. Explain how you would evaluate the model, pick an operating threshold, and check whether its scores are calibrated.
Apple
November 29, 20260
0
0 solved
An on-device 'Hey Siri' style detector outputs a score per 1-second audio frame, and true wake words are roughly 1 in 100,000 frames. Explain how you would evaluate the model, pick an operating threshold, and check whether its scores are calibrated.
Apple's speech and Siri teams care about false accepts (the phone waking up during a TV show) far more than raw accuracy, and the detector runs on a low-power always-on chip. The interviewer checks whether you reason in terms of false accepts per hour and false rejects per attempt instead of accuracy or ROC AUC on a skewed set.
What the Interviewer Expects
- Rejects accuracy and explains why ROC AUC hides the operating region at extreme imbalance
- Frames the business metric as false accepts per hour of ambient audio and false reject rate per real attempt
- Picks the threshold on a held-out set that matches real-world prevalence and acoustic conditions
- Explains calibration (reliability diagram, ECE, temperature or isotonic scaling) and when it matters
- Discusses a two-stage cascade and per-device or per-condition slicing
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you set different thresholds for a HomePod in a noisy kitchen versus AirPods?
- If you trained with downsampled negatives, how do you correct the predicted probabilities?
- How would you estimate false accepts per hour without labeling thousands of hours of audio?
- When would you prefer a precision-recall curve over a DET curve here?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Ask what the score feeds into: is it a first-stage gate that wakes a bigger second-stage verifier on the main processor, or the final decision? Ask the target budget (for example at most 1 false accep...
Approach
Accuracy is useless: predicting 'no wake word' always gives 99.999%. ROC AUC is dominated by the huge negative set, so two models can have AUC 0.999 and differ 10x in false accepts per hour. I evaluat...