Analysis of Legal Documents via Non-negative Matrix Factorization Methods

Ryan Budahazy, Lu Cheng, Yihuan Huang, Andrew Johnson, Pengyu Li, Joshua Vendrow, Zhoutong Wu, Denali Molitor, Elizaveta Rebrova, Deanna NeedellarXiv 2021

TL;DR

This paper applies various Non-negative Matrix Factorization (NMF) techniques to analyze legal documents from the California Innocence Project (CIP), aiming to help them process thousands of case files more efficiently. The research uncovers hidden semantic topics within these documents and explores their utility for classifying cases by crime type and decision status, offering a potential pathway to automate parts of the CIP's case review process.

What Problem Does This Paper Address?

The California Innocence Project (CIP) receives a massive volume of legal documents, including thousands of new requests for assistance and corresponding case files annually. Manually processing and classifying this information is a significant bottleneck for CIP officials. This paper addresses the challenge of extracting meaningful insights and structure from this unstructured text data to aid CIP in understanding existing cases and efficiently triaging new ones. The goal is to leverage topic modeling to uncover the semantic content of these legal documents, thereby improving the efficiency and effectiveness of CIP's operations.

Methods

The core of this research lies in applying and evaluating several variants of Non-negative Matrix Factorization (NMF) for topic modeling and classification. The paper details:

  • Classical NMF: A foundational technique for decomposing a data matrix into two lower-rank matrices, revealing latent topics and document representations.
  • Semantic NMF: An extension that incorporates word co-occurrence information to capture deeper semantic relationships, moving beyond simple "bag-of-words" representations.
  • Semantic NMF with Keyword Highlighting: A novel approach proposed by the authors, where specific "important" keywords are given higher weight during factorization to steer topic discovery towards pre-defined areas of interest for CIP.
  • Hierarchical NMF (HNMF): Both top-down and bottom-up variations are explored to uncover hierarchical structures within the data, allowing for analysis at different granularities of topics.
  • Supervised NMF (SNMF) and Semi-supervised NMF (SSNMF): These methods leverage known labels (crime type and decision type) to train models for predicting these labels on unseen data, enabling classification tasks.

The data pre-processing pipeline includes Optical Character Recognition (OCR) for handwritten documents, spellchecking, and TF-IDF (Term Frequency-Inverse Document Frequency) for vectorizing documents.

Datasets

The primary dataset used in this study is a collection of over 1,000 case files provided by the California Innocence Project (CIP). These files are in PDF format and contain various documents, including:

  • Initial Letters: Handwritten requests for assistance from inmates.
  • Appellant's Opening Briefs (AOBs): Legal documents arguing for innocence.
  • Questionnaires: Standardized forms used to collect basic case information, including crime type.

The paper focuses on analyzing initial letters and AOBs. For classification tasks, the dataset is labeled with "decision types" (e.g., Cases for Investigation, Cases to be Closed) and "crime types" (e.g., murder, assault, robbery).

Key Insights and Ideas

  • Topic Coherence: Across various NMF methods, consistent topics emerge related to seeking assistance, trial information, and evidence, reflecting the core nature of the documents.
  • Semantic NMF's Potential: While classical NMF provides a good starting point, Semantic NMF offers more nuanced topics, though sometimes they can be less interpretable due to word ambiguity.
  • Keyword Highlighting's Impact: The proposed "keyword highlighting" method for Semantic NMF significantly improves topic interpretability and relevance, allowing CIP officials to guide the analysis towards specific areas like physical evidence. This flexibility is a key advantage.
  • Hierarchical Structure: HNMF successfully reveals hierarchical relationships in the data, showing how broader topics can be broken down into more specific sub-topics, which can be useful for detailed case analysis.
  • Classification Accuracy: Supervised methods (SNMF) show promising accuracy in classifying crime types (around 92%) and decision types (around 65%), suggesting NMF can be a valuable tool for automating initial case triage.
  • Multilingual Data Challenge: The presence of Spanish words in some documents highlights a limitation in current NMF implementations and suggests a need for multilingual processing capabilities.

Key Results

  • Topic Discovery: The paper presents tables of top keywords for various topics discovered from initial letters and AOBs using different NMF variants. For instance, topics related to "trial," "evidence," and "seeking assistance" are consistently found in initial letters, while AOBs reveal topics related to "crime types" and "physical evidence."
  • Classification Accuracy:
    • Decision Type Classification: SNMF achieved an average LAS of 65%, while SSNMF achieved 55%. The authors note potential over-fitting in SSNMF due to a small training set.
  • Crime Type Classification: SNMF achieved an average LAS of 92%, and SSNMF achieved 91.8%. These high scores are noted to be potentially influenced by a bias towards "murder" in the dataset.
  • Qualitative Improvements: Semantic NMF with keyword highlighting was found to produce more specific and interpretable topics compared to standard Semantic NMF, particularly for AOBs, by focusing on evidence-related keywords.

Limitations and Future Work

  • Data Size and Bias: The authors acknowledge that the limited size of the dataset may lead to over-fitting issues, particularly for classification tasks. The crime type classification results might also be biased towards the dominant "murder" category.
  • Multilingual Data: The current NMF implementations struggle with multilingual documents (specifically Spanish in this case), leading to separate topics for Spanish words. Future work could involve applying multilingual embedding techniques (like MUSE) or developing pipelines for specific languages.
  • Interpretability of Semantic NMF: While Semantic NMF offers deeper insights, its topics can sometimes be ambiguous or overlapping. Keyword highlighting helps, but further refinement might be needed.
  • NMF Rank Selection: The choice of the number of topics (rank) is currently experimental. Future work could explore more systematic methods for rank selection.
  • Human Judgment: The paper emphasizes that NMF is a tool to assist decision-making, not replace human judgment. The complexity of legal decision-making may not be fully captured by NMF alone.
  • Future Directions:
    • Applying NMF to larger datasets to mitigate over-fitting and improve generalization.
  • Developing more robust methods for handling multilingual text.
  • Exploring n-grams and contextual phrases to enhance topic interpretability.
  • Investigating Non-negative Tensor Factorization to incorporate temporal information.
  • Developing online NMF versions to continuously update topic models with new incoming cases.
  • Addressing potential biases in word embeddings and NMF models.

Summary updated

BibTeX
@misc{budahazy2021analysis,
  author = {Ryan Budahazy and Lu Cheng and Yihuan Huang and Andrew Johnson and Pengyu Li and Joshua Vendrow and Zhoutong Wu and Denali Molitor and Elizaveta Rebrova and Deanna Needell},
  title = {{Analysis of Legal Documents via Non-negative Matrix Factorization Methods}},
  year = {2021},
  eprint = {2104.14028},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.14028},
}
Figure