← Amazon Interview Insights

Amazon·Research Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
May 2026Remote

Summary

Amazon RS phone screen, pure ML breadth orals, no coding. Fast pace, classical stuff but the optimizer and neural net questions had some real teeth to them.

Questions Asked (5)

Q1

What are the assumptions of linear regression, and why do we use squared loss?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

I knew the assumptions cold but fumbled the justification for squared loss until I remembered to frame it as MLE under Gaussian noise.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly listing the assumptions of linear regression (linearity, independence, homoscedasticity, normality of errors, no multicollinearity) and explain why each matters for valid inference. Then, justify squared loss by connecting it to maximum likelihood estimation under Gaussian errors and its mathematical convenience, while briefly noting alternatives like absolute loss for robustness.

Pro tip: Mention that squared loss is sensitive to outliers, so in practice at Amazon you might consider robust alternatives or regularization, showing awareness of trade-offs beyond textbook assumptions.

1. List the assumptions

Enumerate the key assumptions: linearity, independence of errors, homoscedasticity, normality of errors, and no perfect multicollinearity. Briefly explain each.

2. Explain why assumptions matter

Discuss how violations affect coefficient estimates, standard errors, and hypothesis tests, leading to biased or inefficient results.

3. Justify squared loss

Connect squared loss to maximum likelihood estimation under Gaussian errors and its convexity, which ensures a unique global minimum.

4. Discuss trade-offs

Acknowledge that squared loss is sensitive to outliers and may not be ideal for all data; mention alternatives like absolute loss or Huber loss.

5. Relate to practical applications

Tie the discussion to real-world scenarios, such as when assumptions are violated and how to address them (e.g., transformations, robust regression).

Key Points to Mention

  • Linearity: the relationship between predictors and outcome is linear.
  • Independence: errors are uncorrelated.
  • Homoscedasticity: constant variance of errors.
  • Normality: errors are normally distributed (for inference).
  • No multicollinearity: predictors are not perfectly correlated.
  • Squared loss corresponds to Gaussian MLE and is convex, but sensitive to outliers.

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

Q2

What is logistic regression and why do we use log loss instead of raw probability?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Went straight to the Bernoulli likelihood angle.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining logistic regression as a linear model for binary classification that outputs probabilities via the sigmoid function. Then explain that log loss (cross-entropy) is the proper loss function because it directly measures the quality of predicted probabilities and penalizes confident misclassifications, unlike raw probability which is not a proper scoring rule. Emphasize that log loss is derived from maximum likelihood estimation under a Bernoulli assumption, making it statistically principled and convex for efficient optimization.

Pro tip: Mention that log loss is a proper scoring rule, which encourages calibrated probabilities—crucial in real-world applications like Amazon's where decision-making depends on reliable confidence estimates. Also, note that using raw probability as a loss (e.g., mean squared error on probabilities) can lead to vanishing gradients and poor calibration.

1. Define logistic regression

Explain that logistic regression models the probability of a binary outcome using a linear combination of inputs passed through the sigmoid function. It's a discriminative model that directly estimates P(y=1|x).

2. Introduce the loss function

State that we need a loss function to measure how well the model's predicted probabilities match the true labels. Log loss, or binary cross-entropy, is the standard choice.

3. Explain why log loss over raw probability

Discuss that raw probability (e.g., using accuracy or MSE on probabilities) is not a proper scoring rule and doesn't penalize overconfident wrong predictions enough. Log loss heavily penalizes confident misclassifications and is derived from maximum likelihood estimation.

4. Highlight statistical and optimization benefits

Mention that log loss is convex, ensuring a unique global minimum, and aligns with the probabilistic foundation of logistic regression. It also provides well-calibrated probabilities.

5. Connect to practical implications

Emphasize that in applications like Amazon's, calibrated probabilities are essential for decision-making, and log loss encourages that. Also, note that log loss is the natural loss for Bernoulli distribution.

Key Points to Mention

  • Logistic regression uses the sigmoid function to output probabilities.
  • Log loss (binary cross-entropy) is derived from maximum likelihood estimation under a Bernoulli model.
  • Log loss is a proper scoring rule, meaning it is minimized when predicted probabilities match true probabilities.
  • Raw probability (e.g., using MSE on probabilities) is not a proper scoring rule and can lead to poor calibration and vanishing gradients.
  • Log loss heavily penalizes confident misclassifications, which is desirable in many applications.
  • Log loss is convex, which guarantees convergence to the global minimum with gradient-based optimization.

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

Q3

What is Random Forest and how does it select features at each split?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The sqrt(p) thing is one of those details I always have to remind myself is actually the point, not just a hyperparameter quirk.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining Random Forest as an ensemble of decision trees trained on bootstrap samples with random feature subsets, then explain the feature selection at each split: a random subset of features is considered, and the best split is chosen based on impurity reduction (Gini or entropy). Emphasize that this randomness reduces correlation among trees and improves generalization, and connect it to trade-offs like bias-variance and computational efficiency.

Pro tip: Mention that the number of features considered at each split (mtry) is a key hyperparameter that controls the trade-off between tree diversity and individual tree strength, and that in practice it's often set to sqrt(p) for classification and p/3 for regression.

