# Market Research using AI Evolutionary Algorithms and Multimodal Regression

Community Article Published July 17, 2024

In this article I'll propose a theoretical framework for conducting market research using evolutionary generative AI to create ads, test them in the market using a digital ads manager, and then use that data to train a multimodal regression model to predict how well the generated ads will do. This process can be done iteratively to create a feedback loop.

In this artcile we'll define an ad as content and audience. The content is an image and some text.

The audience is who is going to see the ad, in this case age, gender, and location. While there are plenty of other variables we can use for this (interests, placement, platform, etc.), we're going to keep it simple and only use three.

The ad is the granular unit of our framework. In evolutionary alogrithms it might be called a "dna" or "genome". It describes what the ad looks like and who its going to be delivered to.

First we'll need to generate an initial ad batch. We'll start will some seeds that will need to be generated manually. Then we'll feed these seed ads into our evolutionary AI generator to generate a bunch of combinations and variations.

The evolutionary AI generator will use the manually create seed ads as its "dna", it'll pick 2 random seeds, mate them, and produce a new ad that has some characteristics from both of its parents. It will also introduce some randomness, or genetic mutation.

The formula is:

$\text{Generation}\left({\text{ad}}_{1},{\text{ad}}_{2}\right)={\text{ad}}_{1}\ast {\text{ad}}_{2}+\text{randomness}\text\left\{Generation\right\}\left(\text\left\{ad\right\}_1, \text\left\{ad\right\}_2\right) = \text\left\{ad\right\}_1 * \text\left\{ad\right\}_2 + \text\left\{randomness\right\}$

Here's an example of what a generation might look like.

We can see the child image, text, age, and gender is a blend of its two parents. The location is an example of a random mutation, it's completely different than its two parents. The image generation was created with my Image Blender 🤗 Space and the text blending was done with Chat GPT.

For our initial batch we'll start small, say 100 ads. Then we'll need to test them in the market using a digital ads manager such as Meta, SnapChat, or Pinterest. Most ad managers will allow you allocate as little at $1 for an advertising bugdet, but considering we have 100 ads it would make more sense to allocate at least$20.

The primary metric we'll consider in our ad testing is click rate. I.e. out of 100 people that see the ad, how many poeple will click it. So the input into the system is an ad (content + audience) and the output is the click rate.

## Multimodal Regression

Once we do our ad testing we'll have a nice dataset consisting of the 100 ads and their respective scores or click rates. We can use this dataset to create a machine learning model, specifically a multimodal regression model. The model will have 6 inputs: content image, content text, audience age, audience gender, and audience location. And 1 output: click rate.

Now that we've trained our multimodal regression model, we'll have a way to predict the click rate of any abritrary ad.

## Generation-Regression Feedback

Using the generated ads we just tested as the seeds, we'll feed them into the evolutionary AI generator to create a huge batch of ads. Then we'll take that huge batch, say 10,000 ads, and run them through our multimodal regression model to predict the click rate of each one. Using these predictions we'll only take the top 100 (1%) to use in our next batch of ad testing. Once we test our new ad batch, we'll take the data of the ads and the click rates to fine-tune our multimodal regression model.

As you can see we've created a feedback loop. The ads we just tested will be the seeds for the next round of batch ad generation. The ad batch will fed into the updated multimodal regression model to find the ads with the highest predict scores which will be tested in the market. So on and so forth.

## Pseudocode

Although this framework is theoretical, it is very possible to implement:

# Feed the manually-created seed ads into the generator to create an initial batch of 100 ads

# Test the ads in the market

# Train a model that takes an ad as input and predicts the click rate

# Feedback loop
for(num_iterations):
# Feed the ad batch of 100 to the generator to create 10,000 ads

# Use the model to filter out the top 100 ads

# Test the ads in the market