A step towards artificial intelligence, machine learning and deep learning

Soledad Musella Rubio
6 min readMay 28, 2020

--

The easiest way to think about relationship between these 3 concepts is to visualise it as concentric circles . The idea that came first, Artificial Intelligence the biggest, then Machine Learning, which has evolved later, and finally Deep Learning, which is driving the explosion of Today’s AI, within both.

According to the collective imagination, the general concept of Artificial Intelligence comes from the idea of fabulous machines that have all our senses (maybe even more), all our critical reason, and they are capable of thinking just like us. But coming back to the reality AI machines have stayed in science fiction movies and novels for a good reason: we can’t do it, at least not yet.

What we can actually do falls into the concept of “Narrow Artificial Intelligence”. Current technologies can perform specific tasks as well or better than us. The examples of narrow AI are things like image classification in a service like Pinterest, facial recognition on Facebook or remembering musical preference on Spotify.

Those are examples of narrow AI in practice. These technologies exhibit some facets of human intelligence. But how? Where does that intelligence come from? That brings us to the next circle, Machine Learning.

Machine learning

Machine learning, in its more basic form is the practice of using algorithms to analyse data, learn from them and then make a determination or prediction about something in the world.

Basically, the learning process is based on the following steps:

  1. Feed data into an algorithm. (In this step you can provide additional information to the model, for example, by performing feature extraction.)
  2. Use this data to train a model.
  3. Test and deploy the model.
  4. Use the deployed model to do an automated predictive task. (In other words, call and use the deployed model to receive the predictions returned by the model)

During the years, one of the most successful application areas for Machine Learning has been Computer Vision, although it still required a lot of manual coding to do the job. One the classic examples of how machine learning works in this field of application is a classifier to recognise the letters “S-T-O-P” from a road sign. All hand-coded classifiers developed algorithms to make sense of the image and “learn” to determine, for example, if there is a stop signal in a photo. The result of the STOP signal detector predictions with machine learning techniques are good but there may be some limits. For example, in case of a day with fog or low light, the signal can’t be perfectly visible. Because of those limitations , most of the applied features need to be identified by experts and then hard-coded as per the domain and data type. In single terms, the performance of most of the Machine Learning algorithm depends on how accurately the features are identified and extracted. To solve the gap between the human vision and interpretation of images and the computational comes to help the Deep Learning.

Deep Learning

Deep learning works in same way as human brain, elaborates conclusions with respect to any scenario and has allowed many practical applications of Machine Learning and, by extension, the general field of AI. Today, the recognition of images by machines trained through Deep Learning in some scenarios is better than that of humans, and that goes from identifying objects as animals or road signs to identifying indicators of blood cancer and tumours in magnetic resonance imaging. But how does it work and which are the main differences between Deep Learning and Machine Learning?

Artificial Neural Networks (ANN)

Artificial neural networks (ANN) are computing systems inspired by the biological neural networks. But, unlike a biological brain where any neurone can connect to any other neurone within a certain physical distance, these artificial neural networks have discrete layers, connections and data propagation directions.

Going back to the example of a STOP signal, the attributes of the signal image are now cut and “examined” by neurones: its octagonal shape, the hue of the red colour, its distinctive letters, height, among others. The task of the neural network is to conclude whether this is a STOP signal or not. It is a “probability vector”, really a highly educated assumption, based on weighting. In our example, the system can have 86% confidence that the image is a stop sign, 7% confidence is a speed limit sign and 5% is a kite trapped in a tree, and so on , and the network architecture tells the neural network whether it is correct or not. Again in the example STOP signal, it is very likely that the more the network is being trained and the less incorrect answers arise.

What the neurone needs is training, to see hundreds of thousands, even millions of images, until the weighting of the inputs of the neurones is tuned so precisely that you have the correct answer almost always. Andrew Ng in 2012 in Google completed the final stage of deep learning, increasing layers and neurones to run large amounts of data through the system in order to train it.

Nowadays, the image recognition by machines trained through Deep Learning in some scenarios is even better than that of humans; driverless cars, better preventive medical care, even better movie recommendations, are just few examples of what deep learning is able to do.

Comparison of Machine Learning and Deep Learning

Hardware Dependencies

Deep learning requires high-end machines whereas traditional machine learning algorithms can work on low-end machines.

Human Intervention

In machine learning, if an algorithm returns an inaccurate prediction, then an engineer has to step in and make adjustments. Eg. features can be pixels values, textures, shape, position and orientation. While with a deep learning model, an algorithm can determine on its own if a prediction is accurate or not through its own neural network.

Data Contingency

Performance of both techniques differ as the scale of data increases. When data is less Deep learning doesn’t perform very well because of the huge number of parameters needed to be tuned by a learning algorithm. Deep learning starts with some random parameters and then some gradient based optimisation algorithm is used to converge the network to an optimum solution, which might not be global optimum. This whole process requires lot of data. Whereas Machine learning algorithm have their rules which have a better performance which less amount of data.

Problem-Solving Approach

When solving a problem using traditional ML algorithms, it is generally recommended to break the task into different parts, solve them individually, and combine them to get results. Deep learning, by contrast, believes in solving problems end-to-end. Eg. Suppose we have to find multiple objects in an image and name them. Using ML algorithm this task is divided into two parts: object detection and object recognition. On the contrary, in deep learning algorithm, you would do process end-to-end.

Execution Time

Because there is lot of parameters in deep learning algorithm it requires lot of time to train them, whereas machine learning comparatively takes much less time to train. This in turns completely reverse on testing time. At test time, deep learning algorithm takes much less time to run.

Output

Machine learning algorithms usually return numeric values as an output whereas deep learning can have multiple formats, texts, scores, sounds, images.

--

--

No responses yet