Continuous Semi-Supervised Nonnegative Matrix Factorization

Michael R. Lindstrom, Xiaofu Ding, Feng Liu, Anand Somayajula, Deanna Needell · DOI

TL;DR

This paper introduces Continuous Semi-Supervised Nonnegative Matrix Factorization (CSSNMF), a method that simultaneously identifies latent topics in text while using those topics to predict a continuous numerical value (like a star rating). By baking the regression task directly into the topic discovery process, the model finds "predictive topics" that outperform standard two-step approaches while remaining human-interpretable.

What Problem Does This Paper Address?

In traditional natural language processing, Nonnegative Matrix Factorization (NMF) is a popular unsupervised tool for "topic modeling." It breaks down a massive pile of documents into a set of recurring themes (topics). However, if your goal is to predict something—say, the numerical rating of a product review—standard NMF is "blind" to that goal.

Usually, researchers use a two-step pipeline:

  1. Run NMF to find topics.
  2. Use those topics as features in a regression model.

The problem? The topics that are most mathematically prominent in the text might not be the ones that actually drive the rating. The authors address this by creating a "semi-supervised" framework where the regression error helps guide the topic discovery, ensuring the model finds themes that are both linguistically meaningful and statistically predictive.

Methods

The core innovation is a joint objective function. Instead of just minimizing the reconstruction error (how well the topics represent the original text), the authors add a weighted regression penalty:

$$F^{(\lambda)} = \text{NMF Error} + \lambda(\text{Regression Error})$$

  • The "Dial" ($\lambda$): This hyperparameter controls the trade-off. At $\lambda=0$, it’s just standard NMF. As $\lambda$ increases, the model cares more about predicting the response variable ($Y$) accurately.
  • The Algorithm: Since the variables are coupled, the authors use an Alternating Nonnegative Least Squares approach. The model iteratively updates three components:
  • $W$ (Document-Topic weights): How much of each topic is in each document.
  • $H$ (Topic-Word weights): Which words define each topic.
  • $\theta$ (Regression coefficients): How much each topic contributes to the final predicted score.
  • Normalization: They enforce a constraint where topics must sum to 1, ensuring the weights remain interpretable as probabilities or proportions.

Datasets

The authors evaluated CSSNMF using two distinct sources:

  1. Synthetic Datasets: They generated "fake" document-term matrices with known latent topics and added various types of noise (Gaussian and Uniform). This allowed them to prove that the algorithm could recover the "true" underlying structure.
  2. Rate My Professor (RMP): A real-world dataset consisting of student reviews. They pre-processed the text using TF-IDF and balanced the dataset to include an equal number of reviews across different rating intervals (1–5). The final corpus consisted of 228 documents and 1,635 unique words.

Key Insights and Ideas

  • The "Predictive Push": By including the regression error in the training loop, the model can "ignore" frequent but useless words and "focus" on words that correlate strongly with the response variable.
  • Monotonicity Proof: The authors mathematically prove that as you increase the importance of the regression task ($\lambda$), the training regression error is guaranteed to stay the same or decrease. In practice, they found it strictly decreases.
  • Interpretability vs. Accuracy: There is a "sweet spot" for $\lambda$. If $\lambda$ is too high, the model might overfit the ratings and produce "topics" that are just clusters of positive or negative words without much thematic coherence. If it's too low, you lose predictive power.
  • The Intercept Matters: By including a column of 1s in the weight matrix, the model accounts for a "baseline" rating (around 2.4 in the RMP data), allowing topics to either pull that rating up (positive sentiment) or push it down (negative sentiment).

Key Results

  • Performance Boost: On the Rate My Professor dataset, the CSSNMF model achieved a lower testing error than the standard unsupervised NMF-then-regression approach. The optimal balance was found at $\lambda \approx 0.215$.
  • Thematic Discovery: The model successfully identified 11 distinct topics.
  • Positive Topics: Included themes like "extra credit" (Topic 10) and "enjoyable class" (Topic 11).
  • Negative Topics: Included themes like "being unfair" (Topic 5) and "hard/failing students" (Topic 4).
  • Quantitative Nuance: The model revealed that "being a hard teacher" contributed more negatively to a professor's score than "student rants," providing a quantitative look at student sentiment.

Limitations and Future Work

  • Linearity: The current model assumes a linear relationship between topic presence and the response variable. The authors suggest that incorporating non-linearities (like neural network layers) could be a fruitful next step.
  • Hyperparameter Tuning: Choosing the "right" $\lambda$ remains a challenge. While the paper shows that higher $\lambda$ reduces training error, it can lead to overfitting on unseen data.
  • Local Optima: Like all NMF-based methods, the algorithm can get stuck in local minima depending on the random initialization. The authors recommend running the model multiple times with different starting points to find the best result.

Summary updated

BibTeX
@article{lindstrom2023continuous,
  author = {Michael R. Lindstrom and Xiaofu Ding and Feng Liu and Anand Somayajula and Deanna Needell},
  title = {{Continuous Semi-Supervised Nonnegative Matrix Factorization}},
  journal = {Algorithms},
  year = {2023},
  doi = {10.3390/a16040187},
}
Figure