Deep Learning · TEE · section

Biological neurons and the McCulloch-Pitts model

Neural-network foundations

Definition. An artificial neuron is a simplified computational model inspired by the collection, combination and transmission of signals in biological neurons. This analogy motivates weighted inputs and an output response; it is not a full simulation of a living neuron.

Biological and artificial components

Biological componentSimplified artificial counterpartFunction in the analogy
DendritesInput connectionsReceive incoming signals
SynapsesConnection weightsInfluence how strongly each incoming signal contributes
Cell body or somaAggregation stageCombines the weighted signals
Firing behaviorThreshold or activation functionDetermines the model's output response
AxonOutput connectionPasses the resulting signal onward

For an artificial threshold unit, a threshold θ on the weighted sum can be written as a bias b = −θ, followed by a threshold at zero. The equality convention must be preserved.

\sum_i w_ix_i\ge\theta\quad\Longleftrightarrow\quad\sum_i w_ix_i-\theta\ge0LaTeX: \sum_i w_ix_i\ge\theta\quad\Longleftrightarrow\quad\sum_i w_ix_i-\theta\ge0

McCulloch–Pitts model and perceptron

The McCulloch–Pitts model is an early binary threshold model. Its logical connections and threshold are prescribed to implement a desired behavior; it has no data-driven weight-update procedure. The original formulation also distinguishes excitatory inputs from inhibitory inputs, which can prevent firing. In elementary logic-gate examples using only excitatory inputs, a threshold on their sum is sufficient.

A perceptron introduces adjustable connection weights and a learning rule. It calculates a weighted sum, applies a threshold and updates parameters when its classification disagrees with the target. Both single threshold units have a linear decision boundary; neither single unit solves XOR in the original two-input space.

Question. Implement AND and OR for binary inputs x₁, x₂ using the sum x₁ + x₂ and output 1 when the sum is at least θ. Use θ = 2 for AND and θ = 1 for OR.

Given

Implement AND and OR for binary inputs x₁, x₂ using the sum x₁ + x₂ and output 1 when the sum is at least θ.

Use θ = 2 for AND and θ = 1 for OR.

To find

Write every row of the truth table and the requested network output.

Formula — which one and why

Threshold logic. Compute the weighted sum for every binary input combination and apply the threshold rule exactly. Hidden neurons can provide separate threshold decisions before the output combines them.

step(z) returns 1 at or above zero unless the question specifies a strict inequality; otherwise it returns 0.

z=\sum_iw_ix_i+bLaTeX: z=\sum_iw_ix_i+b
\operatorname{step}(z)=\begin{cases}1&z\ge0\\0&z<0\end{cases}LaTeX: \operatorname{step}(z)=\begin{cases}1&z\ge0\\0&z<0\end{cases}

Yaad rakhne ka cue: Har input row ka sum nikalo, phir threshold lagao.

Solution — step by step

Calculate the sum once for each input pair, then compare it with the relevant threshold.

Binary input (0,0)

Step 1: add the inputs.

s=0+0=0LaTeX: s=0+0=0

Step 2: compare with AND threshold 2.

0 ≥ 2 is false; AND output = 0.

Step 3: compare with OR threshold 1.

0 ≥ 1 is false; OR output = 0.

Binary input (0,1)

Step 1: add the inputs.

s=0+1=1LaTeX: s=0+1=1

Step 2: compare with AND threshold 2.

1 ≥ 2 is false; AND output = 0.

Step 3: compare with OR threshold 1.

1 ≥ 1 is true; OR output = 1.

Binary input (1,0)

Step 1: add the inputs.

s=1+0=1LaTeX: s=1+0=1

Step 2: compare with AND threshold 2.

1 ≥ 2 is false; AND output = 0.

Step 3: compare with OR threshold 1.

1 ≥ 1 is true; OR output = 1.

Binary input (1,1)

Step 1: add the inputs.

s=1+1=2LaTeX: s=1+1=2

Step 2: compare with AND threshold 2.

2 ≥ 2 is true; AND output = 1.

Step 3: compare with OR threshold 1.

2 ≥ 1 is true; OR output = 1.

Truth-table summary

x₁x₂x₁ + x₂AND: sum ≥ 2OR: sum ≥ 1
000 + 0 = 000
010 + 1 = 101
101 + 0 = 101
111 + 1 = 211

The parameters have been chosen to implement the truth tables. This calculation is a logic-gate evaluation, not a perceptron training epoch.