TrisZaska's Machine Learning Blog

What is Neural Networks and how it works

1. Introduction
2. History and Overview about Artificial Neural Network
3. Single neural network
4. Multi-layer neural network
5. Install and using Multi-layer Neural Network to classify MNIST data
6. Summary
7. References

Intuition about Neural Networks

Basically, the learning algorithms inside computers are just the combination of algebra variables and mathematical equations linking together to do a specific function. It's true for Neural Networks model, the idea behind Neural Networks is to simulate human brain by interconnected thousand even billion transistors inside CPUs to do pattern recognitions, learning, making decisions like human ways.
We call it's Neuron, each Neuron in Neural Networks operate like a biological neuron in the human brain, to understand how it works, firstly look at the picture above describes the workflow inside brain neuron. A biological neuron receives input signal (electrical and chemical) from output signal of other neurons connected to it by dendrites, then executed by cell nucleus when signals reached to threshold, neuron will wire signal to other neurons through axon and change the axon terminals wire, it cause brain learning. And the connection billion of billion neurons in brain processing parallelly together, human brains can do amazing things.

How it works

In generally, Neural Networks have 3 layers with different tasks:
  • Input layer used to receive information so-called features or variables from data, the number of neurons in input layer belongs to the number of features you want to feed in.
  • Hidden layer is considered to process information from input layer, we can have more than one layers with many neurons in each layer in Hidden layer (called Deep Neural Networks and it's out of scope of this papers).
  • Output layer used to return the outputs, similarly, the number of neurons in output layer belong to what are outputs you want. Example, if your Neural Networks used for binary classification, output layer just has two neurons represented 0 or 1.
We'll go to detail the components of Neural Networks, firstly look at the picture above. What do we see? Hum! it looks like a Neural Network with three layers: input layer has 3 neurons, hidden layer has 4 neurons and output layer has 2 neurons. So, what is Neuron? We can define every neuron in the Neural Network is a processing unit, it's fully interconnected together through "line", each neuron receives input from previous neurons and do some task such as summation and activation we will discuss later, then its fire output to the next neurons. The "lines" in the picture represented the Weight. We then wonder what the weight is? The weight is a coefficient between neurons, its control how much information going from this neuron to another neuron. Imaging weight similar to water pipe from 2 tanks, with small water pipe we have restricted water than bigger water pipe when water flow from this tank to another tank, right? Similarly, with bigger weight its represent the strong connection between two neurons and vice versa.
So, what cause the network learning?
When the input is immutable. The Neural Network learn new things by changes the weight just like human brain changes the connections between neurons. Curiously, how can it do that? The spirit of Neural Network is the Back-Propagation algorithm we will discuss later can help Neural Network learn the pattern between arbitrary input and output, it's also the reason why called Neural Network is Supervised Learning. The idea is it try to optimize all of the weights in Neural Network based on the feedback from output layer, easy right? And what is feedback we will discuss later, too? Let's go to example to make sure you fully understand.

Example

  • Feedforward
  • Backpropagation
  • Update the weight

No comments :

Post a Comment

Leave a Comment...