KatInterview

Validating a Smile Classifier in a Photo Library App

Machine LearningModel answer
MediumModel answerMachine Learningmodel-evaluationground-truthfairness

Last updated

Design a plan to prove a smile detection feature in a photo app works, covering labels, metrics, hard cases, fairness, pipeline tests, rollout and monitoring.

You work on a photo-management product that includes a feature which decides whether people in a photo are smiling. The result may be used for search ("photos where everyone is smiling"), for suggesting the best shot in a burst, or for automatic album highlights.

Explain how you would check that the feature is correct, from the first offline experiment through to life in production.

Your answer should address:

  • What "correct" means for this feature, and what exactly the model outputs (per face, per photo, or a score plus threshold).
  • How you would build trustworthy ground truth, including faces where people disagree on whether there is a smile.
  • Which metrics and which operating threshold you would use, and why.
  • Which difficult cases and population slices you would test explicitly.
  • How you would test the surrounding software, not only the model.
  • How you would validate the feature during rollout and afterwards.
  • How you would respect user privacy while doing all of this.

State any assumptions you make, such as whether a face detector runs upstream and which kind of error hurts the product more.

Hints

Hint 1

Start by pinning down the output and the cost of each error type. Missing a smile and wrongly tagging a smile hurt different features differently, and that drives the threshold.

Hint 2

Ground truth is the hard part: smiles are a spectrum. Think about multiple annotators, written guidelines, an 'unsure' option, and agreement statistics.

Hint 3

Accuracy alone is misleading. Think about precision, recall, a precision-recall curve, calibration, and per-slice results (age, skin tone, lighting, pose, occlusion, image quality).

Hint 4

Verification does not end at launch: consider a shadow mode or staged rollout, implicit user feedback, and drift monitoring on live score distributions.