Target & Tech: Inside Ad Algorithms

Bid shading. Intuition (Part 1)

How does bid shading work, and what is the intuition behind it?

Introduction

Bid optimization is a critical component in modern bidders. Although it is known that simply bidding with impression value is the optimal strategy for 2-price auctions, it is essential to utilize market price information in 1-price auctions. Many companies have proven that bid shading can enhance the efficiency of buyers up to 20% [1].

This problem is well-formulated mathematically, and various strategies have been proposed. We consider one that is widely used: the maximization of total impression value subject to a budget constraint [2, 3]. In other words, we aim to minimize CPA while guaranteeing full budget utilization:

\[\max_{b_t} \sum_{t=1}^{T} v_t w_t(b_t) \\ \sum_{t=1}^{T} b_t w_t(b_t) = B\]

Here:

By using method of Lagrange multipliers this optimization task can be rewritten:

\[\max_{b_t} \sum_{t=1}^{T} (v_t - \lambda b_t) w_t(b_t)\]

Let’s set \(\hat{v} = \frac{v}{\lambda}\) and optimize each \(b_t\) independently:

\[\max_{b} (\hat{v}_x - b) w(b, x)\]

We may think of \(\hat{v}\) as a \(\lambda\)-adjusted impression value. Intuitively, depending on the budget \(B\), impression values are scaled to guarantee budget delivery. Estimation of \(\lambda\) is beyond of scope of this article.

Next, we will discuss the intuition behind that formula and explore the properties of the resulting bids.

Intuition

\[\textcolor{green}{utility(b)} = \textcolor{red}{(\hat{v}_x - b)} \textcolor{blue}{w(b, x)}\]

The optimal bid is derived from maximizing a function composed of two components:

If you bid low, your margin is high but your win rate is low, and vice versa. Thus, the optimal bid price for each particular auction is somewhere in the middle.

fig 1. The optimal bid is a trade-off between a higher margin and a reasonable win rate

Utility function is not convex in general

For example, if your win rate is modeled as a step-based function with high step values, the utility function would have a saw-toothed shape. Therefore, using general optimization methods (designed for convex tasks) would lead to achieving sub-optimal bids.

fig 2. Example of non-convex utility function

In which situations are bids discounted more?

What does a buyer want from a “bid shading” approach? If the impression valuation is significantly higher than the market price, they’d like to lower the bid to save money while still securing a win in the auction (without experiencing a significant decrease in the win rate). Conversely, if the impression valuation is close to or below the market price, the buyer doesn’t want to shade bids. Let’s demonstrate that the algorithm produces bids that align with these preferences.

As \(w(b) = P(z < b)\), where \(z\) denotes the market price, this represents the Cumulative Distribution Function (CDF) for the market price.

fig 3. Win rate is a cumulative distribution function of market price

Clearly, the optimal bid lies within the range \((0, \hat{v})\); otherwise, the utility would be negative. We can view bid optimization as the process of discounting the impression value. Analysing utility function for a specific value \(\hat{v}\), we might conclude:

fig 4. Discounts depending on market price distribution and impression value

So the outcome of this strategy aligns well with the desired behavior: we aim to discount high-valued inventory closer to the market price, allowing us to save money.

How does the market landscape affect the efficiency of bid shading?

fig 5. Different market landscapes

The efficiency of bid shading varies based on the market price distribution:

Where does the real profit lie?

On the one hand, we’ve outlined how bid shading helps us discount bids and save money. However, a counter-argument might be: “Yes, while my KPI improved, my spending decreased!”

Let’s refer to paragraph 3.2.3 [3]:

fig 6. Bid strategy expands spending for low-valued inventory

As discussed above, bids are discounted more for high-valued inventory. Therefore, the range between the orange and black curves represents the money saved by the algorithm. However, due to budget constraints and the need to match the spending of the base strategy, \(\lambda\) starts decreasing, and \(\hat{v}\) increases. As a result, the green curve representing the optimal strategy continues to save money on high-valued inventory (the red region) and reallocates these extra funds to low-valued inventory (the blue region).

In other words, the strategy accomplishes the following:

  1. It saves money by discounting high-valued inventory closer to market price. (the red region)
  2. It reallocates the saved funds to low-valued inventory by increasing their bids. (the blue region)

This way, we not only purchase most of the inventory from the base strategy but also acquire additional low-valued inventory. This also could help to explore a new unseen inventory that is not presented in the training dataset and therefore user response model undervalues it

Takeaway

  1. Bid shading can significantly enhance buyer’s KPI.
  2. Depending on the market landscape, bid shading may not always be efficient.
  3. Bid shading enables an increase in the win rate for low-valued inventory.

References

  1. What is Bid Shading and How Does it Impact Publishers?
  2. Bidding Agent Design in the LinkedIn Ad Marketplace
  3. Optimal Real-Time Bidding for Display Advertising