Deep Learning · MT2 · section

Model answer: explain an artificial neuron

Neural-network foundations

Question

Question. Explain the structure and working of an artificial neuron. Describe the roles of inputs, weights, bias and activation with a numerical example.

Answer — step by step

An artificial neuron is a computational unit that applies an activation function to an affine combination of its inputs. Its trainable weights and bias determine the preactivation; its output is passed to subsequent layers.

Follow each input through its weight, add one bias at the receiving neuron, then apply activation. Tap the diagram to enlarge.

Formula and symbols

z=w_1x_1+w_2x_2+\cdots+w_nx_n+b,\qquad a=f(z)LaTeX: z=w_1x_1+w_2x_2+\cdots+w_nx_n+b,\qquad a=f(z)
PartMeaningWhat it does
x₁, x₂, …Input featuresSupply the information for this calculation
w₁, w₂, …WeightsControl the contribution of each matching input
bBiasShifts the weighted sum independently of the inputs
zNet inputThe number before activation
fActivation ruleTransforms z, often nonlinearly
aActivated outputThe number sent onward

Worked ReLU neuron example

Question. An artificial neuron has x₁ = 2, x₂ = 1, w₁ = 0.5, w₂ = −0.2 and b = 0.1. Calculate its preactivation and ReLU output.

Given

Inputs = [2,1]; weights = [0.5,−0.2]; bias = 0.1; activation = ReLU.

To find

Preactivation z and activated output a.

Formula — which one and why

Each input contributes through its own weight. Add one bias after summing the products; ReLU then keeps a positive total.

z means before activation; a means after activation.

z=w_1x_1+w_2x_2+bLaTeX: z=w_1x_1+w_2x_2+b
a=\max(0,z)LaTeX: a=\max(0,z)

Yaad rakhne ka cue: Product, product, sum, bias, phir activation.

Solution — step by step

Step 1: multiply the first pair.

0.5(2)=1LaTeX: 0.5(2)=1

Step 2: multiply the second pair.

(-0.2)(1)=-0.2LaTeX: (-0.2)(1)=-0.2

Step 3: add both contributions.

1+(-0.2)=0.8LaTeX: 1+(-0.2)=0.8

Step 4: add the bias once.

z=0.8+0.1=0.9LaTeX: z=0.8+0.1=0.9

Step 5: apply ReLU.

a=\max(0,0.9)=0.9LaTeX: a=\max(0,0.9)=0.9

Final answer: z = 0.9 and a = 0.9. ReLU leaves this positive preactivation unchanged.

The weights and bias are learned parameters. During training, their values are adjusted to reduce an objective. The activation function itself is usually chosen as part of the architecture. Adding a bias does not mean adding one bias after every input product; add the receiving neuron's bias once.