Computer Science ›› 2026, Vol. 53 ›› Issue (5): 286-298.doi: 10.11896/jsjkx.251000076

• Artificial Intelligence • Previous Articles     Next Articles

Explainable Sentencing Prediction Method Driven by Sentencing Rule Knowledge Graph

HAN Linrui1,2, ZHENG Ri1,2, CONG Yingnan3   

  1. 1 Ministry of Education Laboratory of Philosophy, Social Sciences-The CUPL Data Law Lab, China University of Political Science, Law, Beijing 100088, China
    2 Institute for Data Law, China University of Political Science and Law, Beijing 100088, China
    3 Business School, China University of Political Science and Law, Beijing 100088, China
  • Received:2025-10-17 Revised:2025-11-23 Published:2026-05-08
  • About author:HAN Linrui,born in 2000,master,is a member of CCF(No.U9119G).His main research interests include data law,economic law,legal artificial intelligence and blockchain.
    CONG Yingnan,born in 1985Ph.D,associate professor,Ph.D supervisor,is a senior member of CCF(No.J0079S).His main research interests include big data on business and law,artificial intelligence,blockchain,FinTech,RegTechand complex systems.
  • Supported by:
    General Project of Humanities and Social Sciences Research of the Ministry of Education(22YJC190003),2022 National Key R&D Program “Social Governance and Smart Society Technology Support” Key Special Project(2022YFC3303000) and Program for Young Innovative Research Team in China University of Political Science and Law(25CXTD04).

Abstract: Sentencing prediction stands as a core task for legal artificial intelligence empowering criminal justice,playing a vital role in overcoming sentencing bias,enhancing judicial efficiency,and safeguarding fairness and justice.Addressing the bottleneck issues of low prediction accuracy and insufficient interpretability inherent in traditional machine learning models,this paper proposes an explainable sentencing prediction method driven by sentencing rule knowledge graph.The method innovatively designs a knowledge graph and large language model integration architecture.The technical roadmap is as follows.Firstly,a structured sentencing rule knowledge graph is constructed top-down using the BERT-BiLSTM-CRF model.Subsequently,Chain-of-Thought reasoning for sentencing is distilled from the Sentencing Guidelines,and structured prompting based on the graph’s data is employed to conduct supervised instruction fine-tuning on large language models(LLaMA-3-8B-Chinese-Chat,Qwen-2-7B,Baichuan2-7B-Chat,GLM-4-9B-Chat),guiding them to learn standardized sentencing reasoning logic.Finally,during the prediction phase,retrieval-augmented generation is implemented on the fine-tuned model via the graph’s entity recognition and retrieval mechanism,outputting sentencing predictions alongside explainable step-by-step analyses consistent with sentencing rules.Expe-rimental results demonstrate that:1)BERT-BiLSTM-CRF model achieves an F1 score of 0.953 8 on the entity-relation extraction task,outperforming conventional models;2)GLM-4-9B-Chat model achieves the best overall performance in both test-set generation quality and downstream tasks;3)The final sentencing prediction model achieves an F1 score of 0.627 6,significantly outperforming baseline models such as MTL-Fusion,Lawformer,and BERT.Moreover,generating explanatory text following the standardized logic of “determining the sentencing starting point-baseline sentence-adjusting the baseline sentence-declared sentence” significantly enhances the interpretability and user acceptance of results;4)Ablation studies and human evaluations jointly demonstrate the model’s significant superiority over baselines in sentencing accuracy,precision of legal provisions citation,logical cohe-rence and fluency of reasoning,as well as compliance with standardized sentencing steps.This research establishes a novel paradigm integrating knowledge-driven and data-driven approaches for legal AI.

Key words: Sentencing prediction, Knowledge graph, Large language model, KG-LLM integration, Sentencing standardization

CLC Number: 

  • TP183
