[Paper Review] Long-length Legal Document Classification
This paper proposes a simplified yet effective method for classifying long legal documents by segmenting them into chunks, generating embeddings via Doc2Vec, and refining them with a BiLSTM encoder before classification. The approach achieves a 98.11% F1 score—0.4% improvement over the full-document baseline—demonstrating that segmentation enhances model performance on lengthy, domain-specific legal texts without complex architectures.
One of the principal tasks of machine learning with major applications is text classification. This paper focuses on the legal domain and, in particular, on the classification of lengthy legal documents. The main challenge that this study addresses is the limitation that current models impose on the length of the input text. In addition, the present paper shows that dividing the text into segments and later combining the resulting embeddings with a BiLSTM architecture to form a single document embedding can improve results. These advancements are achieved by utilising a simpler structure, rather than an increasingly complex one, which is often the case in NLP research. The dataset used in this paper is obtained from an online public database containing lengthy legal documents with highly domain-specific vocabulary and thus, the comparison of our results to the ones produced by models implemented on the commonly used datasets would be unjustified. This work provides the foundation for future work in document classification in the legal field.
Motivation & Objective
- To address the challenge of classifying long legal documents exceeding typical model input length limits.
- To improve classification performance on lengthy, domain-specific legal texts where standard models fail or underperform.
- To evaluate whether document segmentation into smaller chunks enhances embedding quality and classification accuracy.
- To demonstrate that simpler architectures can outperform complex models in low-resource, high-domain-specificity settings like legal document classification.
- To provide a reproducible, efficient framework for legal document management in enterprise settings.
Proposed method
- Documents from the SEC EDGAR corpus are segmented into multiple chunks, with each chunk processed independently to generate word embeddings via Doc2Vec.
- The resulting chunk embeddings are fed into a Bidirectional Long Short-Term Memory (BiLSTM) network to capture sequential dependencies and produce a unified document-level representation.
- The final document embedding is passed through a linear classifier or SVM for multi-class classification.
- The model is trained and validated using a 5,689-sample subset of EDGAR filings, with hyperparameters tuned on a validation set.
- t-SNE visualizations are used to compare the quality of document embeddings before and after BiLSTM processing.
- Performance is evaluated using F1 scores on both validation and test sets, with results reported per document type.
Experimental results
Research questions
- RQ1Does segmenting long legal documents into smaller chunks improve classification performance compared to processing the full document?
- RQ2Can a simpler model architecture combining Doc2Vec and BiLSTM outperform more complex models on long legal texts?
- RQ3How does the use of BiLSTM on chunk embeddings affect the clustering and separability of document embeddings?
- RQ4To what extent does document length and domain-specific vocabulary impact model performance in legal text classification?
- RQ5Is there an optimal number of chunks that maximizes classification accuracy for long legal documents?
Key findings
- Splitting documents into 7 chunks yields the highest test F1 score of 98.11%, representing a 0.4% improvement over the full-document baseline (97.71%).
- The 5-chunk model achieves the best balance with a test F1 of 98.04% and a validation F1 of 98.04%, indicating strong generalization.
- The BiLSTM-enhanced embeddings show clearly defined cluster boundaries in t-SNE plots, suggesting improved semantic representation quality.
- Documents of type 'EX-99.1' are most frequently misclassified, often confused with 'EX-10.1', likely due to overlapping clauses or agreement structures.
- The model with 10 chunks (2,474 words per chunk) achieves 97.92% test F1, showing diminishing returns beyond optimal chunking.
- Even with minimal data (30 documents per filing type), Doc2Vec fine-tuned on 150 samples produces effective document embeddings for classification.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.