Exercises — Bias terms and their role
Before we start, let me re-anchor the four symbols we will lean on the whole way, because you may never use a symbol you have not seen defined:
Two activations appear below, so define them once:

Level 1 — Recognition
L1.1
State, in one equation, the pre-activation of a single neuron with inputs, and name every symbol.
Recall Solution
- : the -th input number.
- : the weight on that input (multiplies it).
- : the bias, a single scalar added to the sum (multiplies nothing).
- : the pre-activation, fed next into an activation .
L1.2
Which of these is the bias term acting correctly? (a) , (b) , (c) .
Recall Solution
(b). The bias is added on top of the weighted sum, not multiplied into it. (a) multiplies it (wrong), and (c) folds it inside the input so it gets scaled by — that is , a different number unless .
L1.3
For a linear neuron , what is the value of when ? What does this tell you is, geometrically?
Recall Solution
At : . So is the -intercept of the line — the height where the line crosses the vertical axis. It is exactly the piece a bias-free model (, forced through the origin) can never produce.
Level 2 — Application
L2.1
A linear neuron is with . Compute at , , and .
Recall Solution
- : .
- : .
- : . Notice every output is "slope " plus the same constant — that constant is the bias.
L2.2
A sigmoid neuron is with . At which input is the neuron half-activated ()?
Recall Solution
equals exactly when its argument is . So set the pre-activation to zero: The neuron is half-on at . Because went negative, the switch point slid to the right — the neuron became "more reluctant," needing as large as before it half-fires.
L2.3
For the loss with a linear neuron , compute the bias gradient when . Then apply one update step with and old .
Recall Solution
Chain rule, linking loss → activation → pre-activation → bias: With : . Update: . The output was too high, so lowering pulls it back toward the target — exactly the right direction.
Level 3 — Analysis
L3.1
Prove that a bias-free linear model can never fit the two points and with zero error, but can. Give the fitting .
Recall Solution
Bias-free: at , for every . But the target there is , so the error at that point is no matter what — never zero. With bias: we need two conditions:
- : .
- : . So gives , passing exactly through both points, . The bias supplied the intercept the origin-locked model was missing.
L3.2
Two neurons feed identical inputs but have biases and (both , sigmoid). Which one is "eager" and which is "reluctant"? Justify using the threshold .
Recall Solution
Thresholds: neuron 1 fires half-on at ; neuron 2 at .
- Neuron 1 is eager: even at (a small/negative push) it is already half-activated, so for ordinary inputs it is strongly on. Large positive bias = loose switch.
- Neuron 2 is reluctant: it needs up to before it half-fires. Large negative bias = stiff switch.
L3.3
Explain why the bias gradient is while a weight's is . What consequence does this have when an input happens to be ?
Recall Solution
Both start from (the neuron's error signal). The final factor differs:
\frac{\partial z}{\partial w_i}=x_i.$$ So bias picks up a factor $1$ (input-independent) while weight $w_i$ picks up $x_i$. **Consequence:** if $x_i=0$, then $\partial L/\partial w_i = \delta\cdot 0 = 0$ — that weight gets *no* update from this example. But the bias still updates by the full $\delta$, because its derivative is $1$, not $0$. The bias keeps learning even when inputs vanish.Level 4 — Synthesis
L4.1
A minibatch of examples produces per-example error signals at one neuron. Using the averaged-batch rule, compute and the updated bias if old .
Recall Solution
Averaged bias gradient: Update: .
L4.2
You have a sigmoid neuron with and want it to be half-activated exactly at . What bias achieves this? Verify by computing the pre-activation at .
Recall Solution
Half-activation requires threshold , so . Check: at , , and . ✓ So places the "switch" precisely at .
L4.3
A ReLU neuron uses . Suppose it currently outputs for all training inputs (a "dead" neuron), because everywhere and . The gradient of a dead ReLU is , so it can never revive. Explain how a positive initial bias would have prevented this, and give the smallest integer bias that makes for the worst-case input where .
Recall Solution
A dead ReLU has for every input, so its output is stuck at and its gradient is — no learning can move it. A small positive bias pushes the pre-activation up, keeping for at least some inputs, so the ReLU stays in its "on" region where the gradient is and updates can flow. For the worst-case input, . Smallest integer: This is exactly why ReLU biases are often initialized to a small positive constant rather than .
Level 5 — Mastery
L5.1
Show that for a sigmoid neuron with , the bias alone controls the output, and it is the same constant for every input. Compute the output when . What has the neuron become?
Recall Solution
With : , independent of . So the output is For : . The neuron has become a constant output unit — it ignores its input entirely and just emits a fixed number set by the bias. This is the degenerate edge case: no slope, pure offset.
L5.2
Consider with a sigmoid neuron . Derive in full, then evaluate it at . (Use .)
Recall Solution
Chain rule with three links: Evaluate: , so .
- .
- .
- Product: . Negative gradient → gradient descent increases , pushing up and toward the target . ✓
L5.3
Prove the general threshold formula: for a single-input activation neuron where has its "half-on" value at argument (like sigmoid or tanh's zero-crossing), the switch input is . Then discuss the degenerate case : does a threshold exist?
Recall Solution
The switch happens where the argument of is : Degenerate case : the formula divides by zero, which signals no finite threshold exists. Indeed with the output is the constant (from L5.1): the neuron never "switches" as varies — it is flat. So the threshold concept only makes sense when ; the sign of also decides whether increasing turns the neuron on () or off ().
Connections
- Weighted sum and linear combinations
- Perceptron and the step function
- Activation functions (sigmoid, ReLU, tanh)
- Backpropagation and the chain rule
- Weight initialization strategies
- Regularization (L1, L2)
- Affine transformations