Large-scale distributed non-negative sparse coding and sparse dictionary learning

Vikas Sindhwani, Amol GhotingKDD 2012

Abstract

We consider the problem of building compact, unsupervised representations of large, high-dimensional, non-negative data using sparse coding and dictionary learning schemes, with an emphasis on executing the algorithm in a Map-Reduce environment. The proposed algorithms may be seen as parallel optimization procedures for constructing sparse non-negative factorizations of large, sparse matrices. Our approach alternates between a parallel sparse coding phase implemented using greedy or convex ($l_1$) regularized risk minimization procedures, and a sequential dictionary learning phase where we solve a set of $l_0$ optimization problems exactly. These two-fold sparsity constraints lead to better statistical performance on text analysis tasks and at the same time make it possible to implement each iteration in a single Map-Reduce job. We detail our implementations and optimizations that lead to the ability to factor matrices with more than 100 million rows and billions of non-zero entries in just a few hours on a small commodity cluster.

Introduction

In the era of web-scale data, extracting structured information from massive, high-dimensional datasets is a critical challenge. Dictionary Learning is a powerful technique for finding "atoms" (e.g., core topics in a text corpus) that can represent data points compactly. However, traditional algorithms often struggle with two main issues: scalability in distributed environments like Hadoop and the interpretability of the resulting representations. Standard Non-negative Matrix Factorization (NMF) often produces dense topics that are hard to interpret and memory-intensive to store. This paper addresses these gaps by introducing a distributed framework that enforces "double sparsity"—sparsity on both the data representations and the dictionary atoms themselves.

Methodology

The proposed framework alternates between two main phases: Parallel Sparse Coding and Sequential Dictionary Learning.

Map-Reduce Architecture

To minimize I/O overhead and avoid massive data shuffles, the algorithm is designed so that each iteration requires only a single Map-Reduce job. Mappers perform the sparse coding and compute summary statistics ($W^TW$ and $X^TW$), which are then aggregated by Reducers. The final dictionary update is performed on a central control node using these compact statistics.

The Map-Reduce workflow for distributed sparse dictionary learning, illustrating the randomization, blocking, and sparse coding phases.

Optimization Phases

  1. Parallel Sparse Coding: For a fixed dictionary, the algorithm finds the best sparse representation for each data point. This is implemented via NOMP (Non-negative Orthogonal Matching Pursuit) for speed or NLASSO (Non-negative Lasso) for convex optimization with warm starts.
  2. Sequential Dictionary Learning: Dictionary atoms are updated individually under a hard $l_0$ sparsity constraint, limiting each topic to exactly $\nu$ words. This transforms the update into a simple "top-$\nu$" selection problem that can be solved efficiently in memory.

Experimental Evaluation

The system was evaluated on datasets ranging from the 20 Newsgroups corpus to an extended Pubmed corpus containing 106 million documents and over 6 billion non-zero entries.

Statistical Performance and Sparsity

Imposing sparsity on dictionary atoms is not merely a computational optimization; it also serves as a statistical prior. For text analysis, meaningful topics should only have support on a small, distinctive set of words. Experimental results show that sparse dictionaries improve clustering and classification performance compared to standard dense NMF.

Impact of dictionary sparsity (W-density) on performance metrics including Normalized Mutual Information and Classification Accuracy.

Scalability and Convergence

On the 106M document Pubmed dataset, the system converged in less than 10 hours using a small 12-node cluster. This performance is highly competitive with state-of-the-art LDA implementations that often require significantly more hardware resources. Furthermore, the implementation demonstrated near-linear speedups on multicore systems, achieving up to 5.2x speedup on a 6-core machine.

Conclusion

By combining double sparsity constraints with a Map-Reduce-optimized architecture, this framework enables the factorization of massive matrices on commodity hardware. While challenges such as parameter sensitivity and Hadoop startup overhead remain, the approach demonstrates that sparse dictionary learning is a highly effective and scalable tool for web-scale data analysis.

Summary updated

BibTeX
@inproceedings{sindhwani2012large,
  author = {Vikas Sindhwani and Amol Ghoting},
  title = {{Large-scale distributed non-negative sparse coding and sparse dictionary learning}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2012},
  url = {https://openreview.net/forum?id=B1eToNW_-B},
}
Figure