A. Introduction to neural networks
B. ANN architectures

  • Feedforward networks
  • Feedback networks
  • Lateral networks

C. Learning methods

  • Supervised learning
  • Unsupervised learning
  • Reinforced learning

D. Learning rule on supervised learning

  • Gradient descent,
  • Widrow-hoff (LMS)
  • Generalized delta
  • Error-correction

E. Feedforward neural network with Gradient descent optimization

Introduction to neural networks

Definition: the ability to learn, memorize and still generalize, prompted research in algorithmic modeling of biological neural systems.

Human brain has the ability to perform tasks such as pattern recognition, perception and motor control much faster than any computer.

Biological neuron

Soma: Nucleus of neuron (the cell body) –
process the input

  • Dendrites: long irregularly shaped filaments attached to the soma – input channels
  • Axon: another type link attached to the soma – output channels
  • Output of the axon: voltage pulse (spike) that lasts for a ms
  • Firing of neuron – membrane potential
  • Axon terminates in a specialized contact called the synaptic junction – the electrochemical contact between neurons
  • The size of synapses are believed to be linked with learning
  • Larger area: excitatory—smaller area: inhibitory
Diagram illustrating the components of a biological neuron, including dendrites, soma, axon, synapses, and axon terminals.

Artificial neuron model (McCulloh-Pitts model, 1949)

Diagram of an artificial neuron model illustrating the flow of input signals, synaptic weights, and the activation function controlling output firing.

Qj : external threshold, offset or bias
wji : synaptic weights
xi : input
yj : output

Equation representing the output of a neuron in a neural network, showing the relationship between inputs, weights, and activation function.

Different NN types

Single-layer NNs, such as the Hopfield network

  • Multilayer feedforward NNs, for example standard backpropagation, functional link and product unit networks
  • Temporal NNs, such as the Elman and Jordan simple recurrent networks as well as time-delay neural networks
  • Self-organizing NNs, such as the Kohonen self-organizing feature maps and the learning vector quantizer
  • Combined feedforward and self-organizing NNs, such as the radial basis function networks

The ANN applications

Classification, the aim is to predict the class of an input vector

  • Pattern matching, the aim is to produce a pattern best associated with a given input vector
  • Pattern completion, the aim is to complete the missing parts of a given input vector
  • Optimization, the aim is to find the optimal values of parameters in an optimization problem
  • Control, an appropriate action is suggested based on given an input vectors
  • Function approximation/times series modeling, the aim is to learn the functional relationships between input and desired output vectors;
  • Data mining, with the aim of discovering hidden patterns from data (knowledge discovery)

ANN architectures

Neural Networks are known to be universal function
approximators

  • Various architectures are available to approximate any
    nonlinear function
  • Different architectures allow for generation of functions of
    different complexity and power.

Feedforward networks
Feedback networks
Lateral networks

Feed Farword Networks

  • Input layer: Number of neurons in this layer corresponds to the number of inputs to the neuronal network. This layer consists of passive nodes, i.e., which do not take part in the actual signal modification, but only transmits the signal to the following layer.
  • Hidden layer: This layer has arbitrary number of layers with arbitrary number of neurons. The nodes in this layer take part in the signal modification, hence, they are active.
  • Output layer: The number of neurons in the output layer corresponds to the number of the output values of the neural network. The nodes in this layer are active ones.
Diagram illustrating a feedforward neural network architecture, featuring input, hidden, and output layers with their respective weight matrices.

•No feedback within the network
•The coupling takes place from one layer to the next
•The information flows, in general, in the forward direction

Feedback networks Elman Recurrent Network

The output of a neuron is either directly or indirectly fed back to its input via other linked neurons used in complex pattern recognition tasks, e.g., speech recognition etc.

Diagram of a feedforward neural network showing input, context, hidden, and output layers with activation functions.

Feedback networks Jordan Recurrent Network

Diagram illustrating a feedforward neural network structure with input, hidden, and output layers, including activation functions for each layer.

Lateral Networks

Diagram of a feedforward neural network showing input layer, hidden layer, and output layer with connections.

•There exist couplings of neurons within one layer
•There is no essentially explicit feedback path amongst the different layers
•This can be thought of as a compromise between the forward and feedback network.

Learning methods

  • Artificial neural networks work through the optimized weight values.
  • The method by which the optimized weight values are attained is called
    learning
  • In the learning process  try to teach the network how to produce the
    output when the corresponding input is presented
  • When learning is complete: the trained neural network, with the updated
    optimal weights, should be able to produce the output within desired
    accuracy corresponding to an input pattern.

Learning methods

  • Supervised learning
  • Unsupervised learning
  • Reinforced learning

Classification of Learning Algorithms

Diagram illustrating different learning algorithms for neural networks, including supervised, unsupervised, and reinforcement learning methods.

Supervised learning

Supervised learning means guided learning by “teacher”; requires a training set which consists of input vectors and a target vector associated with each input vector.

Diagram of a supervised learning system showing the flow of information between the environment, teacher, and learning system, along with error signal feedback.

