Skip to main content
QUICK REVIEW

[Paper Review] CuMF_SGD: Fast and Scalable Matrix Factorization

Xiaolong Xie, Wei Tan|arXiv (Cornell University)|Oct 19, 2016
Stochastic Gradient Optimization TechniquesComputer Science29 references11 citations
TL;DR

cuMF_SGD is a GPU-accelerated stochastic gradient descent (SGD) framework for large-scale matrix factorization, leveraging CUDA to exploit GPUs' high memory bandwidth and massive parallelism. It introduces batch-Hogwild! and wavefront-update scheduling, optimized kernels using half-precision floats and warp-shuffle, and a partitioning scheme for multi-GPU scaling, achieving 3.1X–28.2X speedup over state-of-the-art CPU systems on single-GPU setups and sub-linear scalability on multiple GPUs.

ABSTRACT

Matrix factorization (MF) has been widely used in e.g., recommender systems, topic modeling and word embedding. Stochastic gradient descent (SGD) is popular in solving MF problems because it can deal with large data sets and is easy to do incremental learning. We observed that SGD for MF is memory bound. Meanwhile, single-node CPU systems with caching performs well only for small data sets; distributed systems have higher aggregated memory bandwidth but suffer from relatively slow network connection. This observation inspires us to accelerate MF by utilizing GPUs's high memory bandwidth and fast intra-node connection. We present cuMF_SGD, a CUDA-based SGD solution for large-scale MF problems. On a single CPU, we design two workload schedule schemes, i.e., batch-Hogwild! and wavefront-update that fully exploit the massive amount of cores. Especially, batch-Hogwild! as a vectorized version of Hogwild! overcomes the issue of memory discontinuity. We also develop highly-optimized kernels for SGD update, leveraging cache, warp-shuffle instructions and half-precision floats. We also design a partition scheme to utilize multiple GPUs while addressing the well-known convergence issue when parallelizing SGD. On three data sets with only one Maxwell or Pascal GPU, cuMF_SGD runs 3.1X-28.2X as fast compared with state-of-art CPU solutions on 1-64 CPU nodes. Evaluations also show that cuMF_SGD scales well on multiple GPUs in large data sets.

Motivation & Objective

  • To address the memory bandwidth bottleneck in SGD-based matrix factorization, especially for large-scale datasets.
  • To exploit the high memory bandwidth and fast intra-node communication of GPUs to accelerate matrix factorization beyond what single-node CPUs or distributed CPU clusters can achieve.
  • To design GPU-aware workload scheduling (batch-Hogwild! and wavefront-update) that maintains SGD’s randomness while maximizing parallelism and memory coalescing.
  • To develop highly optimized GPU kernels using half-precision floats, warp-shuffle, and cache-aware access patterns for efficient SGD updates.
  • To enable effective multi-GPU scaling by designing a partitioning scheme that avoids convergence degradation due to update conflicts.

Proposed method

  • Proposes batch-Hogwild!, a vectorized variant of Hogwild! that reduces memory discontinuity by processing multiple updates in batches, improving cache utilization and coalescing memory access.
  • Introduces wavefront-update scheduling to enable data-parallel, dependency-aware update ordering that maximizes GPU occupancy and hides memory latency.
  • Employs highly optimized CUDA kernels using half-precision floating-point arithmetic (FP16), warp-shuffle instructions, and cache blocking to reduce memory traffic and increase arithmetic intensity.
  • Designs a matrix partitioning strategy for multi-GPU systems that ensures load balance and minimizes inter-GPU synchronization overhead while preserving convergence properties of SGD.
  • Uses a lock-free update mechanism inspired by Hogwild! to avoid synchronization bottlenecks, enabling high-throughput training on shared-memory GPU architectures.
  • Employs CPU-GPU memory transfer for synchronization between GPUs, carefully managing data movement to minimize performance degradation in multi-GPU settings.

Experimental results

Research questions

  • RQ1Can GPU-based SGD significantly outperform CPU-based SGD for large-scale matrix factorization by overcoming memory bandwidth limitations?
  • RQ2How can workload scheduling on GPUs be designed to maintain the randomness of SGD while maximizing parallelism and memory coalescing?
  • RQ3What kernel optimizations are most effective in improving arithmetic intensity and reducing memory access overhead in SGD-based matrix factorization on GPUs?
  • RQ4Can multi-GPU scaling be achieved without degrading convergence, and what partitioning strategy enables this?
  • RQ5How does the performance of GPU-accelerated SGD compare to state-of-the-art CPU-based systems across diverse data scales?

Key findings

  • On a single Maxwell or Pascal GPU, cuMF_SGD achieves 3.1X to 28.2X speedup over state-of-the-art CPU solutions running on 1 to 64 CPU nodes.
  • The batch-Hogwild! scheduling scheme effectively reduces memory discontinuity and improves memory coalescing, leading to higher effective memory bandwidth utilization.
  • Wavefront-update scheduling enables high GPU occupancy and hides memory latency, contributing to efficient utilization of the GPU's massive parallelism.
  • The use of half-precision floating-point arithmetic (FP16) and warp-shuffle instructions significantly reduces memory traffic and accelerates kernel execution.
  • cuMF_SGD scales sub-linearly with multiple GPUs, achieving 1.5X speedup on two Pascal GPUs for the Yahoo!Music dataset compared to one GPU, despite CPU-GPU memory transfer overhead.
  • The framework demonstrates strong performance on large-scale datasets such as Yahoo!Music (1M × 625K), where multi-GPU support is feasible and effective, while smaller datasets like Netflix and Hugewiki are constrained by low dimensionality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.