# A Sentence Prediction Approach Incorporating Trial Logic Based on Abductive Learning
## 4 Experiments and Results
### Experimental Setup and Evaluation Index  
Since there is no public dataset on evidence extraction from judgment documents, we obtained the relevant judgment documents from the People's Court of Guizhou Province, erased the sensitive information, and used manual annotation to construct the dataset. The dataset contains 3668 adjudication documents of theft cases, and the training sets with 10%, 50%, and 90% of the cases were used for the experiments. To better measure the performance of the model, we adopted the Monte Carlo cross-validation method by randomly dividing the dataset into training and validation sets each time, so that three-time separate model training and validations were performed, and finally, these validation results were averaged as the validation error of this model. We set the length of the input text to 512, the size of the hidden layer to 768, the threshold \(\alpha\) to 0.25, \(\beta\) in the base penalty to 0.065, and \(\gamma\) to the minimal sentence, where \(\beta\) is mainly used to reduce the amount of integers to decimals in order to facilitate the calculation by the neural network and \(\gamma\) is used to obtain the starting penalty specified in different laws through logical reasoning. In particular, the effect of the \(\alpha\) value on the results is relatively large, and we will analyze its effect in Section 4.4. Experiments ran on a workstation with AMD EPYC 7742 64-Core Processor, 40 GB memory, and the A100-SXM4-40 GB GPU.  
We chose to use the mean absolute error (MAE), mean-squared error (MSE), root-mean-squared error (RMSE), and R2 Score (coefficient of determination \(R^{2}\)) as the evaluation criteria. The MAE is a loss function used in regression models and is the sum of the absolute values of the differences between the target and predicted values, which measures the average modal length of the error between the predicted and target values. It can better reflect the actual situation of prediction value error. The formula is as follows, where \(y\) is the true value and \(\hat{y}\) is the predicted value:  
\[\text{MAE}=\frac{1}{n}\sum_{i=1}^{n}\mid\hat{y}_{i}-y_{i}\mid \tag{9}\]  
the MSE is the sum of squares between the predicted and true values, which is slightly simpler to calculate than the MAE, but has strong robustness. It can be used to measure the dispersion of the difference between the predicted and true values. The formula is as follows, where \(y\) is the true value and \(\hat{y}\) is the predicted value:  
\[\text{MSE}=\frac{1}{n}\sum_{i=1}^{n}\left(\hat{y}_{i}-y_{i}\right)^{2} \tag{10}\]  
The RMSE is the square root of the ratio of the sum of squares of deviations of observations from the true value to the number of observations \(n\). It is used to measure the deviation of the observed value from the true value and is often used as a measure of the prediction results of machine learning models. The formula is as follows, where \(y\) is the true value and \(\hat{y}\) is the predicted value:  
\[\text{RMSE}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(\hat{y}_{i}-y_{i}\right)^{2}} \tag{11}\]  
The R2 Score is generally used in regression models to assess the degree of conformity between predicted and actual values and is defined as follows:  
\[\text{R2 Score}=1-FVI=1-\frac{RSS}{TSS}=1-\frac{\sum_{i=1}^{n}\left(\hat{y}_{i}- y_{i}\right)^{2}}{\sum_{i=1}^{n}\left(y_{i}-\hat{y}\right)^{2}} \tag{12}\]  
where \(y\) is the true value, \(\hat{y}\) is the predicted value, \(\hat{y}\) is the average of the true values, \(FVI\) is called the fraction of variance unexplained, \(RSS\) is called the residual sum of squares, and \(TSS\) is called the total sum of squares. In general, the closer R2 Score is to 1, the better the model fitting effect.