← LinkedIn Interview Insights

LinkedIn·Machine Learning Engineer·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

LinkedIn ML engineer interview covering a solid mix of practical foundations: calibration, feature selection, tokenizers, and optimizers. Nothing too exotic but the questions had enough depth that you couldn't just wave your hands through them.

Questions Asked (4)

Q1

Your model outputs probabilities. When does that actually matter for calibration, and how would you go about calibrating it? How do you even measure whether calibration is good?

Technical Trade-offsProduct Analytics & Metrics
Author's notes

This one tripped me up more than I expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that calibration matters when predicted probabilities are used for decision-making under uncertainty, such as ranking, thresholding, or cost-sensitive actions. Then explain how to calibrate using held-out data and methods like Platt scaling or isotonic regression, and finally describe metrics like reliability diagrams and ECE to measure calibration. Emphasize the trade-off between calibration and discrimination, and the importance of validating on a separate set.

Pro tip: Mention that calibration should be evaluated on a separate calibration set and that it can degrade if the model is overconfident or if the data distribution shifts. Also, note that for ranking tasks like LinkedIn's feed, calibration may be less critical than for tasks like ad bidding where probabilities directly inform bids.

1. When calibration matters

Explain that calibration is crucial when the predicted probabilities are used as actual probabilities for decision-making, e.g., in ad bidding, risk assessment, or when thresholds are set based on costs. It matters less for pure ranking if only the order is needed.

2. How to calibrate

Describe post-hoc calibration methods: Platt scaling (logistic regression on scores) for sigmoid-shaped distortions, isotonic regression for monotonic but non-sigmoid distortions, and temperature scaling for neural networks. Mention that these require a held-out calibration set.

3. Measuring calibration

Discuss metrics: reliability diagrams (calibration curves) to visualize, Expected Calibration Error (ECE) and Maximum Calibration Error (MCE) to quantify, and proper scoring rules like Brier score or log loss that combine calibration and discrimination.

4. Trade-offs and validation

Highlight that calibration can affect discrimination (e.g., isotonic regression may overfit), so validate on a separate test set. Also consider that calibration may need to be re-evaluated over time due to distribution shift.

5. Practical considerations

Mention that in production, calibration should be monitored and updated periodically. For imbalanced data, calibration is especially important. Also, note that some models (e.g., tree-based) are often miscalibrated, while logistic regression is usually well-calibrated.

Key Points to Mention

  • Calibration vs. discrimination: calibration is about the reliability of probability estimates, while discrimination is about ranking ability.
  • Common calibration methods: Platt scaling, isotonic regression, temperature scaling, and their assumptions.
  • Evaluation metrics: reliability diagrams, ECE, MCE, Brier score, log loss.
  • Need for a separate calibration set to avoid overfitting.
  • Impact of data shift on calibration and the need for monitoring.
  • Examples where calibration matters: ad click-through rate prediction, risk scoring, and any decision where expected value is computed.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Walk me through why you'd do feature selection at all, what methods you'd use across filter, wrapper, and embedded approaches, and how you'd use a neural network to do it.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

The neural network angle at the end is what they were really probing for.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the core reasons for feature selection—improving model performance, reducing overfitting, and enhancing interpretability—then systematically cover filter, wrapper, and embedded methods with concrete examples. Finally, discuss neural network-based approaches, emphasizing how they can learn feature importance or perform selection end-to-end, and tie it back to LinkedIn-scale problems.

Pro tip: Mention that feature selection is not just about accuracy but also about reducing inference latency and memory footprint, which is critical for production systems at LinkedIn. Also, highlight that neural feature selection can be integrated into the model architecture, enabling joint optimization.

1. Motivate feature selection

Explain why feature selection matters: combating the curse of dimensionality, reducing overfitting, improving model interpretability, and decreasing computational cost. Relate to LinkedIn's large-scale data and real-time serving needs.

2. Cover filter methods

Describe filter methods that rank features based on statistical scores independent of any model, such as correlation, mutual information, chi-square, and variance threshold. Mention their speed and scalability but note they ignore feature interactions.

3. Cover wrapper methods

Explain wrapper methods that use a predictive model to evaluate feature subsets, like forward selection, backward elimination, and recursive feature elimination (RFE). Highlight their ability to capture interactions but warn about computational expense.

4. Cover embedded methods

Discuss embedded methods that perform feature selection during model training, such as L1 regularization (Lasso), tree-based feature importance, and Elastic Net. Emphasize their balance between performance and efficiency.

5. Neural network-based feature selection

Explain how neural networks can perform feature selection: using attention mechanisms, gating layers (e.g., hard concrete gates), or learned feature weights. Mention that these can be trained end-to-end and allow for non-linear interactions.

Key Points to Mention

  • Curse of dimensionality and overfitting reduction
  • Filter methods: mutual information, chi-square, correlation
  • Wrapper methods: RFE, forward/backward selection
  • Embedded methods: Lasso, tree-based importance
  • Neural approaches: attention, gating mechanisms, learned sparse weights
  • Trade-offs: computational cost vs. model performance, interpretability vs. accuracy

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

