The Hadamard decomposition problem

Martino Ciaperoni, Aristides Gionis, Heikki MannilaData Min. Knowl. Discov 2024 · DOI

Abstract

Matrix decomposition is a cornerstone of dimensionality reduction, traditionally dominated by additive models like Singular Value Decomposition (SVD). However, many real-world datasets exhibit multiplicative or conjunctive structures that additive models struggle to represent efficiently. This paper introduces the Hadamard decomposition problem, which factorizes a matrix into the element-wise (Hadamard) product of two or more low-rank matrices. By exploiting the property that the Hadamard product of rank-$h$ matrices can reach rank $h^2$, this method achieves superior approximation accuracy for high-rank data with fewer parameters than SVD.

Introduction: Beyond Additive Structures

In data science, SVD is the standard for decomposing a matrix into a sum of rank-1 components. While effective, SVD assumes that data is built through addition. In contrast, many natural phenomena are inherently multiplicative—often described as "logical AND" relationships. For instance, in ecology, a species' presence might require both suitable temperature and adequate rainfall. In recommender systems, a user's preference might depend on a movie having both a specific genre and a preferred lead actor. For such datasets, additive models are inherently inefficient.

Methodology

The authors define the Hadamard decomposition as finding matrices $A_1, B_1, A_2, B_2$ such that a target matrix $D$ is approximated by the element-wise product of two low-rank factors: $D \approx (A_1 B_1) \odot (A_2 B_2)$.

Hadamard product of low-rank matrices creating high-rank structures.

Key Innovations

  1. Rank Amplification: The rank of a sum is at most the sum of the ranks. However, the Hadamard product of two rank-$h$ matrices can have a rank as high as $h^2$. This allows for the representation of complex, high-rank information using a fraction of the parameters required by SVD.
  2. Mixed Hadamard Decomposition: To provide flexibility, the authors introduced a mixed model that combines a standard rank-$t$ SVD component (additive) with a Hadamard component (multiplicative).
  3. Optimization via Scaled Gradient Descent: Since no closed-form solution exists, the authors developed an alternating gradient descent algorithm. A specialized "scaling factor" ensures faster convergence and avoids the vanishing gradients typical of multiplicative models.
  4. The $\gamma$ Metric: The authors derived a predictive metric, the Relative Potential Hadamard Benefit ($\gamma$), based on a matrix's singular value spectrum. A high $\gamma$ indicates that a matrix has a "flat" spectrum, suggesting Hadamard decomposition will significantly outperform SVD.

Experimental Evaluation

The framework was tested across 30 datasets, including synthetic structures (banded, triangular), standard image benchmarks (Cameraman, Lena), social graphs, and large-scale collaborative filtering data (Netflix, MovieLens).

Performance in Image Compression

On image datasets, Hadamard decomposition demonstrated remarkable efficiency. Using the same number of basis vectors as SVD, the proposed method achieved a total sum of squared errors 43% lower than the additive baseline.

Reconstruction of a dog image using Hadamard decomposition.

Recommender Systems

In collaborative filtering, the "Hadamard-CF" model consistently outperformed "SVD-CF." On the Netflix dataset, the Root Mean Square Error (RMSE) dropped from 0.308 (SVD) to 0.247 (Hadamard), suggesting that multiplicative latent factors better capture the nuances of user preferences.

Discussion and Future Work

While powerful, Hadamard decomposition presents new challenges. Unlike SVD, the solution is non-unique, which can complicate the interpretation of individual factors. Furthermore, the iterative gradient-based optimization is more computationally intensive than the linear algebra routines used for SVD.

Future research directions include extending the framework to Boolean and non-negative matrix factorization, and investigating its utility as a feature extraction step for downstream tasks like clustering and classification. By shifting from an additive to a multiplicative paradigm, Hadamard decomposition offers a potent new tool for representing the complex "AND" logic found in real-world data.

Summary updated

BibTeX
@article{ciaperoni2024hadamard,
  author = {Martino Ciaperoni and Aristides Gionis and Heikki Mannila},
  title = {{The Hadamard decomposition problem}},
  journal = {Data Min. Knowl. Discov.},
  year = {2024},
  doi = {10.1007/s10618-024-01033-y},
}
Figure