Scalable CP Decomposition for Tensor Learning using GPU Tensor Cores

Zeliang Zhang, Zhuo Liu, Susan Liang, Zhiyuan Wang, Yifan Zhu, Chen Ding, Chenliang XuarXiv 2023

Abstract

CP decomposition is a powerful tool for data science, especially gene analysis, deep learning, and quantum computation. However, the application of tensor decomposition is largely hindered by the exponential increment of the computational complexity and storage consumption with the size of tensors. While the data in our real world is often presented as trillion- or even exascale-scale tensors, existing work can only support billion-scale tensors. In our work, we propose the Exascale-Tensor to mitigate this significant gap. Specifically, we propose a compression-based tensor decomposition framework to support exascale tensor decomposition. We analyze the inherent parallelism and propose strategies to improve computational efficiency. Experiments on tensors ranging from million-scale to trillion-scale show that Exascale-Tensor supports 8,000x larger tensors and achieves speedups up to 6.95x. Application to gene analysis and tensor layer neural networks demonstrates the scalability and effectiveness of our method.

Introduction

In the era of big data, information is often modeled as tensors—multi-dimensional arrays that capture complex relationships in social networks, gene data, or neural network weights. As these tensors grow to "exascale" (trillions or even quintillions of elements), researchers hit two major roadblocks: the "Memory Wall," where GPU VRAM is insufficient for dense tensors, and exponential computational complexity. Existing tools like Matlab’s Tensor Toolbox or Python’s TensorLy are typically limited to tensors that fit in local memory. This paper introduces Exascale-Tensor, a framework designed to perform CP decomposition on massive, dense tensors that far exceed hardware memory limits.

The Exascale-Tensor Framework

The framework addresses the memory and complexity challenges through a three-stage pipeline: Compression, Decomposition, and Recovery.

The Exascale-Tensor framework consists of three main stages: (1) Compression into smaller proxy tensors, (2) Independent decomposition, and (3) Recovery of original components.
  1. Compression: Instead of loading the entire tensor, random projection matrices compress the massive tensor into multiple smaller "proxy" tensors. A block-based approach processes data in chunks, ensuring the GPU memory is never overwhelmed.
  2. Decomposition: Standard CP decomposition is performed on these smaller proxy tensors independently. Because these proxies are small, the computation is highly efficient.
  3. Recovery: To resolve permutation and scaling ambiguities inherent in CP decomposition, the authors utilize the Hungarian algorithm to align components from different proxy tensors and reconstruct the original large-scale principal components.

To maximize performance, the framework is heavily optimized for NVIDIA GPU Tensor Cores using mixed-precision (FP16) arithmetic. A novel factorization method accounts for residual errors during the compression stage, effectively maintaining 32-bit precision results while benefiting from 16-bit hardware speeds.

Experimental Results

The researchers evaluated Exascale-Tensor using synthetic dense and sparse tensors, deep learning weights (ResNet-34), and real-world biological gene data.

Performance comparison showing time consumption and speedups for baseline, CPU-parallel, and GPU-parallel implementations as tensor size increases.

Key findings include:

  • Massive Scalability: Exascale-Tensor successfully handled tensors 8,000 times larger than previous state-of-the-art baselines.
  • Significant Speedups: On dense tensors, the framework achieved up to a 6.95x speedup over optimized CPU baselines. For exascale-scale tensors, the optimized GPU version achieved an average speedup of 56.52x, peaking at 172.98x. A task requiring 18 hours on a CPU baseline was completed in just 20 minutes.
  • Application Accuracy: When used to compress a ResNet-34 model, the framework achieved 67.8% accuracy, outperforming Matlab (63.7%) and TensorLy (59.2%) while maintaining superior speed.

Conclusion

Exascale-Tensor bridges the gap between hardware constraints and the requirements of massive-scale tensor decomposition. By trading extra computation for reduced storage and leveraging mixed-precision GPU acceleration, it enables the analysis of datasets previously considered unreachable. Future work will explore distributed GPU clusters and extending these techniques to other decomposition types like Tucker or Tensor Train.

Summary updated

BibTeX
@misc{zhang2023scalable,
  author = {Zeliang Zhang and Zhuo Liu and Susan Liang and Zhiyuan Wang and Yifan Zhu and Chen Ding and Chenliang Xu},
  title = {{Scalable CP Decomposition for Tensor Learning using GPU Tensor Cores}},
  year = {2023},
  eprint = {2311.13693},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.13693},
}
Figure