What is a tokenizer, what are the main types like BPE, WordPiece, and unigram, and what practical trade-offs should you care about when choosing one?

Technical Trade-offsSystem Design
Author's notes

Felt most comfortable here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining a tokenizer as a component that converts raw text into tokens and then IDs, and explain why subword tokenization is essential for handling open vocabularies and rare words. Then compare BPE, WordPiece, and Unigram in terms of their algorithmic approach and practical implications. Finally, discuss trade-offs such as vocabulary size, language coverage, computational cost, and integration with downstream models, tying them to real-world scenarios like LinkedIn's multilingual content.

Pro tip: Emphasize that the choice of tokenizer is not just a preprocessing detail—it directly impacts model performance, latency, and memory footprint, so always benchmark tokenizers on your specific data distribution and task before committing.

1. Define tokenizer and its role

Explain that a tokenizer segments text into tokens (words, subwords, or characters) and maps them to IDs, enabling models to process text. Highlight that subword tokenization balances vocabulary size and coverage.

2. Describe main types: BPE, WordPiece, Unigram

Briefly outline each: BPE merges frequent character pairs iteratively; WordPiece uses a likelihood-based approach to build subwords; Unigram starts with a large vocabulary and prunes based on probabilities. Mention that BPE and WordPiece are common in models like GPT and BERT, while Unigram is used in SentencePiece.

3. Discuss practical trade-offs

Cover trade-offs: vocabulary size vs. sequence length, handling of rare words and morphologically rich languages, computational efficiency, and compatibility with pretrained models. Note that larger vocabularies reduce sequence length but increase embedding size and softmax cost.

4. Relate to real-world constraints

Connect to production considerations: latency, memory, multilingual support, and domain-specific jargon. For LinkedIn, mention the need to handle diverse languages and professional terminology, and the importance of consistency between training and inference.

5. Conclude with a recommendation

Summarize that the best tokenizer depends on the task, data, and model architecture, and suggest evaluating options empirically. Mention that for many applications, starting with a well-established tokenizer (e.g., BPE from Hugging Face) is pragmatic.

Key Points to Mention

  • Subword tokenization solves the out-of-vocabulary problem and balances vocabulary size with sequence length.
  • BPE: frequency-based merging; WordPiece: likelihood-based merging; Unigram: probabilistic pruning.
  • Trade-offs: vocabulary size affects model size, inference speed, and memory; larger vocab reduces sequence length but increases embedding parameters.
  • Language coverage: tokenizers like SentencePiece (Unigram) handle multilingual text without language-specific preprocessing.
  • Integration: tokenizer must match the pretrained model (e.g., BERT uses WordPiece, GPT uses BPE).
  • Evaluation: measure tokenization quality via metrics like fertility (average tokens per word) and downstream task performance.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Explain Adam at a high level, what internal state it tracks and why, and describe situations where it fails or needs careful tuning.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Standard but they wanted more than 'it uses first and second moment estimates.' The failure cases are where it gets interesting: sparse gradients making the second moment estimate noisy, weight decay interaction being wrong in vanilla Adam versus AdamW.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start with a concise definition of Adam as an adaptive moment estimation optimizer, then explain the two moment estimates (first and second) and bias correction. Next, discuss failure modes like non-convergence, poor generalization, and sensitivity to hyperparameters, and finally mention tuning strategies such as learning rate schedules and epsilon adjustments.

Pro tip: Emphasize that Adam's adaptive learning rates can lead to poor generalization compared to SGD with momentum, and mention that switching to AdamW or using learning rate warmup and decay often resolves issues in practice.

1. Define Adam and its core mechanism

Explain that Adam combines momentum and RMSProp by maintaining exponential moving averages of gradients (first moment) and squared gradients (second moment).

2. Describe internal state and bias correction

Detail the two state variables (m and v) and how bias correction addresses initialization bias, especially in early steps.

3. Discuss failure modes and limitations

Cover issues like non-convergence on some problems, poor generalization, sensitivity to learning rate and epsilon, and the need for warmup.

4. Explain tuning strategies and alternatives

Mention hyperparameter tuning (learning rate, beta1, beta2, epsilon), decoupled weight decay (AdamW), and learning rate schedules.

5. Relate to practical experience

If possible, share a brief example from your work where Adam required tuning or where an alternative optimizer performed better.

Key Points to Mention

  • Adam maintains first and second moment estimates (m and v) for each parameter.
  • Bias correction is applied to counteract initialization bias, especially in early steps.
  • Adam can fail to converge on some problems due to aggressive adaptive learning rates.
  • Poor generalization compared to SGD with momentum is a known issue.
  • Hyperparameters like learning rate, beta1, beta2, and epsilon require careful tuning.
  • AdamW decouples weight decay from the adaptive learning rate, improving regularization.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.