← Coinbase Interview Insights

Coinbase·Machine Learning Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Coinbase ML engineer interview with a very hands-on neural network math question. No fluff, they just handed you a small network with explicit weights and asked you to grind through the arithmetic layer by layer.

Questions Asked (1)

Q1

Given a small fully connected neural network with specific weights and biases and sigmoid activations, compute the forward pass step by step, showing the pre-activation values (z = Wx + b) and the activated outputs (a = sigmoid(z)) for each layer.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This looked straightforward until I started second-guessing my sigmoid approximations mid-calculation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly stating the dimensions of each weight matrix and bias vector to ensure correct matrix multiplication. Then, for each layer, compute the pre-activation z = Wx + b, apply the sigmoid activation to get a, and use that as input to the next layer. Finally, present the output layer's activated values as the network's prediction.

Pro tip: Double-check the order of matrix multiplication: W is (neurons in current layer) x (neurons in previous layer), so z = W * a_prev + b. Also, mention that sigmoid outputs are in (0,1), which is useful for binary classification or probability estimates.

1. Identify dimensions and parameters

List the weight matrices and bias vectors for each layer, noting their shapes to avoid dimension mismatches. Confirm the input vector x and the number of layers.

2. Compute first layer pre-activation and activation

Calculate z1 = W1 * x + b1, then apply sigmoid element-wise to get a1 = sigmoid(z1). Show intermediate values clearly.

3. Propagate through hidden layers

For each subsequent hidden layer i, compute zi = Wi * a_{i-1} + bi, then ai = sigmoid(zi). Repeat until the last hidden layer.

4. Compute output layer

Calculate z_output = W_output * a_last_hidden + b_output, then a_output = sigmoid(z_output). This is the final prediction.

5. Summarize and interpret

Present all z and a values in a table for clarity. Optionally, discuss how these outputs could be used (e.g., threshold at 0.5 for binary classification).

Key Points to Mention

  • Matrix multiplication order: z = W * a_prev + b, where W has shape (current layer size, previous layer size).
  • Sigmoid function: σ(z) = 1 / (1 + e^{-z}), applied element-wise.
  • Importance of tracking dimensions to ensure compatibility.
  • Use of vectorized operations for efficiency in practice.
  • Numerical stability: for large |z|, sigmoid saturates, but exact computation is fine for small networks.
  • Interpretation of output as probabilities, especially for binary classification tasks.

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