EasyDeepLearn

All 214 Unsupervised Learning interview questions

Clustering, dimensionality reduction, density estimation and anomaly detection.

Every question below opens on its own page, with a full answer, the formulas written out and a multiple-choice check. Free to read, no account needed.

Clustering basics

  1. How does k-means work and what are its main limitations?easy
  2. How do you choose the number of clusters k?easy
  3. When would you pick DBSCAN over k-means?medium
  4. What does the silhouette score measure?medium
  5. What is hierarchical clustering and when is it useful?medium
  6. Gaussian Mixture Model vs k-means — what's the difference?medium
  7. What is linkage in agglomerative clustering?hard
  8. Why does clustering degrade in high dimensions?medium
  9. How does k-means++ initialization work?medium
  10. When is mini-batch k-means preferred?medium
  11. k-medoids vs k-means — the difference.medium
  12. What is fuzzy c-means?hard
  13. HDBSCAN — how does it improve on DBSCAN?hard
  14. OPTICS — what does it produce and how do you use it?hard
  15. Spectral clustering — the core idea.hard
  16. Affinity propagation — how does it work?hard
  17. Mean shift clustering — mechanism and use case.hard
  18. BIRCH — when to use it?hard
  19. EM for a GMM — one iteration explicitly.hard
  20. GMM covariance types — which do you pick?hard
  21. How does BIC choose k in GMM?medium
  22. How does the gap statistic work?hard
  23. Why can the elbow method fail?medium
  24. Calinski-Harabasz index — what is it?medium
  25. Davies-Bouldin index — how is it computed?hard
  26. Adjusted Rand Index vs NMI — external cluster metrics.medium
  27. How do you cluster mixed numeric + categorical data?hard
  28. Why do you scale features before k-means?easy
  29. Cosine similarity vs Euclidean — when do you use cosine?medium
  30. How do outliers affect k-means and how do you handle them?medium
  31. How do you assess cluster stability?hard
  32. What is consensus clustering?hard
  33. Online k-means — how does it work?hard
  34. 'Cluster then classify' — when does it help?medium
  35. How do you cluster time series?hard
  36. What is Dynamic Time Warping?hard
  37. Community detection in graphs — main approaches.hard
  38. How do you interpret / visualize clusters?medium
  39. How do you find nested or hierarchical structure?medium
  40. Dirichlet Process — how does it help clustering?hard
  41. One cluster dominates in k-means — what do you do?medium
  42. Interview: 'you're asked to segment 10M customers — how?'hard
  43. How do you monitor cluster drift over time?hard
  44. Mixture models for density estimation — beyond GMM.hard
  45. LDA vs NMF for topic modeling — which do you pick?medium
  46. How does BERTopic work?medium
  47. Applications of clustering in NLP.medium
  48. How do you cluster images at scale?medium
  49. User behavior segmentation — feature engineering.medium
  50. Clustering in single-cell RNA-seq — the standard pipeline.hard
  51. Interview: cluster 5M e-commerce customers for a marketing campaign.hard
  52. Interview: how would you group log messages from a large distributed system?hard
  53. Interview: business asks 'why is customer X in Cluster 3?' — how do you explain?medium
  54. Interview: 'you have to pick k for the executive team — walk me through it.'medium
  55. Interview: after segmentation, one segment has 60% women but each region shows 40%. Why?hard
  56. Interview: how would you cluster 1B rows on a budget?hard
  57. Interview: you cluster and 3 clusters look 'right', but 2 mix categories — what next?hard
  58. Interview: 'no labels — how do you know your clustering is any good?'hard
  59. Interview: 'when should you NOT cluster?'medium
  60. Interview: 'how would you tune HDBSCAN's min_cluster_size?'hard
  61. Interview: 'discuss the tradeoffs between k-means, DBSCAN, and HDBSCAN.'medium
  62. Interview: 'what's the biggest mistake you've seen in a real clustering project?'medium
  63. Without labels, how do you convince a stakeholder your clustering is any good?medium
  64. You run k-means on customer data with age, income and number of purchases. What breaks?easy
  65. The elbow plot has no elbow. How do you pick k?medium
  66. DBSCAN labels almost everything as noise. What do you change?medium
  67. Is it a good idea to run k-means on raw text embeddings?hard
  68. LDA or embedding-based topic modelling for a corpus of support tickets?medium
  69. Your customer segments change completely when you re-run the pipeline monthly. Is that acceptable?hard

