The Transparency and Interpretability InJudicial Judgments Classification with Explainable AI

Authors

  • Ahmad Abdullah Department of Computer Science, Bahauddin Zakariya University, Multan, Pakistan
  • Saad Rasool Department of Computer Science, Bahauddin Zakariya University, Multan, Pakistan
  • Qaisar Rasool Department of Computer Science, Bahauddin Zakariya University, Multan, Pakistan
  • Muhammad Asif Raza Department of Computer Science, Bahauddin Zakariya University, Multan, Pakistan

DOI:

https://doi.org/10.22555/pjets.v14i1.1522

Keywords:

Judicial Judgment Classification, Court Cases, Explainable AI, Legal Text Mining, Machine Learning

Abstract

Judicial judgment classification has gained a lot of attention in the field of automated judicial judgment due to the
opportunities of creating legal information management and decision support systems. Although deep learning models
have demonstrated high predictive accuracy in this space, there is concern about the black-box decision-making pro-
cess where transparency, trust, and ethical application of AI are involved in highly sensitive cases of law. To address
these weaknesses, an Explainable Artificial Intelligence (XAI)-powered framework, a continuation of the earlier study,
a fusion of Shapley Additive exPlanations (SHAP) and advanced text mining algorithms and transformer-based lan-
guage models in judicial decision classification is proposed in this study. We compare Long Short-Term Memory
(LSTM) and DistilBERT, and critically analyze the results of these approaches on a feature-by-feature basis, based
on a filtered set of criminal cases dataset made from Pakistani High and Supreme Courts. We also carry out a com-
parative explainability analysis in addition to analyzing the performance to examine the consistency of model explain-
ability. Further, the idea of SHAP learning linguistic characteristics is considered through the prism of a legal expla-
nation that demonstrates the influence of terms and context with a legal connotation on the decisions of the model.
The paper explains the importance of explainability in identifying potential biases and misleading styles of text that
will contribute to the achievement of credible and accountable AI use in the legal profession. The experimental find-
ings have shown that explainability does not reduce model transparency at the expense of classification performance.
The framework suggested provides a solution to judicial text analytics by connecting predictive performance, as well
as interpretability, and makes a sensible step towards responsible and explainable legal AI systems.

References

[1] A. Li, Y. Wu, M. Cai, A. Jatowt, X. Zhou, W. Lu, et al., “Legal judgment prediction based on knowledge-enhanced multi-task and multi-label text classification,” in Proc. 2025 Conf. Nations Americas Chapter Assoc. Comput. Linguistics: Human Lang. Technol. (NAACL-HLT), vol. 1: Long Papers, Apr. 2025, pp. 6957–6970.

[2] H. Sargeant, A. Izzidien, and F. Steffek, “Topic classification of case law using a large language model and a new taxonomy for UK law: AI insights into summary judgment,” Artificial Intelligence and Law, pp. 1–49, 2025.

[3] S. K. Nigam, T. Dubey, G. Sharma, N. Shallum, K. Ghosh, and A. Bhattacharya, “Legalseg: Unlocking the struc-ture of Indian legal judgments through rhetorical role classification,” arXiv preprint arXiv:2502.05836, 2025.

[4] N. Z. Dina, S. D. Ravana, and N. Idris, “Legal judgment prediction using natural language processing and ma-chine learning methods: A systematic literature review,” SAGE Open, vol. 15, no. 2, Art. no. 21582440251329663, 2025.

[5] C. Meng, Y. Todo, C. Tang, L. Luan, and Z. Tang, “MFLSCI: Multi-granularity fusion and label semantic corre-lation information for multi-label legal text classification,” Engineering Applications of Artificial Intelligence, vol. 139, Art. no. 109604, 2025.

[6] W. Gao, S. Yu, Y. Qin, C. Yang, R. Huang, Y. Chen, and C. Lin, “LSDK-LegalSum: Improving legal judgment summarization using logical structure and domain knowledge,” Journal of King Saud University—Computer and Information Sciences, vol. 37, no. 1, pp. 1–15, 2025.

[7] T. Li, L. Mi, X. Meng, Y. Jia, L. Zhao, Q. Zhao, et al., “Addressing long-tailed distribution in judicial text for crim-inal motive classification: A balanced contrastive learning approach,” EPJ Data Science, vol. 14, no. 1, Art. no. 14, 2025.

[8] H. T. T. Nguyen, H. Q. Cao, K. V. T. Nguyen, and N. D. K. Pham, “Evaluation of explainable artificial intelli-gence: SHAP, LIME, and CAM,” in Proc. FPT AI Conf., May 2021, pp. 1–6.

