3.1 Neural Network Basics
Interview-ready field notes
The 20-second answer
A neural network stacks learned linear transforms with nonlinear activations, then learns the weights with backpropagation and gradient descent.
Core ideas to retain
- One layer computes , then an activation such as ReLU or GELU adds nonlinearity.
- Without activations, stacked linear layers collapse into one linear transform and cannot learn nonlinear boundaries like XOR.
- The forward pass predicts; the loss scores that prediction; the backward pass computes gradients; the optimizer updates weights.
- Initialization and normalization keep activations and gradients in a workable range as depth grows.
Interview / OA rule
For a basic OA question, track tensors by shape: batch , input features , output features ; gives .
One good written resource
Google — Neural Networks — read this after the video when you want a clearer mental model, not more pages of notes.
Most asked
Interview questions to practise aloud
Each answer is the level of detail expected for a strong fundamentals round.
Why do neural nets need activation functions?
They add nonlinearity. Otherwise any number of linear layers is equivalent to one linear layer.
What does backprop compute?
The derivative of loss with respect to each trainable parameter, so the optimizer knows how to change it.
ReLU vs sigmoid in hidden layers?
ReLU is simple and has a non-saturating positive region, so gradients tend to flow better. Sigmoid can saturate and cause small gradients.