Metrics Monitoring And Experimentation
Asked of: Machine Learning Engineer
Last updated

What's being tested
Interviewers are checking your ability to define, instrument, monitor, and experiment on ML-driven metrics so models behave safely and improve reliably in production. Expect to show judgment about metric selection, statistical validity for A/B test designs, drift detection, alerting strategies, and how monitoring ties into model rollout and rollback. LinkedIn cares because model regressions or silent drift directly affect member experience and business outcomes; the engineer must reliably detect, diagnose, and act.
Core knowledge
-
Metric taxonomy: classify metrics as primary business (
DAU,revenue-per-user), model quality (CTR, precision@k, NDCG), guardrail (latency, error-rate), and diagnostic (feature distributions, cohort breakdowns). -
Experiment statistics: know hypothesis tests, type-I/II errors, -values, and that the required sample size for a continuous metric is where is detectable effect and is stddev.
-
Multiple comparisons & FDR: when monitoring many metrics or segments use Benjamini–Hochberg to control False Discovery Rate or Bonferroni for conservative familywise control; naive per-metric -values inflate false positives.
-
Sequential testing: understand fixed-horizon vs sequential tests (alpha-spending, SPRT, Bayesian), and that naïve peeking invalidates -values; use proper corrections or sequential-safe methods for long-running experiments.
-
Sample Ratio Mismatch (SRM): always validate randomization by checking assignment ratios; SRM indicates logging, instrumentation, or bucketing bugs—an early guardrail before analyzing metrics.
-
Drift detection: separate population drift (feature distribution) from concept drift (label relationship). Use KS-test, Population Stability Index (PSI), KL divergence, or model prediction-shift statistics; PSI > 0.1 is moderate drift.
-
Anomaly detection: baseline algorithms: rolling z-score, EWMA, CUSUM for small persistent shifts, and seasonality-aware decompositions; tune sensitivity to balance detection vs alert fatigue.
-
Attribution & exposure logging: for correct experiment evaluation log deterministic exposure events and impressions, not just clicks; without exposures you cannot compute accurate denominators or apply inverse-propensity weighting.
-
Offline vs online parity: track feature freshness, training-serving skew, and reproducing offline metrics; keep a short feedback loop (canary + shadow) to validate online behavior matches offline expectations.
-
Alerting strategy: tier alerts by severity (SLO breach, metric drift, experiment regression) and provide automated triage (top contributing segments, recent model versions, feature changes) to reduce toil.
-
Power & minimum detectable effect (MDE): specify MDE before running experiments; small MDE implies very large sample sizes—prioritize metrics that matter and aggregate thoughtfully (daily vs weekly).
-
Cohort & segmentation: predefine cohorts for diagnostic drilling (device, locale, new vs returning); beware slicing small cohorts which raises variance and false positives; use hierarchical testing to control errors.
Worked example — Design a scalable metrics monitoring system
First 30s: clarify scale (requests/sec, number of metrics), latency needs (real-time vs daily), and ownership (who acts on alerts). Declare assumptions: millions of users, both streaming and daily aggregated metrics, and A/B test experiments run continuously.
Skeleton pillars to communicate:
-
Metric contract & instrumentation: a canonical metrics registry with definitions, ownership, and deterministic exposure logging to ensure correct denominators.
-
Aggregation layer: two paths — low-latency streaming summaries for
p99/real-time alerts and batch daily aggregates for stable metrics and experiments. -
Detection & alerting: combine statistical tests (SRM checks, sequential tests) with anomaly detectors (
EWMA,CUSUM) and tiered alerting (auto-mitigate minor alarms; page SRE for SLO breaches). -
Experiment integration: tie metrics to assignment token, track
treatment/control, run pre-specified analysis pipelines with multiplicity control and power checks. -
Operational tooling: dashboards, automatic diagnostic drilldowns (top-k segments, change in top features), runbooks and canary rollback hooks.
Key tradeoff: sensitivity vs alert fatigue — choose higher thresholds or aggregate windows to reduce false positives, but provide fast detection for regressions in critical metrics. Close by saying: if more time, I’d sketch event schema, select specific algorithms for the streaming path, and prototype SRM and FDR workflows end-to-end with canary rollouts.
A second angle — Design LinkedIn Learning course recommendations
Apply the same monitoring and experimentation principles to a recommender: pick primary metrics (course enroll rate, completion rate), engagement proxies (time-spent), and long-term value (skill acquisition signals). Instrument exposures for each recommended item and log downstream signals (start, complete, certification). Use counterfactual or IPS weighting when offline evaluation is biased by existing policy; run bandit or randomized experiments for exploration-exploitation balance. Monitor novelty and diversity guardrails to avoid filter bubbles, and set up cohort-aware drift detectors since learner behavior varies by career stage and seasonality.
Common pitfalls
Pitfall: Treating every statistically significant change as actionable. Small effects with large N often lack business or user impact; always assess practical significance and cost of remediation.
Pitfall: Starting without validating randomization and instrumentation. Failing SRM checks or missing exposure logs makes experiment results useless; run SRM and data-integrity tests before metric analysis.
Pitfall: Building monitoring as a pure infrastructure problem. Engineers often design pipelines but omit metric ownership, runbooks, or diagnostic tooling—alerts with no actioners become noise.
Connections
The interviewer may pivot to model deployment (canarying, rollback strategies), feature store issues (freshness and schema changes), or causal inference topics (backdoor adjustments, IPW) to dig into how you separate correlation from production-impacting causality. Be ready to connect monitoring results to retraining cadence and CI for models.
Further reading
-
Online Controlled Experiments at Large Scale (Kohavi et al.) — practical lessons and pitfalls from running experiments at internet scale.
-
Evan Miller — A/B Testing Guide — clear treatment of sample size, power, and sequential testing heuristics.
Practice questions
- Design LinkedIn Learning course recommendationsLinkedIn · Machine Learning Engineer · Onsite · medium
- Design a system for LinkedIn SkillsLinkedIn · Machine Learning Engineer · Onsite · medium
- Answer practical ML foundations questionsLinkedIn · Machine Learning Engineer · Onsite · medium
- Design a scalable metrics monitoring systemLinkedIn · Machine Learning Engineer · Technical Screen · hard
Related concepts
- Experimentation, A/B Testing, And Product MetricsBehavioral & Leadership
- Experimentation and Metrics DesignMachine Learning
- Product Metric Frameworks And Diagnostic AnalyticsAnalytics & Experimentation
- A/B Testing And Product Metric DiagnosticsAnalytics & Experimentation
- Product Metrics, Guardrails, And RetentionAnalytics & Experimentation
- Product Metric Design And Diagnostic Deep DivesAnalytics & Experimentation