Entity Representation Learning Through Onsite-Offsite Graph for Pinterest Ads

Jiayin Jin, Zhimeng Pan, Yang Tang, Jiarui Feng, Kungang Li, Chongyuan Xiang, Jiacheng Li, Runze Su, Siping Ji, Han Sun, Ling Leng, Prathibha DeshikachararXiv 2025 · DOI

Introduction

Pinterest engineers have developed a novel approach to enhance ad performance by bridging the gap between "onsite" user interactions (clicks, saves within Pinterest) and "offsite" conversion data (purchases on advertiser websites). By constructing a massive heterogeneous graph and implementing a specialized embedding model called TransRA, the team achieved a 2.69% lift in Click-Through Rate (CTR) and a 1.34% reduction in Cost-Per-Click (CPC) in production environments.

The Challenge of Offsite Data

In digital advertising, understanding user intent across different platforms is critical. While onsite data is abundant, integrating offsite conversion data presents significant hurdles:

  1. Metadata Scarcity: Offsite products often lack the rich, consistent metadata found in onsite Pins.
  2. Distribution Mismatch: User behavior patterns differ fundamentally between internal browsing and external shopping.
  3. Model Integration: Standard ranking models struggle to ingest raw graph-based relationships effectively, often leading to neutral results when using simple pre-trained embeddings.

Methodology

The proposed solution involves a two-stage approach: a novel Knowledge Graph Embedding (KGE) architecture and an attention-based integration strategy.

The Onsite-Offsite Graph

The foundation of this work is a heterogeneous graph containing billions of nodes and edges. It connects entities such as Users, Items, Links, Advertisers, and Ads through various interaction types, including onsite clicks and offsite checkouts.

Figure 1: Heterogeneous graph structure connecting onsite user actions with offsite advertiser conversions.

TransRA: TransR with Anchors

To handle the complexity of this graph, the authors developed TransRA. While standard models like TransE are too simplistic and TransR introduces excessive complexity by projecting every entity into separate mathematical spaces, TransRA designates the User as an "anchor." It maintains the User entity in a fixed space and applies mathematical transformations to other entities (ads, items) to bring them into that shared User space. This simplification makes embeddings significantly more compatible with downstream ranking models.

Attention-Based Finetuning

A key finding was that static embeddings were insufficient. The team introduced a self-attention layer on top of the embedding lookups within the ranking model. This layer allows the model to dynamically learn which graph relationships are most relevant for specific ad placements, acting as a "translator" between the graph's structural knowledge and the tabular ranking features.

Figure 2: Integration of pretrained graph embeddings into the ranking model via a self-attention layer.

Results and Impact

The TransRA framework was deployed in Pinterest’s live Ads Engagement Model with impressive results:

  • Production Performance: +2.69% CTR lift and -1.34% CPC reduction.
  • Offline Accuracy: Significant gains in Area Under the Curve (AUC) for both CTR and Conversion Rate (CVR) models.
  • Model Superiority: TransRA consistently outperformed TransR and TransE. In User-Checkout-Item tasks, TransRA achieved a Recall@10 of 0.812, whereas TransE effectively failed with a score of 1.2e-4.

Conclusion and Future Work

The "anchor" approach in TransRA successfully balanced model power with engineering feasibility at a scale of billions of nodes. Future efforts will focus on addressing the "cold start" problem for new users and ads by combining KGE with Graph Convolutional Networks (GCNs) to leverage node features like images and text alongside structural graph data.

Summary updated

BibTeX
@misc{jin2025entity,
  author = {Jiayin Jin and Zhimeng Pan and Yang Tang and Jiarui Feng and Kungang Li and Chongyuan Xiang and Jiacheng Li and Runze Su and Siping Ji and Han Sun and Ling Leng and Prathibha Deshikachar},
  title = {{Entity Representation Learning Through Onsite-Offsite Graph for Pinterest Ads}},
  year = {2025},
  eprint = {2508.02609},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.02609},
}
Figure