๐Ÿงฌ Deep Learning History & The Perceptron

982 words
5 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# ๐Ÿงฌ Deep Learning History & The Perceptron ## 1. ๐ŸŽฏ Learning Objectives By the end of this topic, you will be able to: - Trace the history of neural networks from McCulloch-Pitts (1943) to modern deep learning - Explain the McCulloch-Pitts neuron model and its limitations - Implement Rosenblatt's perceptron and exp...

๐Ÿงฌ Deep Learning History & The Perceptron

1. ๐ŸŽฏ Learning Objectives

By the end of this topic, you will be able to:
  • Trace the history of neural networks from McCulloch-Pitts (1943) to modern deep learning
  • Explain the McCulloch-Pitts neuron model and its limitations
  • Implement Rosenblatt's perceptron and explain the perceptron learning algorithm
  • State the Perceptron Convergence Theorem
  • Explain why the XOR problem caused the first AI winter
  • Compare biological neurons to artificial neurons

2. ๐Ÿ“‹ Prerequisites

PrerequisiteCourseWhy It Matters
Linear algebra basicsBSMA1001Vector operations, dot products
Binary classificationBSCS3003What perceptrons do
Gradient descent intuitionBSMA1002How perceptrons learn

3. ๐Ÿ“– Core Content

3.1 Intuition: Learning from Biology

Your brain has about 86 billion neurons, each connected to thousands of others. When a neuron receives enough input from its neighbors, it "fires" โ€” sending an electrical signal down its axon to other neurons. Artificial neural networks are a vast simplification of this: they take weighted sums of inputs and apply an activation function to decide whether to "fire." The history of deep learning is a story of ideas that were decades ahead of their time, waiting for data and computation to catch up.

3.2 The McCulloch-Pitts Neuron (1943)

Warren McCulloch (neuroscientist) and Walter Pitts (logician) created the first mathematical model of a neuron in 1943:
y=f(โˆ‘i=1nwixiโˆ’ฮธ)y = f\left(\sum_{i=1}^n w_i x_i - \theta\right)
Where:
  • xix_i: Binary inputs (0 or 1)
  • wiw_i: Weights (excitatory = +1, inhibitory = -1)
  • ฮธ\theta: Threshold
  • ff: Step function (outputs 1 if sum โ‰ฅ ฮธ, else 0) Key insight: The MP neuron is a logical threshold unit. With appropriate weights and thresholds, it can compute AND, OR, NOT โ€” any logical function. AND Gate:
  • Inputs: x1, x2 โˆˆ {0,1}
  • Weights: w1 = 1, w2 = 1
  • Threshold: ฮธ = 2
  • Output: 1 only when x1 = 1 AND x2 = 1 OR Gate:
  • Weights: w1 = 1, w2 = 1
  • Threshold: ฮธ = 1
  • Output: 1 when x1 = 1 OR x2 = 1 Limitation: Weights are fixed โ€” there is no learning algorithm.

3.3 Rosenblatt's Perceptron (1957)

