Compare L1 and L2 Penalties for a Sparse Bing Ads Click Model

Last updated: November 29, 2026

Quick Overview

You train a logistic regression click model with tens of millions of sparse features for Bing Ads. Explain the difference between L1 and L2 regularization, which you would choose, and why.

Microsoft
Machine Learning
Data Scientist
Microsoft
November 29, 2026
Data Scientist
Phone Screen
Machine Learning
Easy

0

0

0 solved


You train a logistic regression click model with tens of millions of sparse features for Bing Ads. Explain the difference between L1 and L2 regularization, which you would choose, and why.

Large sparse linear models are a classic baseline in Microsoft Advertising. The phone screen interviewer is checking that you know the geometry and practical consequences of each penalty, especially model size and serving memory.

What the Interviewer Expects
  • Write both penalized objectives
  • Explain why L1 drives weights exactly to zero
  • Explain L2 shrinkage and handling of correlated features
  • Connect sparsity to serving memory and latency
  • Mention elastic net and choosing lambda by validation
Key Topics to Cover
L1 regularization
L2 regularization
sparsity
elastic net
logistic regression
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • What happens with two perfectly correlated features under L1 vs L2?
  • How does FTRL-Proximal relate to L1 in online learning?
  • How would you choose 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 Prep
Sample Answer
Clarify

The model scores every candidate ad in an auction, so it must be small and fast. Most of the tens of millions of features (query-ad crosses) are rare....

Approach

Objectives: min⁡w  L(w)+λ∥w∥1\min_w \; L(w) + \lambda \lVert w \rVert_1 for L1, and min⁡w  L(w)+λ∥w∥22\min_w \; L(w) + \lambda \lVert w \rVert_2^2 for L2, where LL is the log loss....


Submit Your Answer
Markdown supported