Nonnegative matrix factorization with Wasserstein metric-based regularization for enhanced text embedding

PLoS One. 2024 Dec 5;19(12):e0314762. doi: 10.1371/journal.pone.0314762. eCollection 2024.

Abstract

Text embedding plays a crucial role in natural language processing (NLP). Among various approaches, nonnegative matrix factorization (NMF) is an effective method for this purpose. However, the standard NMF approach, fundamentally based on the bag-of-words model, fails to utilize the contextual information of documents and may result in a significant loss of semantics. To address this issue, we propose a new NMF scheme incorporating a regularization term based on the Wasserstein metric, which quantifies an approximation of a word-context matrix to leverage semantic information. Since the word-context matrix is typically symmetric and positive definite (SPD), the Wasserstein metric used in the regularization is related to a natural SPD manifold structure. We then build upon this manifold structure to integrate an explicit expression of the Wasserstein metric into the NMF framework. Additionally, we introduce modifications to the gradient computation to adapt three fundamental classes of numerical algorithms from ordinary NMF to tackle the Wasserstein-regularized NMF (NMF-WR) problem. To demonstrate the effectiveness of the NMF-WR model and the proposed algorithms, we conduct experiments on popular datasets, focusing on topic modeling and document clustering. The results indicate that the NMF-WR model exhibits superior performance compared to other conventional NMF models in processing text embeddings. These findings suggest that this novel NMF-WR framework not only enhances semantic representation but also underscores a commitment to the model's reliability and interpretability.

MeSH terms

  • Algorithms*
  • Humans
  • Natural Language Processing*
  • Semantics*

Grants and funding

Yibin University Social Science Project No. 2022PY02 Project of Sichuan Provincial Innovation Nature of Science and Technology No. 2021ZFSF011/001 The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.