Choosing L1 or L2 Regularization for Sparse Ad Features
Last updated: November 29, 2026
Quick Overview
A logistic regression model for ad conversion uses millions of sparse binary features. Compare L1 and L2 regularization for this model and recommend one.
TikTok
November 29, 20260
0
0 solved
A logistic regression model for ad conversion uses millions of sparse binary features. Compare L1 and L2 regularization for this model and recommend one.
Although deep models dominate TikTok ads ranking, logistic regression with sparse features is still used for fast baselines and some calibration layers. Phone screens check basic understanding of regularization and its practical effects.
What the Interviewer Expects
- Write the penalized loss for L1 and L2
- Explain sparsity from L1 and shrinkage from L2
- Connect to model size and serving cost
- Mention elastic net and FTRL
- Explain tuning lambda via validation
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- Why does L1 produce exact zeros geometrically?
- What happens with correlated features under L1?
- How does FTRL-Proximal relate to L1?
- How would you tune the regularization strength?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Clarify feature count, whether serving memory matters, and whether features are correlated (many crosses of the same base feature are)....
Approach
Penalized loss:
L1 adds a constant pull toward zero, so weak features are set exactly to zero. L2 shrinks a...