← Goldman Sachs Interview Insights

Goldman Sachs·Machine Learning Engineer·Online Assessment (OA)·Intermediate

Intermediate
Apr 2026

Summary

Took a 70-minute online assessment for an ML Engineer role at Goldman Sachs. Pretty standard fundamentals stuff but the time pressure was real and a couple of the calculations tripped me up more than I expected.

Questions Asked (3)

Q1

You're given four confusion matrices for a binary classifier. Which one(s) have a True Positive Rate of 0.80 and a False Positive Rate of 0.10?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Had to actually compute TPR and FPR for each option instead of eyeballing it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, recall the definitions of True Positive Rate (TPR = TP / (TP + FN)) and False Positive Rate (FPR = FP / (FP + TN)). Then, for each confusion matrix, compute TPR and FPR, and identify which ones match the target values of 0.80 and 0.10. Finally, verify your calculations and consider any edge cases.

Pro tip: In a high-pressure interview, avoid computing every matrix from scratch. Instead, quickly scan for matrices where the sum of TP and FN is a multiple of 5 (since 0.80 = 4/5) and the sum of FP and TN is a multiple of 10 (since 0.10 = 1/10). This can help you shortlist candidates before doing exact arithmetic.

1. Recall metric definitions

State the formulas for TPR and FPR: TPR = TP / (TP + FN) and FPR = FP / (FP + TN). This ensures you and the interviewer are aligned on terminology.

2. Extract values from each matrix

For each confusion matrix, identify the counts for TP, FN, FP, and TN. Write them down clearly to avoid confusion.

3. Compute TPR and FPR

Calculate TPR and FPR for each matrix using the formulas. Simplify fractions where possible to check against 0.80 (4/5) and 0.10 (1/10).

4. Compare and select

Compare the computed values to the target TPR and FPR. Select the matrix or matrices that match both conditions exactly.

5. Verify and discuss

Double-check calculations and briefly discuss any implications, such as the trade-off between TPR and FPR or the classifier's performance.

Key Points to Mention

  • Definition of True Positive Rate (Sensitivity/Recall) and False Positive Rate (1 - Specificity).
  • The importance of both metrics in evaluating binary classifiers, especially in imbalanced datasets.
  • How to compute TPR and FPR from a confusion matrix.
  • The fact that TPR and FPR are independent of class distribution, unlike accuracy.
  • The potential trade-off between TPR and FPR when adjusting the classification threshold.
  • The relevance of these metrics in real-world applications, such as fraud detection or medical diagnosis.

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

Q2

Given weights w=[0.5, -1.0], input x=[2.0, 1.0], and bias b=0, compute the pre-activation z and the sigmoid output to three decimal places.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

z comes out to 0.5*2.0 + (-1.0)*1.0 + 0 = 0.0, so sigma(0) = 0.500.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, compute the pre-activation z by taking the dot product of the weights and inputs and adding the bias. Then, apply the sigmoid function to z and round the result to three decimal places. Clearly state each step and the final values.

Pro tip: In interviews, always verbalize your calculation steps and mention that you are rounding to three decimal places as requested. This demonstrates attention to detail and communication skills.

1. Compute the dot product

Multiply each weight by its corresponding input and sum the results: (0.5 * 2.0) + (-1.0 * 1.0).

2. Add the bias

Add the bias term (0) to the dot product to get the pre-activation z.

3. Apply the sigmoid function

Compute sigmoid(z) = 1 / (1 + exp(-z)) using the calculated z.

4. Round to three decimal places

Round the sigmoid output to three decimal places as requested.

Key Points to Mention

  • The formula for pre-activation: z = w·x + b
  • The sigmoid function: σ(z) = 1 / (1 + e^{-z})
  • Step-by-step arithmetic: (0.5*2.0) + (-1.0*1.0) = 1.0 - 1.0 = 0.0
  • Sigmoid of 0 is exactly 0.5
  • Rounding to three decimal places yields 0.500
  • The importance of clear communication and double-checking calculations

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

Q3

For multi-class single-label classification, which activation function belongs in the output layer, and why are ReLU-style activations preferred in hidden layers over sigmoid or tanh?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Softmax for the output, that part was fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by directly answering the output layer activation for multi-class single-label classification: softmax. Then explain why ReLU-style activations are preferred in hidden layers, focusing on the vanishing gradient problem and sparsity. Conclude by briefly mentioning alternatives like Leaky ReLU or ELU for completeness.

Pro tip: Mention that softmax outputs a probability distribution over classes, which is essential for single-label classification, and that ReLU's non-saturating nature accelerates training. Also note that for hidden layers, ReLU is not the only option; variants like Leaky ReLU can address dying neurons.

1. Identify the output activation

State that softmax is used for multi-class single-label classification because it converts logits into a probability distribution over mutually exclusive classes.

2. Explain why softmax is suitable

Highlight that softmax ensures outputs sum to 1 and are interpretable as probabilities, aligning with the single-label assumption.

3. Discuss hidden layer activations

Explain that ReLU-style activations (e.g., ReLU, Leaky ReLU) mitigate the vanishing gradient problem and introduce sparsity, leading to faster and more effective training.

4. Contrast with sigmoid/tanh

Point out that sigmoid and tanh saturate for large positive or negative inputs, causing gradients to vanish and slowing down learning in deep networks.

5. Mention practical considerations

Note that ReLU can suffer from dying neurons, so variants like Leaky ReLU or ELU are sometimes used, but ReLU remains a strong default.

Key Points to Mention

  • Softmax for multi-class single-label classification
  • Softmax outputs sum to 1 and represent probabilities
  • ReLU avoids vanishing gradient due to non-saturating for positive inputs
  • Sigmoid/tanh saturate and cause vanishing gradients
  • ReLU induces sparsity and faster convergence
  • Variants like Leaky ReLU address dying ReLU problem

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