Abstract
Nonnegative matrix factorization (NMF) has been widely used to learn low-dimensional representations of data. However, NMF pays the same attention to all attributes of a data point, which inevitably leads to inaccurate representation. For example, in a human-face data set, if an image contains a hat on the head, the hat should be removed or the importance of its corresponding attributes should be decreased during matrix factorizing. This paper proposes a new type of NMF called entropy weighted NMF (EWNMF), which uses an optimizable weight for each attribute of each data point to emphasize their importance. This process is achieved by adding an entropy regularizer to the cost function and then using the Lagrange multiplier method to solve the problem. Experimental results with several data sets demonstrate the feasibility and effectiveness of the proposed method. Code is available at: https://github.com/Poisson-EM/Entropy-weighted-NMF.
Introduction
Nonnegative Matrix Factorization (NMF) is a fundamental technique in machine learning for dimensionality reduction and clustering, prized for its ability to produce "parts-based" representations. By decomposing a data matrix into two non-negative matrices—a basis matrix and a representation matrix—NMF allows for an intuitive understanding of complex data, such as facial features or document topics.
However, standard NMF algorithms suffer from a significant limitation: they treat every feature in a dataset with equal importance. In real-world scenarios, datasets are often plagued by noise, outliers, or irrelevant attributes. For instance, in a facial image dataset, a subject wearing a hat introduces features that are irrelevant to the core task of face representation. Standard NMF attempts to reconstruct these irrelevant features with the same fidelity as essential ones, leading to corrupted basis vectors and inaccurate low-dimensional representations. While Weighted NMF exists to mitigate this, it typically requires pre-defined weights, which is impractical for large-scale, unsupervised learning tasks.
The EWNMF Framework
To overcome these challenges, this paper introduces Entropy Weighted NMF (EWNMF). The core innovation is the integration of an optimizable weight matrix, $T$, directly into the NMF objective function. This allows the model to automatically learn the relevance of each attribute during the factorization process.
Objective Function and Regularization
The EWNMF objective function minimizes a weighted Euclidean distance between the original data $X$ and the reconstruction $WH$:
$$\min_{W,H,T} \sum_{i,j} T_{ij} [X_{ij} - (WH)_{ij}]^2 + \gamma \sum_{i,j} T_{ij} \ln T_{ij}$$
Without regularization, the model would likely assign a weight of 1 to the easiest attribute to reconstruct and 0 to all others—a "winner-take-all" scenario. To prevent this, the authors introduce an entropy regularizer ($\gamma \sum T_{ij} \ln T_{ij}$). This term encourages a smoother distribution of weights, effectively acting as a probability distribution over feature importance. The parameter $\gamma$ controls the trade-off between reconstruction accuracy and weight sparsity.
Optimization
The problem is solved using an alternating minimization strategy. The authors derive a closed-form update for the weight matrix $T$ using the Lagrange multiplier method, resulting in a distribution similar to the Softmax function. The basis matrix $W$ and representation matrix $H$ are then updated using modified multiplicative update rules that incorporate the learned weights.
Experimental Evaluation
The performance of EWNMF was evaluated against several state-of-the-art NMF variants, including ONMF, Semi-NMF, and Convex-NMF, across five diverse public datasets: Yale, UMISTface, Caltech101, GTFD, and TDT2. These datasets cover a range of challenges, from varying facial expressions to cluttered backgrounds and text-based corpora.
Key Results
EWNMF consistently outperformed competing methods in clustering tasks, demonstrating superior robustness and representational power:
- Clustering Accuracy (ACC): On the Yale face dataset, EWNMF achieved an accuracy of 46.06%, significantly higher than standard NMF's 39.03%. The improvement was even more pronounced on the UMISTface dataset, where EWNMF reached 64.05% compared to 51.06% for NMF.
- Normalized Mutual Information (NMI): EWNMF showed consistently higher NMI scores across all datasets, indicating that its learned features are more representative of the underlying ground-truth categories.
As shown in the sensitivity analysis, the performance of EWNMF is influenced by the hyperparameter $\gamma$. While there is a stable range where EWNMF significantly outperforms standard NMF (represented by the dashed line), selecting an optimal $\gamma$ is crucial for maximizing accuracy and mutual information.
Conclusion
EWNMF represents a significant advancement in parts-based data representation by introducing automatic, entropy-based feature weighting. By mimicking human perception—focusing on defining characteristics while ignoring noise—EWNMF provides a more robust framework for dimensionality reduction and clustering. Future work will focus on developing auto-adjustment strategies for the $\gamma$ parameter to eliminate the need for manual hyperparameter tuning and exploring ways to improve the spatial locality of the learned basis features.
Summary updated