Single perceptron (binary classifier) or single neuron can’t solve XOR because XOR is not linear separable. A shape of {2,1} is required to solve XOR, or additional input of x1+x2 or additional input of x1*x2 are needed. Inputs are in 2 axes x1 and x2, outputs are marked in red and blue colours.

AND:

x2, 1 0        \  1
      |          \
      |            \
      0-----------0  \
     0            1, x1

OR:

x2, 1 1           1
     \|
      |\
      0--\--------1
     0     \      1, x1

NOT:

         \
      1--- \------0
     0       \    1, x1

XOR:

x2, 1 1           0
      |
      |
      0-----------1
     0            1, x1

And line can’t be drawn on the plane defined by x1 and x2 axes to separate the results, thus XOR is non-linear separable.

Advertisements