| Literature DB >> 35494851 |
André Lage-Freitas1,2, Héctor Allende-Cid2,3, Orivaldo Santana2,4, Lívia Oliveira-Lage5.
Abstract
Predicting case outcomes is useful for legal professionals to understand case law, file a lawsuit, raise a defense, or lodge appeals, for instance. However, it is very hard to predict legal decisions since this requires extracting valuable information from myriads of cases and other documents. Moreover, legal system complexity along with a huge volume of litigation make this problem even harder. This paper introduces an approach to predicting Brazilian court decisions, including whether they will be unanimous. Our methodology uses various machine learning algorithms, including classifiers and state-of-the-art Deep Learning models. We developed a working prototype whose F1-score performance is ~80.2% by using 4,043 cases from a Brazilian court. To our knowledge, this is the first study to present methods for predicting Brazilian court decision outcomes.Entities:
Keywords: Artificial intelligence; Jurimetrics; Law; Legal; Legal informatics; Legal outcome forecast; Litigation prediction; Machine learning; Predictive algorithms
Year: 2022 PMID: 35494851 PMCID: PMC9044329 DOI: 10.7717/peerj-cs.904
Source DB: PubMed Journal: PeerJ Comput Sci ISSN: 2376-5992
Figure 1Methodology.
First, legal case data are collected from the Web and segmented into sections.Then, we label the cases according to their decision and unanimity aspects. As follows, we pre-processthe case descriptions and represent them in number vectors. Last, we train different machine learningalgorithms and evaluate the trained models.
The data set includes the texts that describe the case description, the decision, and the decision unanimity.
| Data | Case description | Decision | Unanimity |
|---|---|---|---|
|
| Direito Processual Civil… | Recurso conhecido e provido | Unanimidade |
|
| Apelação criminal… | Recurso conhecido e parcialmente provido | Decisão unânime |
|
| Apelação Cível em Ação… | Recurso conhecido e não provido | Decisão unânime |
Data set classification. E.g., in Record 1, provido means a favorable (“yes”) decision and Unanimidade was classified as a “unanimous” decision.
| Data | Label | Unanimity label |
|---|---|---|
|
| “yes” | “unanimous” |
|
| “patial” | “unanimous” |
|
| “no” | “unanimous” |
Figure 2The user interface only requires case description and the Machine Learning models predict thecase outcome and its unanimity.
Figure 3Data set distribution by decision publication date.
Number of data set records according to their decision labels for Scenarios 1, 2, and 3. These scenarios perform case outcome predictions.
| Scenarios | “no” | “partial” | “yes” |
|---|---|---|---|
|
| 2,415 | 866 | 762 |
|
| 866 | 866 | 762 |
|
| 2,415 | – | 1,628 |
Results of Scenario 1: case outcome predictive analyses. Mean and standard deviation of F1-score, Precision, Recall, and Accuracy metrics over a five-fold validation.
| Models | F1-score | Precision | Recall | Accuracy |
|---|---|---|---|---|
| Gaussian NB | 0.4772 | 0.4746 | 0.4836 | 0.5451 |
| Decision Tree | 0.6260 | 0.6652 | 0.6064 | 0.7203 |
| SVM | 0.6838 | 0.7204 | 0.6620 | 0.7601 |
| Random Forest | 0.2948 | 0.5244 | 0.3564 | 0.6122 |
| XGBoost | 0.7015 | |||
| BERT-Imbau | 0.6609 | 0.6301 | 0.7342 | |
| LSTM | 0.7105 | 0.6444 | 0.6102 | 0.7105 |
| GRU | 0.7175 | 0.6623 | 0.6082 | 0.7175 |
| BiLSTM | 0.5549 | 0.4343 | 0.4127 | 0.5549 |
| CNN | 0.6071 | 0.6529 | 0.5898 | 0.7032 |
Note:
Bold numbers represent the best results.
Results of Scenario 2: case outcome predictive analyses. Mean and standard deviation of F1-score, Precision, Recall, and Accuracy metrics over a 5-fold validation.
| Models | F1-score | Precision | Recall | Accuracy |
|---|---|---|---|---|
| Gaussian NB | 0.5458 | 0.4746 | 0.5469 | 0.5457 |
| Decision Tree | 0.6315 | 0.6386 | 0.6344 | 0.6323 |
| SVM | 0.6972 | 0.6997 | 0.6985 | 0.6977 |
| Random Forest | 0.6064 | 0.6511 | 0.6148 | 0.6251 |
| XGBoost | ||||
| BERT-Imbau | 0.6278 | 0.6211 | 0.6297 | 0.6278 |
| LSTM | 0.6032 | 0.6114 | 0.6021 | 0.6032 |
| GRU | 0.6137 | 0.6198 | 0.6134 | 0.6137 |
| BiLSTM | 0.4356 | 0.4355 | 0.4340 | 0.4356 |
| CNN | 0.6177 | 0.6309 | 0.6183 | 0.6177 |
Note:
Bold numbers represent the best results.
Results of Scenario 3: case outcome predictive analyses. Mean and standard deviation of F1-score, Precision, Recall, and Accuracy metrics over a 5-fold validation.
| Models | F1-score | Precision | Recall | Accuracy |
|---|---|---|---|---|
| Gaussian NB | 0.6028 | 0.4746 | 0.6142 | 0.6055 |
| Decision Tree | 0.7495 | 0.7516 | 0.7480 | 0.7606 |
| SVM | 0.7911 | 0.8057 | 0.7846 | 0.8051 |
| Random Forest | 0.4874 | 0.7512 | 0.5568 | 0.6419 |
| XGBoost | ||||
| BERT-Imbau | 0.7830 | 0.7636 | 0.7578 | 0.7830 |
| LSTM | 0.7706 | 0.7636 | 0.7562 | 0.7706 |
| GRU | 0.5973 | 0.3186 | 0.5000 | 0.5973 |
| BiLSTM | 0.5929 | 0.5653 | 0.5608 | 0.5929 |
| CNN | 0.7490 | 0.7418 | 0.7316 | 0.7490 |
Note:
Bold numbers represent the best results.
Figure 4Confusion Matrix: Scenario 1 for the XGBoost model.
Figure 5Confusion Matrix: Scenario 2 for the XGBoost model.
Figure 6Confusion Matrix: Scenario 3 for the SVM model.
Distribution of data set records for Scenarios 4 and 5, which predicts judge unanimous behavior.
| Scenarios | “not-unanimous” | “unanimous” |
|---|---|---|
|
| 45 | 2,229 |
|
| 45 | 45 |
Results of Scenario 4: prediction on decision unanimity. Mean and standard deviation ofF1-score, Precision, Recall, and Accuracy metrics over a 5-fold validation.
| Models | F1-score | Precision | Recall | Accuracy |
|---|---|---|---|---|
| Gaussian NB | 0.6425 | 0.7322 | 0.6088 | 0.9802 |
| Decision Tree | 0.8091 | 0.8794 | 0.7651 | |
| SVM | 0.6718 | 0.8475 | 0.6213 | 0.9833 |
| Random Forest | 0.4950 | 0.4901 | 0.5000 | 0.9802 |
| XGBoost | 0.8065 | 0.9885 | ||
| BERT-Imbau | 0.9790 | 0.5920 | 0.5277 | 0.9790 |
| LSTM | 0.9854 | 0.8884 | 0.6550 | 0.9854 |
| GRU | 0.8379 | 0.6529 | 0.9855 | |
| BiLSTM | 0.9852 | 0.8024 | 0.6549 | 0.9852 |
| CNN | 0.9854 | 0.8822 | 0.6921 | 0.9854 |
Note:
Bold numbers represent the best results.
Figure 7Confusion Matrix: Scenario 4 for the Decision Tree model.
Results of Scenario 5: prediction on decision unanimity. Mean and standard deviation of F1-score, Precision, Recall, and Accuracy metrics over a 5-fold validation.
| Models | F1-score | Precision | Recall | Accuracy |
|---|---|---|---|---|
| Gaussian NB | 0.6670 | 0.4746 | 0.6889 | 0.6889 |
| Decision Tree | 0.7863 | 0.8051 | 0.7889 | 0.7889 |
| SVM | 0.8206 | 0.8289 | 0.8222 | 0.8222 |
| Random Forest | ||||
| XGBoost | 0.7648 | 0.7735 | 0.7666 | 0.7666 |
| BERT-Imbau | 0.6787 | 0.7246 | 0.6911 | 0.6911 |
| LSTM | 0.6577 | 0.6552 | 0.6577 | 0.6577 |
| GRU | 0.6866 | 0.7097 | 0.6866 | 0.6866 |
| BiLSTM | 0.7200 | 0.7538 | 0.7200 | 0.7200 |
| CNN | 0.7533 | 0.7833 | 0.7533 | 0.7533 |
Note:
Bold numbers represent the best results.
Figure 8Confusion Matrix: Scenario 5 for the Random Forest model.