2081 1

CSC266 · 2081 · 10 marks

How can you relate synapse, dendrite, and axon in biological neural networks with the elements of artificial neural networks? Create a multi-layer ANN with input layer, hidden layer, and output layer. Assume necessary inputs and weights to the ANN and illustrate a single iteration of backpropagation

How can you relate synapse, dendrite, and axon in biological neural networks with the elements of artificial neural networks? Create a multi-layer ANN with input layer, hidden layer, and output layer. Assume necessary inputs and weights to the ANN and illustrate a single iteration of backpropagation algorithm to train the ANN.[10]

Artificial IntelligenceChapter 5: Machine LearningLearning with Neural NetworksNumerical: ANN backpropagation

Artificial Neural Networks: Biological Analogy and Backpropagation

Given

The question requires us to assume inputs and weights, so the worked example below uses these values:

Inputs: $x_1 = 0.5$, $x_2 = 0.3$ Target: $t = 1.0$

Learning rate: $\alpha = 0.5$ Activation: Sigmoid $g(x) = \dfrac{1}{1+e^{-x}}$, derivative $g'(x) = g(x)(1-g(x))$ Biases: $0$

Initial weights:

WeightConnectionValue
$w_{13}$$x_1 \to h_1$0.4
$w_{23}$$x_2 \to h_1$0.2
$w_{14}$$x_1 \to h_2$0.3
$w_{24}$$x_2 \to h_2$0.5
$w_{35}$$h_1 \to o_1$0.6
$w_{45}$$h_2 \to o_1$0.7

Part 1: Biological vs Artificial Neural Network Mapping

Biological ElementArtificial ElementFunction
DendriteInput connections carrying $x_j$Receive incoming signals
SynapseWeight $w_{ij}$Modulate signal strength; learning adjusts these
AxonNeuron output lineTransmits processed signal onward
Soma (cell body)Summation $\Sigma$ + activation $g(\cdot)$Integrates weighted inputs and fires

Summary: dendrites $\to$ inputs, synapses $\to$ weights, soma $\to$ summation + activation, axon $\to$ output. Learning in ANN = adjusting synaptic weights.


Part 2: Network Architecture

A 2-2-1 multilayer network:

 x1 ─w13─┐        ┌─w35─┐
         ├──> h1 ─┤     │
 x2 ─w23─┘        │     ├──> o1 ──> y
                  │     │
 x1 ─w14─┐        │     │
         ├──> h2 ─┴─w45─┘
 x2 ─w24─┘

Part 3: Single Iteration of Backpropagation

Step 1: Forward pass - hidden layer

$$net_{h1} = 0.4(0.5) + 0.2(0.3) = 0.20 + 0.06 = 0.26$$ $$h_1 = g(0.26) = \frac{1}{1+e^{-0.26}} = \frac{1}{1.7711} = 0.5646$$

$$net_{h2} = 0.3(0.5) + 0.5(0.3) = 0.15 + 0.15 = 0.30$$ $$h_2 = g(0.30) = \frac{1}{1+e^{-0.30}} = \frac{1}{1.7408} = 0.5744$$

Step 2: Forward pass - output layer

$$net_{o1} = 0.6(0.5646) + 0.7(0.5744) = 0.3388 + 0.4021 = 0.7409$$ $$y = g(0.7409) = \frac{1}{1+e^{-0.7409}} = \frac{1}{1.4767} = 0.6772$$

Step 3: Output error and delta

$$\delta_{o1} = (t - y)\cdot y(1-y) = (1.0 - 0.6772)(0.6772)(1-0.6772)$$ $$= 0.3228 \times 0.6772 \times 0.3228 = 0.07057$$

Step 4: Hidden layer deltas

$$\delta_{h1} = h_1(1-h_1),(w_{35},\delta_{o1})$$ $$= 0.5646(0.4354)(0.6 \times 0.07057) = 0.2458 \times 0.04234 = 0.01041$$

$$\delta_{h2} = h_2(1-h_2),(w_{45},\delta_{o1})$$ $$= 0.5744(0.4256)(0.7 \times 0.07057) = 0.2445 \times 0.04940 = 0.01208$$

Step 5: Weight updates $;w^{new} = w^{old} + \alpha,\delta,(\text{input to that weight})$

Output layer: $$w_{35}^{new} = 0.6 + 0.5(0.07057)(0.5646) = 0.6 + 0.01992 = 0.6199$$ $$w_{45}^{new} = 0.7 + 0.5(0.07057)(0.5744) = 0.7 + 0.02027 = 0.7203$$

Hidden layer: $$w_{13}^{new} = 0.4 + 0.5(0.01041)(0.5) = 0.4 + 0.00260 = 0.4026$$ $$w_{23}^{new} = 0.2 + 0.5(0.01041)(0.3) = 0.2 + 0.00156 = 0.2016$$ $$w_{14}^{new} = 0.3 + 0.5(0.01208)(0.5) = 0.3 + 0.00302 = 0.3030$$ $$w_{24}^{new} = 0.5 + 0.5(0.01208)(0.3) = 0.5 + 0.00181 = 0.5018$$

Result of one iteration

WeightOldNew
$w_{13}$0.40.4026
$w_{23}$0.20.2016
$w_{14}$0.30.3030
$w_{24}$0.50.5018
$w_{35}$0.60.6199
$w_{45}$0.70.7203

Output moved from $y = 0.6772$ toward target $t = 1.0$; repeating iterations reduces error.


Common mistake: treating $\delta = t - y = 0.3229$ as the output delta. The sigmoid derivative must be included, giving $\delta_{o1} = (t-y),y(1-y) = 0.0706$, and that is the value used in the weight updates. The forward pass gives $h_1 \approx 0.565$, $h_2 \approx 0.574$ and $y \approx 0.677$.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.