Why Neural Networks
Goal
By the end of this lesson, you can explain why one straight-line decision rule cannot represent every pattern and how an extra nonlinear transformation can make some patterns easier to separate.
Start with four tiny cases
Imagine two switches, x1 and x2. Each switch can be off (0) or on (1). We want the output to be 1 only when exactly one switch is on.
| x1 | x2 | target | ordinary-language case |
|---|---|---|---|
| 0 | 0 | 0 | neither switch is on |
| 0 | 1 | 1 | only x2 is on |
| 1 | 0 | 1 | only x1 is on |
| 1 | 1 | 0 | both switches are on |
This pattern is called XOR, short for “exclusive OR.” You do not need to memorize the name. The important part is the four-case pattern above.
If you plot x1 horizontally and x2 vertically, the two target-1 cases sit at opposite corners. The two target-0 cases sit at the other two corners.
Now try to draw one straight line that puts both 1 corners on one side and both 0 corners on the other. You cannot.
A straight divider used to separate classes is called a linear decision boundary. So the useful lesson from XOR is:
some classification patterns cannot be separated correctly by one linear decision boundary.