May 14, 2020

How deep learning gives deep insights into your data

Mike Khanna

Deep insights allow you to better understand your data and inform your business actions. Here, we see how deep learning enables this.

In the first part of this blog, I explained what deep learning is and touched on how it powers Sonasoft Saibre. Here, I will explain how deep learning unlocks deep insights into your data. As we already saw, deep learning leverages deep neural networks. It works by identifying interesting features in your data and learning how to predict these features in new data. Deep learning is able to gain such deep insights that it can identify patterns and trends a human can’t.

Why unsupervised learning is so vital

Nowadays, it’s hard for us to escape the hype around artificial intelligence. AI powers voice assistants like Siri and Alexa. It promises to bring us self-driving cars. It helps police to identify wanted suspects on CCTV. Mostly, these applications are driven by machine learning. And in the majority of cases, they rely on supervised learning.

Supervised learning is a three-step process. Firstly, I take a large set of data and label the features I am looking for. Secondly, I feed this labeled training data to a machine learning model, which learns how to identify the features. Thirdly, I verify and refine the model using a small unlabeled dataset. Let’s look at a more concrete example.

A simple supervised learning example

Botanists are always looking for better ways to identify and classify plant species. One of the obvious ones is looking at their flowers. So, imagine I want to teach a model to correctly identify the following three species of iris.

Supervised learning can identify irises. (Iris virginica image by Frank Mayfield)
Iris virginica, setosa and versicolor

Naively, you might think image recognition is the correct approach to solve this problem. However, there’s actually a much easier way. If you read any textbook on machine learning, you will come across the Iris dataset. This dataset long predates computers. It consists of four attributes for each flower: sepal length, sepal width, petal length, and petal width. It turns out, these four observations are all you need to reliably classify these three species. The dataset has 50 observations for each species, all collected at the same time.

The next step is to split the data into training and test datasets. Let’s take 40 of each species for training and 10 for testing. So, now I have a set of data I can use to train my model. There are dozens of models I could choose, like K-nearest neighbor, support vector machine, or logistic regression. I’ll skip over the details of training the model since this is actually a blog about deep learning. If you want a detailed tutorial you could do worse than reading this blog by Jason Brownlee. Finally, having trained my model, I use the test dataset to perform validation. This tells me whether my model is actually any good at identifying irises.

The limitations of supervised learning

Supervised learning has two key limitations. Clearly, it only works if you have a large amount of data that you have labeled. With many types of data, this requires a lot of time and effort. However, the bigger issue is that you have to know what features you are looking for. This is doubly bad. Firstly, it encourages you to do feature engineering, which introduces bias. Secondly, in many datasets, you aren’t even sure what features are present. This is why you need deep learning to gain deep insights into your data.

Going deeper

Deep learning uses deep neural networks to avoid the need to extract and label features. The resulting model automatically extracts interesting features and learns how to identify them. However, it is impossible for us to then look back at the model and explain it. So, let’s look at a slightly simpler example to see how deep neural networks can work.

Teaching a computer to read numerals

Imagine I want to teach a computer to identify hand-written numerals. I need to start with a suitable dataset. I could create this by hand. This would involve collecting as many images of hand-written numerals as I could. I’d then need to go through these, identifying each one and storing it in a list of {image, digit}. Fortunately, I don’t actually have to do this, because I can use the MNIST dataset.

The MNIST dataset is great for seeing how deep learning identifies features. Deep learning is the only way to get deep insights into your data.

Now I am ready to construct my ML model. For this sort of problem, I usually choose a convolutional neural network (CNN). CNNs are great for this because they allow us to extract and simplify the features in our handwritten numerals. There’s a great explanation of how to actually train the CNN here. In essence, each image is broken down into smaller pieces. The CNN identifies the features in these images. Then it combines these features to identify the number.

I start by dividing the images into 4 squares. Each square is a feature of the image. Let’s look at a numeral 3. This splits as follows:

Now, let’s look at a numeral 8 in the same way:

As you can see, some of the features are very similar, especially the bottom right corner.

So, we can say that both numeral 3 and numeral 8 will have this feature. What the CNN is doing is identifying all these different features. Then it learns which feature combinations relate to which numerals. This isn’t unsupervised learning, because we have told the computer what the numbers actually are. But it is deep learning because we didn’t tell it what the features are it needed to identify.

The power of deep learning

Deep learning is incredibly powerful precisely because it can identify features by itself. This allows it to see things in the data that humans simply cannot. In turn, this means that you can get important new insights. Where things get really interesting is when you feed in multivariate data from different sources.

Combining data to gain deep insights

Sonasoft Saibre relies heavily on deep learning approaches. This allows Saibre to spot complex connections between different data and use these to gain actionable deep insights. A great example of this is our work with the Delaware Electric Cooperative (DEC). DEC provides power to round 100,000 households on the East Coast. They are an energy reseller, and, as such, their costs are determined by their suppliers. These costs are largely driven by peak loads, especially when these coincide with peaks for their suppliers.

Sonasoft has been working on a Proof of Concept that seeks to predict these coincident peaks in advance. The system is then able to advise exactly when to implement load control measures. These include steps such as asking customers to turn off air conditioners. In order to do this, Saibre has to be able to combine data from a huge range of sources. This includes historical usage data, historical weather data, current weather forecasts, and knowledge of external events. For instance, is there a big game on that people will all be watching. Without deep learning, it would be almost impossible to create models that combine so many inter-related factors.

Causation as well as correlation

But Saibre goes one step further. It doesn’t just spot patterns and create models like some other systems. Instead, it verifies that its hypotheses are causal, e.g. that the pattern it spotted really is significant. It then tests multiple models and establishes exactly which is the most accurate. Sometimes, it may even chain models together. For instance, combining natural language processing with computer vision. The result is a system that generates AI bots faster than any human could and with better performance.


White Paper

SAIBRE AI Ecosystem

End-to-end AI applications that solve any business problem