Frank Rosenblatt introduced the perceptron, which could learn its weights from data. The perceptron takes real-valued inputs, applies weights, sums them, and outputs through a step function. Mathematical formulation:
y^={1ifย wโ‹…x+b>00otherwise\hat{y} = \begin{cases} 1 & \text{if } \mathbf{w} \cdot \mathbf{x} + b > 0 \\ 0 & \text{otherwise} \end{cases}
Perceptron Learning Rule: For each misclassified example x(i)\mathbf{x}^{(i)}:
  • If y^=0\hat{y} = 0 but y(i)=1y^{(i)} = 1: wโ†w+ฮทโ‹…x(i)\mathbf{w} \leftarrow \mathbf{w} + \eta \cdot \mathbf{x}^{(i)}, bโ†b+ฮทb \leftarrow b + \eta
  • If y^=1\hat{y} = 1 but y(i)=0y^{(i)} = 0: wโ†wโˆ’ฮทโ‹…x(i)\mathbf{w} \leftarrow \mathbf{w} - \eta \cdot \mathbf{x}^{(i)}, bโ†bโˆ’ฮทb \leftarrow b - \eta Where ฮท\eta is the learning rate.

3.4 Perceptron Convergence Theorem

Theorem: If the training data is linearly separable, the perceptron learning algorithm will converge to a solution (zero training errors) in a finite number of steps. Proof sketch:
  1. Assume there exists a weight vector wโˆ—\mathbf{w}^* that correctly classifies all points with margin ฮณ>0\gamma > 0
  2. Show that after each update, w(k)\mathbf{w}^{(k)} gets "closer" to wโˆ—\mathbf{w}^* in terms of cosine similarity
  3. Bound the number of updates by (R/ฮณ)2(R/\gamma)^2 where R is the radius of the data

3.5 The XOR Problem and the First AI Winter

In 1969, Minsky and Papert published "Perceptrons," proving that a single perceptron cannot learn the XOR function:
x1x2XOR
000
011
101
110
XOR is not linearly separable โ€” no single straight line can separate the two classes. (Diagram) This limitation, combined with exaggerated claims about perceptrons, led to the first AI winter โ€” funding dried up, and neural network research stagnated for nearly a decade.

3.6 The Solution: Multi-Layer Perceptrons

The solution to XOR requires at least two layers of neurons:
  • First layer: computes two separating lines
  • Second layer: combines them logically XOR(x1, x2) = (x1 AND NOT x2) OR (NOT x1 AND x2) This requires hidden layers โ€” leading to the Multi-Layer Perceptron (MLP).

4. ๐Ÿ“ Key Formulas / Concepts

ConceptFormulaNotes
MP Neurony=f(โˆ‘wixiโˆ’ฮธ)y = f(\sum w_i x_i - \theta)Fixed weights, logical
Perceptrony=f(wโ‹…x+b)y = f(\mathbf{w} \cdot \mathbf{x} + b)Learns weights
Perceptron updatewโ†w+ฮทโ‹…yโ‹…x\mathbf{w} \leftarrow \mathbf{w} + \eta \cdot y \cdot \mathbf{x}For misclassified only
Convergence bound(R/ฮณ)2(R/\gamma)^2 stepsFor separable data

5. โš ๏ธ Common Pitfalls

Pitfall 1: Confusing MP Neuron with Perceptron

The mistake: Treating them as the same thing. Correct approach: MP neuron has fixed weights (no learning). Perceptron has learnable weights via the perceptron learning rule.

Pitfall 2: Thinking Perceptrons Are Useless

The mistake: "Perceptrons can't learn XOR, so they're useless." Correct approach: Perceptrons work perfectly for linearly separable problems. Many real-world problems (especially with enough features) are linearly separable.

Pitfall 3: Forgetting the Bias Term

The mistake: Using perceptron without bias bb. Correct approach: Without bias, the decision boundary always passes through the origin, severely limiting the perceptron's capacity.

6. ๐Ÿ“ Practice Questions

Q1: Show that a single perceptron cannot learn XOR.
Answer: XOR requires a non-linear decision boundary. A perceptron draws a linear boundary (hyperplane). The XOR truth table has points (0,0) and (1,1) on one side (class 0) and (0,1) and (1,0) on the other (class 1) โ€” no single line can separate these. Q2: Trace the perceptron learning rule on AND gate data.
Answer: Initialize w=[0,0], b=0, ฮท=1. Example (0,0): ลท=0, y=0 โ†’ correct. (0,1): ลท=0, y=0 โ†’ correct. (1,0): ลท=0, y=0 โ†’ correct. (1,1): ลท=0, y=1 โ†’ misclassified! Update: w=[1,1], b=1. Repeat until all correct. Converges quickly. Q3: What is the significance of the Perceptron Convergence Theorem?
Answer: It guarantees that if the data is linearly separable, the perceptron will find a separating hyperplane in finite time. This was a powerful theoretical result that gave legitimacy to neural network research. Join Discord NextActivation Functions
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.