Bias & Decision Boundaries
What Is Bias?
The shift in a neuron's output
The bias shifts the sigmoid curve horizontally. Without bias, the sigmoid crosses 0.5 exactly at x = 0. The bias lets us adjust this crossing point.
Step 1 of 6: What Is Bias?
The shift in a neuron's output
The bias shifts the sigmoid curve horizontally. Without bias, the sigmoid crosses 0.5 exactly at x = 0. The bias lets us adjust this crossing point.
Step 2 of 6: Without Bias
Boundaries must pass through the origin
Without bias, the boundary must pass through the origin. You can only rotate it — never shift it. Some points are impossible to classify correctly because the boundary can't move to where it's needed.
Step 3 of 6: With Bias
Shifting the boundary freely
With bias, the boundary can translate freely. The dashed line shows where the boundary would be without bias. Adjust the bias to shift the boundary and improve accuracy.
Step 4 of 6: Bias in 2D
Two inputs, one boundary
In 2D, the boundary is the line w₁x₁ + w₂x₂ + b = 0. The weights control the line's angle, and the bias controls its position. The green and red regions show where the neuron outputs 1 vs 0.
Step 5 of 6: Multiple Neurons
Combining boundaries
With 3 neurons, the network creates 3 decision boundaries. The shaded regions show the combined output — the output neuron merges all hidden neurons into a single non-linear decision surface.
Step 6 of 6: The XOR Solution
Two boundaries, one answer
XOR is not linearly separable — no single straight line can separate the green from red points. The perceptron (one layer) cannot solve it. Yellow-ringed points are misclassified.