Advanced clustering & density

  1. Local Outlier Factor (LOF) — how does it work?medium
  2. Elliptic envelope / robust Mahalanobis distance — when to use?medium
  3. Kernel Density Estimation — mechanism.medium
  4. How do you choose the KDE bandwidth?hard
  5. What is a copula and why use one?hard
  6. Normalizing flows for density estimation — the idea.hard
  7. Score matching — what does it estimate?hard
  8. KL divergence — what it measures and pitfalls.medium

Distance & scaling considerations

  1. HNSW — how does it work?hard
  2. Product Quantization (PQ) — how does it compress vectors?hard
  3. Locality-Sensitive Hashing (LSH) — the core trick.hard
  4. MinHash — how does it estimate Jaccard similarity?hard
  5. Interview: your image dataset (10M) has near-duplicates — how do you dedup at scale?hard
  6. Concretely, what goes wrong with distance-based methods in high dimensions?hard

Cluster evaluation

  1. How do you evaluate anomaly detection?medium
  2. How do you evaluate the quality of a self-supervised representation?medium
  3. How do you evaluate topic quality?medium
  4. Your anomaly detector has no labels. How do you set the decision threshold?medium
  5. What makes a good self-supervised pretext task?hard

Linear dimensionality reduction

  1. PCA vs t-SNE vs UMAP — when do you use each?medium
  2. How do you decide how many PCA components to keep?easy
  3. Derive PCA — what does it optimize?hard
  4. PCA via SVD — the connection.medium
  5. Why standardize before PCA (usually)?easy
  6. When does PCA fail?medium
  7. Kernel PCA — when and how?hard
  8. ICA vs PCA — the key difference.hard
  9. Non-negative Matrix Factorization (NMF) — when to use?medium
  10. Sparse coding — what is it?hard
  11. Random projection — how does it work?medium
  12. Linear Discriminant Analysis (LDA) vs PCA — the difference.medium
  13. Canonical Correlation Analysis (CCA) — use case.hard
  14. t-SNE perplexity — what does it control?medium
  15. Top t-SNE pitfalls to avoid.hard
  16. UMAP vs t-SNE — practical differences.medium
  17. UMAP key hyperparameters.medium
  18. Isomap — what does it do?hard
  19. Locally Linear Embedding (LLE) — how does it work?hard
  20. Multidimensional Scaling (MDS) — variants.medium
  21. Autoencoder for dimensionality reduction — pros and cons.medium
  22. What is the manifold hypothesis?medium
  23. How do you estimate the intrinsic dimension of a dataset?hard
  24. Truncated SVD vs PCA on sparse data.medium
  25. Incremental PCA — when do you need it?medium
  26. Robust PCA — what problem does it solve?hard
  27. Why does truncated SVD denoise?hard
  28. Word embeddings as unsupervised DR of text.medium
  29. How do modern sentence / doc embeddings work?medium
  30. Matrix completion — how does it relate to unsupervised learning?hard
  31. Principal Components Regression (PCR) — what does it do?hard
  32. Partial Least Squares (PLS) — how is it different from PCR?hard
  33. LSA (Latent Semantic Analysis) — how does it relate to modern retrieval?medium
  34. Matrix factorization for recsys — objective.medium
  35. Interview: 'you have 500 features, most correlated — how do you preprocess?'medium
  36. Interview: 'when should you use PCA vs autoencoder for dim reduction?'medium
  37. How many principal components do you keep, and what does 95% variance actually guarantee?medium
  38. What conclusions can you not draw from a t-SNE plot?hard

Anomaly & outlier detection

  1. What are the main approaches to anomaly detection?medium
  2. Isolation Forest — how does it detect anomalies?medium
  3. One-class SVM — mechanism and pitfalls.hard
  4. Autoencoder for anomaly detection — how?medium
  5. VAE-based anomaly detection — advantages.hard
  6. Deep SVDD — the core idea.hard
  7. Semi-supervised vs unsupervised anomaly detection.medium
  8. Positive-Unlabeled (PU) learning — when useful?hard
  9. Anomaly detection in time series — what changes?hard
  10. How is drift detection an unsupervised problem?medium
  11. Maximum Mean Discrepancy (MMD) — what is it?hard
  12. Wasserstein distance — intuition.hard
  13. Covariate drift vs concept drift vs label drift — the differences.medium
  14. Out-of-distribution (OOD) detection — approaches.hard
  15. Conformal prediction for anomaly detection.hard
  16. Scan statistics — when do you use them?hard
  17. CUSUM change-point detection — how does it work?hard
  18. How do you handle 99.9% normal / 0.1% anomaly training data?hard
  19. How do you explain why a point is anomalous?medium
  20. Interview: 'design an unsupervised fraud detection system'.hard
  21. How would you detect anomalies in multi-modal data (image + tabular)?hard
  22. How would you detect fraud rings (colluding accounts)?hard
  23. Interview: production fraud detector — daily volume 10M, current FN too high.hard
  24. Interview: model trained in region A must now serve region B — approach?hard
  25. Interview: 'design anomaly detection for a factory sensor with 200 signals.'hard
  26. Isolation forest or autoencoder for anomaly detection?medium

