Knowledge Base

Deep Learning with MATLAB

The term ‘artificial intelligence’ or ‘AI’ as it is now commonly known was first coined by the renowned computer scientist John McCarthy in 1955 – 56. There are various definitions of what AI connotes. The European Commission (EC) defines AI as follows:

“Artificial intelligence (AI) refers to systems that display intelligent behaviour by analyzing their environment and taking actions – with some degree of autonomy – to achieve specific goals. AI -based systems can be purely software-based, acting in the virtual world (e.g. voice assistants, image analysis software, search engines, speech and face recognition systems) or AI can be embedded in hardware devices (e.g. advanced robots, autonomous cars, drones or Internet of Things applications).”  

And if it is good enough for EC, it should be good enough for us. But to keep it simple, AI involves using computers to do things that traditionally require human intelligence. AI involves creating algorithms to classify, analyze, and make predictions using this data.

Machine learning (ML) is a subset of AI and is essentially a modelling technique that figures out a model from the data given to it. The data can be anything from audio, images to documents. The primary objective of ML is to create a model using the training data when mathematical equations and laws are not adequate to arrive at the model.

Deep Learning, the main topic of this article, is a subset of ML, in which a model learns to perform classification tasks directly from images, text, or sound. Many people confuse between ML and Deep Learning. The two main (there are others too) differences between ML and Deep Learning is that unlike ML, Deep Learning needs a large training dataset. And while ML takes shorter training times, Deep Learning tends to take longer training times. In order to understand Deep Learning and how MATLAB can help, it is necessary to understand what the ‘deep’ in Deep Learning stands for. And in order to do that, we need to first understand what a neural network means.

The concept of neural network is based on biological neurons, which are the elements in the brain that establish communication with the nerves. A neural network architecture simulates this communication in the computational environment by programs composed of nodes and values that work together to process data. A typical system of neural network architecture will attempt to solve a problem by asking a series of 'yes' and 'no' questions about the subject. By discarding certain elements and accepting others, an acceptable answer is eventually found. The ‘deep’ in Deep Learning isn’t a reference to any kind of deeper understanding achieved by the approach; rather, it stands for this idea of successive layers of representations. When Deep Learning was first introduced, it consisted only of one input and one output layers, with may be one layer between the two. Anything more than 2 layers qualify as Deep Learning. Today's Deep Learning networks can have literally 100s of layers, thanks to increase in processing power. How many layers contribute to a model of the data is called the depth of the model. A deep neural network thus combines multiple nonlinear processing layers, using simple elements operating in parallel and inspired by biological nervous systems. It consists of an input layer, several hidden layers, and an output layer. The layers are interconnected via nodes, or neurons, with each hidden layer using the output of the previous layer as its input. It is generally perceived that the greater the number of layers, better the accuracy of the final model.

Deep Learning is especially well-suited to identification applications such as face recognition, text translation, voice recognition, and advanced driver assistance systems, including, lane classification and traffic sign recognition since it is deemed as having better accuracy than ML. Advanced tools and techniques have dramatically improved Deep Learning algorithms—to the point where they can outperform humans at classifying images, win against the world’s best GO player, or enable a voice-controlled assistant used by the likes of Amazon and google Home.

Here are just a few examples of Deep Learning at work:

  • An autonomous vehicle slows down as it approaches a pedestrian crosswalk
  • An ATM rejects a counterfeit bank note
  • A smartphone app gives an instant translation of a foreign street sign

Using MATLAB® for Deep Learning
MATLAB® is a programming platform designed specifically for engineers and scientists to analyze and design systems and products in a fast and efficient manner. The heart of MATLAB is the MATLAB language, a matrix-based language allowing the most natural expression of computational mathematics. MATLAB is considered one of the best programming languages at being able to handle the matrices of Deep Learning in a simple and intuitive manner.

Advantages of MATLAB for Deep Learning
MATLAB has interactive Deep Learning apps for labeling that includes signal data, audio data, images, and video. Labelling is one of the most tedious tasks in Deep Learning, and MATLAB is the ideal app that automates it.

MATLAB can help with generating synthetic data when you don’t have enough data of the right scenarios. This is a huge benefit as Deep Learning depends a lot on huge amount of datasets.

  • In the case of automated driving, you can author scenarios and simulate the output of different sensors using a 3D simulation environment.
  • In radar and communications, this includes generating data for waveform-modulation-identification and target classification applications.
  • MATLAB has a variety of ways to interact and transfer data between Deep Learning frameworks.
  • MATLAB supports ONNX to import and export models between other frameworks. A model designed in PyTorch, for example, can be brought into MATLAB, and models trained in MATLAB can be exported using the ONNX framework.
  • MATLAB also supports Python interoperability: You can call Python from MATLAB and MATLAB from Python.
  • The MATLAB Deep Learning Toolbox™ provides a framework for designing and implementing deep neural networks with algorithms, pre-trained models, and apps.
  • MATLAB also provides specialized toolboxes and functionality for Reinforcement Learning, Automated Driving, Natural Language Processing, Medical Image Processing and Computer Vision

Needless to say, Deep Learning is only one aspect of MATLAB. To learn what else MATLAB can do for you, click here.