When to use convolutional neural networks

Share this article

Are you wondering when you should use convolutional neural networks? Well then you are in luck! In this article, we tell you everything you need to know to understand when to use convolution neural networks and when to opt for a different approach.

We start out with a discussion of what types of outcome variables convolutional neural networks can be used to predict. After that, we discuss some of the main advantages and disadvantages of convolutional neural networks. Finally, we discuss specific scenarios where you should and should not use convolutional neural networks.

Outcomes for convolutional neural networks

What kind of outcomes can be predicted using convolutional neural networks? Like other types of neural networks, convolutional neural networks are highly flexible and can be used to predict a range of different types of outcome variables from simple tabular outcomes to more complex unstructured outcomes.

When you are deciding whether to use a convolutional neural network or not, the real consideration that you should keep in mind is what the features or the input data for your model looks like. Convolutional neural networks excel when you have unstructured input data with complex spatial relationships, such as when you are using images as your input data.

Advantages and disadvantages of convolutional neural nets

Are you wondering what some of the main advantages and disadvantages of convolutional neural networks are? Here are some of the main advantages and disadvantages you should keep in mind when determining whether you want to use a convolutional neural network.

Advantages of convolutional neural networks

  • State of the art performance on image data. One of the main advantages of convolutional neural networks is that they have state of the art performance on image data and other unstructured data with complex spatial patterns. In general, no other machine learning model can even come close to convolutional neural networks for this type of data.
  • No need to featurize or pre-process data. Another advantage that convolutional neural networks have over other methods that can be used to process image data is that there is no need to pre-process your data or extract features from the data before passing it into your model. This means that there is (at least) one extra step that you do not have to worry about when you are using a convolutional neural network.

Disadvantages of convolutional neural networks

  • Requires a lot of data. One of the main disadvantages of convolutional neural networks is that, like most neural networks, they require a large amount of data to train. This can be particularly challenging in domains where convolutional neural networks excel, such as image processing, because pre-labeled data does not always exist. Oftentimes, you have to create the labels for your images yourself before you can train a model.
  • Computationally intensive. Another disadvantage of convolutional neural networks is that, like most neural networks, they are computationally intensive to train. This means that they often take a lot of time and resources to train. These same problems are also reflected at the inference stage when the model is making predictions.
  • Many hyperparameters to tune. As with many other neural networks, convolutional neural networks have many hyperparameters that need to be tuned. They also come along with many architectural decisions that need to be made. That means that you need to make sure you set aside enough time to explore different model configurations.
  • Difficult to explain. Finally, convolutional neural networks are difficult to explain to non-technical stakeholders (and sometimes even technical stakeholders). This is true of standard neural networks as well, but the addition of the convolutional layers adds another layer of complexity that makes this task even more difficult.

When to use convolutional neural networks

What are some examples of situations where you should use convolutional neural networks? Here are some examples of scenarios where you should reach for convolutional neural networks.

  • Image data. Whenever you are in a situation where you are working with image data, you should consider using convolutional neural networks. In general, convolutional neural networks are able to achieve levels of predictive performance on image data that are unmatched by any other machine learning models. That being said, before you train a convolutional neural network from the ground up, you should look into whether using an image embedding model would be sufficient for solving your problem (see the next section for more details).
  • Data with complex spatial relationships. Image data is not necessarily the only type of data that convolutional neural networks excel on. In general, they perform well on any type of data that has complex spatial relationships encoded in it.

When not to use convolutional neural networks

And when should you avoid using convolutional neural networks? Here are some examples of situations where you should avoid using convolutional neural networks.

  • Simple tabular data. You should avoid using convolutional neural networks when you are working with simple tabular data. Many of the benefits of convolutional neural networks are lost on this type of data. In these scenarios, you are better off turning to more traditional methods such as gradient boosted trees or random forests.
  • Sequential data and temporal patterns. Convolutional neural networks perform well on data that has complex spatial patterns encoded in it, but they are not as strong on data that has complex temporal patterns. In these cases, you are better off using a recurrent neural network than a convolutional neural network.
  • Simple way to extract features. Another example of a situation where you should avoid using convolutional neural networks is if you have image data, but there is a simple way to extract the features you need to predict your outcome. For example, if you are looking at images of cars and trying to predict what color a car is, you do not necessarily need to use a complicated model like a convolutional neural network. A simple strategy like taking the most common color across all of the pixels in the image may suffice.
  • Image embeddings would suffice. This final scenario is nuanced because technically you are using the byproduct of a convolutional neural network, but you are saving yourself the hassle of having to train a full convolutional neural network on your own. For many predictive tasks that use image data as an input, you can garner a lot of success by using a pre-trained image embedding model to featurize your image then feeding the results of your image embedding model through a simple model for tabular data. Image embedding models are models that take in images and convert them to a meaningful numeric representation, such as an array of integers. Using image embeddings is a very powerful strategy that shields you from some of the more difficult to handle aspects of training a convolutional neural network from scratch, such as the need for large amounts of training data and the computationally intensive training runs.

Related articles

Are your trying to figure out which machine learning model is best for your next data science project? Check out our comprehensive guide on how to choose the right machine learning model.


Share this article

Leave a Comment

Your email address will not be published.