Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

💰 Part 12: Computational Advertising

The twin sibling of recommender systems — from the ad ecosystem, billing models, and auction mechanisms to online allocation, targeting, retrieval, data trading, anti-fraud, contract selling, and native feeds — a complete practitioner's knowledge base of traffic monetization.

📚 13 sections · ⏱️ Estimated 10.5 hours · 🎯 Target: Build a panoramic understanding of computational advertising and master the full chain of auctions, smart bidding, calibration, targeting & retrieval, data compliance, anti-fraud, and contract/native product forms

Recommendation and advertising share the same technical foundation — retrieval, ranking, feature engineering, CTR estimation — but advertising layers something on top that recommendation lacks: an economic mechanism. Ad slots are scarce resources; every impression must be allocated among multiple advertisers, and the winner pays a fee. The design of the allocation and pricing rules directly determines "how bidding pays off" for each advertiser, and in turn the stability of the whole market and the platform's long-term revenue.

This part follows the framework of Liu Peng's Computational Advertising course and extends it with recent industrial papers from KDD/SIGIR/RecSys, filling in the advertising picture for readers with a recommendation background: first a bird's-eye view of the evolution of ad delivery models and the programmatic ecosystem (12.1), then the thread that runs through every advertising system — billing models and core metrics (12.2), and then the centerpiece of this part — auction mechanisms (12.3): why first-price auctions destabilize the market, why the generalized second price became the industrial mainstream for two decades, and what it costs to make VCG's "truth-telling" work. The final two chapters turn to the engineering side: smart bidding and budget control (12.4) covers how platforms bid on behalf of advertisers, smooth out budget spending, and shade bids in first-price markets; bias and calibration (12.5) covers why ad prediction must be absolutely accurate rather than merely correctly ranked, and how position bias, sample selection bias, and industrial calibration pipelines are handled. Finally, open-loop and closed-loop advertising (12.6) closes the part from the angle of data observability: whether conversions happen inside the platform's observable domain decides how deep the platform can optimize — closed loops train deep pCVR models and support deep conversion bidding, while open loops are stuck with attribution and privacy. Next, online allocation and traffic management (12.7) supplies the algorithmic foundation of contract advertising — the supply/demand bipartite graph, the compact allocation plan that keeps only -level dual variables, and the HWM heuristic; this "constrained optimization + dual pricing" framework is also the theoretical origin of 12.4's budget bidding. Four more chapters complete the practitioner's panorama: audience targeting (12.8) covers the t(c)/t(u)/t(a,u) tag taxonomy and behavioral targeting models; ad retrieval and semantic recall (12.9) covers boolean indexing, WAND pruning, and the ANN recall funnel; data processing and trading (12.10) covers three-party data, DMP/CDP, and privacy compliance; and experiment framework and anti-fraud (12.11) closes the part with the two bottom lines — trustworthy measurement and real traffic.

The programmatic advertising ecosystem at a glance

💡 Key Insight: A recommender system optimizes "the match between one user and one item"; an advertising system additionally optimizes "the game rules among multiple advertisers." Mechanism design is the biggest watershed between ads and recommendation — once you understand the GFP → GSP → VCG storyline, you can read 8.3's EGA with new eyes: why it embeds incentive-compatibility (IC) constraints directly into the generative process.


What This Part Covers