Autoencoders & VAEs

  1. What is self-supervised learning and why does it matter?medium
  2. How does contrastive learning work?hard
  3. What is an autoencoder and what are the common variants?medium
  4. Autoencoder variants — quick tour.medium
  5. Derive the VAE ELBO.hard
  6. VAE vs plain autoencoder — the key advantages.medium
  7. β-VAE — what does the β hyperparameter do?hard
  8. VQ-VAE — the core idea.hard
  9. SimCLR — recipe.medium
  10. MoCo (Momentum Contrast) — how does it enable smaller batches?hard
  11. BYOL — how does it avoid the need for negatives?hard
  12. SimSiam — what makes it minimal?hard
  13. DINO — self-distillation with no labels.hard
  14. MAE (Masked Autoencoder) — He et al. 2022.medium
  15. CLIP — how does contrastive image-text training work?medium
  16. JEPA (I-JEPA, V-JEPA) — LeCun's alternative to generative SSL.hard
  17. InfoNCE loss — formula and intuition.hard
  18. Why are augmentations so important in contrastive SSL?medium
  19. Word2Vec skip-gram — objective and training.medium
  20. GloVe vs Word2Vec.medium
  21. Word embedding analogies — why do they work?hard
  22. Sentence-BERT — how does it improve on BERT for retrieval?medium
  23. Node2Vec — how does it learn graph node embeddings?medium
  24. Modern graph representation learning — GNNs.hard
  25. Self-supervised graph learning — approaches.hard
  26. Self-supervised audio — wav2vec 2 and HuBERT.hard
  27. How are multimodal embeddings unified across text / image / audio?hard
  28. Scaling laws for self-supervised pretraining.hard
  29. Mode / representation collapse in SSL — what and why?hard
  30. VICReg / Barlow Twins — non-contrastive SSL via covariance regularization.hard
  31. Fine-tuning vs linear probe vs prompt-tuning — when do you use each?medium
  32. What is a 'foundation model' in the unsupervised sense?medium
  33. Interview: 'you have unlabeled images — which SSL method should you use?'hard
  34. Interview: 'when should you use a VAE vs GAN vs diffusion for generation?'hard

Topic modeling & text

  1. What is topic modeling and when do you use LDA?medium
  2. TF-IDF weighting — formula and rationale.easy
  3. BM25 — why is it still competitive with modern retrievers?medium
  4. Vector search / approximate nearest neighbors — main algorithms.medium
  5. How is RAG retrieval an unsupervised problem?medium
  6. PMI and PPMI — what they measure.hard
  7. How do you cluster / retrieve code snippets?hard
  8. Interview: users complain search returns irrelevant results — how do you fix?hard
  9. Interview: choose a sentence embedding model for a startup RAG.medium
  10. Interview: 'you have 1M support tickets — how do you categorize them?'hard

Recommender & association

  1. Collaborative filtering — how does it use unsupervised methods?medium
  2. Implicit feedback vs explicit ratings in recsys.hard
  3. How do you handle the cold-start problem?medium
  4. Two-tower recsys — architecture and use.hard
  5. Association rule mining — Apriori & FP-Growth.medium
  6. How does image similarity search work in production?medium
  7. Market basket analysis — modern approach.hard
  8. Unsupervised image segmentation — approaches.hard
  9. Zero-shot image classification via CLIP — mechanism.medium
  10. How does unsupervised learning help with noisy labels?hard
  11. Interview: design a recommender for a new streaming service.hard
  12. Interview: your model's accuracy dropped 15% overnight — how do you diagnose?hard
  13. Interview: you must ship an embedding service serving 100M vectors, 10ms p95 latency.hard
  14. Interview: how do you monitor drift in an embedding-based retrieval system?hard
  15. Interview: 'when should you use graph-based methods over tabular?'medium
  16. Interview: 'you have to embed 100M documents monthly — cost strategy?'hard
  17. Interview: 'summarize when unsupervised learning wins in production.'medium
  18. How do you make recommendations for a brand-new user?medium

Other topics