Unsupervised learning

  • The objective of unsupervised learning is to discover patterns or features in the input data with no help from a teacher, basically performing a clustering of input space.
  • The system learns about the pattern from the data itself without a priori knowledge. This is similar to our learning experience in adulthood “For example, often in our working environment we are thrown into a project or situation which we know very little about. However, we try to familiarize with the situation as quickly as possible using our previous experiences, education, willingness and similar other factors”
  • Hebb’s rule: It helps the neural network or neuron assemblies to remember specific patterns much like the memory. From that stored knowledge, similar sort of incomplete or spatial patterns could be recognized. This is even faster than the delta rule or the backpropagation algorithm because there is no repetitive presentation and training of input–output pairs.

Reinforced learning

Flowchart illustrating a reinforcement learning system with components including a Reinforcement Learning Controller, Plant, Performance Evaluation, and inputs for reinforcement and noise.

•A ‘teacher’ though available, does not present the expected answer but only indicates if
the computed output is correct or incorrect
•The information provided helps the network in its learning process
•A reward is given for a correct answer computed and a penalty for a wrong answer

Leaning algorithm in Supervised learning

  • Gradient descent
  • Widrow-hoff (LMS)
  • Generalized delta
  • Error-correction
Diagram illustrating a single neuron model with inputs, synapses, cell body, and output axon.

Gradient Descent

  • Gradient descent (GD)…(not the first but used most)
  • GD is aimed to find the weight values that minimize Error
  • GD requires the definition of an error (or objective) function to measure the neuron’s error in approximating the target.
Mathematical representation of a neural network's output function and error calculation.

Where tp and fp are respectively the target and actual output for patterns p
The updated weights:

Equation illustrating the Widrow-Hoff learning rule for adjusting neural network weights during training, detailing the relationship between new and old weights and the learning rate.

Analogy: Suppose we want to come down (descend) from a high hill (higher error) to a low valley (lower error). We move along the negative gradient or slopes. By doing so, we take the steepest path to the downhill valley steepest descent algorithm.

Graph illustrating the relationship between error and weight in a neural network, showing the path to reach the minimum error.

Widrow-hoff Least-Means-Square (LMS)

Assume that f = up The weights are updated using:

Mathematical representation of weight updates in a neural network using gradient descent optimization.

Generalized delta

Assume: Differentiable activation functions; such as sigmoid function The weights are updated using:

Mathematical expression illustrating the weight update formula for a neural network using gradient descent optimization.

Error-correction

Assume that binary-valued functions are used, e.g the step function. The weights are updated using:

Mathematical equation showing weight update formulas in neural networks, illustrating methods for adjusting weights based on output error and learning rate.

Weights are only adjusted when the neuron responds in error

Mathematical representation of output error for neural networks.

Feedforward neural network with Gradient descent optimization

Text outlining the process of calculating the actual value from input vectors and then determining the error.
Diagram illustrating the feedforward and backpropagation operations in a neural network, showing layers for inputs, hidden layers, and outputs, with arrows indicating the flow of data and error correction.

Functional Diagram of FFNN

Functional diagram of a feedforward neural network showing input layers, weighted connections, activation functions, and output layers.

Feedforward Operation

Input vector xj where j =1 to n (number of inputs)
Input weight matrix Wij where i = 1 to m (hidden neurons)

Flowchart illustrating the steps for calculating activation and output vectors in a neural network, including equations for activation, decision, and output vectors.

Backpropagation Operation

The backpropagation training algorithm is based on the principle of gradient descent and is given as half the square of the Euclidean norm of the output error vector.

Mathematical formula representing the error function for neural network learning and optimization.
An instructional slide showing three steps in error calculation for a neural network, including the output error vector, decision error vector, and activation error vector, with mathematical equations presented.
Mathematical equations detailing weight changes and updates in neural network training, focusing on learning and momentum rates.

One set of weight modifications is called an epoch, and many of these may be required before the desired accuracy of approximation is reached.

“This is the objective function for NN learning that need to be optimized by the optimization methods”

Diagram of a feedforward neural network showing input vectors, weights, and output values.

Optimization methods to carry out NN learning

  • Local optimization, where the algorithm ends up in a local optimum without finding a global optimum. Gradient descent and scaled conjugate gradient are local optimizers.
  • Global optimization, where the algorithm searches for the global optimum by with mechanisms that allow greater search space explorations. Global optimizers include Leapfrog, simulated annealing, evolutionary computing and swarm optimization.

“Local and global optimization techniques can be combined to form hybrid training algorithms”

Weight Adjustments/Updates

Two types of supervised learning algorithms exist, based on when/how weights are updated:

  • Stochastic/Delta/(online) learning, where the NN weights are adjusted after each pattern presentation. In this case the next input pattern is selected randomly from the training set, to prevent any bias that may occur due to the sequences in which patterns occur in the training set.
  • Batch/(offline) learning, where the NN weight changes are accumulated and used to adjust weights only after all training patterns have been presented.

Feedforward Neural Networks (effects of weight variations)

Graph depicting the output of a neural network function involving weights and a sigmoid activation function, showing multiple curves based on varying parameters.
Graph showing the relationship between input x and output y for a neural network, with different curves representing varying parameters.
Diagram illustrating the flow of information in an artificial neural network, depicting weights, activation function, and the output process.
Graph showing output behavior of a neural network as a function of input values for different weight configurations.


Leave a Reply

Discover more from Geeky Codes

Subscribe now to keep reading and get access to the full archive.

Continue reading