TL;DR
This paper introduces a novel storage and computation scheme called Blocked Compact Symmetric Storage (BCSS) to efficiently handle symmetric tensors. By storing only unique blocks of symmetric tensors and employing block-based algorithms, the authors demonstrate significant reductions in both storage requirements (up to O(m!)) and computational cost (up to O(m)) for tensor operations, paving the way for more efficient multi-linear algebra libraries.
What Problem Does This Paper Address?
Tensors, or multi-dimensional arrays, are becoming increasingly important in various scientific and engineering fields. However, specialized libraries for high-performance tensor computations are still in their early stages. A key challenge is efficiently handling symmetric tensors, where entries are invariant under index permutations. While exploiting symmetry can drastically reduce storage and computation, it often conflicts with the need for simple and regular memory access patterns, which are crucial for high performance. This paper aims to bridge this gap by extending successful matrix computation techniques, like blocking and exploiting symmetry, to the domain of symmetric tensors.
Methods
The core contribution is the Blocked Compact Symmetric Storage (BCSS) scheme. Instead of storing all elements of a symmetric tensor, BCSS stores only the unique blocks of the tensor. This is analogous to storing only the upper or lower triangular part of a symmetric matrix, but generalized to higher-order tensors.
To complement this storage scheme, the authors propose algorithm-by-blocks approaches. These algorithms operate on the blocks of the tensor, treating them as fundamental units of data and computation. This mirrors successful strategies in dense linear algebra libraries like BLAS and LAPACK.
Key techniques include:
- Blocked Data Structures: Partitioning tensors into blocks and storing only unique blocks.
- Algorithm-by-Blocks: Reformulating tensor operations to work on these blocks.
- Exploiting Partial Symmetry: Further reducing computation by exploiting symmetry within temporary tensors generated during computations.
- Change-of-Basis Operation (sttsm): Using the
C := [A; X, ..., X]operation as a motivating example to illustrate the challenges and solutions.
Datasets
Not discussed in the paper. The authors focus on theoretical analysis and algorithmic development, using synthetic tensor operations for demonstration.
Key Insights and Ideas
- Symmetry is a Double-Edged Sword: While symmetry offers massive potential for savings, naive exploitation can lead to complex memory access patterns that hinder performance. BCSS aims to balance these.
- Blocking is Key: Extending the successful "algorithm-by-blocks" paradigm from matrix computations to tensors is crucial for managing complexity and achieving performance.
- Beyond Diagonal Blocks: For higher-order tensors, the concept of "upper triangular" extends to "upper hypertriangular" regions, and BCSS stores only blocks within this region.
- Partial Symmetry Matters: Even temporary tensors generated during computations can exhibit partial symmetry, which can be exploited for further computational and storage savings.
- Theoretical Guarantees: The paper provides theoretical analysis showing significant reductions in storage (O(m!)) and computation (O(m)) for symmetric tensors of order m.
Key Results
- Storage Reduction: BCSS can reduce storage requirements by a factor of O(m!) compared to storing dense tensors, especially for higher-order tensors.
- Computational Reduction: The proposed algorithms can reduce computational requirements by a factor of O(m) for the sttsm operation.
- Practical Implementation: An implementation demonstrates that the complexity introduced by BCSS is manageable and that preliminary results show reduced computational times.
- Performance Crossover: Experimental results indicate that BCSS begins to outperform dense algorithms for tensor orders greater than or equal to 4, especially for larger problem sizes.
- Block Size Trade-off: There's a trade-off in choosing the block size; very small blocks can increase permutation overhead, while very large blocks reduce the benefits of blocking.
Limitations and Future Work
- Permutation Overhead: A significant portion of the computational cost in the current implementation comes from permutations required to align data for BLAS calls. Optimizing these permutations or avoiding them entirely is a major area for future research.
- Meta-data Storage: While BCSS reduces tensor element storage, the meta-data required to manage blocks can add to memory requirements. The paper discusses strategies to mitigate this.
- Numerical Stability: The paper acknowledges that exploiting partial symmetry might introduce minor numerical asymmetry in blocks, which could affect subsequent operations. A post-processing step can correct this.
- Generalizing FLAME: Extending the FLAME methodology for deriving matrix algorithms to multi-linear operations is a promising direction.
- Multithreaded and Distributed Implementations: The authors suggest exploring multithreaded parallelism and distributed memory implementations.
- Optimized Kernels: Developing specialized kernels for tensor operations, similar to how dgemm is optimized, could further boost performance.
Summary updated