Bidding & pacing — the advertiser side of the loop
The auction (lesson 9) takes a bid as input. Where does the bid come from? An advertiser bids millions of times a day under a budget constraint. That is a stochastic control problem — and the modern answer is the autobidder.
From first principles: bidding as control, not pricing
An advertiser does not set a single price for "an ad". They participate in millions of auctions per day, each for an impression of different value — a 9 AM mobile click in Lagos, a 9 PM desktop click in Manhattan. The advertiser has an objective (conversions, revenue, brand reach) and a constraint (daily budget B, target CPA, target ROAS).
So "what's my bid?" is the wrong question. The right one is: given uncertainty about the distribution of future impressions and my constraint, what is the optimal bid for impression i right now? This is a stochastic control problem.
Manual bidding — one CPC bid per keyword, same bid for every impression matching it — is the historical default. Provably suboptimal (some matching impressions are worth far more than others) but it survives for advertisers who don't trust the platform or have too little data for any learned policy to beat a constant.
Autobidding strategies — the modern default
The platform's bidder optimizes bids per-impression on the advertiser's behalf, subject to a constraint the advertiser sets. Four canonical strategies:
| Strategy | Objective | Constraint | What the advertiser supplies |
|---|---|---|---|
| Max conversions | Σ P(conv | i) | Σ pay(i) ≤ B / day | Daily budget only. |
| tCPA | Σ P(conv | i) | Σ pay(i) / Σ conv(i) ≤ tCPA | Target cost per acquisition. |
| tROAS | Σ v_i · P(conv | i) | Σ v_i · P(conv | i) / Σ pay(i) ≥ tROAS | Target revenue / spend ratio. |
| Max value | Σ v_i · P(conv | i) | Σ pay(i) ≤ B / day | Daily budget; conversion values reported back by advertiser. |
All four are constrained optimisations over the (stochastic) per-impression decision. The platform sees the constraint; the advertiser does not see the per-impression bids.
The Lagrangian view — why all autobidders look alike
Take tCPA. Maximise expected conversions subject to an average cost-per-conversion target:
max Σ_i P(conv | i) s.t. Σ_i pay(i) − tCPA · Σ_i P(conv | i) ≤ 0
Form the Lagrangian with multiplier μ ≥ 0 for the tCPA constraint (and a separate λ if there's also a daily budget). The per-impression optimum becomes:
bid_i* = tCPA · P(conv | i) · μ/(1 + μ) [tCPA] bid_i* = (v_i · P(conv | i) / τ) · μ/(1 + μ) [tROAS, with target ratio τ]
For tROAS, the constraint is Σ_i v_i · P(conv|i) / Σ_i pay(i) ≥ τ where τ is the advertiser's target revenue-per-spend ratio; the Lagrangian derivation then gives the formula above. The structure is the same in every strategy: the bid is proportional to expected value per dollar of constraint, scaled by a multiplier the platform tunes in a feedback loop. The multiplier μ ≥ 0 is adjusted online — by dual gradient ascent, a PID controller, or a bandit — so the constraint is met in expectation over the day.
Bid shading — first-price's tax on naive bidders
Second-price auctions are incentive-compatible: bidding true value is optimal. First-price is not — bidding true value yields zero surplus on win. The optimal strategy is to shade: bid below value to maximise (value − bid) · P(win | bid). This requires modelling the distribution of competing bids.
When display exchanges moved to first-price (~2017–2019), every DSP built a bid shader. Modern recipe: for each (placement, audience, time-of-day) segment, fit a small model that predicts the highest competing bid; given the Lagrangian-adjusted value, pick the quantile of that distribution to bid. Usually a small NN with segment features and recent win/loss outcomes, outputting a shading factor in (0, 1]. Shading is internal to the autobidder — invisible to the advertiser.
Budget pacing — making the budget last all day
Spending the daily budget evenly is almost never the goal. The goal is to spend it on the highest-value impressions among those available over the day. Front-loading misses the evening peak. Late-loading wastes budget at midnight. Three common pacing mechanisms:
| Mechanism | How it works | Trade-off |
|---|---|---|
| Throttling | If spend > target curve, drop out of auctions until back on schedule. | Trivial; no bid distortion. But binary on/off; misses high-value impressions while throttled. |
| Bid modulation | Multiply all bids by λ_t, updated by PID or dual-gradient ascent against target spend. | Smooth; still selects high-value impressions under tight pacing. Distorts auction price discovery; tuning is non-trivial. |
| Probabilistic pacing | Participate in each auction with probability p_t; lower when over-spending. | Simple; matches bid modulation in expected spend, not in expected allocation — under second-price the two are NOT equivalent in which auctions you win (probabilistic pacing skips auctions uniformly at random; bid modulation skips the marginal ones). Adds variance; loses signal on dropped impressions. |
Big platforms combine these: probabilistic pacing as a coarse safety net, bid modulation as the fine controller, throttling as a hard ceiling near the daily cap.
The three control loops, composed
Auction, autobidder, and pacer are three loops at very different timescales. They run concurrently and they compose:
Two interview-relevant consequences:
- Truthfulness is relative. A second-price auction is incentive-compatible for value-truthful bidders. But an autobidder bids the Lagrangian-adjusted value, not the raw value, because the advertiser has a constraint. The system is truthful relative to the advertiser's constrained optimisation — not relative to the raw value of an impression.
- Mechanism design partially breaks. When all bidders are autobidders, the realised bid is a function of each bidder's marginal-value distribution and multipliers — neither of which the auction observes. Mehta (2022, "Auction Design in an Auto-bidding Setting") develops the new equilibrium analysis. Headline: classical VCG/SP optimality does not transfer cleanly; truthful-in-the-Lagrangian-sense reporting of the constraint is the closest analogue. Note this isn't a contradiction with the auction-side truthfulness from lesson 9 — VCG is truthful for fixed-value bidders, but autobidders bid a constrained-optimisation output, so even with VCG the equilibrium welfare guarantee weakens (~50% efficient under VCG with all autobidders, per Mehta).
Interactive · a single-day pacing simulator
Synthetic auction price curve over 24 hours, bimodal at lunch and evening. Pick a pacing strategy and see end-of-day spend, effective CPA, and a diagnosis.
Pacing failure modes
| Failure | Symptom | Root cause |
|---|---|---|
| Front-loading | Budget exhausted by mid-afternoon; absent during evening peak. | Pacer too slow to react to early over-spend, or naive constant bid. |
| Late-loading | Unspent budget at midnight; underdelivery. | Pacer too conservative; target curve mis-calibrated to true traffic distribution. |
| Auction oscillation | Auction clearing price wobbles intra-hour as all autobidders react in lockstep. | PID gain too high system-wide; pacers respond faster than the price-discovery timescale. |
| Multi-day drift | tCPA hit on average across the week, but Monday's spend is 2× Friday's. | Per-day Lagrangian reset throws away cross-day learning; or weekday seasonality not modelled. |
| Cold-start starvation | New tROAS campaign spends nothing for two days. | No conversion history → P(conv | i) uncertain → bids too low to win → no data — loop reinforces itself. |
Strategy trade-off table
| Manual CPC | Max conversions | tCPA | tROAS | |
|---|---|---|---|---|
| Advertiser learning curve | Steep — must tune per keyword. | Trivial — budget only. | Easy — pick CPA target. | Hardest — must report conversion values reliably. |
| Sample-efficiency for new campaigns | Best — works from day 1. | Medium — needs few conversions to bootstrap. | Poor — needs ~30+ conversions before stable. | Worst — needs conversions and value labels. |
| Controllability | High but coarse. | Spend-only. | Cost-controlled. | Value-controlled. |
| Performance ceiling | Low — can't react per-impression. | High once warm. | Highest for cost-bounded objectives. | Highest for value-bounded objectives. |
| When to pick | You distrust the platform or have unique pricing data. | Brand / awareness with hard spend cap. | Direct-response with stable CPA economics. | E-commerce with per-conversion revenue values. |
Interview prompts you should be ready for
- "Walk me through tCPA from the Lagrangian point of view." (Set up the constrained optimisation, derive that the per-impression bid is proportional to P(conv | i) scaled by a multiplier, explain that the multiplier is adjusted online to keep realised CPA on target.)
- "Your campaign has a $1,000/day budget; at 11 AM it has spent $300. What should the pacing controller do?" (Probes: do you know the target curve isn't linear? Lunch peak is coming; $300 by 11 AM may be on-pace if 30%+ of the day's value falls in the next 3 hours. Don't reflexively throttle. Ask about the day's traffic distribution.)
- "Why is bid shading necessary in a first-price auction but not in a second-price auction?" (In SP, truthful bidding is dominant; in FP, bidding your value yields zero surplus on win. So you need to model the distribution of competing bids and shade.)
- "All major advertisers run autobidders. What does the mechanism-design literature say still holds?" (Truthfulness becomes truthfulness-in-the-constraint: the advertiser truthfully reports the Lagrangian constraint, not the per-impression value. Classical VCG optimality doesn't transfer cleanly; active research area.)
- "How would you build a tROAS autobidder for a brand-new advertiser with no conversion history?" (Bootstrap from sibling campaigns, run a max-conversions learning phase, fall back to a prior over conversion values, only enable tROAS after N labelled conversions. Discuss the trade-off of relaxing the constraint while learning.)
- "Your pacer is oscillating — spend goes high, then off, then high. Diagnose." (Classic PID overshoot: gain too high, or the system has dead-time between bid change and observed spend that the controller doesn't model. Lower the gain, add a derivative term, or smooth the spend signal.)