Preliminary versions of the MATLAB tensor classes for fast algorithm prototyping.

Brett W. Bader, Tamara G. Kolda

TL;DR

This paper introduces a set of MATLAB classes designed to simplify and accelerate the prototyping of algorithms that operate on tensors (multidimensional arrays). By providing a user-friendly interface for tensor manipulation, these classes aim to make tensor-based computations more accessible to researchers and engineers.

What Problem Does This Paper Address?

Working with multidimensional arrays, or tensors, can be cumbersome in standard programming environments. Traditional array manipulation tools often lack the specialized functions needed for efficient tensor operations, leading to complex and error-prone code. This paper addresses the challenge of developing and testing new algorithms that rely on tensor representations by providing a dedicated, object-oriented toolkit in MATLAB. The goal is to bridge the gap between theoretical tensor concepts and practical implementation, enabling faster development cycles for tensor-based research.

Methods

The core contribution of this paper is the development of three MATLAB classes: tensor, cp_tensor, and tucker_tensor. These classes encapsulate different tensor representations and provide overloaded operators and methods to mimic standard MATLAB array operations (e.g., addition, subtraction, element-wise multiplication, logical operations) while handling the complexities of multidimensional data. The tensor class represents a dense, multidimensional array, while cp_tensor and tucker_tensor implement compressed tensor formats (CANDECOMP/PARAFAC and Tucker decomposition, respectively). This object-oriented approach allows users to write code that looks similar to standard MATLAB array operations but operates on tensors, abstracting away the underlying data management and algorithmic details.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • Abstraction for Tensor Operations: The primary insight is that by creating dedicated MATLAB classes, complex tensor operations can be made to look and feel like standard array operations, significantly lowering the barrier to entry for tensor algorithm development.
  • Support for Multiple Tensor Formats: The inclusion of dense (tensor), CP (cp_tensor), and Tucker (tucker_tensor) formats provides flexibility for users to choose the most appropriate representation for their problem, balancing memory efficiency with computational ease.
  • Focus on Prototyping: The paper emphasizes that these are "preliminary versions" aimed at "fast algorithm prototyping." This suggests a focus on usability and rapid iteration rather than extreme performance optimization, which is often a trade-off in early-stage research.

Key Results

The paper's main result is the provision of a functional MATLAB toolbox for tensor manipulation. It details the implementation of various standard MATLAB operators and functions (e.g., +, -, .*, &, |, ~, ==, ~=, <, <=, >, >=, .*, ./, .^, *, \, /, permute, size, ndims, display, double, full, uminus, uplus, subsref, subsasgn) for each of the three tensor classes. The report serves as a supplementary document, with detailed usage instructions provided separately.

Limitations and Future Work

The paper explicitly states that these are "preliminary versions" and that "details on using this code are provided separately." This implies that the toolkit may not be fully optimized for performance and might have certain functionalities that are not yet implemented or are considered experimental. The authors do not explicitly detail future work in this supplementary report, but the nature of such a toolkit suggests ongoing development to expand functionality, improve performance, and potentially add support for other tensor decomposition formats or operations.

Summary updated

Abstract

We present the source code for three MATLAB classes for manipulating tensors in order to allow fast algorithm prototyping. A tensor is a multidimensional or Nway array. This is a supplementary report; details on using this code are provided separately in SAND-XXXX.
BibTeX
@misc{bader2004preliminary,
  author = {Brett W. Bader and Tamara G. Kolda},
  title = {{Preliminary versions of the MATLAB tensor classes for fast algorithm prototyping.}},
  year = {2004},
  doi = {10.2172/974867},
}
Figure