Multi-Neuron Layer Architecture hero
Lesson 4Matrices & Multiple Neurons

Multi-Neuron Layer Architecture

Grouping parallel neurons into a unified layer, calculating multi-criteria forward passes, and examining the greenlight dilemma for network depth.

Across the last three lessons, we assembled the complete machinery to run multiple artificial neurons in parallel:

  1. The Weight Matrix (Lesson 1): We stacked neuron weights into rows of a matrix (WW) to compute parallel raw scores (WxWx).
  2. The Bias Vector (Lesson 2): We bundled independent baseline offsets into a vector (bb) to produce linear scores (z=Wx+bz = Wx + b).
  3. Vector Activation (Lesson 3): We applied the Sigmoid function element-wise to transform linear scores into independent probabilities (a=σ(z)a = \sigma(z)).

When you group multiple independent neurons together to evaluate the exact same input vector in parallel, you form the fundamental building block of deep learning: a Neural Network Layer.


What Is a "Layer"?

A layer is a collection of independent neurons operating in parallel on the exact same input vector (xx).

  • Modeling complexity: A single neuron can only evaluate one perspective. Using multiple neurons allows the system to analyze the exact same input from multiple angles simultaneously, letting us model far more complex real-world problems.
  • Each neuron is isolated: The Hit neuron has no idea the Oscar neuron exists. Each neuron has its own weights (a row in WW), its own baseline bias (an entry in bb), and produces its own activation. You could calculate each neuron on a separate piece of paper without changing the math.
  • One output per neuron: The number of neurons in a layer always matches the number of entries in its output vector. Because we have 3 neurons, our layer outputs a 3-dimensional vector (aa), with each entry corresponding to its neuron.
  • Layer Width: The number of neurons in a layer defines the layer's width. Because our layer has 3 neurons evaluating the script, its width is 3.
  • Parallel execution: If each neuron is independent, why use a matrix? A matrix lets hardware compute every neuron simultaneously, rather than running them one by one.

A layer doesn't change how each neuron works—the matrix just packages them together so they run in parallel.


The Unified Forward Pass

When we assemble the weights, biases, and activations into a single computational pipeline, we get the complete forward pass for a multi-neuron layer:

The Multi-Neuron Forward Pass: From Input to Activation
Input vector feeds three independent neuron rows in parallel, producing output vector.

In a single compact formula:

a=σ(Wx+b)a = \sigma(Wx + b)

Tracing the End-to-End Pipeline

🎬 'Die Hard in Space': Full Pipeline Trace

NeuronWeights
(wT)
Raw Score
(Wx)
Baseline Bias
(b)
Linear Score
(z)
Probability
(a = σ(z))
Classification
(Threshold 0.50)
Hit[+5.0, −2.0, +1.0, +4.0]+9.5−2.0+7.599.9%🟢 Yes (Hit)
Oscar[−3.0, +4.0, +1.0, −2.0]−4.5−4.0−8.50.02%🔴 No (Passed Over)
International[+4.0, −1.0, 0.0, +5.0]+9.0+1.0+10.0>99.9%🟢 Yes (Overseas Hit)

🎬 'The Notebook 2': Full Pipeline Trace

NeuronWeights
(wT)
Raw Score
(Wx)
Baseline Bias
(b)
Linear Score
(z)
Probability
(a = σ(z))
Classification
(Threshold 0.50)
Hit[+5.0, −2.0, +1.0, +4.0]−1.5−2.0−3.52.9%🔴 No (Flop)
Oscar[−3.0, +4.0, +1.0, −2.0]+4.5−4.0+0.562.2%🟢 Yes (Nominee)
International[+4.0, −1.0, 0.0, +5.0]−1.0+1.00.050.0%🟢 Yes (Break-Even)

The Missing Piece: The Greenlight Dilemma

Our multi-neuron layer evaluated both scripts and produced three independent answers:

  • 'Die Hard in Space': Commercial Hit: Yes (99.9%99.9\%), Oscar Contender: No (0.02%0.02\%), International Appeal: Yes (>99.9%>99.9\%).
  • 'The Notebook 2': Commercial Hit: No (2.9%2.9\%), Oscar Contender: Yes (62.2%62.2\%), International Appeal: Yes (50.0%50.0\%).

But answering these questions still doesn't decide whether to greenlight a film. The studio is left weighing trade-offs between conflicting answers: does massive overseas appeal make up for zero awards buzz? Is an Oscar contender worth funding if it loses money domestically?

Because neurons in a single layer operate in total isolation, they cannot combine their answers. To automate the final verdict—Greenlight or Pass—we need another layer that takes these three outputs as its input before making the final decision.

Parallel neurons gave our network width—evaluating multiple criteria at once. But automating decisions across those criteria requires depth—stacking layers sequentially into a Multi-Layer Neural Network. That is the focus of Topic 4.


Previous
Multi-Neuron Forward Pass