D2GCLF: Document-to-Graph Classifier for Legal Document Classification

Qiqi Wang, Kaiqi Zhao, Robert Amor, Benjamin Liu, Ruofan WangNAACL 2022 · DOI

Introduction

Automating the classification and filing of legal cases is a critical challenge for modern judicial systems. In China, local courts often face an overwhelming volume of litigation, with some small-town branches handling upwards of 10,000 civil complaints annually. While standard Natural Language Processing (NLP) models like BERT or Convolutional Neural Networks (CNNs) excel at broad topic classification (e.g., distinguishing sports from medicine), they frequently falter when applied to the legal domain.

The primary hurdle is high semantic similarity. Two distinct legal cases may share nearly identical vocabularies—frequently mentioning "contracts," "payments," and "property"—yet belong to different legal categories based on subtle factual distinctions, such as the specific legal status of the participants. Traditional sequence-based models often fail to capture these structural nuances, treating essential facts and irrelevant boilerplate text with equal weight.

Methodology: The Document-to-Graph Approach

To address these limitations, the researchers developed the Document-to-Graph Classifier (D2GCLF). Rather than processing a document as a linear sequence of words, D2GCLF transforms legal text into a set of four specialized relation graphs that explicitly model the "who, what, and how" of a case.

The D2GCLF architecture, illustrating the extraction of four specialized relation graphs and their integration via a Graph Attention Network.

The model extracts four distinct graph types to represent the core facts:

  1. Entity-Matter Graph: Links litigation participants (plaintiffs and defendants) to specific nouns representing the subject of the dispute (e.g., "money" or "house").
  2. Entity-Action Graph: Captures the specific verbs describing interactions between participants (e.g., "Plaintiff loaned to Defendant").
  3. Entity-Keyword Graph: Utilizes the TextRank algorithm to identify and connect high-importance keywords to the relevant stakeholders.
  4. Semantic Role Labeling (SRL) Graph: Models complex multi-party relations, including third parties like guarantors, through subject-predicate-object structures.

These graphs are merged into a single "Combined Graph," which is then processed by a Graph Attention Network (GAT). The GAT uses multi-head attention to aggregate information from these disparate nodes into a central "document node," whose latent representation is used to predict the final legal category.

Leveraging Structural Signals

Legal documents follow a highly predictable structure. By targeting the specific sections that contain the most predictive power, D2GCLF effectively filters out "noise."

The hierarchical structure of a typical civil complaint, highlighting the sections used for graph extraction.

As shown in the document structure above, the model focuses its extraction on the "Facts" and "Reason" sections. This allows the system to ignore boilerplate information, such as citations of common laws or standard entity descriptions, which appear across many different case types and can confuse traditional classifiers. The researchers found that the Entity-Matter graph was the most critical individual component, but the highest accuracy was only achieved when all four graph types were combined, proving that actions and third-party roles provide unique, non-overlapping signals.

Experimental Results

The D2GCLF model was evaluated on a curated dataset of 4,000 Chinese civil judgments across 20 distinct legal classes (e.g., medical liability, private lending disputes). The results demonstrate a significant improvement over existing state-of-the-art methods:

  • Superior Accuracy: D2GCLF achieved an AUC of 91.33%.
  • Outperforming BERT: It surpassed the best BERT-based model (85.75% AUC) by over 5%, highlighting the advantage of graph-based relational modeling over sequential pre-training for legal text.
  • Comparison to Graph Baselines: It outperformed other graph-based approaches like TextING (83.71% AUC), which rely on simple word co-occurrence rather than explicit entity-relation extraction.

Conclusion and Future Work

D2GCLF demonstrates that in the legal domain, the relationships between entities are far more predictive than simple vocabulary. While the current implementation is optimized for the linguistic structure of Chinese legal documents, the underlying framework of multi-graph relational modeling is broadly applicable. Future research may explore more advanced Graph Neural Network architectures and the adaptation of this graph-extraction logic to other languages and legal systems.

Summary updated

BibTeX
@inproceedings{wang2022d,
  author = {Qiqi Wang and Kaiqi Zhao and Robert Amor and Benjamin Liu and Ruofan Wang},
  title = {{D2GCLF: Document-to-Graph Classifier for Legal Document Classification}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-naacl.170},
}
Figure