Abstract
Identifying contradictory statements in legal proceedings is largely manual in nature. Automating this using intelligent techniques such as natural language model will not only save a lot of time but also aid in the process of solving legal cases. This paper aims at creating an artificial intelligent (AI) model that can identify contradictory sentences in legal proceedings. The novelty of this study is the construction of a new dataset that represents neutral and contradictory statements that may be given in the legal proceedings. We give a comparative study of the various pre-trained Natural Language Models such as ELMo, Google BERT, XLNet, and Google ALBERT to understand and identify contradictory statements made by people in legal proceedings. We achieve the highest accuracy of 88.0% in identifying contradictory statements using the Google ALBERT model. This model can be implemented on a real-time basis and hence has practical applicability.




Similar content being viewed by others
Explore related subjects
Discover the latest articles and news from researchers in related subjects, suggested using machine learning.References
Kersting K. Machine learning and artificial intelligence: two fellow travelers on the quest for intelligent behavior in machines. Front Big Data. 2018;1.
Beg Mirza A. Impact of artificial intelligence on indian legal system. Legal Service India—law, lawyers and legal resources. Legal Serv India E-J. 2018. https://legalserviceindia.com/legal/article-631-impact-of-artificial-intelligence-on-indian-legal-system.html.
Jen. Legal Geek | Online Events | In-Person Events | Legal Conferences. Legal Geek. https://www.legalgeek.co/. Accessed 1 Mar 2021.
Affordable Legal Services, Free Legal Documents, Advice & Ask a Lawyer | Rocket Lawyer. Affordable Legal Services, Free Legal Documents, Advice & Ask a Lawyer | Rocket Lawyer. https://www.rocketlawyer.com/. Accessed 1 Mar 2021.
The Most Granular Mapping of US Case Law | CaseMine. The Most Granular Mapping of US Case Law | CaseMine. https://www.casemine.com/. Accessed 1 Mar 2021.
Lex Machina. Legal analytics by Lex Machina. https://lexmachina.com/. Accessed 28 Feb 2021.
Luminance Technologies Ltd. Luminance. Luminance. https://www.luminance.com/. Accessed 28 Feb 2021.
Sil R, Bharat B, Arun M. Artificial intelligence and machine learning based legal application: the state-of-the-art and future research trends. 2019; 57–62.
NearLaw e Judgments Supreme Court Bombay High Court IPC CrPC CPC. NearLaw e judgments supreme court Bombay high court IPC CrPC CPC, 9AD. https://nearlaw.com/.
Premonition. Premonition: legal analytics | unfair advantage in litigation. https://premonition.ai/. Accessed 28 Feb 2021.
Contract management for teams of all sizes | SpotDraft. Contract management for teams of all sizes | SpotDraft. https://spotdraft.com/. Accessed 28 Feb 2021.
Leverton. Leverton artificial intelligence platform | data extraction. https://www.leverton.ai/. Accessed 28 Feb 2021.
Dabass J, Bhupender D. Scope of artificial intelligence in law. Berlin: Springer; 2018.
Krieger H, Peters A, Kreuzer L. Due diligence in the international legal order. Oxford: Oxford University Press; 2021.
Pasquale F, Glyn C. Prediction, persuasion, and the jurisprudence of behaviourism. Univ Toronto Law J. 2018;68:63–81.
Dagan H, Kreitner R, Katz Kricheli T. Legal theory for legal empiricists. Law Soc Inquiry. 2018;43.
Jackson D, Kelly N, Calloway J. How do I choose? Selecting and implementing law practice technology. 2018.
Welcome to Edward Elgar Publishing. 3D printing and beyond. https://www.e-elgar.com/shop/gbp/3d-printing-and-beyond-9781786434043.html. Accessed 2 May 2021.
Dubber Markus D. Comparative criminal law. Edited by Mathias Reimann and Reinhard Zimmermann. Oxf Handb Comp Law. 2006;1286–326. https://doi.org/10.1093/oxfordhb/9780199296064.013.0041.
Rissland E. Artificial intelligence and law: stepping stones to a model of legal reasoning. Yale Law J. 1990;99.
Scherer M. artificial intelligence and legal decision-making: the wide open? Study on the example of international arbitration (May 22, 2019). In: Queen Mary School of Law Legal Studies research paper No. 318/2019. Available at SSRN: https://ssrn.com/abstract=3392669.
Sharma D. Proving a contradiction during a Trial|SCC Blog. SCC Blog. https://www.scconline.com/blog/post/2020/09/12/proving-a-contradiction-during-a-trial/. Accessed 12 Sep 2020.
Kadam VP, Baokar SG, Pallod SS, Patil VV, Balwani CR, Bhagwat RR. Contradictions and omissions. 2019. http://mja.gov.in/Site/Upload/GR/Title%20NO.211(As%20Per%20Workshop%20List%20title%20no211%20pdf).pdf.
Government of Maharashtra. Recording and proof of contradictions and omissions, their evidential value and appreciation of evidence of hostile witnesses. D. Google, 2014. http://mja.gov.in/Site/Upload/GR/Title%20NO.66(As%20Per%20Workshop%20List%20title%20no66%20pdf).pdf.
The Stanford Natural Language Processing Group. The Stanford natural language inference (SNLI) corpus. https://nlp.stanford.edu/projects/snli/. Accessed 26 Jan 2021.
Bowman Samuel R, Angeli G, Potts C, Manning Christopher D. A large annotated corpus for learning natural language inference. In: Proceedings of the 2015 conference on empirical methods in natural language processing. 2015. https://doi.org/10.18653/v1/D15-1075.
Williams A, Nangia N, Bowman S. The multi-genre NLI corpus. Home Page | NYU Courant. MultiNLI. https://cims.nyu.edu/~sbowman/multinli/. Accessed 26 Jan 2021.
Williams A, Nangia N, Bowman S. A broad-coverage challenge corpus for sentence understanding through inference. In: Proceedings of the 2018 conference of the North American chapter of the Association for Computational Linguistics: human language technologies, vol 1 (long papers). https://doi.org/10.18653/v1/N18-1101. 2018. p. 17.
Wang A, Singh A, Bowman S. GLUE benchmark. GLUE benchmark. https://gluebenchmark.com/. Accessed 26 Jan 2021.
Wang A, Bowman S, Singh A, Michael J, Hill F, Levy O. GLUE: a multi-task benchmark and analysis platform for natural language understanding. In: Proceedings of the 2018 EMNLP workshop BlackboxNLP: analyzing and interpreting neural networks for NLP. 2018. https://doi.org/10.18653/v1/W18-5446.
Singh V, Balwinder S. An effective tokenization algorithm for information retrieval systems. 2014.
Mandelbaum A, Adi S. Word embeddings and their use in sentence classification tasks. 2016. https://arxiv.org/pdf/1610.08229.pdf.
Wu Y, Mike S, Zhifeng C, Quoc L, Mohammad N, Wolfgang M, Maxim K, Yuan C, Qin G, Klaus M, Jeff K, Apurva S, Melvin J, Xiaobing L, ukasz K, Stephan G, Yoshikiyo K, Taku K, Hideto K, Jeffrey D. Google’s neural machine translation system: bridging the gap between human and machine translation. 2016.
Sileo D. Understanding BERT transformer: attention isn’t all you need | by Damien Sileo | Synapsedev | Medium. Medium. synapsedev. https://medium.com/synapse-dev/understanding-bert-transformer-attention-isnt-all-you-need-5839ebd396db. Accessed 26 Feb 2019.
Stickland A, Murray I. BERT and PALs: projected attention layers for efficient adaptation in multi-task learning. 2019.
American Express. Attention Mechanism In Deep Learning | Attention Model Keras. Analytics Vidhya. https://www.facebook.com/AnalyticsVidhya/. https://www.analyticsvidhya.com/blog/2019/11/comprehensive-guide-attention-mechanism-deep-learning/. Accessed 20 Nov 2019.
Patchigolla D. Understanding BERT architecture. BERT is probably one of the most | by Dileep Patchigolla | Analytics Vidhya | Medium. Medium. Analytics Vidhya. https://medium.com/analytics-vidhya/understanding-bert-architecture-3f35a264b187. Accessed 10 Nov 2019.
Peters Matthew E, Neumann M, Gardner M, Iyyer M. Deep contextualized word representations. In: Proceedings of the 2018 conference of the North American, Chapter of the Association for Computational Linguistics: human language technologies, Vol. 1 (Long Papers). 2018. https://doi.org/10.18653/v1/N18-1202.
Huang Z, Wei X, Kai Y. Bidirectional LSTM-CRF models for sequence tagging. 2015.
Singh A. How to build custom NER model with context based word embeddings in vernacular languages | by Akash Singh | Saarthi.Ai | Medium. Medium. Saarthi.ai. https://medium.com/saarthi-ai/how-to-make-your-own-ner-model-with-contexual-word-embeddings-5086276e04a0. Accessed 29 Apr 2019.
Joshi P. What is ELMo | ELMo for text classification in Python. Analytics Vidhya. https://www.facebook.com/AnalyticsVidhya/. https://www.analyticsvidhya.com/blog/2019/03/learn-to-use-elmo-to-extract-features-from-text/. Accessed 10 Mar 2019.
Malte A, Ratadiya P. Evolution of transfer learning in natural language processing. 2019.
Horan C. Ten trends in deep learning NLP. FloydHub Blog. FloydHub Blog. https://blog.floydhub.com/ten-trends-in-deep-learning-nlp/. Accessed 12 Mar 2019.
Devlin J, Chang M-W. Google AI Blog: open sourcing BERT: state-of-the-art pre-training for natural language processing. Google AI Blog. Google AI Blog. 2018. https://ai.googleblog.com/2018/11/open-sourcing-bert-state-of-art-pre.html.
Pan S, Qiang Y. A survey on transfer learning. IEEE Trans Knowl Data Eng. 2010;22:1345–59.
Dai A, Le Q. Semi-supervised sequence learning. 2015.
Radford A, Narasimhan K. Improving language understanding by generative pre-training. 2018.
Howard Jeremy, Ruder Sebastian. Universal Language Model Fine-tuning for Text Classification. 2018;328–39. https://doi.org/10.18653/v1/P18-1031.
Devlin J, Chang M-W, Toutanova K, Lee K. BERT: pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 conference of the North American, Chapter of the Association for Computational Linguistics: human language technologies, Vol. 1 (Long and Short Papers). 2019. https://doi.org/10.18653/v1/N19-1423.
Sanad ZR, Mohd A. What Is BERT | BERT for text classification. Analytics Vidhya. https://www.facebook.com/AnalyticsVidhya/. https://www.analyticsvidhya.com/blog/2019/09/demystifying-bert-groundbreaking-nlp-framework/. Accessed 25 Sep 2019.
Horev R. BERT explained: state of the art language model for NLP | by Rani Horev | Towards Data Science. Medium. Towards Data Science. https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270. Accessed 10 Nov 2018.
Seth Y. BERT explained—a list of frequently asked questions—let the machines learn. Let the machines learn. https://www.facebook.com/WordPresscom, https://yashuseth.blog/2019/06/12/bert-explained-faqs-understand-bert-working/. Accessed 11 June 2019.
Horev R. BERT: state of the art NLP model, explained - KDnuggets. KDnuggets. https://www.facebook.com/kdnuggets. https://www.kdnuggets.com/2018/12/bert-sota-nlp-model-explained.html. Accessed 28 Feb 2021.
Yang Z, Dai Z, Yang Y, Carbonell J, Salakhutdinov R, Le Quoc V. XLNet: generalized autoregressive pretraining for language understanding. Adv Neural Inf Process Syst 32 (NeurIPS 2019). 2020. https://arxiv.org/pdf/1906.08237.pdf.
Xu L. What is XLNet and why it outperforms BERT | by Xu LIANG | Towards Data Science. Medium. Towards Data Science. https://towardsdatascience.com/what-is-xlnet-and-why-it-outperforms-bert-8d8fce710335. Accessed 24 June 2019.
Xiao M. Understanding language using XLNet with autoregressive pre-training | by Maggie Xiao | Medium. Medium. Medium. https://medium.com/@zxiao2015/understanding-language-using-xlnet-with-autoregressive-pre-training-9c86e5bea443. Accessed 4 May 2020.
Huilgol P. Pretrained models for text classification | Deep Learning Models. Analytics Vidhya. https://www.facebook.com/AnalyticsVidhya/, https://www.analyticsvidhya.com/blog/2020/03/6-pretrained-models-text-classification/. Accessed 18 Mar 2020.
Elvis. XLNet outperforms BERT on several NLP tasks | Dair.Ai | Medium. Medium. dair.ai. https://medium.com/dair-ai/xlnet-outperforms-bert-on-several-nlp-tasks-9ec867bb563b. Accessed 21 June 2019.
Soricut R, Lan Z. Google AI Blog: ALBERT: a lite BERT for self-supervised learning of language representations. Google AI Blog. Google AI Blog. 2019. https://ai.googleblog.com/2019/12/albert-lite-bert-for-self-supervised.html.
Lan Z, Chen M, Goodman S, Gimpel K, Sharma P, Soricut R. ALBERT: a lite BERT for self-supervised learning of language representations. In: International conference on learning representations. 2020. https://arxiv.org/pdf/1909.11942.pdf.
GeeksforGeeks. ALBERT— a light BERT for supervised learning—GeeksforGeeks. https://www.geeksforgeeks.org/albert-a-light-bert-for-supervised-learning/. Accessed 25 Nov 2020.
Synced. Google’s ALBERT is a leaner BERT; achieves SOTA on 3 NLP benchmarks | by Synced | SyncedReview | Medium. Medium. SyncedReview. https://medium.com/syncedreview/googles-albert-is-a-leaner-bert-achieves-sota-on-3-nlp-benchmarks-f64466dd583. Accessed 27 Sep 2019.
Shen K. Effect of batch size on training dynamics | by Kevin Shen | Mini Distill | Medium. Medium. Mini Distill. https://medium.com/mini-distill/effect-of-batch-size-on-training-dynamics-21c14f7a716e. Accessed 19 June 2018.
Kandel I, Mauro A. The effect of batch size on the generalizability of the convolutional neural networks on a histopathology dataset. ICT Express. 2020;6.
Ma E. Data augmentation library for text | by Edward Ma | Towards Data Science. Medium. Towards Data Science. https://towardsdatascience.com/data-augmentation-library-for-text-9661736b13ff. Accessed 20 Apr 2019.
Bansal T, Rishikesh J, Andrew M. Learning to few-shot learn across diverse natural language classification tasks. 2020. p. 5108–5123.
Yin W. Meta-learning for few-shot natural language processing: a survey. 2020.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Surana, S., Dembla, S. & Bihani, P. Identifying Contradictions in the Legal Proceedings Using Natural Language Models. SN COMPUT. SCI. 3, 187 (2022). https://doi.org/10.1007/s42979-022-01075-3
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s42979-022-01075-3