EasyDeepLearn

What is Maximum Mean Discrepancy (MMD) for drift detection?

hard

Answer

  • Kernel-based two-sample test.
  • Embed both distributions in RKHS via kernel k.
  • MMD2(P,  Q)\mathrm{MMD}^{2}(P, \;Q) = ||μP    μQ{\mu}_{P}\; - \;{\mu}_{Q}||²_H = E[k(x, x')] - 2 E[k(x, y)] + E[k(y, y')].
  • Zero iff P = Q.
  • Handles high-dimensional data (unlike per-feature KS).
  • RBF kernel with median-bandwidth heuristic works well.
  • Permutation test for p-value.
  • Foundation of modern high-dim drift (embeddings from LLMs / vision models).
Check yourself — multiple choice
  • Same as KS
  • Kernel two-sample: MMD2  =  E[k(x,x)]    2\mathrm{MMD}^{2}\; = \;E[k(x, x)]\; - \;2 E[k(x,y)] + E[k(y,y')]; RBF + median heuristic; permutation p-value; foundation for high-dim embedding drift
  • Random
  • Not real

MMD: kernel two-sample; RBF + permutation; high-dim drift.

#monitoring#data-quality

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions