Matrix factorization with neural networks

Francesco Camilli, Marc Mézard

Matrix factorization is a cornerstone of modern data science, powering everything from Netflix recommendations to dictionary learning. But what happens when the number of features (the rank) grows as large as the number of data points? In a new paper, Francesco Camilli and Marc Mézard bridge the gap between statistical physics and machine learning to tackle this "extensive rank" regime using a technique they call decimation.

TL;DR

The authors introduce a "decimation" scheme that maps matrix factorization to neural network models of associative memory (like Hopfield networks). By iteratively retrieving and removing individual patterns from a noisy matrix, they show—both theoretically and numerically—that it is possible to factorize and denoise high-rank matrices more effectively than standard rotationally invariant methods.

What Problem Does This Paper Address?

The core task is simple: given a noisy matrix $Y$, can we recover the underlying factors $A$ and $B$ such that $Y \approx AB$?

Most existing research focuses on the "low-rank" or "spiked" regime, where the number of factors $P$ is small and fixed. However, many real-world problems involve an extensive rank, where $P$ scales linearly with the system size $N$ (i.e., $P/N = \alpha$). In this regime, the problem becomes significantly harder because the "signal" of any single factor is buried under the "interference" of all the others. Standard denoising tools, like Rotationally Invariant Estimators (RIEs), often fail to exploit specific structural knowledge about the factors, such as sparsity or binary constraints.

Methods

The authors propose a decimation scheme. Instead of trying to find all $P$ factors simultaneously, they find them one by one:

  1. Map to Associative Memory: They treat the search for a single factor (a "pattern") as finding the ground state of a neural network energy function. This function is remarkably similar to the energy used in Hopfield models for associative memory.
  2. Iterative Decimation: Once an estimate for one pattern is found, its contribution is subtracted (decimated) from the original matrix $Y$.
  3. Repeat: The process is repeated $P$ times.

To analyze this theoretically, they use the Replica Method from statistical physics. This allows them to predict the "phase diagram" of the system—identifying exactly when the noise is too high for the patterns to be retrieved. To validate the theory, they implement a "Ground State Oracle" using Simulated Annealing with restarts, which searches for the lowest energy state of the neural network.

Datasets

The paper relies on synthetic datasets to provide a controlled environment for theoretical validation:

  • Factors ($\xi$): Generated from a Bernoulli-Rademacher distribution, allowing the authors to tune the sparsity ($\rho$) of the patterns.
  • Noise ($Z$): Standard Gaussian noise added to the product of the factors.
  • Scale: Experiments were conducted with system sizes up to $N = 2000$.

Key Insights and Ideas

  • The Balancing Act of Noise: Decimation introduces a trade-off. As you remove patterns, the "interference noise" from other patterns decreases, but "decimation noise" (errors from imperfect previous steps) accumulates. The paper shows that if you start in a "retrieval phase," the reduction in interference usually wins out.
  • Sparsity is a Superpower: One of the most striking findings is how much sparsity helps. As the patterns become sparser, the "retrieval region" in the phase diagram expands significantly, making the system much more robust to noise.
  • Prior Knowledge Matters: Unlike standard spectral methods (like PCA) which only look at the eigenvalues of the matrix, this decimation approach uses the prior distribution of the factors. This is why it can outperform "optimal" rotationally invariant estimators.

Key Results

  • Theoretical Match: The numerical results from the Simulated Annealing algorithm closely match the theoretical predictions derived from the Replica Symmetric ansatz.
  • Superior Denoising: In head-to-head comparisons, the decimation-based denoiser achieved a significantly lower Mean Square Error (MSE) than RIEs, especially when the underlying factors were sparse (see Figure 3 in the paper).
  • Phase Transitions: The authors successfully mapped the boundaries between the "Retrieval" phase (where factorization is possible), the "Metastable" phase, and the "Spin Glass" phase (where the signal is lost).

Limitations and Future Work

The primary limitation is computational complexity. The "oracle" used in this paper (Simulated Annealing) is an exponential-time algorithm. While it works for $N \approx 2000$, it won't scale to massive real-world datasets without a more efficient "searcher."

The authors suggest two main paths forward:

  1. Polynomial-Time Oracles: Developing algorithms like Approximate Message Passing (AMP) that can operate in this extensive rank regime.
  2. Asymmetric Matrices: Extending the framework from symmetric matrices ($Y = \xi\xi^T$) to the more general asymmetric case ($Y = AB$), which is common in most practical machine learning applications.

Summary updated

BibTeX
@inproceedings{camilli2023matrix,
  author = {Francesco Camilli and Marc Mézard},
  title = {{Matrix factorization with neural networks}},
  booktitle = {Physical},
  year = {2023},
  doi = {10.1103/physreve.107.064308},
}
Figure