Autoencoders for Audience Modeling

HomeInsightsBlogs | Last Updated August 5, 2021 - by shivam chauhan under data science & analytics

Published onJuly 2, 2021

Behavioral Clustering & Marketing

The desire to identify customers based on their behavior is pervasive across marketing in all industries. Companies have realized the potential of uncovering hidden information or, in data science parlance, latent representations from raw data to get an edge over the competition. Some AI and ML models are designed to understand this latent representation to identify key audiences for your business. Clustering algorithms are unsupervised learning methods that are widely applied in marketing for grouping customers into distinct categories. However, the process of creating clusters from hidden information is complex. It requires a lot of computational power and memory to just run these algorithms when you have high-dimensional data. High-dimensional data is when you have a large number of characteristics or variables in your data. We call this the curse of dimensionality problem. Some algorithms can take hours or days to process high-dimensional data and can also cost you a fortune. If you decide to run these algorithms on a small sample, then you will miss a substantial number of potential customers. So how do we handle high-dimensional data?  Dimensionality reduction techniques are commonly used to address this issue, and in this blog, we will discuss dimensionality reduction using Autoencoders.

Autoencoders

Autoencoders are neural networks that can reduce the size of data to a low-dimensional latent representation. The basic concept of an autoencoder is that it compresses the data into lower dimensions and then checks its accuracy by decompressing or recreating the original dataset. An autoencoder aims to learn linear as well as non-linear relationships in the data while ignoring the noise. The biggest advantage of an Autoencoder is that it can work with non-linear data, which means it can learn more complex relationships in data. This concept is widely used in computer vision and is gaining popularity as a dimensionality reduction technique. The architecture of an autoencoder has three components:

  1. Encoder – These are neural network layers that compress data to their reduced dimensional form.
  2. Bottleneck or Latent Space – This is where we have our encoded data.
  3. Decoder – These are neural network layers that reconstruct our encoded data to its original form.
Example Autoencoder Architecture

Method

To perform clustering on high-dimensional data, you will have to first train an autoencoder. In this process, your autoencoder will learn how to encode your data and recreate it to its original form. You will require a substantial amount of cleaned and processed data for this. Once the data is prepared, you can train your autoencoder. To train an autoencoder, it is crucial to:

  1. Design your neural network for encoder and decoder components with the right number of layers.
  2. Choose the right number of dimensions to reduce to.

Finding the right balance of autoencoder architecture is very important and there is no formula for defining how many dimensions you want in the reduced representation. Typically, it should be decided based on how many dimensions your clustering algorithm can handle and how many neural network layers in the encoder and decoder yield the best re-creation of the original dataset. So how do you know if the encoded data captures all the important information in your data? After training your autoencoder you will have to evaluate your model. You can evaluate your trained model by checking the difference between the recreated data and the original data. This will give you an idea of how well your autoencoder can capture important features. You should always train different autoencoder architecture and choose the one which works best for you.

Analysis

We have collected data from the stakeholder and trained our autoencoder on the prepared data. Once our autoencoder was trained, we used this autoencoder to encode the clustering data. We were successfully able to reduce our original dataset comprising 319 dimensions to 6 dimensions, with an average difference of 0.67 between original and recreated data. Now, we were ready to run our clustering algorithm. We were able to cluster our encoded data into 5 cluster groups and identified the customer group with similar behavioral characteristics. We see a clear separation between clusters in Fig 2, and this helped our stakeholders to make an actionable marketing campaign for millions of targeted groups of customers.

Each of these groups behaves differently when compared to each other and customers in a group have some behavior characteristics in common. This allows marketers to create a personalized marketing strategy for each group rather than creating a general marketing strategy for all. You can even create more clusters if required for your use case and target specific customers.  Personalized marketing helped to target customers in a way that they engage and result in better conversions. We spent less time in identifying our potential audience. This also helps in spending less money on campaigns when your campaign is more effective.

TSNE 2D representation of the encoded data and colored by clustered groups

Concluding Thoughts

The ability to use deep learning tools like Autoencoder opens new possibilities for innovation and decision-making in marketing. For creating better relationships and brand loyalty, personalized marketing is necessary. For personalized marketing, you need to understand your customer faster than your competition. That is where autoencoder can help segment targeted audiences quickly and allow marketers to form better personalized marketing strategies. To better understand your customer, you need the right resources and technology. If you are not using the right technology, your efforts will fall flat. With constantly improving technology, businesses need to adopt new techniques. The advantages of using an autoencoder over a traditional dimension reduction method like PCA are huge which makes them more powerful than other techniques. Autoencoder can understand the deeper non-linear encodings in your data. This helps you to achieve your goal to understand your audience and target them so that you can create the right personalized marketing strategies for your customer at the right time. At Softcrylic, we have a lot of experience building complex audience models, including leveraging autoencoders for dimensionality reduction. If you have any questions or are simply curious to learn more, feel free to reach out!

Learn about Softcrylic’s Data Science services, schedule a consultation!

    Shivam Chauhan

    Shivam is a consultant on our Data Science & Advanced Analytics team. He is passionate about problem-solving using data. He is talented with data science and data analytics while having a deep understanding of statistical modeling.

    Contact Us

    We're not around right now. But you can send us an email and we'll get back to you, asap.

    Not readable? Change text. captcha txt

    Start typing and press Enter to search