Hello! In our last lesson, we delved into Support Vector Machines and saw how they find an optimal dividing line by maximizing a margin. We're now going to transition to a different, yet immensely powerful, family of models known as Artificial Neural Networks.
Today's lesson addresses the learning outcome: Describe the architecture of an Artificial Neural Network (ANN), including neurons, layers, and activation functions. We will break down these brain-inspired models into their fundamental components. This will provide you with the foundational knowledge needed for your exam, and set the stage for understanding how these networks learn in our next lesson.
1. From Logistic Regression to a Single Neuron
At its core, an Artificial Neural Network is a computational model composed of interconnected processing units. Before we look at a full network, let's start with its most basic building block: a single neuron, also known as a perceptron.
You might be surprised to learn that a simple logistic regression model, which you may have encountered in your statistics or finance studies, can be viewed as a one-neuron network. It takes several inputs, computes a weighted sum, and passes the result through a function (the sigmoid function) to produce a probability.
The following video from MIT OpenCourseWare provides an excellent demonstration of this idea, reframing a familiar concept into the language of neural networks.
1: Introduction to Neural Networks and Deep Learning; Training Deep NNs
This excerpt from an MIT lecture, "Introduction to Neural Networks and Deep Learning", provides a clear bridge from logistic regression to the concept of a neural network.
Watch the section that reframes logistic regression as a network of operations. Focus on how inputs (like GPA and experience) are combined and processed to produce an output probability. This segment, from logistic regression as a network, will help you see the basic mechanics in action.
As the video illustrates, a neuron is a simple computational unit that performs two main steps:
- Aggregation: It calculates a weighted sum of its inputs and adds a bias. The weights determine the influence of each input, much like coefficients in a regression model. The bias acts like an intercept, allowing the neuron to adjust its output independently of its inputs.
- Activation: The result of the aggregation is then passed through an activation function. This function transforms the aggregated value into the neuron's final output.
The diagram below shows this process. Inputs are multiplied by their respective weights , summed together with a bias , and then passed through an activation function to produce the output .

For a formal definition, the following resource provides a concise explanation.
NEURAL NETWORKS LECTURE NOTES B.TECH III YEAR
These lecture notes offer a clear, textbook-style definition of an artificial neuron and its components.
Read the initial definition of an ANN on the first page. Then, in the section "STRUCTURE AND FUNCTIONS OF ARTIFICIAL NEURON," read the paragraph that describes the neuron's process: receiving weighted inputs, summing them, and passing the result through an activation function.
2. Building the Network: Input, Hidden, and Output Layers
A single neuron is limited in what it can learn. The true power of ANNs comes from connecting many of these neurons together in a structured way, forming a network of layers.
A simple feedforward neural network, the most common type you'll see on an exam, has three types of layers:
- Input Layer: This is the entry point for your data. It consists of one neuron for each feature in your dataset. For example, if you were predicting a company's stock performance based on its P/E ratio, revenue, and debt level, your input layer would have three neurons. This layer doesn't perform any computation; it simply passes the data to the next layer.
- Hidden Layer(s): These are the layers between the input and output layers. A network can have one or more hidden layers. This is where the magic happens—each layer learns to detect progressively more complex features and patterns from the data passed on by the previous layer. The number of hidden layers and the number of neurons in each are key design choices that define the network's "architecture."
- Output Layer: This is the final layer that produces the model's prediction. The number of neurons in the output layer depends on the task. For a binary classification problem (e.g., will a customer default? Yes/No), you typically have one output neuron. For a regression problem (e.g., predicting a house price), you also have one neuron.
The connections are typically fully connected or dense, meaning every neuron in one layer is connected to every neuron in the next layer.

The StatQuest video below provides a very intuitive visual overview of how these layers fit together.
The Essential Main Ideas of Neural Networks
This video, "The Essential Main Ideas of Neural Networks", excels at making abstract concepts concrete and easy to understand.
Watch the segment explaining the different layers of a network. Focus on the distinction between the input, output, and hidden layers (the explanation of layers).
3. The "On" Switch: The Role of Activation Functions
We've mentioned activation functions, but why are they so important? Their crucial role is to introduce non-linearity into the network.
Imagine a network without activation functions (or with a simple linear one). Each layer would just be performing a linear transformation (like matrix multiplication). No matter how many layers you stack, the combination of multiple linear functions is still just one big linear function. Such a network could only learn linear relationships, just like a simple linear regression model. It couldn't capture complex, "squiggly" patterns in the data.
Activation functions are the non-linear "switches" that allow the network to bend and shape its decision boundary, enabling it to learn far more complex patterns. For your exam, you should be familiar with a couple of the most common ones:
- Sigmoid Function: This function squashes any input value into a range between 0 and 1. This makes it a natural choice for the output layer in a binary classification problem, where the output can be interpreted as a probability. Its formula is .
- ReLU (Rectified Linear Unit): This is the most popular activation function for hidden layers. It is very simple: it outputs the input directly if it's positive, and outputs zero otherwise. Its formula is . This simplicity makes it computationally very efficient.
The MIT lecture provides a fantastic explanation of why we need non-linearity and introduces these key functions.
1: Introduction to Neural Networks and Deep Learning; Training Deep NNs
We return to the MIT lecture to get a clear definition of activation functions and their purpose.
Watch the section from the activation functions section. Pay close attention to the descriptions of the Sigmoid and ReLU functions and the rule of thumb for where to use them (ReLU for hidden layers, Sigmoid for binary classification output).
This table from the "Neural Network Architecture Guide" provides a great summary of the components we've discussed.
Neural Network Architecture Guide: Types and Key Algorithms
This article provides a high-level overview of neural network components. We'll use its summary table.
Find the section "Common Components and Their Purpose" and review the table that defines the roles of the key components: Input layer, Hidden layers, Output layer, Weights, Bias, and Activation function.
Conclusion
In this lesson, you've learned the fundamental architectural components of an Artificial Neural Network. You are now prepared to define and describe these concepts in an exam setting.
Here are the key takeaways:
- Neuron: The basic building block of an ANN, which computes a weighted sum of its inputs, adds a bias, and passes the result through an activation function.
- Layers: Neurons are organized into an input layer (for data), one or more hidden layers (for pattern detection), and an output layer (for predictions).
- Activation Functions: These introduce essential non-linearity into the network, allowing it to model complex relationships. ReLU is standard for hidden layers, while Sigmoid is often used for binary classification outputs.
We have now established the what—the static structure of a neural network. In our next lesson, we will explore the how. We will cover Backpropagation, the core algorithm that allows the network to learn from data by adjusting its weights and biases to make better predictions.