Neural Networks

Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 6

7 cards in “6.2 The XOR problem” · whole deck

6.2 The XOR problem

  1. What did Minsky and Papert (1969) prove about single neural units?
    That a single unit (perceptron) cannot compute some very simple functions of its input, notably XOR.
  2. What is a perceptron?
    A simple neural unit with a binary output and a step-function activation: \(y = 1\) if \(w \cdot x + b > 0\), else 0.
  3. Give perceptron weights that compute AND and OR on binary inputs.
    AND: \(w_1 = w_2 = 1\), \(b = -1\). OR: \(w_1 = w_2 = 1\), \(b = 0\). (Many other settings work.)
  4. Why can’t a perceptron compute XOR?
    A perceptron is a linear classifier: its decision boundary \(w_1x_1 + w_2x_2 + b = 0\) is a line. No line separates XOR’s positive cases (01, 10) from its negative cases (00, 11); XOR is not linearly separable.
    AND: a line works?XOR: no line
    Filled = output 1. Axes are x₁ and x₂.
  5. What is a decision boundary in higher dimensions?
    A hyperplane separating the input space into the two output classes.
  6. How can a neural network compute XOR?
    With a layered network: e.g. two hidden ReLU units and one output unit (Goodfellow et al., 2016). The hidden layer maps inputs [0, 1] and [1, 0] to the same point, after which positive and negative cases are linearly separable.
  7. What lesson does the XOR network teach about hidden layers?
    The hidden layer forms a new representation of the input in which the problem becomes easy. With backpropagation, networks learn such useful representations automatically.

Source