[1]WANG Y.Substantive Approaches to Sentencing Standardization in the AI Era[J].Law and Economy,2025(3):148-164.
[2]ZHAN G C,MENG Y.Bridging the Divide:Technical Research and Application on Legal Judgment Prediction[EB/OL].https://doi.org/10.1007/s10506-025-09473-7.
[3]FAN A M,WANG Y C.Multi-Task Intelligent Legal Judgment Method Based on BERT Model[J].Microelectronics & Compu-ter,2022,39(9):107-114.
[4]XIAO C,HU X,LIU Z,et al.Lawformer:A Pre-trained Lan-guage Model for Chinese Legal Long Documents[J].AI Open,2021,2:79-84.
[5]WEI B.Judicial Applications and Regulation of Large LegalLanguage Models[J].Oriental Law,2024(5):57-73.
[6]WANG L S.On Predictive Justice[J].Social Science in China,2024(6):80-99.
[7]HUANG B,WU S A,WANG W G,et al.KG-LLM-MCom:A Survey on Integration of Knowledge Graph and Large Language Model[J].Journal of Wuhan University(Natural Science Edition),2024,70(4):397-412.
[8]LIU S,YU S,ZHANG C,et al.Deep Learning-Based LegalJudgment Prediction:A Research Review[J].Computer Engineering and Applications,2026,62(1):68-86.
[9]WEI J,WANG X,SCHUURMANS D,et al.Chain-of-Thought Prompting Elicits Reasoning in Large Language Models[J].Advances in Neural Information Processing Systems,2022,35:24824-24837.
[10]LEWIS P,PEREZ E,PIKTUS A,et al.Retrieval-AugmentedGeneration for Knowledge-Intensive NLP Tasks[J].Advances in Neural Information Processing Systems,2020,33:9459-9474.
[11]CUI J,SHEN X,WEN S.A Survey on Legal Judgment Prediction:Datasets,Metrics,Models and Challenges[J].IEEE Access,2023,11:102050-102071.
[12]KORT F.Predicting Supreme Court Decisions Mathematically:A Quantitative Analysis of the “Right to Counsel” Cases[J].American Political Science Review,1957,51(1):1-12.
[13]SERGOT M J,SADRI F,KOWALSKI R A,et al.The British Nationality Act as a logic program[J].Communications of the ACM,1986,29(5):370-386.
[14]ZHANG H,PAN B,TAN H,et al.Judgment Prediction Based on Legal Judgment Documents[J].Big Data Research,2021,7(5):164-175.
[15]KATZ D M,BOMMARITO II M J,BLACKMAN J.Predicting the Behavior of the Supreme Court of the United States:A Ge-neral Approach[J].arXiv:1407.6333,2014.
[16]SULEA O M,ZAMPIERI M,MALMASI S,et al.Exploring the use of Text Classification in the Legal Domain[J].arXiv:1710.09306,2017.
[17]LUO B,FENG Y,XU J,et al.Learning to Predict Charges for Criminal Cases with Legal Basis[J].arXiv:1707.09168,2017.
[18]LIU Z L,ZHANG M S,ZHENG R R,et al.Multi-task Learning Model for Legal Judgment Predictions with Charge Keywords[J].Journal of Tsinghua University(Science and Technology),2019,59(7):497-504.
[19]ZHANG H,ZHENG W,DOU Z,et al.Integrating Multi-Layer Structure Information of Law for Legal Judgement Prediction[J].Computer Engineering and Applications,2023,59(3):253-263.
[20]YIN M,LI X,LI C,et al.An Analysis Method of Influencing Factors of Legal Judgment Prediction[J].Computer and Mo-dernization,2021(4):37-41.
[21]CHEN Y G,LIU H,LI C,et al.Knowledge Graph Construction Techniques Based on Criminal Cases[J].Journal of Zhengzhou University(Natural Science Edition),2019,51(3):85-90.
[22]WANG N,LIU W,LAN J.Construction and Completion of Legal Knowledge Graph Based on Court Judgment Documents[J].Journal of Zhengzhou University(Natural Science Edition),2021,53(3):23-29.
[23]HONG W,HU Z,WENG Y,et al.Automated KnowledgeGraph Construction for Judicial Case Facts[J].Journal of Chinese Information Processing,2020,34(1):34-44.
[24]LI Z Y,ZHANG Y J,HUANG Y X,et al.Legal Judgment Prediction Using Case Feature Enhancement Based on Knowledge Graph[J].Application Research of Computers,2024,41(7):2153-2159.
[25]HONG L X.Misunderstandings and Correct Ways:the Dilem-ma,Causes and Improvements of Algorithm Problems in Legal Artificial Intelligence[J].Journal of Sichuan Normal University(Social Sciences Edition),2020,47(1):58-70.
[26]CONG Y N,HAN L R,MA J Y,et al.Research on Intelligent Judgment of Criminal Cases Based on Large Language Models[J].Computer Science,2025,52(5):58-69.
[27]CHEN X H,CHENG J L,HU D B,et al.Application of Artificial Intelligence Large Language Model for Smart Environmental Judicial Adjudication[J].Strategic Study of CAE,2024,26(1):190-201.
[28]WANG D S.Multi-defendant Legal Judgment Prediction withMulti-turn LLM and Criminal Knowledge Graph[J].Computer Science,2025,52(8):308-316.
[29]JING H F,WANG D S.A Sentencing Normativity Prediction Method Based on Multi-Source Knowledge Aggregation[EB/OL].https://doi.org/10.13209/j.0479-8023.2025.098.
[30]VALVODA J,COTTERELL R.Towards Explainability in Legal Outcome Prediction Models[J].arXiv:2403.16852,2024.
[31]PENG X,CHEN L.Athena:Retrieval-augmented Legal Judgment Prediction with Large Language Models[J].arXiv:2410.11195,2024.
[32]WANG X,ZHANG X,HOO V,et al.LegalReasoner:A Multi-Stage Framework for Legal Judgment Prediction via Large Language Models and Knowledge Integration[J].IEEE Access,2024,12:166843-166854.
[33]HU E J,SHEN Y,WALLIS P,et al.LoRA:Low-Rank Adaptation of Large Language Models[J].arXiv:2106.09685,2021.
[34]DEVLIN J,CHANG M,LEE K,et al.BERT:Pre-training ofDeep Bidirectional Transformers for Language Understanding[C]//Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies.Minneapolis,Minnesota:Association for Computational Linguistics,2019:4171-4186.
[35]VASWANI A,SHAZEER N,PARMAR N,et al.AttentionIs All You Need[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems.2017:6000-6010.
[36]TAM S,SAID R B,TANRÖIVER Ö Ö.A ConvBiLSTM Deep Learning Model-based Approach for Twitter Sentiment Classification[J].IEEE Access,2021,9:41283-41293.
[37]KUMAR H,AGARWAL A,DASGUPTA R,et al.Dialogue Act Sequence Labeling Using Hierarchical Encoder With CRF[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2018:3440-3447.
[38]LI X,ZHANG F,LI Q,et al.Exploiting a Knowledge Hypergraph for Modeling Multi-nary Relations in Fault Diagnosis Reports[J].Advanced Engineering Informatics,2023,57:102084.
[39]XIE T,YANG J A,LIU H.Chinese Entity Recognition Based on BERT-BiLSTM-CRF Model[J].Computer Systems & Applications,2020,29(7):48-55.
[40]ZHANG F,YANG L Y,LI J W,et al.An Overview of EntityAlignment Methods[J].Chinese Journal of Computers,2022,45(6):1195-1225.
[41]PAPINENI K,ROUKOS S,WARD T,et al.BLEU:A Method for Automatic Evaluation of Machine Translation[C]//Procee-dings of the 40th Annual Meeting of the Association for Computational Linguistics.ACL,2002:311-318.
[42]LIN C Y.ROUGE:A Package for Automatic Evaluation ofSummaries[C]//Text Summarization Branches Out.Association for Computational Linguistics,2004:74-81.
[43]XU L,LI A,ZHU L,et al.SuperCLUE:A Comprehensive Chinese Large Language Model Benchmark[J].arXiv:2307.15020,2023.
[44]ZHAO X,ZHANG H,WANG D S.Review of Large Language Model Evaluation Studies:Current Status,Applications,Challenges,and Trends[J].Journal of the China Society for Scientific and Technical Information,2025,44(8):1058-1074.
[45]ZHAO Y,HE J W,ZHU S C,et al.Security of Large Language Models:Current Status and Challenges[J].Computer Science,2024,51(1):68-71.
[46]HAO Y,DONG L,WEI F,et al.Self-Attention Attribution:Interpreting Information Interactions inside Transformer[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2021,35(14):12963-12971.
[47]VELIČKOVIĆ P,CUCURULL G,CASANOVA A,et al.Graph Attention Networks[J].arXiv:1710.10903,2017.
[48]JIA Y.On Digital Courts[J].Chinese Journal of Law,2024,46(4):3-20.
[1] JI Wendi, WANG Yongquan, SHEN Yicheng. Boosting Generative Rule Extraction via Negative-aware Approach [J]. Computer Science, 2026, 53(5): 276-285.
[2] LIU Xukai, LIU Yang, HUANG Haozhen. EC-MIIP:Efficient Fine-tuning Small-parameter Large Language Model for Intellectual Property [J]. Computer Science, 2026, 53(5): 299-308.
[3] WANG Shenghui, LI Teng. Innovative Automated Scoring Based on Large Language Models [J]. Computer Science, 2026, 53(5): 90-98.
[4] LI Minbo, WANG Shaohua, WU Dazhen. Data Resource Organization Method Based on Enterprise Dataspace and Data Asset Management [J]. Computer Science, 2026, 53(5): 119-128.
[5] HU Junjie, CHEN Yujie, HU Yikun, WEN Cheng, CAO Jialun, MA Zhi, SU Jie, SUN Weidi, TIAN Cong, QIN Shengchao. Formal Theorem Proving Empowered by Large Language Model:Survey and Perspectives [J]. Computer Science, 2026, 53(4): 1-23.
[6] LIU Suyi, LIU Qi, GAO Weibo. Agent4Stu:Efficient LLM-based Student Answer Behavior Simulation Agent [J]. Computer Science, 2026, 53(4): 347-355.
[7] WU Qiaorui, LUO Li, ZHAO Cairong. LLM-augmented Training Framework with Cycle-Consistency Constraints [J]. Computer Science, 2026, 53(4): 377-383.
[8] XIN Yichen, LI Shichong, CHEN Bin, CHENG Zhangtao, LI Ye, ZHOU Fan. Enhancing Temporal Knowledge Graph Reasoning Method with Graph Information Bottleneck and Transformer [J]. Computer Science, 2026, 53(4): 393-405.
[9] WU Xianjie, LI Tongliang, LI Zhoujun. Survey of Table Question Answering Research [J]. Computer Science, 2026, 53(3): 295-306.
[10] XU Cheng, LIU Yuxuan, WANG Xin, ZHANG Cheng, YAO Dengfeng, YUAN Jiazheng. Review of Speech Disorder Assessment Methods Driven by Large Language Models [J]. Computer Science, 2026, 53(3): 307-320.
[11] LI Wenli, FENG Xiaonian, QIAN Tieyun. Few-shot Continuous Toxicity Detection Based on Large Language Model Augmentation [J]. Computer Science, 2026, 53(3): 321-330.
[12] QIN Jing, LI Guanfeng, CHEN Yuyin, XIAO Yuhang. Embedding Model of Knowledge Graph via Jointly Modeling Ontology and Instances [J]. Computer Science, 2026, 53(3): 331-340.
[13] DU Jiantong, GUAN Zeli, XUE Zhe. Multi-task Learning-based Ophthalmic Video Feature Fusion and Multi-dimensional Profiling [J]. Computer Science, 2026, 53(3): 383-391.
[14] WANG Zhibin, LI Shipeng, ZHOU Yuhang, LI Xue, ZHANG Zhonghui, JIANG Zhiwei, GU Rong, TIAN Chen, CHEN Guihai, ZHONG Sheng. Optimization of Service Level Objectives and System Level Metrics in Large Language ModelServing System [J]. Computer Science, 2026, 53(3): 23-32.
[15] ZHOU Yueyuan, LU Guanze, XIANG Jiawei, ZHANG Jiawei, SHAO En, HE Xin. Training System for Large Language Models Based on Adaptive Transpose on Hygon DCU [J]. Computer Science, 2026, 53(3): 33-40.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!