We use only two functions the whole way down. Let us restate them so nothing is assumed:
Figure 1 — the two squashers. Study this before Level 1; it is the geometry behind Levels 1–2.
Look at Figure 1: the blue curve (σ) lives between the two dashed lines 0 and 1; the yellow curve (tanh) lives between −1 and 1 and passes exactly through the origin. Later, Figure 2 (placed just before Level 5) draws the two derivative humps — refer to it when a solution mentions the "σ′ hump" or "tanh′ hump".
What we check: the range (set of possible outputs) of each function.
Read it off Figure 1: the blue σ curve stays entirely above the dashed line at 0; the yellow tanh curve dips below0 on its left half.
σ(z)∈(0,1) — always positive, never reaches 0 or 1.
tanh(z)∈(−1,1) — can be negative for z<0.
Answer: only tanh can be negative. Range of sigmoid is (0,1); range of tanh is (−1,1).
Why the open brackets? Because e−z is never exactly 0 (an exponential is always strictly positive), so σ can approach but never touch 1 — and similarly for the other bounds.
Recall Solution L1-Q2
At z=0:e−0=e0=1.
σ(0)=1+11=21=0.5.
tanh(0)=1+11−1=20=0.
Check against Figure 1: the blue dot marks (0,0.5) and the yellow dot marks (0,0) — exactly the two values we just computed.
Answer:σ(0)=0.5, tanh(0)=0. These are exactly the midpoints of their ranges — the "meh, undecided" point of each dimmer switch.
Plug in:σ(2)=1+e−21=1+0.1353351=1.1353351.
Do the division by hand. We want 1÷1.135335. Multiply a trial value: 1.135335×0.88=0.99909, a touch under 1; 1.135335×0.881=1.00023, a touch over. So the answer sits between 0.880 and 0.881. Interpolating, 1−0.99909=0.00091 of the gap 0.00114 per thousandth, giving about 0.0008 more: 0.8808.
Why round to 4 places? The inputs e−2=0.135335 were given to 6 significant figures; carrying more than 4 decimals in the output would claim precision the inputs do not support, so 4 decimals (0.8808) is the honest stopping point.
Locate it on Figure 1: at z=2 the blue curve is already high, hugging the upper dashed line near 1 — consistent with 0.88.
Answer:σ(2)≈0.8808. The neuron "fires" at about 88% confidence.
Recall Solution L2-Q2
Step 1 — pre-activation (weighted sum):z=(0.5)(2)+(−1)(1)+(2)(0.5)+(−0.5)=1−1+1−0.5=0.5.Why? The dot product w⋅x multiplies each weight by its matching input and adds them, then the bias shifts the total.
Step 2 — apply tanh:tanh(0.5)=e0.5+e−0.5e0.5−e−0.5=1.64872+0.6065311.64872−0.606531=2.2552511.042189=0.4621.Answer:z=0.5, tanh(0.5)≈0.4621.
Recall Solution L2-Q3
Why this route? The identity says tanh is a stretched, shifted sigmoid; checking it two ways guards against arithmetic slips.
Step 1:2z=1, so σ(1)=1+e−11=1.3678791=0.731059.
Step 2:2σ(1)−1=2(0.731059)−1=1.462117−1=0.4621.
Answer:0.4621 — matches Q2. The identity holds.
Use the self-referential derivative:σ′(z)=σ(z)(1−σ(z)).
σ′(4)=0.982014×(1−0.982014)=0.982014×0.017986=0.017663.Form the ratioσ′(4)σ′(0)=0.0176630.25≈14.2.
Answer:σ′(4)≈0.01766; it is approximately 14 times smaller than σ′(0). Confirm this visually on Figure 2 (the derivative-hump figure before Level 5): the green σ′ curve peaks at 0.25 over z=0 and has nearly flattened to the axis by z=4. Out on that flat tail a nudge in z barely moves the output, so backprop passes almost no signal — the vanishing-gradient effect from Vanishing and Exploding Gradients.
Recall Solution L3-Q2
Chain rule (from the recap): the loss depends on zthrough the activation a=σ(z), so multiply the incoming slope by the local slope:
∂z∂L=incoming∂a∂L⋅localσ′(z)=∂a∂L⋅a(1−a).=1.5×0.017663=0.026494.Answer:∂z∂L≈0.02649. Even a healthy upstream gradient of 1.5 is choked down to ≈0.026 by the tiny local slope — one saturated layer already loses ~98% of the signal. See Backpropagation.
Recall Solution L3-Q3
Compute:∂w1∂L=δ⋅a1=(−0.3)(0.7)=−0.21,∂w2∂L=δ⋅a2=(−0.3)(0.9)=−0.27.Both negative. Because a1,a2 are forced positive (sigmoid range (0,1) — the entirely-above-zero blue curve in Figure 1), the sign of every weight gradient equals the sign of the single shared δ. So all weights are pushed the same direction each step → the "zig-zag" inefficiency.
Answer:−0.21 and −0.27; same sign. This is exactly why zero-centered tanh (which can output negatives) trains hidden layers more smoothly.
First, why we may swap variable from z to s. We claim σ is strictly increasing, so each z maps to exactly one s and vice versa. Justification: σ′(z)=σ(z)(1−σ(z)); since σ(z)∈(0,1) (from L1-Q1), both factors σ(z)>0 and 1−σ(z)>0, so their product σ′(z)>0 for every real z. A function with a strictly positive slope everywhere is strictly increasing — hence a genuine one-to-one correspondence between z and s. Maximizing the slope over z is therefore the same as maximizing it over s.
Reframe: the slope is g(s)=s(1−s)=s−s2 where s ranges over (0,1).
Maximize g:dsdg=1−2s=0⇒s=21. Second derivative −2<0, so it's a maximum.
Translate back:s=21 means σ(z)=0.5, which happens at z=0. There g=21⋅21=0.25.
See it: this is exactly the peak of the green σ′ hump in Figure 2, sitting at (0,0.25).
Answer: max slope =0.25 at z=0. ∎
Recall Solution L4-Q2
Differentiate the identity using the chain rule from the recap. The outer function multiplies by 2; the inner function is 2z, whose derivative is 2 — so that inner 2 gets pulled out front (this is the g′(z) factor):
tanh′(z)=dzd[2σ(2z)−1]=2⋅f′(g)σ′(2z)⋅g′2=4σ′(2z).Evaluate at z=0:σ′(0)=0.25, so
tanh′(0)=4×0.25=1.0.See it: in Figure 2 the red tanh′ hump peaks at 1.0, exactly four times higher than the green σ′ peak at 0.25.
Answer:tanh′(0)=1.0 — and the "4×" factor is now explained: it's precisely the two chain-rule factors of 2 multiplying σ′.
Recall Solution L4-Q3
Invert sigmoid. From σ(z)=1+e−z1=0.8:
1+e−z=0.81=1.25⇒e−z=0.25⇒−z=ln(0.25)=−ln4⇒z⋆=ln4=1.386294.Slope check:σ′(z⋆)=0.8(1−0.8)=0.8×0.2=0.16.Answer:z⋆≈1.3863, slope =0.16. The function z=ln1−ss that undoes sigmoid is called the logit — the backbone of Logistic Regression.
Figure 2 — the derivative humps. Use this for the symmetry arguments in Level 5 (and the L3/L4 references above).
The green hump is σ′: notice it is a mirror-symmetric bell peaking at 0.25 over z=0, with the two marked points at z=±1.386 sitting at equal height 0.16 — the picture of the L5-Q3 result. The red hump (tanh′) peaks four times higher at 1.0.
Recall Solution L5-Q1
Start from the definition:σ(−z)=1+ez1.Multiply top and bottom by e−z (a legal move, e−z=0):
=e−z+1e−z=1+e−z(1+e−z)−1=1−1+e−z1=1−σ(z).■Interpretation (look at Figure 1): reflect the input across 0 and the output reflects across 0.5 — the blue curve has point symmetry about the marked dot (0,0.5), confirming the L1 trap that it is not symmetric about the origin.
Recall Solution L5-Q2
From the definition, replace z by −z:tanh(−z)=e−z+e−(−z)e−z−e−(−z)=e−z+eze−z−ez.Factor −1 out of the numerator and note the denominator is unchanged (addition is commutative, so e−z+ez=ez+e−z):
=ez+e−z−(ez−e−z)=−ez+e−zez−e−z=−tanh(z).■Connection (see the yellow curve in Figure 1): oddness means the curve has point symmetry about the origin, so for symmetric inputs the outputs are balanced positive/negative — their average sits at 0. That is exactly the "zero-centered" property that avoids the same-sign gradient zig-zag of L3-Q3.
Recall Solution L5-Q3
Symbolic proof. Differentiate the identity σ(−z)=1−σ(z). On the left, the chain rule (recap) applies to σ(−z): outer slope σ′(−z) times inner slope dzd(−z)=−1, giving −σ′(−z). On the right, dzd[1−σ(z)]=−σ′(z). Equate:
−σ′(−z)=−σ′(z)⇒σ′(−z)=σ′(z).■
So the slope is an even function — a bell-shaped hump centered at z=0, its peak 0.25.
Numeric check. At z=1.386294, σ(z)=0.8 so σ′(z)=0.8×0.2=0.16. By symmetry σ′(−1.386294) should also be 0.16: indeed σ(−1.386294)=1−0.8=0.2, giving σ′=0.2×0.8=0.16. ✓
Answer: both equal 0.16 — the two green square markers at z=±1.386 in Figure 2 sit at the same height 0.16, the picture of this result.