I have a set of 10 possible banners to show on a web page. For a given page view only a subset of them are available. I can only show one per page.

There are some additional parameters for example page type, number of page viewes in the session and session count for the user.

I want to use deep learning to maximize conversions (purchases) by showing the most effective banner given the available banners, page type, session number, etc...

The desired output is 10 numbers representing the banners where the highest represents the banner with highest probability to convert.

The problem: For training I need to show random banners in part of the sessions (e.g. 30%) (please correct me if I'm wrong on this). Then my training data will include the banner that was shown and whether it resulted in conversion or not. How do I treat the banner that was shown in the training? I cannot add it as additional input data because the desired output will be which banner to show.


1 Answer 1


Instead of framing it as a 10-way classification problem and predicting which banner to use, or producing 10 scores, you could frame it as a binary classification problem and predict whether a banner leads to a conversion or not. This approach has the advantage that it generalizes more easily to many banners, possibly without retraining for every new banner.

The neural network takes as input some information about the user and the page, let's call that $\mathbf{x}$, and some information describing the banner, $\mathbf{b}$. $\mathbf{b}$ could represent a number from $\{1, ..., 10\}$ (one-hot encoded) or a real-valued vector describing generic features of the banner such as its topic, $\mathbf{b} \in \mathbb{R}^N$. The output of the network, $f(\mathbf{x}, \mathbf{b})$, is the probability with which the banner lead to a conversion.

After training, you pick the best banner by feeding representations $\mathbf{b}_i$ for all of them through the network and picking the one with highest probability of conversion,

$$\text{argmax}_i \, f(\mathbf{x}, \mathbf{b}_i).$$

Training takes as input page descriptions and banners, and as outputs binary labels indicating whether or not there was a conversion.

  • 1
    $\begingroup$ That's a very interesting approach. I'll certainly consider it. I wonder if the perrofmance required to run n (=num of available banners) predictions for a single page view instead of 1 is not a show stopper. $\endgroup$
    – Nir
    Jan 4, 2017 at 14:21
  • $\begingroup$ It can be as efficient as the corresponding $N$-class classification problem. Your function could look like this, for example: $f(\mathbf{x}, \mathbf{b}) = \sigma(\mathbf{b}^\top g(\mathbf{x}) + a)$. For each banner, you now only have to evaluate 1 additional inner product. In an $N$-class classification problem, your last layer will also perform $N$ inner products. $\endgroup$
    – Lucas
    Jan 4, 2017 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.