Artificial Neural Network
Artificial Neural Network (ANN) — Architecture, Neurons & Activation Functions
Artificial Neural Networks (ANNs) are the backbone of modern machine learning. Before jumping into advanced models like CNN or RNN, it's important to understand how a basic neural network is structured — starting from how biological neurons inspire the design, to how activation functions introduce non-linearity that makes learning possible.
Brain and Perceptrons
Biological learning systems are built from a very complex web of interconnected neurons. The human brain has an immensely connected network of approximately 100 billion neurons, each connected on average to 1,000 other neurons.
Even though neuron transmission speeds are much slower than computer processing speeds, the brain's massive parallelism makes it extremely powerful for learning and decision-making tasks.
The Perceptron — the simplest form of an artificial neural network — was directly inspired by this biological design.
Artificial Neurons
An artificial neuron is a mathematical function conceived as a model of a biological neuron. Artificial neurons are the elementary units of an artificial neural network (ANN).
This artificial neuron receives one or more inputs and sums them to produce an output. Each input is individually weighted, and the sum is passed through a function known as the activation function or transfer function.

Terminology
Symbol | Meaning |
|---|---|
Input signal | |
Weights associated with inputs | |
Bias input (constant value of 1) | |
Weight associated with (bias weight) | |
Weighted sum of input signals | |
Activation function output | |
Output signal |
The output of a neuron is computed as:
Activation Functions
In artificial neural networks, the activation function takes the weighted sum as input and decides the output of the neuron. Without activation functions, a neural network — no matter how deep — would behave like a single linear transformation. Activation functions introduce non-linearity, which is what allows networks to learn complex patterns.
For a deeper look at how these functions interact with training, see the Loss Function and Gradient Descent posts.
1. Threshold Activation Function
The threshold activation function produces a binary output based on whether the input crosses zero:

2. Unit Step Function
Sometimes the threshold activation function is also defined as the unit step function, in which the output range shifts from {-1, 1} to {0, 1}:
3. Sigmoid Activation Function (Logistic Function)
One of the most commonly used activation functions is the sigmoid (or logistic) function. It maps any input to a smooth output between 0 and 1, making it especially useful for binary classification problems.
It is defined as:

You can see sigmoid used in practice in the Logistic Regression post.
4. Linear Activation Function
The linear activation function outputs a value directly proportional to the input:

5. Piecewise Saturated Linear Activation Function
This function behaves linearly within a defined range and saturates (clips) outside it:
6. Gaussian Activation Function
The Gaussian activation function is defined as:
Where:
is the standard deviation
is the mathematical constant Pi
ensures the Gaussian (bell-curve) shape
This function is commonly used in radial basis function (RBF) networks and probabilistic models.
7. Hyperbolic Tangent (tanh) Activation Function
The tanh function is similar to sigmoid but outputs values in the range [-1, 1], making it zero-centered — which often helps with training stability.
It is defined as:

8. ReLU (Rectified Linear Unit)
The Rectified Linear Unit (ReLU) is the most widely used activation function in modern deep learning, especially in Convolutional Neural Networks (CNN).
It is defined as:
Which can also be written as:
Why ReLU? Sigmoid and tanh both suffer from the vanishing gradient problem — during backpropagation, gradients become extremely small, slowing down learning. ReLU avoids this by outputting the input directly for positive values, keeping gradients healthy. See Gradient Descent for more on how this affects training.
Quick Comparison
Activation Function | Output Range | Use Case |
|---|---|---|
Threshold | {-1, 1} | Binary decisions |
Unit Step | {0, 1} | Simple binary output |
Sigmoid | (0, 1) | Binary classification, output layer |
Linear | Regression output layer | |
Piecewise Linear | Clipped linear | Custom saturation range |
Gaussian | (0, 1] | RBF networks, probabilistic models |
Tanh | (-1, 1) | Hidden layers, zero-centered output |
ReLU | Hidden layers in deep networks, CNN |
What's Next?
Now that you understand how a single neuron works and how activation functions shape its output, the next step is understanding how networks of neurons learn — through loss minimization and backpropagation.
Loss Function — how a network measures its own error
Gradient Descent — how it learns by minimizing that error
Perceptron — the simplest neural network building block
Convolutional Neural Network (CNN) — applying neural networks to image data
