Artificial Intelligence - A beginner's guide to Neural Networks

Modeling computer learning from human learning

Posted by Sheia Anandaraj on July 30, 2020 · 5 mins read

In this series, we would be exploring, at a high level, some ideas, techniques, and algorithms that are at the foundation of AI. AI covers a wide range of techniques and in this series, I would be covering the following categories of problems:

  1. Search – searching for a solution to a problem, for example driving directions from point A to point B
  2. Knowledge – making inferences given some information
  3. Uncertainty – dealing with uncertain events
  4. Optimization – locating the best option among a possible set of solutions
  5. Learning – being able to perform a task by learning from data
  6. Neural Networks – drawing inspiration from human intelligence
  7. Language – understanding natural language

In this post, we will explore Neural Networks.

6. Neural Networks

MNIST, the “Hello World” of deep learning. © Yann LeCun et al.

Neural Networks (NN) is one of the most popular techniques within ML and is inspired by the neurons in the human brain.

An Artificial Neural Network (ANN) is a mathematical model for learning inspired by biological neural networks.

Application

ANN is very versatile and can be applied to many domains. Some examples are given below:

  • Computer Vision - where the AI analyzes digital images or videos and classifies them or decides what action to take.
    • Recognizing faces and tagging names on social media websites.
    • Recognizing objects and traffic light signals on the road for self-driving cars.
    • Recognizing hand-writing where the computer deciphers letters and numbers written by humans.
    • Analyzing a video to check for copyright violation or categorizing it as per genre in Youtube for example.
  • Others
    • Classifying a text message such as a movie review as positive or negative
    • Recognizing voice and classifying it according to whose voice it is.
    • Translating sentences from one language into another in say, Google Translate.
Approach
An ANN with an input layer, an output layer and three hidden layers (https://cdn-images-1.medium.com/max/800/1*FBXS211lj7zWEQZRAmDedQ.png)

Given above is a graphical representation of a Multilayer neural network. The network would first need to be trained to identify the weights required to translate the input(s) to the expected output(s). Backpropagation is the key algorithm for training multi-level structures and Gradient Descent is an optimization algorithm used for identifying the weights such that it minimizes the loss function, which is the difference between the actual and predicted output.

A trained Neural Network from Tensorflow’s playgroup (http://playground.tensorflow.org/)

Given above is an example from Tensorflow’s playground which shows a trained network that has classified the input data points by assigning the weights successfully.

Feedforward neural network is a simple NN that has connections only in one direction and is used for classification types of problems.

Using Image Convolution to detect edges (https://timdettmers.com/2015/03/26/convolution-deep-learning/)

Convolutional neural network is used for analyzing images. It uses Image Convolution, which is the method of extracting useful information/features from images by applying filters to those images. This mimics the way humans look at an image by extracting edges or particular shapes to determine what the image is about. Pooling helps reduce the size of an input image by sampling from regions in the input.

Recurrent neural network is a NN that feeds the output back to the input for use in future runs. This is particularly helpful when the input is a sequence such as a sequence of pictures in the case of a video or a sequence of words in the case of text messages and thus makes interpreting video, audio and sentences possible.


Reference: CS50’s Introduction to Artificial Intelligence with Python