6CS4-04 · RTU · 3rd Year
Artificial Neural Networks
Learn the fundamentals of Artificial Neural Networks, Perceptrons, Back Propagation, SOM, and Neuro Dynamics.
Last time you stopped at card —. ·
- 45cards
- 5units
- 0nailed
- 9diagrams
45/45
-
An Artificial Neural Network (ANN) is a computational model inspired by the structure and function of the human brain. It consists of interconnected processing units called artificial neurons or nodes, organized in layers, which process information in a parallel and distributed manner.
Key Characteristics
- Learning: ANNs learn from experience (training data) rather than being explicitly programmed.
- Generalization: They can infer rules from data and apply them to unseen examples.
- Fault Tolerance: Information is distributed, so localized damage doesn't cause catastrophic failure.
-
The human brain is a highly complex, biological neural network that excels at pattern recognition, learning, and parallel processing, while an ANN is its mathematical abstraction.
Feature Human Brain Artificial Neural Network Processing Element Biological Neuron Artificial Node (Perceptron) Connections Synapses Weights Processing Speed Slow (milliseconds) Fast (nanoseconds) Parallelism Massively Parallel Simulated/Hardware Parallelism Learning Mechanism Synaptic Plasticity (Chemical) Weight adjustment algorithms (Math) -
An artificial neuron models the biological neuron using mathematical operations. It consists of three primary components:
- 1. Synaptic Weights (\(w_1, w_2, ..., w_n\)): Multiply the inputs to simulate the strength of synaptic connections.
- 2. Adder / Summation Junction (\(\Sigma\)): Computes the linear combination of inputs and weights: \(v_k = \sum_{j=1}^{m} w_{kj}x_j\)
- 3. Activation Function (\(\phi(\cdot)\)): Limits the amplitude of the output and introduces non-linearity: \(y_k = \phi(v_k + b_k)\) where \(b_k\) is the bias.
-
A Neural Network can be represented as a Directed Graph where:
- Nodes (Vertices): Represent the artificial neurons (processing units).
- Directed Edges (Links): Represent the synaptic connections between neurons, each associated with a weight \(w_{ij}\) indicating the flow of signals from neuron \(j\) to neuron \(i\).
Signal Flow Graph: A specialized directed graph with nodes representing system variables and branches representing functional relationships, useful for tracing the signal transmission through the network.
-
Neural networks are classified based on their connection patterns (architectures):
- 1. Single-Layer Feedforward Networks: An input layer of source nodes projecting directly onto an output layer of neurons. (No hidden layers).
- 2. Multi-Layer Feedforward Networks: One or more hidden layers exist between the input and output nodes, allowing the network to extract higher-order statistics.
- 3. Recurrent Networks: Networks containing at least one feedback loop. Signals can flow backwards, creating an internal memory or state, crucial for processing temporal sequences.
-
Knowledge Representation refers to how information is stored inside an ANN. Unlike expert systems with explicit symbolic rules, ANNs store knowledge implicitly in their synaptic weights and network architecture.
Rules for Knowledge Representation
- Similar inputs from classes should produce similar representations inside the network.
- Prior information (if known) should be incorporated into the network design (e.g., using convolutional layers for images).
-
Artificial Intelligence (AI) is the broader field aimed at creating machines capable of intelligent behavior. Neural Networks are a specific subfield of AI (under the umbrella of Machine Learning).
- Symbolic AI (Good Old-Fashioned AI): Uses explicit, hard-coded rules and logic to represent knowledge.
- Connectionist AI (Neural Networks): Uses distributed, implicit representations learned from data without explicit programming, making them far better at fuzzy, noisy tasks like image and speech recognition.
-
Learning is the process by which a neural network adapts its internal parameters (synaptic weights and biases) in response to stimulation from the environment, leading to a change in the network's behavior over time.
Mathematically, it involves updating the weight matrix \(\mathbf{W}\) using a learning algorithm: \(\Delta w_{ij}(t) = \text{Learning Algorithm}(\text{Environment, Network State})\)
-
Error Correction Learning is a supervised learning paradigm based on the minimization of an error signal. It compares the network's actual output \(y_k(n)\) with the desired target output \(d_k(n)\).
- 1. Calculate the error: \(e_k(n) = d_k(n) - y_k(n)\)
- 2. Adjust weights to minimize this error (usually using gradient descent).
Delta Rule (Widrow-Hoff rule): The weight adjustment is proportional to the product of the error and the input: \(\Delta w_{kj}(n) = \eta \cdot e_k(n) \cdot x_j(n)\) where \(\eta\) is the learning rate.
-
In Memory-Based Learning, all (or most) of the past experiences (training examples) are explicitly stored in a large memory. When classifying a new, unseen test instance, the algorithm computes the distance between the new instance and the stored examples.
- Nearest Neighbor Rule: Assigns the test instance to the class of the closest stored example.
- k-Nearest Neighbors (k-NN): Takes a majority vote among the \(k\) closest stored examples.
-
Hebbian Learning is a biological principle (postulated by Donald Hebb in 1949) summarized as: "Neurons that fire together, wire together."
If two interconnected neurons are activated simultaneously, the synaptic weight between them increases. Mathematically:
\(\Delta w_{kj}(n) = \eta \cdot y_k(n) \cdot x_j(n)\)
It is an unsupervised learning rule heavily used in associative memory networks.
-
Competitive Learning is an unsupervised learning mechanism where output neurons compete among themselves to become active (fire). Only a single output neuron—the "winner"—is active at any given time.
Winner-Takes-All
When an input pattern is presented, the neuron whose weight vector is most similar to the input vector wins the competition. Only the winner's weights are updated to move even closer to the input pattern, creating highly specialized feature detectors.
-
Boltzmann Learning is a stochastic learning rule rooted in statistical mechanics. It is used in networks like Boltzmann Machines, where neurons have binary states (on/off) and the network operates based on an energy function.
The learning process aims to minimize the discrepancy between the probability distribution of the network's visible units in the "clamped" phase (when fixed to training data) and the "free-running" phase. It uses simulated annealing to escape local minima.
-
The Credit Assignment Problem is the challenge of determining how much "credit" or "blame" each internal (hidden) neuron should receive for the final error generated at the output layer.
In single-layer networks, this is trivial, but in multi-layer networks, it's difficult because hidden neurons don't have direct target values. The Back-Propagation algorithm was specifically developed as a solution to this problem, propagating the output error backward through the hidden layers.
-
In neural networks, Memory refers to the retention of information learned from the environment.
- Short-Term Memory: The temporary state or activation level of a neuron at a given time instance.
- Long-Term Memory: The knowledge permanently embedded in the synaptic weights of the network as a result of the learning process.
-
Adaption is the ability of a neural network to change its synaptic weights in real-time to operate in a non-stationary environment (an environment where the underlying statistical properties change over time).
An adaptive network continually monitors its performance and triggers a learning phase whenever the error exceeds a certain threshold, ensuring the network remains robust and accurate over time.
-
The learning process in neural networks is fundamentally statistical because the environment providing the training data is typically random and noisy.
- The training examples are drawn from an unknown probability distribution.
- Learning algorithms (like Stochastic Gradient Descent) act as statistical estimators, trying to find the optimal weights that minimize the expected value of the loss function over this unknown distribution.
- The weights themselves behave as random variables during the training phase.
-
The Adaptive Filtering Problem is the foundational problem that perceptrons try to solve. It involves designing a filter (a single-layer neural network) whose parameters (weights) automatically adjust themselves based on the input signal to minimize a predefined error criterion (like Mean Square Error).
It is "adaptive" because the filter learns its optimal configuration from the environment iteratively, rather than having it pre-calculated.
-
Training a neural network is fundamentally an unconstrained optimization problem. The goal is to find a weight vector \(\mathbf{w}\) that minimizes the cost function \(E(\mathbf{w})\) without any constraints on the values \(\mathbf{w}\) can take.
Key Methods
- Gradient Descent (Steepest Descent): Moves weights in the opposite direction of the gradient of the cost function. \(\mathbf{w}(n+1) = \mathbf{w}(n) - \eta \nabla E(\mathbf{w})\)
- Newton's Method: Uses second-order derivatives (Hessian matrix) for faster convergence, but is computationally expensive.
-
A Linear Least Square Filter aims to minimize the sum of squared errors between the desired output and the actual filter output across all data points.
The Least Mean Square (LMS) Algorithm (also known as the Widrow-Hoff rule) is a stochastic gradient descent method that approximates the steepest descent by updating weights based on the instantaneous error rather than the total error.
LMS Weight Update Rule: \(\mathbf{w}(n+1) = \mathbf{w}(n) + \eta \cdot e(n) \cdot \mathbf{x}(n)\) where \(e(n) = d(n) - \mathbf{w}^T(n)\mathbf{x}(n)\). It is highly computationally efficient and widely used.
-
A Learning Curve is a graphical representation of the learning process, typically plotting the Error (Cost Function) on the y-axis against the Number of Epochs (Training Iterations) on the x-axis.
- Steep drop: Fast initial learning.
- Plateau: The network is converging to a minimum error state.
- Divergence (curve goes up): The learning rate might be too high, causing instability.
-
Learning Rate Annealing (or Learning Rate Decay) is a technique where the learning rate \(\eta\) is systematically decreased as training progresses.
Why?
- A large initial \(\eta\) allows the network to learn quickly and escape local minima.
- A smaller \(\eta\) later allows the network to fine-tune the weights and stably converge to the absolute minimum of the cost function without oscillating around it.
-
The Perceptron Convergence Theorem (proved by Frank Rosenblatt) states that if two classes of patterns are linearly separable, the perceptron learning algorithm will always find a separating hyperplane (a weight vector) in a finite number of steps.
Limitation: If the classes are not linearly separable (like the XOR problem), the perceptron algorithm will never converge and will loop infinitely.
-
The XOR Problem involves learning the Exclusive-OR logic gate (output is 1 if inputs are different, 0 if they are the same).
In 1969, Minsky and Papert proved that a single-layer perceptron can only learn linearly separable patterns (patterns that can be separated by a single straight line). Plotting XOR on a 2D graph shows that no single straight line can separate the 0 outputs from the 1 outputs.
This realization caused the first "AI Winter," which was only resolved by the introduction of hidden layers and the Back-Propagation algorithm.
-
An MLP solves the XOR problem by introducing one or more hidden layers with non-linear activation functions.
The hidden layer effectively acts as a feature extractor, transforming the original non-linearly separable input space into a new, higher-dimensional hidden space where the patterns become linearly separable by the output layer.
-
To make Back-Propagation converge faster and avoid poor local minima, several heuristics (rules of thumb) are used:
- 1. Initialization: Initialize weights randomly from a uniform distribution with a zero mean and small variance to prevent saturation.
- 2. Sequential vs. Batch Updating: Sequential (stochastic) updating is often faster and less prone to local minima than batch updating for large datasets.
- 3. Maximizing Information Content: Present examples that produce the largest error first.
- 4. Momentum: Add a fraction of the previous weight change to the current weight change to accelerate learning and dampen oscillations.
-
In an MLP, the hidden neurons perform Feature Detection. During training, the network automatically discovers salient features (patterns, edges, relationships) in the input data and assigns specific hidden neurons to act as detectors for those features.
For example, in image processing, the first hidden layer might learn to detect basic edges, the second layer might combine edges to detect shapes, and the output layer makes a decision based on those high-level features.
-
Back Propagation (BP) is an algorithm for training multilayer perceptrons. It works by applying the chain rule of differentiation iteratively to compute the gradient of the loss function with respect to every weight in the network.
It operates in two phases:
- 1. Forward Pass: The input signal propagates forward layer-by-layer to compute the output. Weights are fixed.
- 2. Backward Pass: The error signal (difference between actual and desired output) propagates backward through the network. Weights are updated using the computed gradients.
-
The Hessian Matrix (\(H\)) is a square matrix of second-order partial derivatives of the cost function with respect to the weights. \(H = \nabla^2 E(\mathbf{w})\)
While standard Back-Propagation uses first-order derivatives (gradient) pointing in the direction of steepest descent, the Hessian provides information about the curvature of the error surface.
- Using the Hessian (like in Newton's Method) allows for much faster convergence (Accelerated Convergence) by taking larger steps where the surface is flat and smaller steps where it is highly curved.
- Drawback: It is computationally extremely expensive to calculate and invert for large networks.
-
Virtues (Pros) Limitations (Cons) Mathematically rigorous (based on chain rule) Can get stuck in Local Minima instead of the global minimum. Works excellently for multi-layer networks Slow convergence, especially for deep networks. Capable of learning highly complex, non-linear mappings Vanishing Gradient Problem: Gradients become extremely small in deep layers, halting learning. Flexible and widely applicable Requires careful tuning of hyperparameters (learning rate, momentum).
-
Generalization is a network's ability to perform well on new, unseen test data that was not part of the training set. It means the network has learned the underlying true pattern rather than memorizing the specific training examples.
Overfitting occurs when a network learns the training data too well, memorizing noise and specific anomalies. An overfitted network has very low training error but extremely high test error (poor generalization).
-
Cross Validation is a technique to estimate the generalization performance of a network and stop training before overfitting occurs (Early Stopping).
The dataset is split into:
- 1. Training Set: Used to update the weights.
- 2. Validation Set: Not used for training. Evaluated periodically during training.
- 3. Test Set: Kept strictly hidden until the very end.
Early Stopping: Training is halted when the error on the Validation Set starts to increase, even if the Training Set error is still decreasing.
-
Network Pruning involves removing redundant or unnecessary neurons and synaptic connections from a trained network to make it smaller, faster, and less prone to overfitting.
Common Techniques
- Weight Decay: Adding a penalty term to the cost function to drive small weights to zero during training.
- Optimal Brain Damage (OBD): Uses the second derivatives (Hessian matrix) to identify and delete weights whose removal causes the least increase in the training error.
-
A Self-Organizing Map (SOM), also known as a Kohonen Map, is a type of unsupervised artificial neural network that is trained to produce a low-dimensional (typically 2D), discretized representation of the input space of the training samples, called a map.
SOMs differ from other artificial neural networks as they apply competitive learning as opposed to error-correction learning (such as backpropagation with gradient descent), and in the sense that they use a neighborhood function to preserve the topological properties of the input space.
-
The biological basis of SOMs relies on the fact that different sensory inputs (motor, visual, auditory) map to topologically distinct areas of the cerebral cortex.
- 1. Willshaw-von der Malsburg Model: An early model demonstrating that ordered neural connections can be formed by self-organization using Hebbian learning rules with lateral inhibition.
- 2. Kohonen Model (SOM): A mathematically simplified, computationally efficient abstraction of the biological map formation, focusing on competitive learning and topological neighborhood updating.
-
The SOM algorithm proceeds in four main stages:
- 1. Initialization: Choose random values for the initial weight vectors \(w_j\).
- 2. Competition: For each input pattern \(x\), all neurons compute the distance (e.g., Euclidean) between their weight vector and the input. The neuron with the smallest distance is declared the Best Matching Unit (BMU).
- 3. Cooperation: The BMU determines the spatial location of a topological neighborhood of excited neurons.
- 4. Synaptic Adaptation: The weights of the BMU and its neighbors are adjusted to move closer to the input vector \(x\). The learning rate and neighborhood size shrink over time.
-
Properties of SOMs
- Approximation of Input Space: The weight vectors of the map neurons approximate the probability density function of the input space.
- Topological Ordering: The spatial location of a neuron in the map corresponds to a particular domain of input patterns. Similar inputs map to neurons that are close to each other in the grid.
- Density Matching: Regions of the input space with higher density of data points are represented by a larger area in the feature map (more neurons).
- Feature Selection: Given data from a high-dimensional space, the SOM selects the best nonlinear surface (the 2D map) to represent that data.
-
Learning Vector Quantization (LVQ) is a supervised learning algorithm closely related to SOM. While SOM is used for unsupervised clustering and dimensionality reduction, LVQ is used for pattern classification.
In LVQ, each output neuron is assigned to a specific class. It adjusts its weight vectors (codebook vectors) to define the class boundaries in the input space using labeled training data.
-
When an input vector \(x\) belonging to class \(C_x\) is presented, LVQ finds the closest weight vector \(w_c\) (the winner).
- If the winner is correct (i.e., \(w_c\) also belongs to class \(C_x\)): The weight vector is moved closer to the input to reinforce the correct classification. \(w_c(t+1) = w_c(t) + \alpha[x - w_c(t)]\)
- If the winner is incorrect: The weight vector is moved away from the input to correct the mistake. \(w_c(t+1) = w_c(t) - \alpha[x - w_c(t)]\)
Other (non-winning) vectors are not updated.
-
Adaptive Pattern Classification refers to a system's ability to classify input patterns into distinct categories and dynamically adapt its decision boundaries as new data arrives.
Algorithms like LVQ perform adaptive pattern classification by continually adjusting their codebook vectors. This is particularly useful in environments where the underlying distribution of the data (the concepts) might change slowly over time (concept drift).
-
Neuro Dynamics is the study of the temporal (time-based) behavior of neural networks. Unlike feedforward networks where data flows straight through, neuro-dynamical systems use recurrent networks (networks with feedback loops), making them complex, non-linear dynamical systems whose state evolves over time.
-
In a dynamical system, an equilibrium state is a condition where the system's state variables no longer change with time. It is a "fixed point."
- Stable Equilibrium (Attractor): If the system is perturbed slightly from this state, it naturally returns to it. Think of a marble at the bottom of a bowl. The set of all initial conditions that eventually lead to a specific attractor is called its basin of attraction.
- Unstable Equilibrium: A slight perturbation causes the system to move further away from the state. Think of a marble perfectly balanced on top of an inverted bowl.
-
In Recurrent Neural Networks (like the Hopfield Network), learning is viewed as the process of shaping the energy landscape of the network. By adjusting the synaptic weights, we manipulate the position and depth of the attractors.
We "carve out" basins of attraction so that the fundamental memories (patterns we want the network to learn) become the stable equilibrium states of the network. When presented with a noisy or incomplete input, the network's dynamics naturally flow "downhill" into the nearest attractor, thereby recovering the original, clean memory.
-
A Hopfield Network (invented by John Hopfield in 1982) is a form of recurrent artificial neural network that serves as a content-addressable memory (associative memory) system.
Key Characteristics
- Fully Interconnected: Every neuron is connected to every other neuron (except itself).
- Symmetric Weights: The weight from neuron \(i\) to \(j\) is exactly the same as from \(j\) to \(i\) (\(w_{ij} = w_{ji}\)).
- Binary/Bipolar States: Neurons take on discrete values (usually +1 or -1).
- Energy Function: The network has a global energy function that decreases monotonically as the network updates its state, guaranteeing convergence to a local minimum (an attractor/memory).
-
Storage Phase: The network stores \(P\) patterns (memories) by calculating the weight matrix using a Hebbian-like outer product rule. \(W = \frac{1}{N} \sum_{k=1}^{P} \mathbf{x}_k \mathbf{x}_k^T - \frac{P}{N}I\)
Retrieval Phase:
- 1. An unknown, noisy, or partial pattern \(\mathbf{y}\) is presented as the initial state of the network.
- 2. Neurons update their states asynchronously (one by one) or synchronously based on the weighted sum of inputs from other neurons.
- 3. The network state evolves, moving down the energy landscape.
- 4. It eventually stops at a stable fixed point (attractor). If successful, this fixed point is the original stored memory closest to the input \(\mathbf{y}\).
No card matches that search.
1/45
0
0:00
Question
Click the card or press Space to flip
Answer
Diagram for this card
Diagram
Handwritten diagram
Run complete
0 nailed · 0 in the pile · 0:00 · best combo 0
Scroll to zoom · drag to pan · Esc to close
Shortcuts
- S
- Start the run
- Space
- Show me the answer
- ← →
- Previous / next card
- 1 2
- Not yet / Nailed it
- D
- Open the diagram
- F
- Diagram full screen
- /
- Search the deck
- Esc
- Close whatever is open