Interview questions in AI & ML, page 3
Compare YCbCr and RGB. Why chroma subsampling for compression?
Tests color decorrelation and perceptual redundancy. Contrast correlated RGB with YCbCr's luma-chroma split; eyes resolve brightness better than color, so 4:2:0/4:2:2 cuts chroma bandwidth ~50-75% with little loss.

How do you guarantee identical feature engineering for training and real-time inference?
Tests unifying feature engineering across batch and online paths to eliminate skew. Answer: shared transformation libraries, versioned feature stores, and logged feature validation. Red flag: separate training and serving code without a single source of truth.
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.

How would you build and validate a proxy target for employee burnout?
Combine survey scales with behavioral signals such as off-hours logins and PTO drops; validate via convergent and predictive validity against attrition.

Why is RGB Euclidean distance a poor measure of perceptual color difference?
This tests perceptual uniformity. A good answer explains that RGB distance does not match human vision, then describes CIELAB as a space where deltas approximate perceived differences, making segmentation align with human vision.
Why Multi-Head Attention
Multiple heads attend to different subspaces and relations in parallel, which one big head averages away.

Design ingestion for clickstream and batch product metadata
Use a data lake for raw data, a feature store for joins, columnar formats for batch, and row formats for events.
Describe the BRDF, its advantage over Lambertian, and critical CV tasks
Tests 4D view-dependent reflectance. Strong answers define BRDF as dL_r/dE_i (sr^-1) over four angles; note Lambertian is isotropic; cite photometric stereo and shape-from-shading where specularity breaks the model. Red flag: calling it albedo.

ETL vs ELT: when to prefer each for ML?
Tests architecture tradeoffs. Contrast ETL's pre-load transformation with ELT's in-warehouse transformation, map structured legacy to ETL and raw lakes to ELT, and cite ML iteration needs. Red flag: calling one better ignoring compute placement or volume.
What is masked in decoder self-attention and why?
Future positions are masked so token i attends only to prior tokens. This prevents cheating during parallel teacher-forced training when the full target is visible.

How would you implement a simple box blur on a grayscale image?
Iterate interior pixels, sum the N by N neighborhood, divide by kernel area, write to a new buffer.
What data validation strategy prevents new categories from breaking your encoder?
Lock categorical domains in a schema, reject unseen categories before encoding, and use an OOV bucket as fallback.
Why is self-attention O(n^2) and what are the implications?
Tests the attention matrix bottleneck. Strong answers note QK^T yields an N×N matrix, creating quadratic compute and memory that blocks long documents and high-res images. Red flag: confusing model size with activation memory.

Explain the Central Limit Theorem and its importance for hypothesis testing
This tests whether you know why sample means from skewed populations tend toward normal as size grows, enabling tests. A strong answer covers mean convergence to normal and standard error. Red flag: claiming the CLT works for small samples or single points.
What is an image histogram and how does histogram equalization improve contrast?
Define a histogram as pixel counts per intensity; explain equalization normalizes the CDF to spread intensities across the full range.
Versioning a 10TB dataset as code
Treat data like code via content-addressed pointers in Git while bytes live in object storage; dedupe by hashing so versions share unchanged files.
Removing salt-and-pepper noise
Use a median filter; it replaces a pixel with the neighborhood median so extreme outliers are discarded.
Layer Norm and Residuals in Transformer Blocks
Residuals preserve gradient flow, layer norm stabilizes activations per token, and it beats batch norm because it is independent of batch and sequence length.
Describe the bias-variance tradeoff and how model complexity affects bias and variance
More complexity cuts bias but boosts variance via overfitting; test error forms a U.
Causal versus Masked Language Modeling
Pre-training learns general language from unlabeled text; CLM predicts the next token left-to-right, MLM predicts masked tokens using both sides.
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