SectionTopicThe Big Idea
12.1The Advertising Panorama and EcosystemFrom "advertiser ↔ publisher direct deals" to "DSP-ADX-SSP programmatic trading" — three leaps in delivery models, each integrating supply and demand and refining the granularity of bidding
12.2Billing Models and Core MetricsThe CPT→CPM→CPC→CPA spectrum is fundamentally a transfer of risk allocation; eCPM is the common yardstick — the platform sorts by it, advertisers game it
12.3Auction Mechanisms: From First-Price to Second-PriceFirst-price (GFP) has no stable equilibrium, second-price (GSP) became the industrial mainstream, VCG makes everyone honest but is hard to deploy — mechanism design is a trade-off between stability and incentive compatibility
12.4Smart Bidding and Budget ControloCPC/oCPM platform-managed bidding, PID feedback control for budget pacing, and bid shading in first-price markets maximizing expected surplus — the four-layer bidding stack
12.5Bias and Calibration in Ad SystemsPosition bias (PAL), sample selection bias (ESMM), winner's curse and delayed feedback; the Platt/isotonic calibration pipeline — absolute prediction accuracy is the foundation of ad systems
12.6Open-Loop and Closed-Loop AdvertisingWhether conversion happens inside the platform's observable domain decides how deep it can optimize — closed loops train deep pCVR models, open loops are stuck with attribution and privacy
12.7Online Allocation and Traffic ManagementGuaranteed-volume contracts written as constrained optimization on a bipartite graph: the compact allocation plan recovers -level allocation rates from -level dual variables, and HWM is the heuristic genuinely running in engineering
12.8Audience TargetingThree classes of tags — t(c)/t(u)/t(a,u): contextual labeling, behavioral targeting with Poisson GLM and time decay, demographic prediction — topic models are history, embedding/LLM labeling is the present
12.9Ad Retrieval and Semantic RecallFrom billions of candidates to millisecond auctions: boolean two-layer indexing + WAND pruning for Top-K, DSSM/two-tower semantic recall evolved into HNSW/IVF-PQ multi-source recall
12.10Data Processing and TradingThe processing pipeline and trading loop of first/second/third-party data; cookie mapping is dead — CDP + UID2 + clean rooms are the compliance-era answer
12.11Experiment Framework and Anti-FraudLayered experiments keep measurement trustworthy; anomaly detection + device fingerprinting + graph analysis keep traffic real — the two bottom lines of ad systems
12.12Contract Advertising: Product Forms and Selling Models"Slots before ads": CPT/CPD scheduling and rotation, the evolution from selling positions to selling audiences — the commercial precondition of 12.7's online allocation
12.13Feed and Native AdvertisingThe fusion of ad and content forms: feed mixing is the problem "isomorphic to recommender engineering," plus rewarded video, the oCPX product chain, and the convergence of native and RTB

What You'll Be Able to Do After This Part

  • 🟢 Explain the essential differences between ads and recommendation: non-homogeneous matching, conversion as the endpoint, ROI orientation, and mechanism-design constraints
  • 🟢 Describe the responsibilities of DSP / ADX / SSP / DMP and the complete timeline of one RTB auction
  • 🟡 Distinguish risk allocation under each billing model: who makes the decision, who bears the effect uncertainty
  • 🟡 Derive the eCPM ranking logic and the GSP payment formula
  • 🔴 Prove that truthful bidding is a dominant strategy in the single-slot second-price auction, and explain why multi-slot GSP loses strict incentive compatibility
  • 🔴 Compare GSP and VCG on revenue, equilibrium properties, and industrial feasibility, and understand why programmatic markets moved "back to first-price"
  • 🔴 Distinguish the open-loop/closed-loop criterion, and explain why closed loops support deep conversion bidding while open loops depend on postbacks and attribution models, and how ATT/SKAN collapse deterministic attribution
  • 🔴 Model the online allocation problem: write out the supply/demand constraints and the compact plan's recovery formula , and explain HWM's priority-and-scale-down logic
  • 🔴 Design an audience targeting tag system: distinguish the use cases of t(c)/t(u)/t(a,u), score behavioral interests with a Poisson GLM + time decay, and articulate the reach/CTR trade-off
  • 🔴 Optimize the ad retrieval funnel: explain why boolean two-layer indexing and WAND pruning compress billions of candidates into milliseconds, and compare LSH vs. graph-based ANN
  • 🔴 Navigate data compliance boundaries: partition three-party data, explain why cookie mapping failed, and trace the DMP→CDP and clean-room evolution under GDPR/PIPL
  • 🔴 Fight ad fraud: recognize the motives and traces of click flooding/click injection, and defend the two bottom lines — trustworthy measurement and real traffic — with layered experiments and anomaly detection
  • 🏆 Verify "what happens if you misreport" with the interactive auction simulator, find the optimal bid with the bid-shading simulator, and compare five attribution models with the attribution simulator — then finish the tiered exercises in each section

Core Concepts

