Abstract
Guided Semi-Supervised Non-negative Matrix Factorization (GSSNMF) is a novel hybrid framework designed for simultaneous document classification and topic modeling. While standard Non-negative Matrix Factorization (NMF) often produces redundant topics and semi-supervised variants can fall into "majority class traps," GSSNMF leverages dual supervision—document labels and expert-curated seed words—to enhance both topic coherence and classification accuracy. Testing on a legal corpus from the California Innocence Project (CIP) demonstrates that GSSNMF significantly outperforms existing NMF methods, particularly in identifying minority classes within imbalanced datasets, achieving a Macro-F1 score of 0.72.
Introduction
Non-negative Matrix Factorization (NMF) is a fundamental tool in data science for uncovering latent themes within massive text datasets. However, unsupervised NMF often fails to capture subtle trends or generates redundant topics. To address these issues, researchers have developed Semi-Supervised NMF (SSNMF), which utilizes document labels, and Guided NMF, which uses user-defined "seed words" to nudge the model toward specific topics.
Despite their individual successes, no single method previously integrated both forms of supervision effectively. This paper introduces GSSNMF, a unified framework that bridges this gap. By combining labels and seed words, GSSNMF avoids the common pitfalls of its predecessors, such as the tendency of semi-supervised models to ignore rare but important categories in favor of dominant classes.
Methodology
The GSSNMF framework is built upon a unified objective function that minimizes three distinct components:
- Classical NMF Reconstruction: The standard error in reconstructing the original data matrix.
- Guiding Term: A penalty for topics that deviate from user-provided seed words, controlled by a parameter $\lambda$.
- Label Information Term: A penalty for classification errors based on known document labels, weighted by a parameter $\mu$.
To optimize this function, the authors derived a set of multiplicative update rules. These rules iteratively refine the dictionary matrix (topics), the coding matrix (document-topic relevance), and the supervision matrices. This iterative process ensures that the resulting topics are mathematically optimal while remaining aligned with human expertise and ground-truth categories.
Experimental Results
The model was evaluated using a real-world legal dataset consisting of 203 Appellant’s Opening Briefs (AOBs) from the California Innocence Project. These documents were labeled across 13 crime categories, including murder, robbery, and sexual assault. The text was preprocessed using standard NLP techniques and converted into a corpus matrix using tf-idf.
Performance was measured using the Macro-F1 score for classification and the $C$ coherence score for topic quality. GSSNMF demonstrated a clear advantage over standard SSNMF across various hyperparameter settings.
As shown in the heatmaps above, GSSNMF (c) achieved a Macro-F1 score of up to 0.72, significantly higher than the 0.63–0.66 range observed for SSNMF (a). This improvement highlights the power of seed words in refining multi-label classification tasks.
Discussion: Overcoming Classification Bias
A significant challenge in the CIP dataset is the dominance of the "murder" label. Standard semi-supervised models often fall into a "majority class trap," where they achieve high raw accuracy by classifying almost every document as the dominant class. GSSNMF uses seed words to "anchor" the model, forcing it to recognize minority classes like "vandalism" or "stalking."
Visualizing the classification results reveals that while SSNMF (a) is often sparse or overly biased toward dominant categories, GSSNMF (c) provides a more comprehensive and accurate mapping across the 13 crime types. Furthermore, GSSNMF maintains high interpretability; the dictionary matrix directly reveals the specific legal terms defining each topic, such as "gang, member, crip" for gang-related crimes.
Conclusion
GSSNMF represents a significant step forward in integrating human expertise with automated document analysis. By combining labels and seed words, it produces more coherent topics and more accurate classifications than previous NMF variants. Future work will explore the use of alternative distance measures, such as Kullback–Leibler divergence, and investigate methods for automated hyperparameter tuning to enhance the model's scalability and ease of use.
Summary updated