Start with the simplest neuron and a linear activation ϕ(z)=z. With no bias:
z=wx.
This is a line through the origin. At x=0, we are stuck at z=0. We can only rotate the line by changing w; we can never move it up or down.
Now suppose the true relationship is y=2x+5. No matter what w we pick, z=wx can never produce the constant +5. The model is fundamentally incapable of fitting the data.
Add a bias:
z=wx+b.
Now b supplies exactly the intercept. Setting w=2,b=5 fits perfectly.
Append a constant 1 to the input: x~=[x1,…,xn,1], and let w~=[w1,…,wn,b]. Then
w~⊤x~=∑iwixi+b⋅1=z.
So the bias is mathematically the weight on a dummy input that is always 1. This is why it is trained by the same gradient descent rule as any weight.
y=3 (constant)?
Because z=w⊤x is zero whenever the input is zero and can't add a constant offset — every hyperplane it defines passes through the origin.
Recall What is
∂z/∂b and why does it matter?
It equals 1, so the bias gradient is simply the neuron's error δ, independent of the input magnitude.
Recall What does
−b/w represent for a sigmoid neuron?
The input value at which the neuron is half-activated — its decision threshold.
Recall Feynman: explain to a 12-year-old
Imagine a light switch that turns on when you push it hard enough. The weights decide how much each push counts. The bias decides how hard the switch is to flip — a "loose" switch (big bias) turns on with a tiny push; a "stiff" one needs a big shove. Learning just means tightening or loosening that switch until the light turns on at exactly the right moments.
Dekho, ek neuron basically inputs ka weighted sum leta hai: z=w1x1+w2x2+⋯+b. Yeh jo b hai, isko bias kehte hain. Weights decide karte hain ki line kitni tilt hogi, lekin bias decide karta hai ki line upar-neeche kahan set hai. Agar bias na ho, toh jab saare inputs zero honge, output bhi zabardasti zero ho jayega — matlab decision boundary hamesha origin se guzregi. Yeh ek badi limitation hai, kyunki real data ka intercept zero nahi hota.
Sochiye ek light switch — weights batate hain ki har push kitna count karta hai, aur bias batata hai ki switch kitna "tight" ya "loose" hai. Bada positive bias = switch aasani se on ho jata hai (neuron jaldi fire karta hai). Bada negative bias = zyada push chahiye. Sigmoid neuron mein neuron half-on hota hai jab x=−b/w, yani bias threshold ko left-right slide karta hai.
Training kaise hoti hai? Chain rule se: ∂z/∂b=1 hota hai (kyunki bias sirf add hota hai, kisi input ko multiply nahi karta). Isliye bias ka gradient seedha neuron ka error δ ban jata hai — input ke size se independent. Ek pyaara trick: ek dummy input 1 jod do, toh bias bas usska weight ban jata hai, isliye same gradient descent se train hota hai.
Practical points: har neuron ka apna alag bias hota hai (poore layer ke liye ek nahi). Bias ko aksar 0 se initialize karte hain, aur usually L2 regularization mein include nahi karte, kyunki wo model ki flexibility ko bina fayde ke maar deta hai. Bas yaad rakho: weights tilt karte hain, bias budge karta hai.