Parallel Algorithms for Computing the Tensor-Train Decomposition

Tianyi Shi, Maximilian Ruth, Alex Townsend

TL;DR

This paper introduces a suite of parallel algorithms for computing the Tensor-Train (TT) decomposition, a data-sparse representation crucial for handling high-dimensional data in fields like molecular simulations and PDE-constrained optimization. By leveraging novel connections between tensor unfoldings and employing techniques like sketching and optimized linear algebra, these algorithms significantly improve computational efficiency and memory usage, making TT decomposition more accessible for large-scale problems.

What Problem Does This Paper Address?

High-dimensional data is increasingly prevalent in scientific and engineering applications, often represented as tensors. Storing and processing these tensors directly is computationally prohibitive due to their exponential scaling with dimensionality. The Tensor-Train (TT) decomposition offers a way to represent these tensors in a "data-sparse" format, drastically reducing storage and computational costs. However, existing methods for computing the TT decomposition, particularly the widely used TTSVD algorithm, are inherently sequential. This poses a significant bottleneck for large-scale problems that could benefit from parallel processing on modern multi-core architectures. The core challenge this paper addresses is the development of efficient, scalable, and accurate parallel algorithms for computing TT decompositions, especially when dealing with tensors that are too large to fit into memory.

Methods

The paper proposes four main parallelizable algorithms:

  • Parallel-TTSVD: This algorithm adapts the traditional TTSVD approach by exploiting the relationship between the column spaces of different tensor unfoldings. Instead of a sequential process, it computes ON bases for these column spaces simultaneously, enabling parallelization.
  • Parallel Streaming TT Sketching (PSTT): Recognizing that SVD can be computationally expensive, PSTT uses randomized linear algebra techniques (sketching) to approximate the ON bases of tensor unfoldings. This is particularly beneficial for streaming data where the entire tensor cannot be loaded into memory. A two-sided version (PSTT2) is shown to achieve a memory complexity of $O(n^{d/2})$, a significant improvement over previous methods. A one-pass variant, PSTT2-onepass, further optimizes efficiency by minimizing data passes.
  • Tucker2TT and TT2Tucker: These algorithms provide efficient methods for converting between orthogonal Tucker format and TT format. Tucker2TT leverages the TT cores of the Tucker core, while TT2Tucker uses relationships between tensor unfoldings and TT cores to convert TT format to Tucker format.
  • TT-fADI: This method addresses the computation of TT decompositions for tensors that are implicitly defined as solutions to Sylvester tensor equations. It adapts the factored alternating direction implicit (fADI) method to solve these equations in the TT format.

The implementations leverage standard parallel computing frameworks like MPI and optimized linear algebra libraries (BLAS3, LAPACKE).

Datasets

The paper does not introduce new benchmark datasets. Instead, it uses synthetic datasets, specifically "Hilbert tensors," defined by the formula $X_{i_1,...,i_d} = \frac{1}{1 - d + \sum_{k=1}^d i_k}$. These tensors are known to be well-approximated by low-rank TT tensors and are used to profile the performance and memory usage of the proposed algorithms across different dimensions ($d=3, 5, 9$) and tensor sizes.

Key Insights and Ideas

  • Connecting Tensor Unfoldings: A crucial insight is the relationship between the column spaces of different tensor unfoldings. This connection allows for a more unified and parallelizable approach to computing TT cores, moving away from the strictly sequential nature of traditional TTSVD.
  • Sketching for Scalability: The adoption of randomized sketching techniques is a key enabler for handling massive tensors. By approximating the essential information of tensor unfoldings, sketching drastically reduces memory requirements and computational cost, especially for streaming scenarios.
  • Memory Efficiency of PSTT2: The $O(n^{d/2})$ memory complexity achieved by PSTT2 is a significant breakthrough, particularly for high-dimensional tensors, as it scales much more favorably than previous methods.
  • Parallelism in TT-fADI: Adapting the fADI method to solve Sylvester tensor equations in parallel is important for applications where tensors arise implicitly from such equations, common in PDE solutions.

Key Results

  • Algorithmic Improvements: The paper presents four distinct parallel algorithms (Parallel-TTSVD, PSTT, Tucker2TT, TT2Tucker, TT-fADI) that offer significant advantages over existing sequential methods.
  • Memory Complexity: PSTT2 achieves a memory complexity of $O(n^{d/2})$, a substantial improvement over $O(n^{d-1})$ from previous algorithms.
  • Performance: Numerical experiments on Hilbert tensors demonstrate that the parallel algorithms, particularly PSTT2 and PSTT2-onepass, exhibit strong scaling with the number of cores. They show reduced memory allocation per core and competitive or superior execution times compared to a serial streaming TT sketching (SSTT) baseline, especially for higher dimensions. For instance, for $d=9$, PSTT2 and SSTT have comparable times, while PSTT2-onepass is significantly faster.
  • TT-fADI Speedup: The TT-fADI algorithm for Sylvester tensor equations shows substantial speedups (up to 4x faster than ST21 and 6x faster than a direct solver for $n=350$) compared to existing methods, particularly for larger problem sizes.

Limitations and Future Work

  • Known Ranks: The presented algorithms often assume that the TT ranks are known a priori. While the paper mentions the possibility of adaptive algorithms, this remains an area for further development.
  • Communication Costs: For very small tensor sizes, communication overhead can become a significant factor, as observed in the $d=3$ Hilbert tensor experiments where SSTT outperforms PSTT2. The paper suggests that the balance between memory and timing performance depends on the partitioning strategy.
  • Gaussian Mixture Model: While the TT-fADI algorithm shows promise, the paper notes that its performance can be affected by the complexity of evaluating tensor entries, as seen in the Gaussian mixture model experiment.
  • Future Work: The paper implicitly suggests further exploration of adaptive rank selection, optimizing communication strategies for various tensor sizes and dimensions, and applying these algorithms to real-world scientific problems. The development of more robust and efficient sketching techniques for higher dimensions is also a potential avenue.

Summary updated

BibTeX
@article{shi2023parallel,
  author = {Tianyi Shi and Maximilian Ruth and Alex Townsend},
  title = {{Parallel Algorithms for Computing the Tensor-Train Decomposition}},
  journal = {SIAM J. Sci. Comput.},
  year = {2023},
  doi = {10.1137/21m146079x},
}
Figure