Matrix factorization with binary components

Martin Slawski, Matthias Hein, Pavlo Lutsik

Matrix factorization is a workhorse of modern data science, powering everything from recommendation engines to gene expression analysis. But what happens when your underlying "basis elements" aren't smooth gradients, but hard "on/off" switches?

In their paper "Matrix factorization with binary components," Martin Slawski and colleagues tackle the computationally daunting task of factorizing a matrix when one of its factors is strictly binary. They move past the usual "cross-your-fingers" heuristics to provide an algorithm with actual theoretical guarantees.

TL;DR

The authors present a novel algorithm for low-rank matrix factorization where one factor is constrained to be binary ($\lbrace0, 1\rbrace$). By leveraging geometric insights and combinatorial theory, they provide a method that provably recovers the underlying factors and scales linearly with data size, making it uniquely suited for high-dimensional biological applications.

What Problem Does This Paper Address?

Standard matrix factorization (like SVD or NMF) decomposes a data matrix $D$ into two factors, $T$ and $A$. Usually, these factors are real-valued. However, in many fields—like wireless communication, network inference, or computational biology—the latent factors are naturally binary. For example, a gene is either regulated by a transcription factor or it isn't; a DNA site is either methylated or it isn't.

The challenge is that adding a binary constraint to a non-convex problem makes it combinatorially explosive. If your data has $m$ dimensions and $r$ latent factors, there are $2^{m \cdot r}$ possible binary matrices to check. Traditional approaches rely on local search methods (like EM or MCMC) that frequently get stuck in local minima and offer no guarantee of finding the "true" underlying structure.

Methods

The authors’ core contribution is shifting the problem from a massive combinatorial search to a geometric one.

Geometric representation of data points lying in the affine hull of binary vertices
  1. The Affine Insight: They observe that if $D = TA$, then the columns of the data matrix $D$ must lie within the affine hull of the columns of the binary matrix $T$.
  2. Algorithm 1 (FINDVERTICES EXACT): Instead of searching through $2^m$ possible vertices of a high-dimensional hypercube, they show that you only need to check a much smaller subspace. Remarkably, they prove that the number of potential vertices to check can be reduced to $2^{r-1}$, where $r$ is the rank. Since $r$ is typically very small compared to the data dimension $m$, this makes the problem tractable.
  3. Littlewood-Offord Theory: To handle the "speed-up" and prove uniqueness, they use the Littlewood-Offord lemma from combinatorics. This allows them to show that for most random binary matrices, the factorization is unique and the search space can be pruned even further.
  4. Integer Linear Programming (ILP): For cases where $r$ is larger (up to $r=80$), they show the problem can be framed as a feasibility problem solvable by off-the-shelf ILP solvers like CPLEX.
  5. Handling Noise: They introduce Algorithm 3, which uses a truncated SVD and distance-based filtering to find binary components even when the data is contaminated with noise.

Datasets

The paper evaluates the approach on two fronts:

  • Synthetic Data: Matrices generated with Bernoulli-distributed binary factors and varying levels of Gaussian noise to test recovery limits and computational speed.
  • DNA Methylation Data: A real-world dataset consisting of 500 CpG sites across 12 blood samples. The goal was to "unmix" the samples to identify the methylation signatures of 4 major cell types (B-cells, T-cells, granulocytes, and monocytes).

Key Insights and Ideas

  • Rank over Dimension: The computational "curse" of the binary constraint depends on the rank ($r$), not the feature dimension ($m$). This is a massive win for "Big Data" where we have thousands of features but only a few dozen underlying processes.
  • Uniqueness is the Norm: Using combinatorial probability, the authors show that as the dimension $m$ grows, the probability that a random binary factorization is unique approaches 1. This provides a theoretical safety net for researchers.
  • Geometry as a Filter: By treating the problem as finding which vertices of a hypercube intersect a specific low-dimensional slice, they bypass the need for traditional gradient-based optimization which struggles with discrete constraints.

Key Results

  • Provable Recovery: In the exact (noise-free) case, the algorithm is guaranteed to recover the true $T$ and $A$.
  • Efficiency: The algorithm scales linearly in $m$ (number of features) and $n$ (number of samples).
  • Superiority over Heuristics: In noisy synthetic tests, the "FindVertices" approach significantly outperformed standard "box" relaxations and quadratic penalty methods, especially as the noise level increased.
RMSE comparison showing FindVertices outperforming standard heuristics under noise
  • Biological Accuracy: On the DNA methylation dataset, the algorithm correctly identified the four cell types and their proportions with 96% agreement compared to the ground truth. It also correctly suggested that $r=4$ was the optimal number of components by looking at the error curve.

Limitations and Future Work

  • The Exponential Wall: While the algorithm is linear in $m$, it is still exponential in $r$. For problems where the latent rank is very high (e.g., $r > 100$), the $2^{r-1}$ search space remains a bottleneck, though the ILP approach mitigates this somewhat.
  • Sum-to-One Constraint: The current "exact" derivation assumes the columns of $A$ sum to one (affine combinations). While the authors mention this can be generalized, the most elegant parts of the proof rely on this structure.
  • Future Directions: The authors suggest exploring more sophisticated pruning techniques for the candidate vertex pool and extending the robustness of the approximate algorithm to non-Gaussian noise distributions.

Summary updated

BibTeX
@inproceedings{slawski2013matrix,
  author = {Martin Slawski and Matthias Hein and Pavlo Lutsik},
  title = {{Matrix factorization with binary components}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2013},
  url = {https://openreview.net/forum?id=HkZUq_ZdbS},
}
Figure