SlowGuess/NAACL_2021_OCR huggingface dataset:
Table 3 reports the charge disambiguation performance of our models and comparison models.
Causal Graph vs. Correlation-based Graph. GCI outperforms GCI-co by  $4.5\%$  on average Acc, and  $9.8\%$  on average F1, indicating the graph constructed by mining causal relations better captures the relationship between charges and factors.
Causal Inference vs. Neural Networks. Comparing  $GCI$  with NN baselines  $LSTM, Bi-LSTM$  and  $Bi-LSTM+Att$ , we observe in few-shot settings (1%, 5%),  $GCI$  outperforms NNs by about 10% on average, since NNs tend to underfit in few-shot settings. However, with the increase of training data, the performance gap becomes narrower and consequently, NNs outperform  $GCI$  in several cases. Compared with  $GCI$ , NNs have the advantage of learning from large amounts of unstructured data.
Adding Strength Constraints. We can see that  $Bi - LSTM + Att + Cons$  outperforms  $Bi - LSTM + Att$  by around  $1 - 5\%$ . The performance gap is much larger in few-shot settings. This suggests that our estimated causal strength is helpful for attention-based models to capture the key information in the text.
Causal Chains vs. Whole Text. Both CausalChain and LSTM are a straightforward application of unidirectional LSTM, but over different texts, one for our extracted causal chains and the other for the whole fact description. We find CausalChain outperforms LSTM by  $8.2\%$  on average Acc and  $11.7\%$  on average F1. The difference shows that causal chains contain condensed key information that contributes to the judgement, while the whole description may contain far more irrelevant information that may disturb the prediction. We also conduct experiments on combining causal chains and the
Table 3: Performance on similar charge disambiguation. The first number is Acc and the second number is F1. Highest results are in bold, and different symbols indicate different training ratios.
Figure 4: An example of sensitivity analysis for treatments of extortion in the causal graph of F&E.
whole plain text, but simply concatenating them does not work well since the whole text may introduce noise, and better integration methods are needed, which we leave for future work.
6.1 Quality of Causal Graphs
To analyze the robustness of the causal discovery process, we apply sensitivity analysis on the causal graphs. In detail, we make disturbance to the original causal relations, and examine the sensitivity of causal effect towards the violations. Following Kiciman and Sharma (2018), we use three re
futters for examination: 1) Random Confounder, a new confounder with random value is added to the graph, and ideally, the causal strength should remain the same as before. 2) Placebo Treatment, the value of a treatment is replaced by a random value, so the treatment becomes a placebo, and the strength should be zero. 3) Subset of Data, we use a subset of cases to recalculate the strength. Ideally, the strength estimation will not vary significantly.
We take a sampled causal graph of F&E (Fraud & Extortion) as an example, and exhibit the refuters on the treatments of charge extortion in Figure 4. Causal strength is almost the same as before after Random Confounder and Subset of Data refutation; and turns to nearly zero after Placebo Treatment. The results show that our graph construction method is robust against disturbance.
6.2 Causal Chains in Graph
Causal chains manifest how effective  $GCI$  is in terms of inducing common patterns of suspect's
Figure 5: Causal chains in Personal Injury's graph.
behaviours. It is helpful for people to better understand the core part of legal cases. Here we select the causal graph of Personal Injury (Intentional Injury & Murder & Involuntary Manslaughter) and showcase several causal chains underlying the text. As shown in Figure 5, the chains depict common patterns of these charges, from the initial causes, to the final criminal behaviour. More examples are provided in Appendix D.
Now the question is how the graph structures help to discriminate similar charges. Here we analyze the nuance between the causal chains of two similar charges E&MPF (Embezzlement & Misappropriation of Public Funds). For both charges, the cases often first give the background that someone held a certain position of authority, thus had power. Then both kinds of cases describe that the person illegally obtained a large amount of money by utilizing his power. While the cases in E&MPF share very similar context, there exists nuance between them: embezzlement emphasizes that someone privately and illegally possesses the bulk of money, while misappropriation of public funds emphasizes that someone would temporally use the money for a certain purpose. By observing the causal chains of two charges,  $GCI$  could capture the slight difference well: for embezzlement, the causal chains tend to be work / take charge of  $\rightarrow$  take advantage of (position/power); for misappropriation of public funds, the causal chains tend to be take charge of  $\rightarrow$  take advantage of (position/power)  $\rightarrow$  misappropriate  $\rightarrow$  profit. The difference between the former and latter chains is whether the person had subsequent behaviour (e.g., using the money for purposes like making profits). We could observe that the difference in causal chains accords with the definitions of the two charges.
6.3 Effect of Integrating Causal Strength with Attention
Following Lei et al. (2017), we conduct human evaluation on words accorded with high attention
Charge Sets	Bi-LSTM+Att	Bi-LSTM+Att+Cons
Personal Injury	3.03	3.17
Violent Acquisition	3.18	3.74
F&E	3.34	3.65
E&MPF	3.13	3.27
AP&DD	3.08	3.13
Table 4: Results of human evaluation. Better results are in bold.
weights and compare the evaluation results of standard  $(Bi - LSTM + Att)$  and constraint-based attention models  $(Bi - LSTM + Att + Cons)$ .
For each set of charges, we train both models with  $10\%$  data, and randomly select 30 cases that both models predict correctly. For the total 150 cases, we showcase content, charge names, attention weights above 0.05, and corresponding words. Each participant is asked to score from 1 to 5 for the extent of how beneficial the extracted keywords are to disambiguation. A higher score means that the attention weights indeed capture the keywords. Each case is assigned to at least four participants. Results are shown in Table 4. We observe that the constraint-based model is better at explanation than normal attention-based models on all five charge groups. Take Violent Acquisition as an example. Although the cases are predicted correctly by BiLSTM+Att, the model tends to attend to words bag, RMB and value, which frequently occur but cannot be treated as clues for judgement. Instead, BiLSTM+Att+Cons values factors such as grab, rob and hold, which are more helpful for judgement.
Causal Inference with Text. Recently, a few works try to take text into account when performing causal inference. Landeiro and Culotta (2016) introduce causal inference to text classification, and manage to remove bias from certain out-of-text confounders. Wood-Doughty et al. (2018) use text as a supplement of missing data and measurement error for the causal graphs constructed by structured data. Egami et al. (2018) focus on mapping text to a low-dimensional representation of the treatment or outcome. Veitch et al. (2019) and Yao et al. (2019) treat text as confounder and covariate, which help to make causal estimation more accurate. These works all build causal graphs manually, and regard text as a whole to be one of the factors. In contrast, we set our sights on text containing rich causal information in itself. Paul (2017) looks into text by computing propensity score for each word, but only
focuses on causal relationship between words and sentiment. We instead take a causal graph perspective, discover and utilize causal relationship inside text to perform reasoning.
Neural Networks for Causal Discovery. Recently, researchers attempt to apply neural networks to causal discovery (Ponti and Korhonen, 2017; Alvarez-Melis and Jaakkola, 2017; Ning et al., 2018; Gao et al., 2019; Weber et al., 2020). However, Alvarez-Melis and Jaakkola (2017) model causal relationship by correlation, which may introduce bias into causal inference; Ning et al. (2018) and Gao et al. (2019) merely focus on capturing causality by explicit textual features or supervision from labeled causal pairs. There are also a line of works focusing on how to use neural networks to summarize confounders and estimate treatment effects (Louizos et al., 2017; Yao et al., 2018; Künzel et al., 2018), which are parts of the whole causal inference process. Weber et al. (2020) show how to formalize causal relationships in script learning, but it is limited to pairwise learning of events and cannot be generalized to sequential and compositional events.
Legal Judgement Prediction. Previous works in legal text analysis focus on the task of legal judgement prediction (LJP). Luo et al. (2017) and Zhong et al. (2018) exploit neural networks to solve LJP tasks. Zhong et al. (2020) provide interpretable judgements by iteratively questioning and answering. Another line pays attention to confusing charges: Hu et al. (2018) manually design discriminative attributes, and Xu et al. (2020) use attention mechanisms to highlight differences between similar charges. Using knowledge derived from causal graphs,  $GCI$  exhibits a different and interpretable discrimination process.
Although  $GCI$  is effective on its own and when working with powerful neural network models, there is still room for further improvement.
More Precise Causal Inference Models. The causal estimation results of  $GCI$  is based on the constructed causal graphs in former stages, and the automated construction process may bring imprecise factors and even omissions. As clustering algorithms try to summarize the general characteristics of text, descriptions with subtle differences may be
clustered into one factor, but the differences matter in legal judgement. For example, in Personal Injury's graph, different ways of killing are summarized as the factor kill, therefore lose valuable information. Specifically, beaten to death might occur in cases of involuntary manslaughter, while shooting cases are more likely to be associated with murder. Also, factors with low frequency may be omitted in clustering, but are actually useful for discrimination. Overall, under the circumstance without much expert effort, it is worthwhile to explore how to construct a more reliable causal graph.
Deep understanding on legal documents. Although  $GCI$  to some extent tackles the challenges of incapability of causal inference methods on unstructured text, it may make mistakes when facing complex fact descriptions. Negation semantics is a typical example. It is occasional to see negation word usage in fact descriptions, which usually indicates that someone did not have a certain behaviour. However,  $GCI$  has not considered this aspect, and may be awry in cases containing negation usage. Besides, pronoun resolution is also an important aspect that may confuse models. For example, certain behaviour is done by the victim and the subject of the behaviour is a pronoun. If the model was unaware of the subject of the behaviour, it would be counted as criminal's behaviour and introduces noise to later inference stage. Moreover, intent could be a decisive factor when discriminating charges, for example, murder and involuntary manslaughter. But it may not be mentioned explicitly in the fact descriptions. It should be better to recover the complete course of fact and recognize the implicit intents between the lines with deep understanding of the context and relevant common sense knowledge.
We propose  $GCI$ , a graph-based causal inference framework to discover causal information in text, and design approaches to integrate causal models and neural networks. In the similar charge disambiguation task, we show our approaches capture important evidence for judgement and nuance among charges. Further analysis demonstrates the quality of causal graphs, value of causal chains, and interpretability of computed causal strength.
10.1 Intended Use
We aim to facilitate legal service with our proposed  $GCI$ , providing valuable evidence instead of directly making judgements. We hope that legal AI models could assist legal workers in underdeveloped areas, helping them to explore key points in cases, discriminate from similar crimes, and make better decisions. By treating like cases alike in different regions of the country, influences of judges' intellectual flaws and arbitrariness are weakened, and rights of people, both the defendants and the victims, are protected.
Failure Mode. The model may give wrong evidence in some cases, but this will not cause significantly bad impact. The process of GCI is transparent. Extracted factors, the causal relations between them, and causal chains that lead to the final decision are all shown to users. By checking these "rationales" of model reasoning, users can clearly find where goes wrong, and not adopt the outputs, or intervene and correct the model.
Misuse Potential. We emphasize that such a model cannot be used individually, as the trial process is seriously conducted and regulated by the judicial system. In the actual judicial process, the prosecutors, judges, and lawyers are under strict supervision. We do not think there is a possibility for them to misuse computer models.
10.2 Bias Analysis
Criminal behaviour is very unbalanced in gender. Take the three charges in our Personal Injury charge set as an example. Lin and Zou (2020) counted gender ratio in criminal cases from 2013 to 2017 in China, and the ratios of male defendant are  $94.70\%$  (Intentional Injury),  $87.72\%$  (Murder), and  $93.97\%$  (Involuntary Manslaughter). The disparity in defendants of male and female leads to the small proportion of female cases in training corpus. Therefore, female cases may be inadequately trained. If this results in more incorrect predictions for female cases, women's rights are violated.
Following Dixon et al. (2018) and Park et al. (2018), we use False Positive Equality Difference (FPED) and False Negative Equality Difference (FNED) to examine the performance difference in
Metrics	Bi-LSTM+Att	Bi-LSTM+Att+Cons
FPED	0.048	0.032
FNED	0.065	0.049
Table 5: Results of equality difference. Better results are in bold.
two genders. They are defined as:
$$
\mathrm {F P E D} = \sum_ {t \in T} | \mathrm {F P R} - \mathrm {F P R} _ {t} |, \tag {8}
$$
$$
\mathrm {F N E D} = \sum_ {t \in T} | \mathrm {F N R} - \mathrm {F N R} _ {t} |,
$$
where FPR is false positive rate of classification, FNR is false negative rate, and  $T = \{ male, female\}$ . The two metrics quantify the extent of variation between the performances of two genders.
Applying them to  $Bi$ -LSTM+Att and  $Bi$ -LSTM+Att+Cons models in Personal Injury charge set, the results are shown in Table 5. The model with causal constraints achieves smaller variance measured by both metrics, which reduce between 1/4 to 1/3 of the unfairness in performance of  $Bi$ -LSTM+Att. This shows the superiority of our model with causal knowledge. Compared with normal neural networks, our constraint-based model utilizes causal relations, which are more stable to the number of occurrences.
Though adding causal knowledge narrows the equality difference, it still exists in  $BiLSTM + Att + Cons$  (the metrics are greater than zero). Other types of bias may also exist in our model, given that the training corpora contain decisions of humans and systemic bias of humans may be preserved. Further debiasing method is needed if the model is put into real use.
In general, we believe that adding causal knowledge to decision making will help debiasing, and the transparent exhibition of causal graphs and chains will enable people to find biases in time and correct them.
This work is supported in part by National Hi-Tech R&D Program of China (2018YFC0831900). We would like to thank the anonymous reviewers for the helpful discussions and suggestions. Also, we would thank Yuxuan Lai, Liunian Harold Li, Jieyu Zhao, Chen Wu and Xingchen Lan for advice about
experiments and writing. For any correspondence, please contact Yansong Feng.
David Alvarez-Melis and Tommi Jaakkola. 2017. A causal framework for explaining the predictions of black-box sequence-to-sequence models. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 412-421, Copenhagen, Denmark. Association for Computational Linguistics.
Max Black. 1956. Why cannot an effect precede its cause? Analysis, 16(3):49-58.
Ricardo Campos, Vitor Mangaravite, Arian Pasquali, Alipio Jorge, Celia Nunes, and Adam Jatowt. 2020. Yake! keyword extraction from single documents using multiple local features. Information Sciences, 509:257-289.
David Maxwell Chickering. 2002. Optimal structure identification with greedy search. Journal of machine learning research, 3(Nov):507-554.
National People's Congress. 2017. Criminal Law of the People's Republic of China. China Legal Publishing House.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. 2018. Measuring and mitigating unintended bias in text classification. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, pages 67-73.
Naoki Egami, Christian J Fong, Justin Grimmer, Margaret E Roberts, and Brandon M Stewart. 2018. How to make causal inferences using texts. arXiv preprint arXiv:1802.02163.
Lei Gao, Prafulla Kumar Choubey, and Ruihong Huang. 2019. Modeling document-level causal structures for event causal relation identification. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 1808-1817, Minneapolis, Minnesota. Association for Computational Linguistics.
Tin Kam Ho. 1995. Random decision forests. In Proceedings of 3rd international conference on document analysis and recognition, volume 1, pages 278-282. IEEE.
Paul W Holland. 1986. Statistics and causal inference. Journal of the American statistical Association, 81(396):945-960.
Zikun Hu, Xiang Li, Cunchao Tu, Zhiyuan Liu, and Maosong Sun. 2018. Few-shot charge prediction with discriminative legal attributes. In Proceedings of the 27th International Conference on Computational Linguistics, pages 487-498.
Karen Sparck Jones. 1972. A statistical interpretation of term specificity and its application in retrieval. Journal of documentation.
Katherine A Keith, David Jensen, and Brendan O'Connor. 2020. Text and causal inference: A review of using text to remove confounding from causal estimates. arXiv preprint arXiv:2005.00649.
Emre Kiciman and Amit Sharma. 2018. Tutorial on causal inference and counterfactual reasoning. In ACM KDD International Conference on Knowledge Discovery and Data Mining.
Sören R. Künzel, Bradly C. Stadie, Nikita Vemuri, Varsha Ramakrishnan, Jasjeet S. Sekhon, and Pieter Abbeel. 2018. Transfer learning for estimating causal effects using neural networks. CoRR, abs/1808.07804.
Virgile Landeiro and Aron Culotta. 2016. Robust text classification in the presence of confounding bias. In Thirtieth AAAI Conference on Artificial Intelligence.
Tao Lei et al. 2017. Interpretable neural models for natural language processing. Ph.D. thesis, Massachusetts Institute of Technology.
Wei Lin and Shaokun Zou. 2020. The Bluebook on the Big Data of Criminal Justice. Peking University Press.
Christos Louizos, Uri Shalit, Joris M. Mooij, David A. Sontag, Richard S. Zemel, and Max Welling. 2017. Causal effect inference with deep latent-variable models. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pages 6446-6456.
Bingfeng Luo, Yansong Feng, Jianbo Xu, Xiang Zhang, and Dongyan Zhao. 2017. Learning to predict charges for criminal cases with legal basis. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2727-2736, Copenhagen, Denmark. Association for Computational Linguistics.
James MacQueen et al. 1967. Some methods for classification and analysis of multivariate observations. In Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, volume 1, pages 281-297. Oakland, CA, USA.
Qiang Ning, Zhili Feng, Hao Wu, and Dan Roth. 2018. Joint reasoning for temporal and causal relations. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2278-2288, Melbourne, Australia. Association for Computational Linguistics.
Juan Miguel Ogarrio, Peter Spirtes, and Joe Ramsey. 2016. A hybrid causal search algorithm for latent variable models. In Conference on Probabilistic Graphical Models, pages 368-379.
Tao Ouyang, Kejia Wei, and Renwen Liu. 1999. Confusing crimes, noncrime, and boundaries between crimes. Chinese People's Public Security University Press.
Ji Ho Park, Jamin Shin, and Pascale Fung. 2018. Reducing gender bias in abusive language detection. arXiv preprint arXiv:1808.07231.
Michael Paul. 2017. Feature selection as causal inference: Experiments with text classification. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 163-172.
Judea Pearl and Dana Mackenzie. 2018. The book of why: the new science of cause and effect. Basic Books.
Edoardo Maria Ponti and Anna Korhonen. 2017. Event-related features in feedforward neural networks contribute to identifying causal relations in discourse. In Proceedings of the 2nd Workshop on Linking Models of Lexical, Sentential and Discourse-level Semantics, pages 25-30, Valencia, Spain. Association for Computational Linguistics.
Joseph Ramsey, Madelyn Glymour, Ruben Sanchez-Romero, and Clark Glymour. 2016. A million variables and more: the fast greedy equivalence search algorithm for learning high-dimensional graphical causal models, with an application to functional magnetic resonance images. International Journal of Data Science and Analytics, 2(3):121-129.
Gideon Schwarz et al. 1978. Estimating the dimension of a model. The annals of statistics, 6(2):461-464.
Yan Song, Shuming Shi, Jing Li, and Haisong Zhang, 2018. Directional skip-gram: Explicitly distinguishing left and right context for word embeddings. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 175–180.
Peter L Spirtes, Christopher Meek, and Thomas S Richardson. 2013. Causal inference in the presence of latent variables and selection bias. arXiv preprint arXiv:1302.4983.
Victor Veitch, Dhanya Sridhar, and David M Blei. 2019. Using text embeddings for causal inference. arXiv preprint arXiv:1905.12741.
Noah Weber, Rachel Rudinger, and Benjamin Van Durme. 2020. Causal inference of script knowledge. ArXiv, abs/2004.01174.