Ai4
AI-assisted summary of Advanced AI for Ads Ranking With Reddit Inc — original source. Check the original for full context.
Source published:
Detailed notes
## Background Published on YouTube by the Ai4 channel on August 26, 2025, this talk features Vishal Gupta, Engineering Manager of Machine Learning at Reddit Inc. The session description highlights how modern advertising platforms enhance ads ranking and recommender systems by adopting advancements from natural language processing, computer vision, graph neural networks, and large language models.
## TL;DR Vishal Gupta outlines the end-to-end advertising funnel, explaining how candidate retrieval, heavy ranking models, and auction dynamics work together under strict calibration requirements. He traces the historical evolution of engagement prediction across four generations, transitioning from pre-deep learning linear models with decision trees to Wide & Deep paradigms, specialized feature-crossing architectures like DCN-v2 and DLRM, and generative sequence models governed by LLM scaling laws. Gupta also details how Reddit leverages multimodal representations and Graph Neural Networks across posts, subreddits, and ads. He concludes with practical lessons for applied ML practitioners, highlighting the realities of single-digit millisecond latency constraints, the primacy of training infrastructure, and the hidden metric gains achieved through codebase refactoring.
## Atmosphere & style The presentation carries the brisk, focused energy of an experienced engineering leader packing dense technical insights into a compact briefing. Gupta balances architectural depth with candid pragmatism and occasional dry humor, drawing upon career lessons spanning Google, DeepMind, X, and Reddit. The session feels refreshingly grounded, demystifying cutting-edge AI breakthroughs by viewing them through the practical lens of operational latency budgets, rigorous error analysis, and clean system maintenance.
## Key takeaways - [01:57](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=117s) The ad ranking pipeline filters candidates across retrieval, heavy ranking, and auction stages, distinguishing itself from organic recommender systems because paying advertisers directly influence outcomes through financial bids and budgets. - [04:06](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=246s) Heavy ranker models compute conditional engagement probabilities across upper-funnel and lower-funnel events to calculate estimated cost per mille (eCPM) for ad auction utility. - [04:06](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=246s) Precise model calibration is essential in ads ranking because uncalibrated probabilities directly distort monetary auction pricing and lead to systemic auction instability. - [07:00](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=420s) First-generation ad systems paired offline Gradient Boosted Decision Trees for non-linear feature extraction with online Logistic Regression, creating an engineering bottleneck around manual feature crossing. - [09:46](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=586s) Second-generation Wide & Deep architectures balanced the memorization of historical co-occurrences with the generalization capabilities of dense continuous embeddings. - [11:33](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=693s) Third-generation specialized architectures like DCN-v2 eliminate manual feature engineering by learning explicit, bounded-degree feature interactions automatically within dedicated cross layers. - [13:00](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=780s) Meta's DLRM architecture maps sparse categorical features into unified embedding dimensions and calculates explicit dot-product interactions across all feature pairs. - [14:22](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=862s) Platforms like Reddit build multimodal entity representations by fine-tuning foundation models (such as CLIP and Transformers) on ad copy, images, and chronological user activity sequences. - [14:22](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=862s) Graph Neural Networks (GNNs) capture structural community topology across users, subreddits, and posts to generate expressive entity embeddings for downstream retrieval and ranking. - [16:40](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1000s) Fourth-generation systems adopt generative LLM scaling paradigms by representing user engagements as discrete action tokens within sequential Transformer architectures. - [17:09](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1029s) Breakthroughs in AI research migrate to organic recommender systems before ads ranking due to the strict single-digit millisecond latency budgets and auction-level compute constraints of ad platforms. - [17:09](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1029s) Targeted cohort error analysis and periodic refactoring of legacy feature and serving infrastructure often yield larger online revenue gains than deploying complex architectures without optimization.
## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=4s) Introduction and Speaker Background
Vishal Gupta opens the presentation noting that while the session is brief, it is packed with dense material on advanced AI for ads ranking, meaning he may need to skim through certain technical nuances depending on how timing unfolds. Emphasizing a standard disclaimer, Gupta explains that the perspectives shared reflect his personal trajectory across the applied AI industry rather than the official stance of Reddit. His career path began at Google, transitioning in 2018 to DeepMind to tackle applied machine learning problems. In 2022, he moved to Twitter (now X), spending roughly a year there—including three months under Elon Musk's ownership, which he lightheartedly describes with a snort as "kind of fun." In February 2023, he joined Reddit initially as a machine learning tech lead before transitioning into engineering management.
The session outline is structured around three core pillars: an introduction to how ads ranking operates, an industry-wide historical evolution of engagement prediction models categorized into four distinct generations (from pre-deep learning to modern approaches), and key concluding takeaways for practitioners.
---
[01:57](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=117s) The Ads Funnel and Ads Auction vs. Recommendation Systems
To understand ads ranking, one must first grasp the broader end-to-end advertising funnel, a system refined across the tech industry over more than two decades. Given an incoming user request and an ad slot to be filled, the primary objective of the ad funnel is to discover and serve the single best candidate ad. The pipeline begins at the retrieval stage, where candidate spaces comprising millions—or on massive platforms, hundreds of millions—of candidate ads are narrowed down to a few hundred or a few thousand candidates. These candidates are then passed to the ranking stage, which computes fine-grained probabilities of user engagement. Finally, top-ranked candidates enter an auction where the winning ad is selected and rendered to the user.
```mermaid flowchart LR accTitle: High-Level Ads Funnel Architecture subgraph S1["Retrieval Stage"] A["Millions / 100M+ Ads"] --> B["Candidate Retrieval"] end subgraph S2["Ranking Stage"] B --> C["A Few Hundred / Thousand Ads"] C --> D["Heavy Ranker Model\nEngagement Probabilities"] end subgraph S3["Auction Stage"] D --> E["Ad Auction\n(eCPM + Relevance)"] E --> F["Winning Ad Served"] end ```
Gupta highlights a fundamental architectural distinction between standard recommender systems and ad systems. Having previously worked on recommendation systems across multiple Google products, he notes that while candidate retrieval and scoring look structurally similar, the auction mechanism introduces a completely different dynamic: in advertising platforms, paying advertisers directly influence which items are displayed through their bids and budgets.
---
[04:06](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=246s) Heavy Ranker Models, Contextual Nuances, and Calibration
The heavy ranker operates as an engagement prediction engine whose core task is calculating the conditional probability that a user will interact with a given creative:
$$\Pr(\text{Engagement} \mid \text{Ad}, \text{User}, \text{Context})$$
Engagement spans a wide taxonomy of event types. Upper-funnel (first-party) events encompass actions occurring directly within the platform's interface, such as clicking on an ad or viewing a video creative. Lower-funnel (third-party) events track post-click user actions occurring on external advertiser properties, including web conversions, mobile conversions, and application installs. These predicted probabilities integrate directly into the ad auction by computing the estimated cost per mille (eCPM)—multiplying the advertiser's bid by the model's predicted engagement probabilities—which is then combined with relevance scores to establish the final auction utility:
$$\text{eCPM} \propto \text{Bid} \times \Pr(\text{Engagement})$$
Gupta stresses that context is critical to prediction accuracy. Context factors include the time of day and the specific UI surface being browsed. On Reddit, this means accounting for distinct surface behaviors across the main home feed, individual subreddit feeds, and deep conversation/comment pages under specific posts. Furthermore, model calibration is paramount: because predicted probabilities are directly multiplied by financial bids to determine auction outcomes across heterogeneous engagement types, uncalibrated probabilities will distort pricing, degrade ad utility, and cause severe systemic auction instability.
---
[07:00](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=420s) Why AI in Ads Ranking and Generation 1: Pre-Deep Learning Systems
Relying solely on rigid mathematical formulas or basic statistical models fails because modern ad ranking requires delivering "the right ad to the right user at the right time." Historically, legacy systems relied heavily on historical user activity to forecast future behavior. However, if a user initiates a real-time search or enters a context entirely unrelated to their historical profile, past behavioral signals fall flat, underscoring the absolute necessity of real-time contextual modeling. Powerful AI models bridge this gap, optimizing both short-term performance and long-term ecosystem value for users and advertisers alike.
```mermaid flowchart TD accTitle: Generation 1 Pre-Deep Learning Architecture subgraph Offline["Offline Batch Training (Periodic)"] A["Historical Data"] --> B["Decision Trees / GBDT\n(Non-linear Feature Transforms)"] end subgraph Online["Online Real-Time Training"] B --> C["Leaf Node Index Features"] D["Real-Time Stream"] --> E["Logistic Regression\n(Online Linear Model)"] C --> E end E --> F["Click / Engagement Prediction"] ```
In Gupta's classification, First Generation (Gen 1) systems represent the pre-deep learning era: - **Core Architecture:** Centered on Logistic Regression (LR) computing linear combinations across extensive sets of sparse categorical and dense numerical features. - **Non-Linearity via GBDTs:** To capture non-linear feature interactions, platforms adopted architectures popularized by Facebook's seminal 2014 paper, pairing Gradient Boosted Decision Trees (GBDT) with an online linear model. - **Training Frequency:** GBDT components were retrained offline every few days or weeks to extract structural feature crosses, whereas the downstream logistic regression layer was updated online in real time on streaming data to catch shifting trends. - **Scaling Bottlenecks:** Maintaining these systems required hundreds to thousands of engineers manually engineering handcrafted feature crosses, which eventually became a severe organizational and computational scaling bottleneck.
---
[09:46](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=586s) Generation 2: Deep Learning and Wide & Deep Architectures
Second Generation (Gen 2) models emerged as ad platforms adopted deep learning, with industry pioneers like Google and Meta transitioning around 2016–2017 and other platforms following suit. The primary limitation of pure logistic regression was its tendency to merely "memorize" past co-occurrences without the capacity to generalize to unseen feature combinations. Deep Neural Networks (DNNs) resolved this by learning dense, low-dimensional continuous embeddings capable of generalizing across sparse feature spaces.
```mermaid flowchart TD accTitle: Wide and Deep Architectural Paradigm subgraph Wide["Wide Component (Memorization)"] W1["Cross-Product Transformations\n(Historical Co-occurrences)"] --> W2["Linear Model"] end subgraph Deep["Deep Component (Generalization)"] D1["Dense Embeddings\n(Continuous Representations)"] --> D2["Hidden Deep Layers"] end W2 --> Out["Final Engagement Probability Prediction"] D2 --> Out ```
Inspired by recommender system research, platforms widely embraced Google's *Wide & Deep* paradigm: - **Wide Component:** Preserved the memorization strengths of linear models over historical feature interactions. - **Deep Component:** Provided non-linear generalization through deep neural network stacks. - **Training Paradigm:** Gen 2 systems operated primarily via offline batch training over massive datasets. - **Impact:** Although extensive manual feature engineering remained necessary, deep learning unlocked substantial performance gains by extracting signal from massive data volumes.
---
[11:33](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=693s) Generation 3: Specialized Architectures and Automated Feature Crosses (DCN-v2)
Generation 3 (Gen 3) evolved away from massive, monolithic feed-forward DNNs toward specialized, domain-tailored neural architectures. While a single-layer feed-forward network with sufficient width is theoretically a universal function approximator, in practice, designing explicit architectural components for specific ranking subtasks yields far superior empirical performance and training efficiency.
Gupta highlights Deep & Cross Network V2 (DCN-v2) as an especially impactful milestone in this evolution: - **Eliminating Manual Crosses:** Rather than requiring ML engineers to manually hypothesize and craft high-degree feature crosses, DCN-v2 delegates interaction learning directly to dedicated model layers. - **Cross Layers:** The cross-layer architecture automatically computes explicit, bounded-degree feature interactions at each subsequent layer without combinatorial explosion. - **Controllable Interaction Degree:** Stacking $N$ cross layers explicitly models interaction degrees up to order $N+1$, allowing the network to systematically learn complex multi-way feature relationships.
[13:00](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=780s) Feature Crossing Architectures and DLRM
Deep & Cross Network (DCN) architectures make it possible to automatically learn explicit feature interactions up to multiple degrees. While practitioners can technically stack many cross layers, practical experience shows that two to three cross layers are more than sufficient. Furthermore, parallel cross networks—where the cross network runs alongside a standard deep network—consistently outperform sequentially stacked cross networks.
Building directly on the necessity of capturing sparse pairwise interactions, Meta pioneered the Deep Learning Recommendation Model (DLRM), with related architectural variations also developed at Google. In prior generations of recommendation systems, combining sparse signals was proven to yield the largest lift—such as understanding that a user watched a movie in a specific genre and subsequently bought a related product. DLRM formalized this by projecting all categorical sparse features into a unified embedding dimension, followed by computing explicit dot-product interactions between every feature pair. This design significantly expanded what was achievable at the intersection of deep learning and recommender systems.
- **Cross Layer Depth:** Two to three cross layers typically capture optimal non-linear interactions without unnecessary overhead. - **DLRM Core Innovation:** Maps distinct sparse categorical features to embedding vectors of identical dimensionality and computes dense dot-product crosses across all pairs.
---
[14:22](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=862s) Multimodal Entity Representations and Graph Neural Networks at Reddit
High-capacity entity representations form the backbone of both the retrieval and ranking stages. At Reddit, primary entities include posts, subreddits, and ads. As computer vision and natural language processing advanced, their foundational models were adopted to generate rich semantic embeddings. Image models extract visual features from creative assets, while LSTMs, GRUs, and Transformers encode post titles, descriptions, and comments. Multimodal vision-language models, such as OpenAI's CLIP, are frequently utilized to generate joint text-and-image embeddings. The standard operational recipe involves taking off-the-shelf pre-trained foundation models, deploying them directly or fine-tuning them on in-house platform data, and feeding the resulting embeddings downstream into core ranking models.
Beyond unstructured media, sequence encoders and graph representation learning unlocked relational modeling. Instead of tokenized natural language, sequence models ingest chronologically ordered sequences of user engagements. Simultaneously, Graph Neural Networks (GNNs) capture the structural topology of Reddit's ecosystem, where users subscribe to specific subreddits while independently interacting with posts outside their subscribed communities. Passing this heterogeneous graph into powerful graph encoders with supervised objectives yields expressive embeddings across all platform entities.
```mermaid flowchart TD accTitle: Reddit Multimodal and Graph Entity Representation Pipeline accDescr: Diagram illustrating how text, images, sequences, and graph topology are processed into unified entity representations for ranking.
subgraph Inputs ["Platform Signals & Entities"] IMG["Ad & Post Images"] TXT["Post & Ad Copy"] SEQ["User Action Sequences"] GRAPH["User-Subreddit-Post Graph"] end
subgraph Encoders ["Specialized Encoders"] CLIP["Vision & Multimodal Models (CLIP)"] TRANS["Sequence Models / Transformers"] GNN["Graph Encoders (GNNs)"] end
subgraph Output ["Downstream Ranking"] EMB["Unified Entity Representations\n(Posts, Subreddits, Ads)"] RANK["Ads Retrieval & Ranking Models"] end
IMG --> CLIP TXT --> CLIP SEQ --> TRANS GRAPH --> GNN
CLIP --> EMB TRANS --> EMB GNN --> EMB EMB --> RANK ```
---
[16:40](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1000s) Generative RecSys: Scaling Laws and Sequence Modeling for Ads
Modern fourth-generation recommendation systems increasingly adopt the generative scaling paradigms of Large Language Models (LLMs). Meta's landmark research paper, *"Actions Speak Louder Than Words,"* established that the fundamental scaling laws governing autoregressive LLMs apply directly to sequential recommendation architectures.
Instead of passing natural language tokens into a Transformer decoder, these architectures represent discrete user engagements as an ordered sequence of action tokens. Scaling compute, dataset volume, and parameter counts on these action sequences unlocks substantial performance gains across both organic content recommendation and real-time ads ranking pipelines.
- **Token Analogy:** User actions (clicks, views, community visits) replace textual words as the fundamental vocabulary of the sequence model. - **Power of Scale:** Model performance scales predictably with increased sequence length, compute, and parameter capacity.
---
[17:09](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1029s) The Applied ML Lifecycle: Latency Constraints, Infrastructure, and Clean Codebases
Machine learning breakthroughs follow a defined progression: breakthroughs originating in NLP, computer vision, and graph learning are first absorbed by organic recommendation systems, and only later migrate into ads ranking. Direct, immediate adoption in ads ranking is blocked by extreme operational constraints. Ads systems operate under strict, single-digit millisecond latency budgets and evaluate massive candidate pools. While organic feed ranking can compute recommendations once per session, ads ranking must run complex inference passes for every distinct ad slot auction across millions of concurrent requests, making compute efficiency paramount.
```mermaid flowchart LR accTitle: Research Innovation Flow to Ads Ranking accDescr: Flow diagram showing research migrating from foundational AI fields to organic recommender systems and finally to ads ranking.
AI["Core AI Research\n(NLP, Vision, Graphs, LLMs)"] REC["Organic Recommender Systems\n(Looser Latency Budgets)"] ADS["Ads Ranking Systems\n(Strict SLA & Per-Slot Cost)"]
AI --> REC REC --> ADS ```
Applied ML engineers must also avoid the common pitfall of treating advanced model architectures as a "hammer" where "every problem starts looking like nails." Squeezing maximum real-world value requires granular error analysis to discover exactly which user or advertiser segments are underperforming, followed by targeted modeling. Furthermore, machine learning training and serving infrastructure quickly becomes the ultimate ceiling on innovation. Long-term practitioners discover that periodically refactoring and rewriting legacy feature engineering and serving pipelines often produces dramatic, unexpected online revenue wins by eliminating silent technical debt, metric drift, and unintentional implementation bugs accumulated during rapid prototyping.
- **Inference Constraints:** Ads ranking faces tight real-time latency SLAs and multiplicative compute costs per ad impression auction. - **Targeted Improvements:** Error analysis on underperforming cohorts delivers greater incremental ROI than blindly deploying complex architectures. - **Infrastructure Investment:** Robust training and serving platforms prevent infrastructure from throttling applied modeling velocity. - **Code Refactoring Gains:** Rewriting legacy serving codebases frequently uncovers silent bugs, yielding substantial online metric improvements.
## Notable quotes > [00:04](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=4s) kind of fun — Vishal Gupta
> [07:00](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=420s) the right ad to the right user at the right time — Vishal Gupta
> [09:46](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=586s) memorize — Vishal Gupta
> [16:40](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1000s) Actions Speak Louder Than Words — Vishal Gupta
> [17:09](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1029s) hammer — Vishal Gupta
> [17:09](https://www.youtube.com/watch?v=CbTWx11S9wQ&t=1029s) every problem starts looking like nails — Vishal Gupta
## Mentioned Vishal Gupta, Reddit, Google, DeepMind, Twitter, X, Elon Musk, Meta, Facebook, OpenAI, CLIP, Wide & Deep, Deep & Cross Network V2 (DCN-v2), Deep Learning Recommendation Model (DLRM), Actions Speak Louder Than Words
## Video description Vishal Gupta, Engineering Manager, Machine Learning, Reddit Inc
Abstracts
How advanced AI can improve Ads Ranking?
AI models have been helping Ads platforms to show relevant Ads to their users since last couple of decades. The advancement in Ads ranking models has accelerated with the advancement in fields like NLP, Computer Vision, Recommender Systems.
In this talk you will learn how Ads ranking models have improved by drawing inspiration from Transformers, LLMs, Graph neural networks etc. Lets dive deep into concepts that can improve Ads ranking and other related domains like Recommender Systems, e-commerce etc.
[Source](https://www.youtube.com/watch?v=CbTWx11S9wQ)