Introduction
Training industry-scale Ads recommendation and auction scoring models presents a significant infrastructure challenge. These models involve billions of parameters and petabytes of data, requiring continuous updates to maintain "freshness." While specialized hardware like Tensor Processing Units (TPUs) has accelerated dense linear algebra, other system components often become bottlenecks. Google researchers have identified three primary hurdles: the "Input Gap" where CPU-intensive feature conversion starves TPUs, "Embedding Bloat" from massive sparse data tables, and "Datacenter Friction" caused by job preemptions in shared environments.
System Architecture
To address these challenges, the authors developed a holistic Training Service Architecture designed to optimize data ingestion and resource utilization across the entire pipeline.
Shared Input Generator (SIG)
A core innovation is the Shared Input Generator (SIG). Rather than each model independently processing raw data, SIG serves as a centralized "memoization" service. By caching feature transformations, SIG allows multiple models to reuse computed results. For instance, if several models require the same unigram transformation of a search query, SIG computes it once. This approach achieved a cache hit rate exceeding 95%, with individual data blocks reused by an average of 22 different models. This reduced the cost of input reader jobs by 4.3x to 7.5x compared to local generation.
Hybrid Embedding Partitioning
Ads models rely heavily on embedding tables, which can range from 64 million to 300 million entries. These tables are often too large for a single chip and exhibit irregular memory access patterns. The system employs a mix of Table, Column, and Row partitioning to balance memory and compute loads across the TPU cluster.
This partitioning is further optimized using Feedback-Directed Partitioning (FDP), which leverages historical statistics to prevent "hot" chips from bottlenecking the entire cluster. By implementing software techniques to overlap SparseCore (embedding) and TensorCore (dense math) operations, the system achieves higher throughput. Crucially, the researchers found that allowing "one-step staleness"—starting embedding lookups for step $N+1$ while step $N$ completes—had no noticeable impact on final model accuracy.
Evaluation and Results
The infrastructure was evaluated using five representative Google production Ads model families, representing over 50% of the total production workload. These models process billions of events and hundreds of embedding tables, with dense components ranging from 50M to 300M weights.
Key performance metrics include:
- Throughput: A geometric mean improvement of 116% across the evaluated models.
- Cost Efficiency: An 18% reduction in total cost of ownership (TCO).
- Reliability: A "preemption notice" protocol allows jobs to checkpoint progress before being displaced, ensuring that 61% of preempted epochs now successfully commit their work, drastically reducing wasted TPU cycles.
Conclusion and Future Work
The implemented optimizations have significantly enhanced Google's ability to train massive recommendation models efficiently. However, limitations remain. SIG currently memoizes only connected components within transformation graphs and faces challenges with mutable or late-arriving data (e.g., labels updated after spam detection). Future research will focus on more granular subgraph memoization, better integration with real-time data updates, and further automating embedding placement through techniques like "FlexShard."
Summary updated