← Pinterest Interview Insights

Pinterest·Machine Learning Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Pinterest ML Engineer screen that was basically a 'can you do arithmetic with neural nets' exercise. One question, very hands-on, felt more like a math exam than a real interview.

Questions Asked (1)

Q1

Given a small neural network with specific weights, biases, and an input vector, compute the forward pass by hand. Show all intermediate pre-activations and post-activations at each layer using the sigmoid function.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

I spent the first few minutes just confirming the architecture because I've been burned before assuming things.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly stating the architecture and the given parameters, then systematically compute the pre-activation (z) and post-activation (a) for each layer using the sigmoid function. Show all arithmetic steps and keep track of intermediate values to avoid errors, and finally verify the output shape and range.

Pro tip: While computing, mention that sigmoid outputs are always between 0 and 1, and note that for large negative or positive inputs, the sigmoid saturates, which can cause vanishing gradients—this shows awareness of practical implications.

1. Understand the network architecture

Identify the number of layers, neurons per layer, and the activation function (sigmoid). Write down the weight matrices and bias vectors for each layer.

2. Compute first layer pre-activations

For each neuron in the first hidden layer, compute z = W·x + b, where x is the input vector. Show the dot product and addition explicitly.

3. Apply sigmoid activation

Compute a = σ(z) = 1/(1+e^{-z}) for each pre-activation. Round to a reasonable number of decimal places (e.g., 4) for clarity.

4. Propagate through subsequent layers

Repeat steps 2 and 3 for each hidden layer, using the previous layer's activations as input. For the output layer, compute pre-activations and apply sigmoid if required.

5. Summarize and verify

List all intermediate pre-activations and post-activations in a table. Check that outputs are in (0,1) and that dimensions match expectations.

Key Points to Mention

  • Sigmoid function formula and its range (0,1)
  • Matrix multiplication and bias addition for each layer
  • Importance of showing intermediate pre-activations (z) and post-activations (a)
  • Potential numerical issues like saturation and vanishing gradients
  • Verification of output shape and consistency with network architecture
  • Use of vectorized operations for efficiency (even when computing by hand)

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