#AI

Unifying Ads Engagement Modeling Across Pinterest Surfaces

Unifying Ads Engagement Modeling Across Pinterest Surfaces
01

Summary

One Model to Rule Them All: Pinterest’s Ads AI Unification Story

How Pinterest consolidated three separate engagement models into a single high-performance framework

Explore how Pinterest's engineering team unified fragmented ads prediction systems into a cohesive framework. This article details the architectural shifts and efficiency optimizations required to maintain surface-specific nuances while maximizing shared representation learning at scale.

  • 01Successful consolidation of Home Feed and Search modeling stacks with improved performance
  • 02Integration of MMoE and long-sequence Transformers for better prediction accuracy
  • 03Latency reduction using DCNv2 to project high-dimensional representations efficiently
  • 04Infrastructure savings via request-level broadcasting of unique user embeddings
  • 05Enhanced CTR prediction through the introduction of surface-specific calibration layers

RECOMMENDATION

Highly recommended for ML engineers managing multiple domain-specific models who seek practical strategies for architectural unification and large-scale serving efficiency.

The Problem

Operating independent ads engagement models for Home Feed, Search, and Related Pins led to slow iteration velocity, redundant training costs, and heavy maintenance overhead due to architectural divergence.

The Solution

Pinterest developed a unified multi-task learning architecture featuring surface-specific calibration, DCNv2-based projection layers for latency reduction, and request-level broadcasting to optimize embedding lookups.

The Result

The unified model achieved significant improvements in both offline and online metrics while streamlining development workflows and ensuring infrastructure cost-efficiency.

Trade-off

Initial unification caused increased serving latency due to the merging of feature maps, and the embedding reuse strategy introduced a constraint on the maximum number of unique users per batch to ensure reliability.

03

Key Concepts

Concept · 01

MMoE (Multi-gate Mixture-of-Experts)

An architecture that captures shared information across multiple tasks while using gating networks to model task-specific differences.

  • Used to balance shared representation learning and surface-specific nuances across different ad surfaces.
Concept · 02

DCNv2 (Deep & Cross Network v2)

A sophisticated architecture designed to learn cross-feature interactions effectively with lower computational cost.

  • Implemented to project expensive Transformer outputs into smaller representations, preserving signals while reducing latency.
Concept · 03

Request-level Broadcasting

A serving optimization that fetches common data once per request batch and broadcasts it to redundant slots.

  • Eliminated redundant user embedding lookups per candidate, significantly reducing serving infrastructure load.