[9] D. Gaspar, P. Silva, and C. Silva, “Explainable AI for intrusion detection systems: LIME and SHAP applicability on multi-layer perceptron,” IEEE Access, vol. 12, pp. 30164–30175, 2024.

[10] O. Yalcin, X. Fan, and S. Liu, “Evaluating the correctness of explainable AI algorithms for classification,” arXiv preprint arXiv:2105.09740, 2021.

[11] I. Ahmed, A. Brahmacharimayum, R. H. Ali, T. A. Khan, and M. O. Ahmad, “Explainable AI for depression detection and severity classification from activity data: Development and evaluation study of an interpretable framework,” JMIR Mental Health, vol. 12, no. 1, Art. no. e72038, 2025.

[12] T. T. H. Le, H. Kim, H. Kang, and H. Kim, “Classification and explanation for intrusion detection system based on ensemble trees and SHAP method,” Sensors, vol. 22, no. 3, Art. no. 1154, 2022.

[13] W. Khan, J. Ahmad, N. Alasbali, A. Al Mazroa, M. S. Alshehri, and M. S. Khan, “A novel transformer-based explainable AI approach using SHAP for intrusion detection in vehicular ad hoc networks,” Computer Networks, Art. no. 111575, 2025.

[14] J. Lee, “Legal text classification in Korean sexual offense cases: From traditional machine learning to large language models with XAI insights,” Artificial Intelligence and Law, pp. 1–22, 2025.

[15] A. Sharma, A. Singh, and D. Shrivastava, “Hybrid legal language simplification for Indian judiciary: Leverag-ing LegalBERT and summarization techniques,” in Proc. 2025 Int. Conf. Next Generation Information System En-gineering (NGISE), vol. 1, 2025, pp. 1–4.

[16] N. Wang, S. Cui, E. Zhao, and B. Jin, “A classification method for online consultation on civil disputes based on deep transfer learning with small datasets,” Engineering Applications of Artificial Intelligence, vol. 157, Art. no. 111360, 2025.

[17] H. Sargeant, H. Waldetoft, and M. Magnusson, “Classifying hate: Legal and ethical evaluations of ML-assisted hate crime classification and estimation in Sweden,” in Proc. 2025 ACM Conf. Fairness, Accountability, Transparency (FAccT), Jun. 2025, pp. 195–208.

[18] S. Rasool, I. Hanif, Q. Rasool, H. Afzal, and M. R. Mufti, “A text mining approach for automated case classi-fication of judicial judgment,” Proceedings of the Pakistan Academy of Sciences: A. Physical and Computational Sciences, vol. 62, no. 1, pp. 41–51, 2025.

[19] B. Wei, Y. Yu, L. Gan, and F. Wu, “An LLMs-based neuro-symbolic legal judgment prediction framework for civil cases,” Artificial Intelligence and Law, pp. 1–35, 2025.

[20] S. Jadhav, A. P. Shende, and S. Sapkal, “A hybrid graph-attention and contextual sentiment embedding model for sentiment analysis in legal documents,” Acdlore Transactions on Machine Learning, vol. 4, no. 2, pp. 62–81, 2025.

[21] T. B. Donmez, M. Kutlu, M. Mansour, and M. Z. Yildiz, “Explainable AI in action: A comparative analysis of hypertension risk factors using SHAP and LIME,” Neural Computing and Applications, vol. 37, no. 5, pp. 4053–4074, 2025.

[22] C. C. Ukwuoma, D. Cai, E. O. Eziefuna, A. Oluwasanmi, S. F. Abdi, G. W. Muoka, et al., “Enhancing histo-pathological medical image classification for early cancer diagnosis using deep learning and explainable AI—LIME & SHAP,” Biomedical Signal Processing and Control, vol. 100, Art. no. 107014, 2025.

[23] Z. Rafie, M. S. Talab, B. E. Z. Koor, A. Garavand, C. Salehnasab, and M. Ghaderzadeh, “Leveraging XGBoost and explainable AI for accurate prediction of type 2 diabetes,” BMC Public Health, vol. 25, no. 1, Art. no. 3688, 2025.

[24] Y. Aryal, “Assessing climate and watershed controls on rain-on-snow runoff using XGBoost-SHAP explainable AI (XAI),” Geosciences, vol. 15, no. 12, Art. no. 467, 2025.

Downloads

Published

2026-06-16

How to Cite

The Transparency and Interpretability InJudicial Judgments Classification with Explainable AI. (2026). Pakistan Journal of Engineering, Technology and Science, 14(1), 112-123. https://doi.org/10.22555/pjets.v14i1.1522

Similar Articles

1-10 of 77

You may also start an advanced similarity search for this article.