1. Define Random Forest

Explain that it's an ensemble learning method that builds multiple decision trees and aggregates their predictions (majority vote for classification, average for regression).

2. Describe the training process

Mention bootstrap sampling (bagging) and that each tree is grown on a different bootstrap sample, with random feature selection at each split.

3. Explain feature selection at splits

At each node, a random subset of m features (out of p total) is selected, and the best split among those is chosen based on impurity reduction (Gini impurity or entropy).

4. Discuss the role of randomness

Highlight that this randomness decorrelates trees, reducing variance and preventing overfitting, while maintaining low bias.

5. Connect to trade-offs and practical considerations

Mention hyperparameters like number of trees and mtry, and how they affect performance, computational cost, and interpretability.

Key Points to Mention

  • Ensemble of decision trees using bagging (bootstrap aggregating)
  • Random feature subset selection at each split (mtry hyperparameter)
  • Impurity measures: Gini impurity or entropy for classification, variance reduction for regression
  • Reduction of correlation among trees leading to lower variance
  • Out-of-bag error as a validation method
  • Feature importance derived from impurity decrease or permutation

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

Q4

Explain Adam and walk through its pros and cons versus SGD.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

I had drilled the four update lines enough that I could write them out without hesitating.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining Adam's update rule, emphasizing its adaptive per-parameter learning rates and bias correction. Then compare it to SGD across key dimensions like convergence speed, generalization, and hyperparameter sensitivity, citing empirical evidence and practical considerations. Conclude with guidance on when to choose each optimizer based on problem characteristics.

Pro tip: Mention that while Adam often converges faster, SGD with momentum can achieve better generalization in some vision tasks, and recent optimizers like AdamW fix Adam's weight decay issue—showing you're up-to-date with research.

1. Define Adam

Explain that Adam computes adaptive learning rates for each parameter using estimates of first and second moments of gradients, with bias correction.

2. Define SGD

Briefly describe SGD and its common variant with momentum, noting that it uses a single learning rate for all parameters.

3. Compare Pros and Cons

Contrast Adam's fast convergence, robustness to hyperparameters, and suitability for sparse gradients against SGD's better generalization, lower memory, and simplicity.

4. Discuss Practical Considerations

Highlight scenarios where each shines: Adam for NLP/transformers, SGD for computer vision; mention AdamW and learning rate schedules.

5. Conclude with Recommendations

Summarize that the choice depends on the task, and suggest starting with Adam for rapid prototyping, then trying SGD for final performance.

Key Points to Mention

  • Adam's update rule: m_t and v_t estimates, bias correction, and per-parameter learning rates.
  • SGD with momentum: update rule and its effect on navigating ravines.
  • Convergence speed: Adam often faster initially, but SGD can catch up with tuning.
  • Generalization: SGD sometimes yields better test performance, especially in vision.
  • Hyperparameter sensitivity: Adam less sensitive to learning rate, but weight decay needs tuning (AdamW).
  • Memory and computation: Adam stores additional moment estimates, increasing memory footprint.

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

Q5

You have two two-layer neural networks, one narrow and one wide. Which is more likely to get stuck in local minima?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

This one is designed to catch people who assume more parameters means more complexity means harder optimization.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify that the question is about optimization difficulty in non-convex loss landscapes, then compare the narrow and wide networks in terms of parameter count, redundancy, and loss surface geometry. Argue that the narrow network is more likely to get stuck in local minima due to its limited capacity and more rugged loss surface, while the wide network has smoother, more connected minima.

Pro tip: Acknowledge that in practice, with modern optimizers and overparameterization, local minima are often not the main obstacle; instead, saddle points and plateaus dominate. This shows depth beyond textbook knowledge.

1. Define local minima in context

Explain that local minima are suboptimal points where gradients vanish but are not global minima, and that they can trap gradient-based optimization.

2. Compare loss surface geometry

Discuss how narrow networks have fewer parameters and less redundancy, leading to a more rugged loss surface with many isolated local minima, while wide networks have smoother, more connected surfaces.

3. Consider overparameterization effects

Mention that wide networks are overparameterized, which tends to eliminate bad local minima and create paths to good solutions, as supported by recent theoretical and empirical work.

4. Address practical caveats

Note that in practice, local minima are less problematic than saddle points, and that other factors like initialization, learning rate, and batch size also influence optimization.

5. Conclude with the answer

State clearly that the narrow network is more likely to get stuck in local minima, but emphasize the nuances and practical considerations.

Key Points to Mention

  • Overparameterization in wide networks leads to smoother loss landscapes and fewer bad local minima.
  • Narrow networks have limited capacity and less redundancy, making them more prone to rugged loss surfaces.
  • Recent research (e.g., Choromanska et al., 2015; Dauphin et al., 2014) shows that saddle points, not local minima, are the primary challenge in high-dimensional optimization.
  • Wide networks can have many equivalent global minima due to permutation symmetries, which helps optimization.
  • Practical factors like initialization (e.g., Xavier, He) and optimization algorithms (e.g., Adam, SGD with momentum) can mitigate local minima issues.
  • The question is nuanced: while narrow networks are more likely to have local minima, wide networks can still have saddle points and plateaus.

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