ConceptSectionRelevance
Advertising effectiveness model12.1Exposure→attention→comprehension→acceptance→retention→decision — a six-stage map of ad effect
Programmatic ecosystem (DSP/ADX/SSP/DMP)12.1The infrastructure of modern ad delivery
RTB (Real-Time Bidding)12.1Open bidding at per-impression granularity; Cookie Mapping is the prerequisite
eCPM12.2The common yardstick that makes cross-billing-model ranking possible
Guaranteed Delivery & online allocation12.7The bipartite-graph optimization framework of contract advertising: compact allocation plan + HWM
Compact Allocation Plan / SHALE12.7Stores only contract-level dual variables α and recovers allocation rates; solved by primal-dual iteration, supporting incremental contracts
Position Auction12.3The unified model for multi-slot allocation and pricing
Generalized Second Price (GSP)12.3The dominant pricing mechanism of search advertising for two decades
VCG mechanism12.3The theoretically optimal truth-telling pricing, and the benchmark for industrial trade-offs
Incentive Compatibility (IC) / Individual Rationality (IR)12.3The two properties of mechanism design, and the core constraints of EGA in 8.3
Closed-loop / open-loop advertising12.6The binary of whether conversion happens inside the platform's observable domain, which caps optimization depth
Targeting tag taxonomy t(c)/t(u)/t(a,u)12.8The classification framework of contextual / user / combined targeting tags
Behavioral targeting Poisson model12.8Interest intensity h~Poisson(λt); time decay λ(d)=αλ(d−1)+w·x updates online
Boolean retrieval & WAND12.9Two-layer inverted index + upper-bound pruning — the industrial skeleton of Top-K ad retrieval
Semantic recall / ANN12.9DSSM→two-tower→HNSW/IVF-PQ: from keyword matching to vector retrieval
Three-party data & DMP12.10First/second/third-party data partition; DMP processes audience segments for DSP bidding
CDP & clean room12.10Post-cookie first-party data infrastructure and "usable but invisible" compliant trading
Layered experiments12.11Orthogonal layered traffic splitting lets many experiments run in parallel without contamination
Click flooding / click injection12.11Two canonical attribution-fraud tactics and their detection signals
CPT / CPD / Rotation12.12The slot-selling trio: exclusivity, scheduling, and rotation with a random starting number
From selling positions to selling audiences12.12Targeting labels make slot traffic sliceable, spawning guaranteed-volume contracts and online allocation
Feed mixing12.13Ads and organic content compete for positions under a unified score — a problem isomorphic to recommender engineering
Rewarded video12.13The opt-in watch-to-earn format with the highest eCPM
Attribution12.6A rule for crediting a conversion to a channel — a convention, not an objective measurement
SKAdNetwork (SKAN)12.6Apple's privacy-preserving attribution: aggregated, delayed, crowd-anonymized — the collapse of deterministic attribution

Prerequisites

  • You have read 1.1 (What is a Recommender System) — this part repeatedly uses recommendation as the reference frame
  • Basic probability and expected-value computation (); 12.3 contains light game-theoretic derivation but requires no prior game theory
  • The IC/IR material in 12.3 and 8.3 (end-to-end generative advertising) are mirror images of each other — reading either first deepens the other

This part is a special topic that does not depend on any chapter of the generative track; but the mechanism-design perspective of 12.3 will in turn illuminate why EGA in 8.3 decouples "allocation" from "payment."


Tips for This Part

  1. Read 12.2 asking "who bears the risk." Every billing model can be summarized in one sentence: who holds the decision right, and who absorbs the effect uncertainty. This thread beats memorizing formulas.
  2. Compute by hand in 12.3 — don't just read. The GSP formula looks simple, but the position-CTR conversion trips people up constantly. Work through the three-slot numerical example in 12.3.3 by hand first, then play with the interactive simulator.
  3. Treat mechanisms as institutions, not formulas. The difference between first- and second-price lies not in algebra but in the advertiser behavior they incentivize: oscillating bidding wars vs. stable equilibria. After 12.3 you should be able to explain why Overture's 1998 market was chaotic — and what Google changed in 2002.

Let's dive in! 🚀