Intermediate interview questions in AI & ML, page 6
Re-identification in multi-object tracking
Re-ID matches an object to its prior id using appearance embeddings, not just position; store track features and match re-entering detections by embedding similarity.
Aligning text and image representations
Contrastive learning like CLIP pulls matched image-text pairs together and pushes mismatches apart; alternatively projection layers map one modality into a frozen model's space.
How would you systematically diagnose high latency in an online inference service?
Check p90/p99 and TTFT to split queuing from compute; inspect queue depth, batch size, GPU, and benchmarks; check cache.
Explain model quantization, its benefits, drawbacks, and validation approach
Tests precision trade-offs in production. Answer: define lowering weights from fp32 to int8/int4; cite memory and latency gains versus accuracy loss; validate with downstream benchmarks and shadow A/B. Red flag: treating as lossless or skipping task metrics.
Explain bias-variance tradeoff and how regularization or tree depth manage it
Tests understanding of generalization error decomposition. Define bias as underfitting and variance as sensitivity to training noise; show regularization and shallow trees trade excess variance for slightly higher bias. Red flag: claiming both can hit zero.
Inductive biases of ViT versus CNN
CNNs bake in locality and translation equivariance; a plain ViT has almost none beyond patch structure, so it must learn spatial relations from data, needing large datasets or strong pretraining.
How would you design an A/B test for two live ML models?
Tests production experimentation rigor beyond random splitting. Strong answers cover: consistent user hashing for sticky assignment, isolated feature stores, guardrail metrics, and pre-calculated statistical power.

How would feature engineering for categoricals differ for logistic regression versus LightGBM?
It tests model-specific encoding decisions. Logistic regression needs one-hot to avoid false ordinality; tree models like LightGBM use ordinal encoding since splits rely on thresholds, not distance.
Random Forest versus Gradient Boosting
Random Forest trains deep trees in parallel and averages to cut variance; boosting builds shallow trees sequentially, each correcting prior errors to cut bias, often higher accuracy but…
How Swin Transformer achieves linear attention
Swin computes attention within local non-overlapping windows of fixed size, making cost linear in patches, then shifts windows between layers so information crosses boundaries.
How FID is calculated versus Inception Score
FID fits Gaussians to Inception features of real and fake images then measures Frechet distance; it uses real references and detects mode collapse.
Cross-attention for visual question answering
In cross-attention queries come from one modality and keys/values from the other, e.g. text queries attend over image features so the question selects relevant regions.

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.
How to evaluate a RAG system end to end
Measure retrieval (recall, precision, MRR, NDCG) and generation (faithfulness, answer relevance) separately, plus end-to-end correctness.
Why ViTs need positional embeddings
Self-attention is permutation invariant so patch order is lost; positional embeddings restore spatial location. CNNs encode position implicitly via the fixed convolution grid.
How MMLU works and the contamination problem
MMLU is multiple-choice across 57 subjects scored by accuracy; contamination means test items leaked into pretraining, inflating scores.
Reference-free evaluation for open-ended dialogue
ROUGE punishes valid paraphrases; use reference-free LLM-as-judge or learned scorers rating coherence, relevance, and groundedness.

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.

Model output distribution shifts. What are root causes and next steps?
This tests covariate vs label shift vs concept drift when outputs shift. A strong answer checks features before labels, then feedback loops or staleness. A red flag is generic drift without separating P(X), P(Y), and P(Y|X).
Designing input and output guardrails for a chatbot
Input guardrails filter or classify user prompts (injection, off-topic, PII) before the model; output guardrails validate responses for toxicity, leakage, and policy before sending.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles