TL;DR
ProactivePIM is a specialized two-level Processing-in-Memory (PIM) architecture designed to accelerate recommendation systems that use model compression. By exploiting a newly identified "intra-GnR locality" and using a clever subtable duplication strategy, it eliminates costly communication overheads and achieves over a 2x speedup for state-of-the-art weight-sharing algorithms like QR-trick and TT-Rec.
What Problem Does This Paper Address?
Personalized recommendation systems, such as Meta’s DLRM, are the workhorses of modern data centers, but they face a massive scalability wall. Their primary bottleneck is the embedding layer, which maps categorical features (like "user ID" or "item ID") into dense vectors. This process is notoriously memory-intensive due to its sparse and irregular access patterns.
As shown in the figure below, both model sizes and the required memory bandwidth are exploding:
To fit these multi-terabyte models into server memory, researchers use weight-sharing algorithms (like QR-trick and TT-Rec). These methods compress one giant embedding table into several smaller "subtables." However, this creates a new problem: to get a single embedding, the system must now fetch multiple sub-embeddings and perform a "Collect-and-Reconstruction" (CnR) operation (e.g., vector multiplication). In standard PIM architectures, these sub-embeddings often reside in different memory banks, forcing the CPU to coordinate data movement between PIM units. This "CPU-PIM communication" can consume over 30% of the total execution time, negating the benefits of PIM.
Methods
The authors propose ProactivePIM, a hardware-software co-design that integrates PIM directly into High Bandwidth Memory (HBM).
- Two-Level PIM Architecture: They implement a hierarchy consisting of bank-group PIM (bg-PIM) for local reconstruction and base-die PIM (bd-PIM) for final data reduction.
- Intra-GnR Locality & SRAM Caching: The authors discovered that in compressed models, certain sub-embeddings are reused multiple times within a single "Gather-and-Reduce" (GnR) operation. They added a small (40KB) SRAM cache to each bg-PIM unit to capture this locality.
- Table-wise Prefetching: To hide the latency of loading data into the SRAM, they use a pipelined prefetching scheme that loads the next table's "hot" sub-embeddings while the current table is being processed.
- Subtable Mapping Strategy: To kill the communication overhead, they exploit the fact that weight-sharing subtables are often imbalanced in size. ProactivePIM duplicates the smallest subtables across all bank groups. This ensures that every PIM unit has all the operands it needs locally to perform multiplications, completely eliminating the need for inter-unit communication.
- TT-Rec Optimization: They reordered the complex tensor-train math into a two-stage "skinny" GEMM (General Matrix-Matrix Multiplication) to further reduce redundant memory reads.
Datasets
The system was evaluated using cycle-accurate simulations (DRAMsim3) with traces generated from:
- Criteo Terabyte Dataset: The industry standard for evaluating recommendation models.
- MIX1 Dataset: A combination of Amazon and Google Maps datasets used in prior PIM research (SPACE).
- Synthetic Traces: Generated from official DLRM code to test various embedding dimensions (128B to 512B).
Key Insights and Ideas
- The Locality Surprise: While original embedding tables have very poor locality, compressed subtables exhibit high intra-GnR locality. Because the total number of sub-embeddings is smaller, the "hit rate" for specific vectors increases significantly.
- Communication is the Real Bottleneck: The authors' roofline analysis (see below) confirms that while these algorithms are memory-bound, the overhead of moving data between PIM units is what prevents them from reaching peak performance.
- Strategic Redundancy: In a world of limited memory, duplicating data sounds counter-intuitive. However, because the "R subtables" in QR-trick are tiny (e.g., 0.12MB), duplicating them across HBM bank groups costs less than 4% of total capacity but provides a massive boost by localizing all computation.
Key Results
ProactivePIM significantly outperforms both standard HBM baselines and prior state-of-the-art PIM designs (like RecNMP and SPACE):
- Speedup: Achieves 2.22x speedup for QR-trick and 2.15x for TT-Rec compared to a baseline HBM2 architecture.
- Energy Efficiency: Reduces energy consumption by approximately 50% compared to previous PIM designs by minimizing row activations and off-chip I/O.
- Area Efficiency: The hardware overhead is modest, occupying only 5.75% of the HBM2 die area.
- Generality: Beyond recommendation, the authors showed a 1.7x speedup on general "skinny GEMM" workloads, which are common in many AI applications.
Limitations and Future Work
- Duplication Limits: While effective for current models, if the number of embedding tables grows to thousands, the cumulative capacity overhead of duplication might become significant.
- Static Profiling: The current prefetching and caching rely on profiling "hot" embeddings during training. While effective for stable datasets, it might need adaptation for models with rapidly shifting data distributions.
- Future Directions: The authors suggest extending this work to PIM-enabled CXL (Compute Express Link) interfaces to support even larger models that span multiple nodes.
Summary updated