01204563 Advanced Machine Learning · Topic 6

Backpropagation on XOR

Follow the numbers as they move forward, flow backward, and update the parameters.

2–2–1MLP
Round 1 · 0 / 10 steps0%

Network and notation

state 0 / 10
A two input, two hidden unit, one output neural networkBlue arrows carry the forward calculation from x1 and x2 through h1 and h2 to predicted y. Red dashed arrows show the backward error signal. INPUTSHIDDEN LAYEROUTPUT w₁₁0.150w₂₂0.050w₂₁−0.100w₁₂0.200v₁0.300v₂−0.250 x₁0x₂1 h₁h₂ ŷ z₁ = —z₂ = —zₒ = —δₒ = —E = —δ₁ = —δ₂ = — b₁, b₂bₒ featuressigmoidsigmoidsolid = forwarddashed red = backward
y actual targetŷ predicted yz pre-activation / linear scorezₒ output logit

Current computation

Step 0 · Press “Next step” to begin

Forward pass
(x₁, x₂) = (0, 1)actual y = 1
What this step calculates
Values used
Substitute
Result
Meaning
sigmoid(t) = 1 / (1 + e−t)
E = ½(y − ŷ)2 · η = 0.5

Start by calculating the hidden pre-activation z₁.

Calculation trace

Every row repeats the equation, the values used, the calculation, and the result.

01

Sample (0, 1), target 1

Forward pass → loss → backward pass → update

locked
StepEquationValues usedCalculationResultMeaning

Parameter snapshots

trainable values
ParameterInitialAfter Round 1After Round 2

Takeaway

not convergence
forwardlossbackwardupdate

Two updates demonstrate the mechanism. They do not prove that the network has solved XOR.