AI Module5
AI Module5
Biological neurons are the fundamental units of the human nervous system and serve as the
inspiration for artificial neural networks. Understanding how biological neurons work helps
us grasp the logic behind artificial neurons, which form the basis of machine learning
models like ANNs.
1. Dendrites
3. Axon
4. Synapse
o The junction between two neurons where signal transmission occurs via
neurotransmitters.
4. At the synapse, neurotransmitters are released, passing the signal to the receiving
neuron's dendrites.
Biological to Artificial Mapping
Dendrites Inputs
Axon Output
• Human brain has ~86 billion neurons connected via trillions of synapses—ANNs
mimic this structure at a much smaller scale.
Real-World Analogy
This biological flow—input → processing → output—is the core principle behind all neural
network models.
Biological neurons are the foundation of all neural processing in the brain. Their structure
and behavior inspired the design of artificial neurons used in machine learning. Though
artificial models are simplified, they capture the essence of biological learning: using inputs,
adjusting weights, and generating outputs to adapt and learn.
ANNs are the backbone of deep learning and have been successfully applied to tasks like
image recognition, speech processing, natural language understanding, and medical
diagnosis.
• The human brain contains billions of neurons that communicate through synapses.
• Similarly, an ANN consists of artificial neurons that are connected and pass
information between each other.
Analogy:
2. Structure of an ANN
1. Input Layer – Takes raw input features (e.g., pixels, sensor data).
2. Hidden Layer(s) – Processes input data using weighted connections and activation
functions.
Diagram (Conceptual):
3. Forward Propagation
The process of passing inputs through the network from input to output is called forward
propagation. At each neuron, the weighted sum of inputs is computed and passed through
an activation function.
• Learn directly from raw data (no need for manual feature engineering).
Advantages
Limitations
An artificial neuron (also called a node or perceptron) is the fundamental building block
of an artificial neural network. It is inspired by the structure and function of a biological
neuron in the human brain. The artificial neuron takes multiple inputs, processes them, and
generates an output.
This simple structure enables neural networks to learn from data and make decisions.
Synapse Weights
Axon Output
Each input is assigned a weight which signifies its importance in the final output.
Where bbb is the bias term that allows shifting the activation.
4. Activation Function
The weighted sum is passed through an activation function to introduce non-linearity and
decide the output.
5. Output
Example
Let’s assume:
Then:
The structure of an artificial neuron defines how neural networks process information.
With input weights, bias, and activation functions, neurons can simulate the behavior of the
brain and learn complex mappings between inputs and outputs. Understanding this
structure is essential before studying multilayer networks and training techniques like
backpropagation.
The Perceptron is the earliest and simplest type of artificial neural network, introduced by
Frank Rosenblatt in 1958. It models a single neuron and is used primarily for binary
classification problems. The perceptron is a linear classifier, meaning it can only solve
problems where classes are linearly separable.
This topic bridges the gap between biological inspiration and computational learning.
Structure of a Perceptron
Mathematical Representation:
Where:
Example:
Learning in Perceptron
Where:
The learning continues until all training examples are classified correctly (or max epochs
are reached).
If the data is linearly separable, the perceptron learning algorithm is guaranteed to find a
set of weights that classify all points correctly in finite time.
Applications
Limitations
Term Meaning
Artificial Neural Networks come in different architectures depending on the nature of the
problem (e.g., classification, regression, image recognition, pattern mapping). The choice of
network type determines how data flows, how training happens, and what kinds of
problems the network can solve.
Each type of ANN has a different structure, learning strategy, and area of application.
• No hidden layer.
Use Case: Basic binary classification (e.g., spam detection with simple features).
Limitation: Can only learn linearly separable patterns (like the Perceptron).
• Includes one or more hidden layers between input and output layers.
• Two-layer network:
Key Characteristic:
Applications:
• Function approximation
• Time-series prediction
• Control systems
Structure:
• Unlike feedforward networks, outputs from previous steps are fed back into the
network.
Applications:
• Language modeling
• Speech recognition
Key Features:
Applications:
• Image classification
• Face recognition
• Medical imaging
Use Case:
• Clustering
• Data visualization
• Pattern discovery
CNN Supervised Convolution and pooling layers Image and video processing
Different types of ANNs are suited for different kinds of problems. Choosing the right
network depends on the data type, learning task, and computational resources. While
feedforward networks form the foundation, specialized types like CNNs, RNNs, and SOFMs
power many of today’s advanced AI systems.
The learning in MLP is typically done using the backpropagation algorithm, a supervised
learning technique that updates weights to minimize the prediction error.
Structure of an MLP
• Hidden Layer(s): Intermediate layers that apply weights and activation functions.
Common architecture:
Forward Propagation
Steps of Backpropagation
1. Initialization
2. Forward Pass
3. Compute Error
• Use partial derivatives to compute the gradient of the error with respect to each
weight.
5. Repeat
• Common choices:
• Common choices:
Example
Advantages of MLP
Limitations
MLPs form the basis of most modern deep learning systems. The backpropagation
algorithm allows these networks to learn from errors and continuously improve.
Understanding this process is critical for training accurate, reliable machine
learning models.
The Radial Basis Function (RBF) Neural Network is a special type of feedforward
neural network that uses radial basis functions as activation functions in the hidden
layer. RBF networks are particularly useful for function approximation, time-series
prediction, and pattern recognition tasks.
They are faster to train and require fewer parameters compared to multilayer perceptrons,
but are generally suitable for smaller datasets.
1. Input Layer
3. Output Layer
o Produces the final output using a linear combination of the hidden neuron
outputs.
Where:
• x: Input vector
Visual Representation
You can visualize each RBF neuron as a bell-shaped curve centered at a point in input
space. The neuron activates more when the input is closer to its center.
o Learn the weights from the hidden layer to the output layer using least
squares method or gradient descent.
• Function approximation
• Time-series forecasting
• Handwriting recognition
Advantages
Limitations
Real-Life Example
An RBF network trained to recognize handwritten digits might use 10 RBF neurons (one
for each digit 0–9). Each neuron is highly responsive to inputs that are similar in shape
to the digit it represents.
RBF neural networks offer a powerful yet simple architecture for classification and
regression. Their structure, based on radial distance, provides a localized response to
input patterns, making them suitable for a wide range of real-world problems with
moderate complexity.
It is unique because it not only groups similar data but also preserves the topological
structure, meaning similar input patterns are mapped close together on the output
grid.
Key Characteristics
• Topology preservation: Inputs that are close in the original space remain close in
the map.
Architecture
1. Input Layer
o Each neuron has an associated weight vector of the same dimension as the
input.
o Identify the Best Matching Unit (BMU) – neuron closest to the input.
3. Update weights of the BMU and its neighbors to make them more like the input:
1. Where:
Neighborhood Function
• Determines which neurons (besides BMU) should have their weights updated.
• The size of the neighborhood shrinks over time, leading to more precise mapping.
Example Visualization
SOFM would visually organize these colors such that related ones appear close together.
Applications of SOFM
• Data clustering
• Market segmentation
• Pattern recognition
Advantages
• Excellent for visualizing complex, high-dimensional data
Limitations
Summary Table
Feature Details
The Self-Organizing Feature Map is a powerful tool for unsupervised learning and data
exploration. It provides an intuitive way to understand large datasets by projecting them
into lower dimensions, while maintaining the structure of the original data. Though it's less
common in modern deep learning pipelines, it remains widely used in exploratory data
analysis and research.