Model order selection for boolean matrix factorization

Pauli Miettinen, Jilles Vreeken

Introduction

Boolean Matrix Factorization (BMF) is a powerful tool for discovering latent structure in binary datasets, such as customer purchase histories or species occurrence maps. By decomposing a binary matrix into two smaller binary factor matrices, BMF provides highly interpretable and sparse representations. However, a persistent challenge in BMF is "model order selection"—determining the optimal number of factors ($k$). Selecting too few factors results in missing significant patterns, while selecting too many leads to "modeling the noise."

The MDL Principle for BMF

This paper proposes a principled approach to model order selection based on the Minimum Description Length (MDL) principle. MDL treats data mining as a compression task: the best model is the one that minimizes the total number of bits required to describe both the model itself and the reconstruction errors.

The authors implement a two-part MDL scheme where the total cost is defined as $L(Model) + L(Data | Model)$. A critical innovation is the use of Typed XOR encoding for the error matrix. By separately encoding false positives and false negatives, the method achieves tighter compression and more accurate selection of $k$ than naive error-encoding strategies.

MDL cost function for the Paleo dataset, showing a clear minimum at $k=19$.

As shown in the Paleo dataset analysis (Figure 6), the MDL cost function typically exhibits a "near-convex" shape. This property allows for efficient greedy search algorithms, such as the Asso algorithm, to automatically terminate when adding a new factor no longer reduces the total description length.

Experimental Evaluation

The proposed method was evaluated against synthetic data and several real-world datasets. In synthetic tests with varying levels of additive noise, the MDL approach demonstrated superior robustness compared to traditional methods like cross-validation.

Estimated model order on synthetic data with varying noise levels. The horizontal line indicates the true number of planted factors (10).

As illustrated in Figure 1, the MDL-based selection (darker bars) remains close to the true model order ($k=10$) even as noise increases. Notably, at high noise levels (25%), the method tends to underestimate the number of factors rather than overfitting to the noise—a desirable property for robust data mining. In contrast, alternative methods (lighter bars) consistently overestimate the model order, often suggesting nearly full-rank decompositions.

Key Insights

  • Cross-Validation Limitations: The study highlights that 10-fold cross-validation often fails for BMF because generalizing factors to held-out data is an NP-hard problem, leading to consistent overestimation of $k$.
  • Parameter Automation: Beyond selecting $k$, the MDL framework successfully automates the selection of other hyperparameters, such as the rounding threshold ($t$) in the Asso algorithm.
  • Interpretability: On real-world data like the DBLP dataset, the method identified a small number of factors ($k=4$) that corresponded directly to major computer science sub-fields, demonstrating that MDL-selected orders align with meaningful semantic structures.

Conclusion

By framing model selection as a compression problem, this work provides a robust, parameter-free method for determining the number of factors in Boolean Matrix Factorization. The approach effectively separates signal from noise, providing researchers with a reliable way to extract interpretable latent structures from complex binary data.

Summary updated

BibTeX
@inproceedings{miettinen2011model,
  author = {Pauli Miettinen and Jilles Vreeken},
  title = {{Model order selection for boolean matrix factorization}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2011},
  doi = {10.1145/2020408.2020424},
}
Figure