AI · 6.1
The Artificial Neuron: Weights, Bias and a Decision
Name
Class
Date
Mark / 21
Section A
Circle the letter of the correct answer. One mark each.
- 1What does an artificial neuron compute first, before its activation function?1
- AThe largest of its inputs
- BA weighted sum of its inputs plus a bias
- CA random number between 0 and 1
- DThe average of its weights
- 2Inputs are [2, 3], weights are [0.5, −1] and the bias is 1. What is the weighted sum?1
- A3
- B−2
- C−1
- D1
- 3What does a negative weight mean?1
- AMore of that input pushes the output down
- BThe neuron has made an error
- CThat input must always be negative
- DThat input is ignored by the neuron
- 4What does changing the bias do to a neuron's decision boundary?1
- ARemoves it
- BSlides it without turning it
- CCurves it
- DTurns it without sliding it
- 5Which weights and bias make a step neuron compute AND?1
- Aw = (−1, −1), b = 1.5
- Bw = (1, 1), b = −0.5
- Cw = (1, 1), b = 0.5
- Dw = (1, 1), b = −1.5
- 6In the perceptron rule, what happens when the prediction is correct?1
- AThe learning rate increases
- BThe bias is reset to zero
- CEvery weight doubles
- DThe weights do not change
- 7A perceptron outputs 0 for an example whose target is 1. What does the rule do?1
- AIncreases each weight in proportion to its input
- BDecreases every weight
- CLeaves the weights alone and changes only the input
- DDeletes the example
- 8Why can no single neuron compute XOR?1
- AXOR needs a negative learning rate
- BNeurons cannot output the value 0
- CXOR has too many inputs for one neuron
- DIts classes cannot be separated by one straight line
- 9What does the perceptron convergence theorem guarantee?1
- AIf a separating line exists, the rule finds one in finite steps
- BTraining always takes exactly one epoch
- CThe perceptron can learn any function at all
- DThe perceptron always reaches zero loss on XOR
- 10Which part of an artificial neuron plays the role of synapse strength?1
- AThe activation function
- BThe inputs
- CThe weights
- DThe output
Section B
Answer in the space provided. The number of marks tells you how many separate points to make.
- 1CalculateA neuron has inputs x = [1, 0, 2], weights w = [0.4, 1.2, −0.3] and bias b = 0.1. Calculate its weighted sum and its output with a step activation that outputs 1 when z > 0.3
- 2ExplainExplain how a perceptron learns using the perceptron learning rule.4
- 3ExplainExplain why a single neuron cannot learn the XOR function, and how a neural network overcomes this.4
Mark scheme
Section A
Section B
1 A neuron has inputs x = [1, 0, 2], weights w = [0.4, 1.2, −0.3] and bias b = 0.1. Calculate its weighted sum and its output with a step activation that outputs 1 when z > 0. 3
One mark for each of the following, to a maximum of 3.
- 1 × 0.4 + 0 × 1.2 + 2 × (−0.3) + 0.1
- z = −0.1
- Output 0, because z is not above 0
Model answer. z = 1 × 0.4 + 0 × 1.2 + 2 × (−0.3) + 0.1 = 0.4 + 0 − 0.6 + 0.1 = −0.1. Because z is not greater than 0, the step activation outputs 0.
2 Explain how a perceptron learns using the perceptron learning rule. 4
One mark for each of the following, to a maximum of 4.
- It makes a prediction from the weighted sum / step function
- The error is the target minus the prediction
- Each weight changes by learning rate × error × input
- No change when correct; repeated over the examples until no mistakes
Model answer. For each training example the perceptron calculates its weighted sum and uses a step function to predict 0 or 1. It works out the error as the target minus the prediction. Each weight is then changed by the learning rate multiplied by the error and by that weight's input, and the bias by the learning rate times the error, so a wrong answer pushes the weighted sum towards the right side. When the prediction is correct the error is zero and nothing changes. This is repeated over all the examples, epoch after epoch, until it makes no mistakes.
3 Explain why a single neuron cannot learn the XOR function, and how a neural network overcomes this. 4
One mark for each of the following, to a maximum of 4.
- A single neuron's boundary is a straight line
- XOR's outputs are not linearly separable / 1s on one diagonal
- A hidden layer of neurons draws more than one line / transforms the inputs
- An output neuron combines the hidden neurons' outputs
Model answer. A single neuron outputs 1 on one side of a straight line, its decision boundary, and 0 on the other. XOR's two 1 outputs lie on one diagonal of the square and its two 0 outputs on the other, so no single straight line can separate them: XOR is not linearly separable. A network overcomes this with a hidden layer: two hidden neurons each draw a line, for example one acting like OR and one like AND, and an output neuron combines their outputs so that it fires when OR is true but AND is not.