Learning Predictors from Multidimensional Data with Tensor Factorizations

Soo Min Kwon, Anand D. SarwateAresty 2021

Abstract: Statistical machine learning algorithms often involve learning a linear relationship between dependent and independent variables. This relationship is modeled as a vector of numerical values, commonly referred to as weights or predictors. These weights allow us to make predictions, and the quality of these weights influence the accuracy of our predictions. However, when the dependent variable inherently possesses a more complex, multidimensional structure, it becomes increasingly difficult to model the relationship with a vector. In this paper, we address this issue by investigating machine learning classification algorithms with multidimensional (tensor) structure. By imposing tensor factorizations on the predictors, we can better model the relationship, as the predictors would take the form of the data in question. We empirically show that our approach works more efficiently than the traditional machine learning method when the data possesses both an exact and an approximate tensor structure. Additionally, we show that estimating predictors with these factorizations also allow us to solve for fewer parameters, making computation more feasible for multidimensional data.

Introduction

Traditional machine learning typically relies on learning linear relationships between variables, represented as a vector of weights. While effective for simple data, this approach struggles when the data possesses an inherent multidimensional structure, such as in 3D medical imaging, video sequences, or multi-way relational data. This paper investigates classification algorithms that leverage tensor structures to better model these complex relationships, moving beyond the limitations of standard vector-based predictors.

The Problem: Structural Loss and Parameter Explosion

Most classical machine learning algorithms, like Support Vector Machines (SVM) and Logistic Regression, are designed for vector spaces. To apply them to multidimensional data, a common practice is "vectorization"—the process of flattening a multi-way array into a single long string of numbers.

Comparison between a 2D matrix and a 3D tensor.

As illustrated in Figure 4, data can naturally exist in higher dimensions (e.g., adding a 'Time' dimension to a User-Movie matrix). Flattening this data into a vector, as shown in Figure 6, leads to two critical issues:

  1. Structural Loss: Flattening destroys the spatial and structural relationships inherent in the data. For example, it obscures which pixels are neighbors in an image or which time steps are adjacent in a sequence.
  2. Parameter Explosion: In high dimensions, the number of weights required to learn becomes computationally prohibitive and prone to overfitting. For a modest $128 \times 128 \times 128$ medical image, vectorization requires solving for over 2 million coefficients, making computation slow and demanding massive amounts of training data.
The process of naive vectorization.

Proposed Methodology: CP-Structured Classifiers

To address these limitations, the authors introduce "CP-SVM" and "CP-LOGIT." These models reformulate standard classifiers to admit a tensor structure for their predictors (weights) using CP (CANDECOMP/PARAFAC) decomposition.

Instead of learning a massive weight vector $w$, the authors represent the weights as a tensor approximated by the sum of rank-one tensors (outer products of vectors). This approach acts as a powerful regularizer by forcing the model to learn a low-rank predictor. By baking this "structural prior" into the model, the algorithms can ignore noise and focus on the essential multidimensional patterns.

Because the resulting optimization problem is non-convex, the authors utilize an alternating minimization (block relaxation) algorithm. This approach updates one component of the tensor factorization at a time while keeping the others fixed, effectively transforming a complex problem into a series of simpler, convex sub-problems.

Experimental Evaluation

The authors evaluated their models using two types of data:

  • Synthetic Data: They generated $15 \times 15$ images featuring "cross" and "square" patterns to serve as the "true" weights. This allowed them to measure exactly how well the algorithms could reconstruct a known signal from noisy samples.
  • MNIST Database: A standard benchmark of handwritten digits. Specifically, they used the digit "1" to test how the models handle "approximate" low-rank structures found in real-world data.

Key Results and Insights

The study revealed several significant advantages of the tensor-based approach:

  • Massive Parameter Reduction: The advantage of tensor structures grows exponentially with dimensionality. For a $5 \times 5 \times 5$ data sample, a traditional model learns 125 coefficients, whereas a CP-structured model with rank $R=3$ only needs to solve for 45.
  • Superior Reconstruction: In synthetic tests, the CP-structured models reconstructed the "true" weight patterns much more clearly than traditional vector-based models, especially at smaller sample sizes ($n=500$).
  • MNIST Performance: For the MNIST "1" digit, CP-SVM (Rank 2) and CP-LOGIT (Rank 2) achieved the best performance across all metrics, including Mean Squared Error (MSE) and Cosine Distance.
  • Convergence and Efficiency: The CP-structured models reached high classification accuracy and high cosine similarity to the true signal much faster than traditional methods as the number of training samples increased.

Conclusion and Future Work

By preserving the multidimensional structure of data through tensor factorizations, the proposed models offer a more efficient and accurate alternative to traditional vectorization. While the current study focuses on linear relationships and acknowledges challenges with non-convexity, it demonstrates that low-rank priors are highly effective for multidimensional signals. Future work may explore integrating tensor decompositions into Deep Learning architectures to handle non-linear relationships, potentially overcoming the parameter explosion issues currently faced by large-scale neural networks.

Summary updated

BibTeX
@inproceedings{kwon2021learning,
  author = {Soo Min Kwon and Anand D. Sarwate},
  title = {{Learning Predictors from Multidimensional Data with Tensor Factorizations}},
  booktitle = {Aresty},
  year = {2021},
  doi = {10.14713/arestyrurj.v1i3.165},
}
Figure