Friday, April 28, 2023

From Pixels to Perception : Let's Decode the Brain of AI



Today, we will be decoding the working of an AI Brain - a brain that is created by us. In the world of exponentially growing technology, it is essential to understand the the latest advancements and accept the truth and thrill that comes with it. Let us walk in parallel with the trend.

How Human Brain works ?

let's understand with an example.
what happens when you see a ball is coming on you and how you will be avoiding that ? 


The very first thing is that sound waves are identified by the ear neurons. Our body contains around 86 billion neurons, which are mostly present in the brain, and some other parts like the eyes, ears, and spinal cord. These neurons transmit signals to the brain. As we know, human neurons work in a simpler way, but intelligence comes when they work in groups. The signals are passed to the brain, and a chain reaction happens, after which the decision is sent to the motor neurons in the spinal cord, which connect the brain's decision to muscle actions.

In the first instance, our eyes identify an object coming towards us, but since processing is going on, the brain cannot interpret it immediately. However, a defense system is activated to protect the face. As time passes, the ball becomes clearer, and it is identified as a ball."


After the object is identified, there are different cases that can occur. 
In the first case, the brain processes all the available information and uses the physics learned during its lifetime to guess the trajectory, speed, and effect based on contextual and historical data. Using this information, the person is able to catch the ball successfully. 
In the other case, the brain is unable to decide on the appropriate action within a very short time span, and as a result, the ball hits the face.

Artificial Neural Networks
"Up until now, we have established that the decision is converted into the proper action. In humans, this decision is the result of the processing of the brain, which uses the thinking and decision-making unit called neurons."


Similarly in machines we have nodes designed to perform the similar task and since working of these nodes are based on neurons , so we called them neurons and they works in group or network and this group of neurons is called as neural network, as these are artificial so they are also known as Artificial Neural Network(ANN).

Working of Neural Networks : 

A neural network consist of layers of interconnected processing units or neurons , each neuron receives the input from other neurons, process that input and produces an output that is fed forward to the next layer  of neurons .This process continue until the output of the final layer is produced , which represents the networks prediction and output.

Perceptron : Unit of Neural Network 

it is the unit of the neural network or sometimes called as the simplest neural network as it contains a single layer of processing units that receives the input.
          


the inputs received at the input layer is processed using summation and the activation function in combine to give the output which is act as input for the second layer, there are different kind of activation functions are used in evaluating the output . instead of the mathematical terms let's understand in simple terms.

Activation State
each neuron is associated with some constant value which varies in range of (0 ---> 1).
higher value of activation state of neuron leaves more impact on the next layer.
to understand the activation state of value you can assume it as empty and filled 
balls .

to connect all the points discussed above  here is an example.
how it identifies a handwritten digit ?
so first you pass a image made of huge number of pixels like here we are taking the 


and corresponding to each pixel we have one neuron and it activation value depends on how highlighted pixel it is . in our case we will take 28 x 28 pixels which is 784 pixels and since our digit ranges 0 to 9 so output layer will consist only 10 neurons. Intermediate layers  can be of any number of neurons but here 16 is sufficient and more the number of intermediate layer increase the accuracy of identifying the digit, 
 we will proceed with the digit 7 :


image source
The input layer of the neural network consists of a set of neurons that each correspond to a pixel in the image.The hidden layers of the neural network are responsible for learning the patterns in the data. Each neuron in a hidden layer is connected to every neuron in the previous layer, and each connection is assigned a weight.During training, the neural network adjusts its weights and biases based on the errors made in its predictions. This is done through a process called backpropagation.

Once the neural network has been trained, it can be used to classify new handwritten digits by feeding the image through the input layer and propagating the inputs through the hidden layers to the output layer.The digit with the highest output value is then taken as the prediction of the network.
so this is how  neural network  makes the decision and i hope you were able to understand it.

Whatsapp Button works on Mobile Device only

Start typing and press Enter to search