Loading…
From User Sequences to Scaling Laws: A Multi-Stage Architecture for Meta’s Ads Ranking
MetaBy Steven De Gryze, Parshva Doshi, Sean O'Byrne, Arnold Overwijk, Dinesh Ramasamy, Lee Xiong
Summary
Scaling sequence models for real-time ad recommendations faces latency bottlenecks and scaling ceilings when hybrid configurations process both long user histories and sparse feature interactions online. Meta addresses these trade-offs with a multi-stage architecture that decouples heavy, asynchronous offline user modeling from lightweight, real-time online ranking. Deep upstream transformer models process sequences of thousands of actions to generate cached user embeddings, which downstream online models combine with candidate ad features using dense tokenization and target-aware multi-head attention. This framework produces predictable, LLM-style log-linear scaling curves between compute and normalized entropy without disproportionate increases in online serving costs. Implemented as part of Meta's Generative Ads Recommendation Model, the design achieved a cumulative 6% lift in Instagram conversions and a 3% lift in Facebook conversions.
Takeaways
- Decoupling the architecture into an asynchronous offline stage for user embeddings and a low-latency online stage for ad ranking enables upstream model capacity to scale without increasing online serving costs.
- Dense tokenization and target-aware multi-head attention allow the model to learn sparse feature interactions directly from data while scoring historical actions against specific candidate ads.
- Diverse sequence composition combining multiple engagement types—such as views, clicks, and conversions—generates richer user representations than homogeneous sequences of a single action type.
Related reading
Meta ·
GEM Training: How Meta Doubled the Efficiency of Its LLM-Scale Ads Foundation Model
Meta's Generative Ads Recommendation Model (GEM) trains across thousands of GPUs using a hybrid architecture featuring trillions of sparse embedding parameters and billions of dense parameters. Standard training infrastructure built for large language models struggles with recommendation-specific workloads characterized by jagged user activity histories, asymmetric attention patterns, and numerical sensitivity. To overcome these bottlenecks, engineering teams introduced custom kernels like Jagged Flash Attention and Generalized Dot-Product Attention alongside MXFP8 mixed-precision execution. Pairing these kernel optimizations with topology-aware 5D parallelism doubled end-to-end training efficiency to 20–25% Model FLOPs Utilization while scaling total training FLOPs fourfold over twelve months.
Meta ·
Exploring Hierarchical Interest Representation For Meta Ads Deep Funnel Optimization
Meta developed Hierarchical Interest Representation as an upstream representation layer to optimize deep funnel ad ranking across its platforms. The architecture organizes interactions among users, advertisers, and products into a heterogeneous, time-decayed graph and projects sparse raw edges into multi-level super-graphs of latent interest primitives. To encode these structures, a transformer-based hierarchical encoder incorporates multimodal product semantics processed via language models alongside topology-aware attention biases. Computation scales across billions of entities by pairing deep hash ID embeddings with FlexAttention to evaluate graph biases on the fly without materializing full matrices. Self-supervised cross-view distillation trains student representations against broader teacher graph views to yield universal embeddings and interest tokens.
By Yuhui Ouyang, Di Wang, Sreedal Menon, Jie TianMeta ·
MetaRoCE: A New RDMA Transport Built for AI-Scale Ethernet
Scaling frontier AI training and inference across massive GPU clusters places severe demands on network fabrics, yet conventional RoCE relies on Priority Flow Control to enforce in-order packet delivery. Meta introduced MetaRoCE, a clean-sheet RDMA transport protocol engineered specifically for lossy, multiplane commodity Ethernet without requiring PFC. By shifting intelligence to endpoint NICs, the protocol sprays packets across fine-grained logical paths, writing out-of-order data directly into destination memory without reorder buffers or head-of-line blocking. Congestion is managed via per-path ECN windows paired with receiver-driven rate hints returned in acknowledgments. In validation on a 64-node AMD GPU cluster running collective operations, MetaRoCE outperformed RoCEv2, sustaining roughly 86% throughput under 1% packet loss and achieving linear scaling across multiplane fabrics.
By Arvind Srinivasan, Neil Spring, Omar Baldonado, Rajiv KrishnamurthyMeta ·
How We’re Building Scam Alert on WhatsApp With End-to-End Encryption and Verifiability Guarantees
WhatsApp is introducing Scam Alert, an optional feature designed to detect scam messages from non-contacts while preserving end-to-end encryption guarantees. The system executes text classification entirely on-device using a machine learning model trained on conversational patterns from user reports, ensuring raw message content never leaves the client. To evaluate feature accuracy without compromising privacy, the client transmits minimal pre-aggregated telemetry—consisting only of warning and action counts—over Oblivious HTTP relays to Trusted Execution Environments. These confidential virtual machines securely aggregate metrics and apply differential privacy noise before exposing population-level statistics to servers. System integrity and non-targetability are maintained by requiring clients to attest backend binaries against public transparency ledgers before transmitting any telemetry.