5.6.6 · D5Machine Learning (Aerospace Applications)
Question bank — Neural network fundamentals — neuron, activation functions (ReLU, sigmoid, tanh)
Before we start, one word to unpack so nothing below is mysterious: the pre-activation is just the plain number you get from before any activation function touches it. The activation is what comes out after. Everything below hinges on keeping those two straight.
True or false — justify
Stacking 100 linear layers with no activation can learn a curved decision boundary.
False — the whole stack collapses to a single , which only draws straight lines/planes. The number of layers changes nothing without a non-linearity between them.
A neuron with all weights zero and bias zero is useless forever.
True at that instant (output is for every input), but training can move the weights via gradients — unless the activation kills the gradient too, which is why initialization matters (Weight Initialization Strategies).
ReLU is a non-linear function even though each of its two pieces is a straight line.
True — the "kink" at is the non-linearity. A function is linear only if it's a single straight line through the origin scaled everywhere; the bend at zero breaks that.
Sigmoid always outputs a valid probability, so it's a safe choice for any output layer.
False — its range suits binary probability, but it can't represent signed quantities (control deflection) or multi-class distributions, and in hidden layers it causes vanishing gradients.
Tanh is just sigmoid shifted and stretched.
True — exactly . It has the same S-shape but is re-centered to span instead of .
The bias term is optional because you can always rescale the inputs instead.
False — rescaling inputs changes slope, not the vertical shift. Without the activation is forced to pass through a fixed point, so the neuron can't move its threshold.
ReLU never suffers from vanishing gradients.
Mostly true on its positive side (derivative is exactly 1), but on the negative side the gradient is 0, causing the dead neuron problem instead — a different failure, not vanishing.
A larger weight always means that input is more important.
False in general — importance depends on weight magnitude relative to input scale. A big weight on an input that's always tiny may matter less than a small weight on a large input; this is why input normalization matters.
Spot the error
"We use ReLU in the output layer so the network gives a probability."
Error — ReLU outputs , not . Probabilities need sigmoid (binary) or softmax (multi-class); ReLU belongs in hidden layers.
"Sigmoid's derivative can be as large as 1, so gradients survive deep networks."
Error — peaks at with value , not 1. Multiplying many factors shrinks gradients fast (Vanishing and Exploding Gradients).
"tanh is zero-centered, so it can never saturate."
Error — zero-centering and saturation are unrelated. tanh still flattens to for large , where its derivative goes to 0.
"A dead ReLU neuron will recover on its own after a few epochs."
Error — if for all data, the gradient through that neuron is 0, so its weights never update. It stays dead unless you use Leaky ReLU or re-initialize.
"Non-linearity comes from the weighted sum, so the more weights, the more non-linear the neuron."
Error — the weighted sum is perfectly linear no matter how many terms. Non-linearity comes only from the activation function .
"Since tanh gives negative values, its gradient can be negative, which stops learning."
Error — the output can be negative, but its derivative is always in , i.e. non-negative. Learning direction is set by the loss, not by the sign of the activation output.
"We should always use the same activation for every layer for consistency."
Error — best practice mixes them: ReLU (or variants) in hidden layers for healthy gradients, and sigmoid/tanh/softmax at the output chosen by the task (probability vs. signed vs. class).
Why questions
Why does inserting between two linear layers rescue expressiveness?
Because breaks the algebraic collapse — can no longer be folded into a single , so the composition can bend and fold input space into curves.
Why is ReLU the default for hidden layers despite being non-differentiable at ?
The single kink at exactly almost never occurs on real data, and its constant slope-1 gradient elsewhere avoids the vanishing problem — cheapness plus healthy gradients outweigh the one undefined point.
Why does sigmoid cause learning to stall in deep networks?
In backprop, per-layer derivatives multiply. Since each , ten layers give a factor , so the earliest layers get near-zero updates (Backpropagation and Gradient Descent).
Why prefer tanh over sigmoid for hidden layers when you must use an S-shape?
tanh is zero-centered, so activations aren't all-positive; this keeps gradient directions balanced and typically speeds convergence. Its slope near zero (up to 1) is also steeper than sigmoid's (up to 0.25).
Why does the bias act like a neuron's "resting potential"?
It sets the output when all inputs are zero: . This lets a neuron fire (or stay silent) without any input signal, shifting the activation threshold left or right.
Why is careful weight initialization tied to whether a network even starts learning?
Poor scaling can push every deep into a saturated region (sigmoid/tanh) or below zero (ReLU), zeroing gradients from step one. He-initialization keeps in the sensitive range (Weight Initialization Strategies).
Edge cases
What does ReLU output at exactly ?
Zero, by the convention with the boundary assigned to the "off" branch. The subderivative there is ambiguous, but frameworks pick (or ) and it rarely matters in practice.
What is as and ?
It approaches and respectively but reaches neither — the range is the open interval , so a sigmoid output is never exactly 0 or 1.
What is and why does that make tanh "zero-centered"?
, so a zero pre-activation gives a zero output. Symmetry about the origin means positive and negative inputs map symmetrically, keeping the mean activation near zero.
If every input , what does the neuron output?
— purely the bias passed through the activation. This is exactly why bias exists: without it the answer would be forced to for all-zero inputs.
For a saturated neuron ( very large) using sigmoid, what happens to its gradient contribution in backprop?
It's nearly zero, so upstream weights receive almost no update through this path — the neuron is effectively frozen even though it's still producing an output.
Can a Leaky ReLU neuron become permanently dead like a plain ReLU?
No — for it still passes a small slope (e.g. ), so a nonzero gradient always flows and the weights can keep updating back toward the active region.
Recall One-line summary to hold onto
Linearity lives in the weighted sum; all expressive power and all gradient trouble live in the activation function — pick by what the layer needs (gradient health for hidden, output meaning for the last).