FRAPPE: $\underline{\text{F}}$ast $\underline{\text{Ra}}$nk $\underline{\text{App}}$roximation with $\underline{\text{E}}$xplainable Features for Tensors

William Shiao, Evangelos E. Papalexakis

TL;DR

FRAPPE is a novel, self-supervised method for estimating the canonical rank of a tensor—a notoriously difficult and computationally expensive task—without ever having to compute the actual decomposition. By training a "disposable" regression model on synthetic data tailored to the specific size and sparsity of an input tensor, FRAPPE achieves a 24x speedup over state-of-the-art baselines while maintaining or improving accuracy.

What Problem Does This Paper Address?

In the world of multidimensional data analysis, tensors are the standard for representing complex relationships. The CANDECOMP/PARAFAC decomposition (CPD) is a popular tool for breaking these tensors down into interpretable components. However, CPD has a "Goldilocks" problem: you must specify the number of components ($R$), known as the canonical rank.

If $R$ is too low, you miss key information; if it’s too high, you start modeling noise. Finding the exact rank is NP-hard, and current state-of-the-art methods rely on "brute-force" heuristics—repeatedly calculating the expensive CPD for every possible rank and checking which one fits best. For large datasets, this is computationally prohibitive. The authors of FRAPPE set out to find a way to estimate this rank quickly, accurately, and without the heavy lifting of full decompositions.

Methods

The core innovation of FRAPPE (Fast Rank Approximation with Explainable Features) is its self-supervised, single-use model approach. Instead of training one massive model to rule them all, FRAPPE generates a specialized training set for every new tensor it encounters.

The workflow, illustrated in the diagram below, follows these steps:

  1. Analyze the Input: It measures the dimensions and sparsity of the target tensor.
  2. Generate Synthetic Data: It creates a set of synthetic tensors that match the input's size and sparsity but have known ranks.
  3. Feature Extraction: It extracts 112 hand-picked, size-agnostic features from both the synthetic and target tensors. These include sparsity statistics, ranks of individual slices (calculated via SVD), and pairwise correlations between slices.
  4. Train & Predict: It trains a LightGBM regression model on the synthetic data and immediately uses it to predict the rank of the original input tensor. The model is then discarded.
Diagram of the FRAPPE workflow, showing the generation of synthetic data tailored to the input tensor to train a specialized regression model.

Datasets

The authors evaluated FRAPPE across three distinct categories:

  • Synthetic Tensors: Tensors generated with varying levels of noise and sparsity (sparse-noise, dense-noise, and fully dense) to test the model's robustness.
  • Real-world Tri-linear Datasets: Classic benchmarks like amino_acid, dorrit, and sugar (fluorescence spectroscopy data) where the ground-truth rank is known based on the number of chemical components.
  • Social/Graph Data: The enron email dataset and reality_mining dataset, where ranks are estimated based on previous manual literature analysis.
  • CNN Weights: The 4D weight tensor of the final layer of an AlexNet model, used to test rank estimation for neural network compression.

Key Insights and Ideas

  • Synthetic Data is "Cheap": The authors realized that while decomposing a tensor is hard, constructing one from known components is trivial. This allows for an infinite supply of labeled training data.
  • The Generalization Gap: A key "aha moment" was discovering that a general model trained on random synthetic data fails on real-world tensors. By tailoring the synthetic training data to mimic the specific input tensor's distribution (size and sparsity), they bridged this gap.
  • Correlation as a Proxy for Rank: The paper provides a theoretical proof that the pairwise correlation of vectors in a matrix (or slices in a tensor) is a strong indicator of rank. High correlation suggests fewer components are needed, leading to a lower canonical rank.
  • Explainability: Unlike Bayesian "black-box" methods, FRAPPE uses features that domain experts can understand. The authors found that slice correlation and thresholded non-zero counts were the most important predictors.

Key Results

FRAPPE significantly outperforms existing baselines in both efficiency and effectiveness. As shown in the comparison table below, it is the only method that avoids computing the CPD entirely.

Comparison table of FRAPPE against baseline methods like NORMO, ARD-Tucker, and AutoTen, highlighting its speed and ability to work without computing the CPD.
  • Speed: It is ~24x faster than the best-performing baseline (NORMO) and ~1.6x faster than the fastest baseline (AutoTen).
  • Accuracy: On synthetic data, it showed a 10% improvement in Mean Absolute Percentage Error (MAPE) over the best baseline.
  • Real-World Performance: It perfectly estimated the rank for all three fluorescence datasets, matching the performance of much slower Bayesian methods.
  • Deep Learning Compression: In the AlexNet weight compression task, FRAPPE identified a rank (40) that sat right at the "knee" of the accuracy-compression curve, whereas baselines predicted values that were either far too low (losing accuracy) or far too high (losing compression).

Limitations and Future Work

While highly effective for 3rd-order tensors, the authors note that higher-order tensors (4D+) require adjustments. Specifically, calculating the "rank of slices" for a 4D tensor involves finding the rank of 3D sub-tensors, which brings us back to the original NP-hard problem. Currently, they omit these specific features for 4D tensors, which works "fairly well" but leaves room for improvement.

Future research directions include refining features for higher-order tensors and exploring whether more complex synthetic data generation (beyond just matching size and sparsity) could further improve generalization for highly specialized domains.

Summary updated

BibTeX
@article{shiao2024frappe,
  author = {William Shiao and Evangelos E. Papalexakis},
  title = {{FRAPPE: $\textbackslash\{\}underline\{\textbackslash\{\}text\{F\}\}$ast $\textbackslash\{\}underline\{\textbackslash\{\}text\{Ra\}\}$nk $\textbackslash\{\}underline\{\textbackslash\{\}text\{App\}\}$roximation with $\textbackslash\{\}underline\{\textbackslash\{\}text\{E\}\}$xplainable Features for Tensors}},
  journal = {Data Min. Knowl. Discov.},
  year = {2024},
  doi = {10.1007/s10618-024-01071-6},
}
Figure