Machine Learning
51 bites tagged Machine Learning — interview questions with model answers, and 60-second explainers.
What is a feature store and how does it prevent training-serving skew?
This tests training-serving consistency via centralized feature management. Covers offline batch storage, online serving, shared transformations, and alternatives like ad-hoc ETL. A red flag is calling it just a database and ignoring point-in-time correctness.
What are the essential components of an end-to-end ML platform?
Tests mapping the ML lifecycle to infrastructure. A strong answer walks through six stages: data ingestion, feature store, training pipeline, model registry, deployment/serving, and monitoring with feedback loops.
How do you monitor thousands of per-customer models as a fleet?
Tests fleet-level statistical aggregation versus per-instance alerting. Strong answers propose tiered telemetry, cohort baselining for drift, and hierarchical alerting to prevent fatigue.
Design a system to monitor a real-time prediction service for feature drift
Async feature logging, distribution comparison via PSI/KS against training baseline, and threshold-based anomaly alerts. production ML observability beyond accuracy checks.
Differences between monitoring a traditional REST API and a production ML model
Contrast latency/errors with ML signals like data drift and training-serving skew against baselines, noting ground truth delays. Awareness that ML fails via data decay, not code bugs.
What automated tests belong in CI before deploying a classification model?
Name data schema checks, performance regression vs baseline, bias audits, and artifact integrity. Distinguishing code tests from ML-specific CI validation. Only testing the inference API while ignoring model behavior.
Design a system to detect training-serving skew for a numerical feature
Tests ML monitoring design via statistical distribution comparison between training and live data. Strong answers cover PSI/KS tests, windowed thresholding, and tiered alerting. Red flag: comparing raw values instead of distributions or ignoring alert fatigue.
What problems does a Feature Store solve in ML systems?
Tests understanding of feature store value beyond storage. Great answers cover: feature reuse across teams, managed transformation pipelines, and online/offline consistency to prevent training-serving skew. Red flag: calling it simply a database or cache.
How to establish data lineage and reproducibility for hundreds of ML models
This tests MLOps traceability architecture. A strong answer proposes a unified metadata graph linking raw data, feature transforms, dataset versions, training runs, and deployed models via automated hooks.
Describe feature store architecture and training-serving skew
This tests FTI pipeline glue and dual-store skew elimination. A strong answer lists offline and online stores, shared transformation logic for consistent compute, and point-in-time correctness. A red flag is calling it merely a database or cache.
Design a robust automated testing strategy for ML models before production
Statistical offline thresholds, shadow-canary launches, input drift detection, and rollbacks tied to KPIs. Validating probabilistic systems beyond binary pass-fail.
Explain ML pipelines and typical CI/CD/CT components
Tests if you separate code CI/CD from model CT and grasp ML automation. Cover source control, build, tests, deploy for code; data validation, training, evaluation, promotion for CT. Red flag: treating ML like software CI/CD and ignoring data or registry gates.
Explain Q, K, and V matrices in self-attention
This tests the information-retrieval intuition behind self-attention. Cover that Q, K, V are linear projections of one input; Q requests, K indexes, V supplies content; scores weight a sum of V.
What data pipelines and infrastructure feed a viral user acquisition model?
Tests causal attribution architecture. Great answers cover invite instrumentation with identity resolution, streaming pipelines that split organic and viral signups, and feature stores for network-state features.
Design a system that detects choice paralysis and dynamically simplifies the interface
Track hover entropy, scroll jitter, and time-to-click; use a contextual bandit to select simplification tiers. real-time behavioral inference with safe UI adaptation.
How would you use ML to optimize habit-loop notifications?
Tests blending behavioral psychology and ML to personalize cues without coercion. Good answers use contextual bandits with user-state features and reward habit formation over clicks.
K-Means vs DBSCAN: which for geospatial hotspots?
Tests matching algorithmic assumptions to data structure. K-Means needs K and assumes spheres; DBSCAN discovers arbitrary density shapes and labels noise. Choose DBSCAN for geospatial hotspots because density is irregular.
What is cross-validation and why is it more robust than a holdout split?
A single split is noisy and wastes data; k-fold rotates each fold as test, averages scores, and trains on all data. Understanding of generalization and evaluation variance.
Why is scaling unnecessary for trees but critical for SVM or K-Means?
Tests whether you understand model internals. Trees split on rank order, so scale is irrelevant. SVM and K-Means rely on distance or margin geometry, making magnitude dominate.
Why avoid one-hot encoding for high cardinality and what are alternatives?
This tests dimensionality explosion and encoding alternatives. A strong answer notes one-hot creates hundreds of sparse binary columns, causing memory bloat and overfitting, then names two strategies like target encoding and count encoding.
ML Model Registry: Source of Truth for Production Models
A model registry is version control for trained models, not just code. It tracks which artifact is running in production, who approved it, and how it was built. Skip it and you get untracked files in S3 with no way to reproduce a production model.
ML Pipeline: Systematic Model Delivery
A machine learning pipeline is the systematic workflow that carries models from data labeling through deployment inside MLOps. It keeps the AI lifecycle repeatable rather than ad hoc. The footgun is treating a one-off notebook as a production pipeline.
t-SNE: Map High-Dimensional Similarity to 2D
t-SNE turns high-dimensional similarity into 2D or 3D distance: similar points cluster and dissimilar points separate. Use it to visualize complex datasets on a flat map. Do not read exact distances from the plot; it preserves local probability, not geometry.
Design a personalized newsletter recommendation pipeline
Tests batch versus stream tradeoffs and send-time personalization constraints for millions of recipients. A strong answer covers event capture, 24-hour aggregation, lightweight rec generation, and template injection before send.
Get Machine Learning bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.