Submitted:
15 December 2025
Posted:
17 December 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
- This paper proposes a two-stage sequential fine-tuning framework based on Low-Rank Adaptation (LoRA) that decomposes legal judgment prediction into progressive knowledge acquisition stages. Stage 1 performs legal knowledge pre-tuning with a higher learning rate (), enabling the model to rapidly capture dominant, approximately symmetric structures in the label co-occurrence graph, while Stage 2 conducts judgment relation fine-tuning with a lower learning rate () that refines asymmetric and low-frequency label relationships, achieving efficient transfer learning with only 0.21% trainable parameters.
- This work presents a comprehensive analysis of the theoretical foundations and practical implementation of LoRA-based parameter-efficient fine-tuning for legal text classification. By aligning low-rank parameterization with the structural regularities of the legal judgment graph, the framework provides a symmetry-aware adaptation strategy, along with detailed formulations of optimization objectives and gradient computation procedures for both training stages.
- Extensive experiments are conducted on a Chinese legal case dataset comprising divorce-related judgments with 20 multi-label categories. The results demonstrate that the proposed two-stage approach achieves superior performance compared to single-stage fine-tuning baselines across multiple evaluation metrics including macro F1-score, Hamming Loss, and accuracy, validating that separating symmetric and asymmetric learning behaviors through curriculum-inspired sequential optimization is effective for complex legal domain adaptation tasks.
1.1. Legal Judgment Prediction
1.2. Parameter-Efficient Fine-Tuning for Large Language Models
2. Methodology
2.1. Overview
2.2. Problem Formulation
2.3. Low-Rank Adaptation for Parameter-Efficient Fine-Tuning
2.4. Two-Stage Sequential Fine-Tuning Strategy
2.4.1. Stage 1: Legal Knowledge Pre-Tuning
2.4.2. Stage 2: Judgment Relation Fine-Tuning
2.4.3. Rationale for Sequential Fine-Tuning
2.5. Implementation Details
2.6. Datasets
- Child-related labels: DV1 (Children after marriage), DV2 (Limited capacity child custody), DV4 (Child support payment), DV8 (Monthly child support), DV19 (Children living with non-custodial parent), DV14 (Existence of illegitimate children).
- Property-related labels: DV3 (Marital community property), DV5 (Real estate division), DV11 (Pre-marital personal property), DV20 (Post-marital personal property), DV10 (Marital community debt).
- Divorce grounds and procedures: DV9 (Approval of divorce), DV12 (Legal grounds for divorce), DV6 (Post-marital separation), DV7 (Second petition), DV18 (Emotional discord and two-year separation), DV13 (Failure to perform family obligations).
- Additional legal elements: DV15 (Appropriate assistance), DV16 (Failure to perform agreement), DV17 (Damages compensation).
2.7. Experimental Setup
2.7.1. Comparison Methods
- Traditional ML Baselines: Support Vector Machine (SVM), Random Forest, and Gradient Boosting classifiers using TF-IDF features, representing classical feature-based approaches for legal text classification [9,10]. These models do not explicitly account for label co-occurrence structure and therefore provide a useful lower bound for tasks involving asymmetric and sparse labels.
- Neural Baselines: TextCNN and BERT-base Chinese fine-tuned on the legal judgment task, representing standard neural and pre-trained language model baselines without parameter-efficient adaptation [11]. These models learn continuous representations but still rely on full-parameter updates that may overfit to rare or weakly connected labels.
- Legal-Specific Models: MPBFN, LADAN, Mulan, and CBA, domain-specific architectures designed for legal judgment prediction tasks [12,39,40,41]. These models often incorporate hierarchical or attention-based mechanisms tailored for the structural dependencies observed in legal reasoning, making them natural baselines for evaluating how well the proposed approach captures symmetric and asymmetric relations across the label graph.
2.7.2. Evaluation Metrics
- Macro Precision, Macro Recall, and Macro F1-Score: computed independently for each label and then averaged across labels. These metrics evaluate performance uniformly across the entire label graph, regardless of the node degree or connectivity of each label.
- Hamming Loss: measures the fraction of incorrectly predicted labels. Because rare labels form structurally asymmetric nodes in the label graph, Hamming Loss is sensitive to false positives or false negatives in these regions and thus complements macro-averaged metrics.
- Accuracy: evaluates whether the entire set of predicted labels for each sample matches the ground truth. This metric becomes stringent under the severe sparsity of the dataset, where most samples contain few labels.
2.7.3. Implementation Details
2.7.4. Performance Assessment
2.7.5. Ablation Study
2.7.6. Hyperparameter Sensitivity Analysis
3. Conclusion
4. Additional Information
Author Contributions
Conflicts of Interest
References
- Zhao, Q.; Gao, T.; Guo, N. Beyond text: Fusing multi-modal legal knowledge for legal judgment prediction. Knowledge-Based Systems 2025, 329, 114358. [Google Scholar] [CrossRef]
- Kong, Y.; Wang, Y.G.; Deng, H.; Xiao, Z.; Zhang, Y. LF-HGRILF: A law-fact heterogeneous graph representation and iterative learning framework for legal judgment prediction. Knowledge-Based Systems 2025, 327, 114083. [Google Scholar] [CrossRef]
- He, C.; Tan, T.P.; Xue, S.; Tan, Y. Simulating judicial trial logic: Dual residual cross-attention learning for predicting legal judgment in long documents. Expert Systems with Applications 2025, 261, 125462. [Google Scholar] [CrossRef]
- Gana, B.; Allende-Cid, H.; Rüping, S.; Becerra-Rozas, M.; Zamora, J. A systematic review of long document summarization methods: Evaluation metrics and approaches. Neurocomputing 2025, 655, 131287. [Google Scholar] [CrossRef]
- Almuzaini, H.A.; Azmi, A.M. TaSbeeb: A judicial decision support system based on deep learning framework. Journal of King Saud University - Computer and Information Sciences 2023, 35, 101695. [Google Scholar] [CrossRef]
- Yin, J. Crime Prediction Methods Based on Machine Learning: A Survey. Computers, Materials and Continua 2022, 74, 4601–4629. [Google Scholar] [CrossRef]
- Feng, X.; Liu, L.; Ye, M.; Mašek, O.; Gouda, S.; Chang, K.; Wang, X.; Huang, Q. Unveiling and interpreting the relationships among multi-pollutant emission factors in municipal solid waste incineration by machine learning. Waste Management 2026, 210, 115256. [Google Scholar] [CrossRef]
- Anonymous. Analysis on Hybrid Deep Neural Networks for Legal Domain Multitasks. International Journal of e-Collaboration 2022, 18. [Google Scholar] [CrossRef]
- Chauhan, V.K.; Dahiya, K.; Sharma, A. Problem formulations and solvers in linear SVM: a review. Artificial Intelligence Review 2019, 52, 803–855. [Google Scholar] [CrossRef]
- Rigatti, S.J. Random forest. Journal of insurance medicine 2017, 47, 31–39. [Google Scholar] [CrossRef]
- Guo, B.; Zhang, C.; Liu, J.; Ma, X. Improving text classification with weighted word embeddings via a multi-channel TextCNN model. Neurocomputing 2019, 363, 366–374. [Google Scholar] [CrossRef]
- Lu, G.; Liu, Y.; Wang, J.; Wu, H. CNN-BiLSTM-Attention: A multi-label neural classifier for short texts with a small set of labels. Information Processing & Management 2023, 60, 103320. [Google Scholar]
- Sukanya, G.; Priyadarshini, J. Modified Hierarchical-Attention Network model for legal judgment predictions. Data & Knowledge Engineering 2023, 147, 102203. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. Proceedings of the Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies 2019, volume 1 (long and short papers), 4171–4186. [Google Scholar]
- Song, D.; Vold, A.; Madan, K.; Schilder, F. Multi-label legal document classification: A deep learning-based approach with label-attention and domain-specific pre-training. Information Systems 2022, 106, 101718. [Google Scholar] [CrossRef]
- Shao, R.; Tang, Y.; Yang, L.; Wang, F. Law LLM unlearning via interfere prompt, review output and update parameter: new challenges, method and baseline. Expert Systems with Applications 2025, 292, 128612. [Google Scholar] [CrossRef]
- Pan, Q.; Ji, W.; Ding, Y.; Li, J.; Chen, S.; Wang, J.; Zhou, J.; Chen, Q.; Zhang, M.; Wu, Y.; et al. A survey of slow thinking-based reasoning LLMs using reinforcement learning and test-time scaling law. Information Processing & Management 2026, 63, 104394. [Google Scholar] [CrossRef]
- Nguyen, H.T.; Fungwacharakorn, W.; Zin, M.M.; Goebel, R.; Toni, F.; Stathis, K.; Satoh, K. LLMs for legal reasoning: A unified framework and future perspectives. Computer Law & Security Review 2025, 58, 106165. [Google Scholar] [CrossRef]
- Sun, J.; Wei, C. A multi-source heterogeneous knowledge injected prompt learning method for legal charge prediction. Applied Soft Computing 2025, 180, 113438. [Google Scholar] [CrossRef]
- Meng, C.; Todo, Y.; Tang, C.; Luan, L.; Tang, Z. DPFSI: A legal judgment prediction method based on deontic logic prompt and fusion of law article statistical information. Expert Systems with Applications 2025, 272, 126722. [Google Scholar] [CrossRef]
- Siino, M. Exploring the use of LLMs in the Italian legal domain: A survey on recent applications. Computer Law & Security Review 2025, 58, 106164. [Google Scholar] [CrossRef]
- Aganaba-Jeanty, T. Introducing the Cosmopolitan Approaches to International Law (CAIL) lens to analyze governance issues as they affect emerging and aspirant space actors. Space Policy 2016, 37, 3–11. [Google Scholar] [CrossRef]
- Nam, S.M.; Park, N.; Park, C.K.; Chang, M.; Yoon, S. An LLM as a virtual simulation model for language-eloquent area surgery in human. Medical Hypotheses 2025, 205, 111792. [Google Scholar] [CrossRef]
- Aghaee, F.; Shaker, H.R. RB-LLM Control: an Intelligent Control Framework with Rule-Based LargeLanguage Model Decision-Making. Aerospace Science and Technology 2025, 111259. [Google Scholar] [CrossRef]
- Kim, K.J.; Lee, C.H.; Bae, S.E.; Choi, J.H.; Kang, W. Digital forensics in law enforcement: A case study of LLM-driven evidence analysis. Forensic Science International: Digital Investigation 2025, 54, 301939. [Google Scholar] [CrossRef]
- Feng, J.; Zhao, L.; Qin, H.; Xu, Y.; Wang, Z. CADLRA: A multi-charge prediction method based on the Criminal Act-Driven Law Retrieval Augmentation. Engineering Applications of Artificial Intelligence 2024, 134, 108619. [Google Scholar] [CrossRef]
- Zhang, K.; Tu, Y.; Lu, J.; Ai, Z.; Liu, Z.; Wang, L.; Liu, X. Multi-Head Hierarchical Attention Framework with Multi-Level Learning Optimization Strategy for Legal Text Recognition. Electronics 2025, 14, 1946. [Google Scholar] [CrossRef]
- Javed, K.; Li, J. Artificial intelligence in judicial adjudication: Semantic biasness classification and identification in legal judgement (SBCILJ). Heliyon 2024, 10, e30184. [Google Scholar] [CrossRef]
- Sukanya, G.; Priyadarshini, J. Fine Tuned Hybrid Deep Learning Model for Effective Judgment Prediction. CMES - Computer Modeling in Engineering and Sciences 2025, 142, 2925–2958. [Google Scholar] [CrossRef]
- Wei, Z.L.; An, H.Y.; Yao, Y.; Su, W.C.; Li, G.; Saifullah; Sun, B.F.; Wang, M.J.S. FSTGAT: Financial Spatio-Temporal Graph Attention Network for Non-Stationary Financial Systems and Its Application in Stock Price Prediction. Symmetry 2025, 17, 1344. [Google Scholar] [CrossRef]
- Tong, S.; Yuan, J.; Zhang, P.; Li, L. Legal Judgment Prediction via graph boosting with constraints. Information Processing & Management 2024, 61, 103663. [Google Scholar] [CrossRef]
- Wang, M.; Lin, Y.; Wang, S.; Wang, M. Sufficient conditions for graphs to be maximally 4-restricted edge connected. Australas. J Comb. 2018, 70, 123–136. [Google Scholar]
- Wang, M.; Xiang, D.; Wang, S. Connectivity and diagnosability of leaf-sort graphs. Parallel Processing Letters 2020, 30, 2040004. [Google Scholar] [CrossRef]
- Wang, S.; Wang, M. A Note on the Connectivity of m-Ary n-Dimensional Hypercubes. Parallel Processing Letters 2019, 29, 1950017. [Google Scholar] [CrossRef]
- Xiang, D.; Hsieh, S.Y.; et al. G-good-neighbor diagnosability under the modified comparison model for multiprocessor systems. Theoretical Computer Science 2025, 1028, 115027. [Google Scholar]
- Wang, M.; Xu, S.; Jiang, J.; Xiang, D.; Hsieh, S.Y. Global reliable diagnosis of networks based on Self-Comparative Diagnosis Model and g-good-neighbor property. Journal of Computer and System Sciences 2025, 103698. [Google Scholar] [CrossRef]
- Wang, M.; Yang, W.; Wang, S. Conditional matching preclusion number for the Cayley graph on the symmetric group. Acta Math. Appl. Sin. (Chinese Series) 2013, 36, 813–820. [Google Scholar]
- Lin, Y.; Wang, M.; Xu, L.; Zhang, F. The maximum forcing number of a polyomino. Australas. J. Combin 2017, 69, 306–314. [Google Scholar]
- Yang, W.; Jia, W.; Zhou, X.; Luo, Y. Legal judgment prediction via multi-perspective bi-feedback network. arXiv 2019, arXiv:1905.03969. [Google Scholar]
- Xu, N.; Wang, P.; Chen, L.; Pan, L.; Wang, X.; Zhao, J. Distinguish confusing law articles for legal judgment prediction. arXiv arXiv:2004.02557. [CrossRef]
- Chen, J.; Du, L.; Liu, M.; Zhou, X. Mulan: A multiple residual article-wise attention network for legal judgment prediction. Transactions on Asian and Low-Resource Language Information Processing 2022, 21, 1–15. [Google Scholar] [CrossRef]
- Lyu, Y.; Wang, Z.; Ren, Z.; Ren, P.; Chen, Z.; Liu, X.; Li, Y.; Li, H.; Song, H. Improving legal judgment prediction through reinforced criminal element extraction. Information Processing & Management 2022, 59, 102780. [Google Scholar] [CrossRef]
- Sha, L.; Camburu, O.M.; Lukasiewicz, T. Rationalizing predictions by adversarial information calibration. Artificial Intelligence 2023, 315, 103828. [Google Scholar] [CrossRef]
- Liu, P.; Zhang, W.; Ding, Y.; Jiang, J.; Yang, S.H. SEMKR: Joint learning of semantic and topological representations for Knowledge Graph Completion. Neurocomputing 2025, 653, 130909. [Google Scholar] [CrossRef]
- Li, S.; Chen, W.; Zhang, Y.; Zhao, G.; Pan, R.; Huang, Z.; Tang, Y. A context-enhanced sentence representation learning method for close domains with topic modeling. Information Sciences 2022, 607, 186–210. [Google Scholar] [CrossRef]
- Yao, F.; Sun, X.; Yu, H.; Zhang, W.; Fu, K. Commonalities-, specificities-, and dependencies-enhanced multi-task learning network for judicial decision prediction. Neurocomputing 2021, 433, 169–180. [Google Scholar] [CrossRef]
- Yang, S.; Tong, S.; Zhu, G.; Cao, J.; Wang, Y.; Xue, Z.; Sun, H.; Wen, Y. MVE-FLK: A multi-task legal judgment prediction via multi-view encoder fusing legal keywords. Knowledge-Based Systems 2022, 239, 107960. [Google Scholar] [CrossRef]
- Zhang, Y.; Wei, X.; Yu, H. HD-LJP: A Hierarchical Dependency-based Legal Judgment Prediction Framework for Multi-task Learning. Knowledge-Based Systems 2024, 299, 112033. [Google Scholar] [CrossRef]
- Zhang, H.; Dou, Z.; Zhu, Y.; Wen, J.R. Contrastive learning for legal judgment prediction. ACM Transactions on Information Systems 2023, 41, 1–25. [Google Scholar] [CrossRef]
- Madambakam, P.; Sarma, H. Integrated dual-level dependency analysis framework for multi-task judicial decision prognosis in murder cases. Engineering Applications of Artificial Intelligence 2025, 160, 112002. [Google Scholar] [CrossRef]
- Yao, F.; Sun, X.; Yu, H.; Yang, Y.; Zhang, W.; Fu, K. Gated hierarchical multi-task learning network for judicial decision prediction. Neurocomputing 2020, 411, 313–326. [Google Scholar] [CrossRef]




| Hyperparameter | Stage 1 | Stage 2 |
|---|---|---|
| Base model | Qwen 3-4B | Qwen 3-4B |
| LoRA rank / | , | , |
| Target modules | ||
| Trainable parameters | 8.4M (0.21%) | 8.4M (0.21%) |
| Quantization / precision | 4-bit NF4, FP16 compute | 4-bit NF4, FP16 compute |
| Learning rate | ||
| Warmup steps | 50 | 30 |
| Max epochs | 3 | 3 |
| Batch size (per device) | 4 (grad. acc.=2) | 4 (grad. acc.=2) |
| Optimizer | AdamW, weight decay 0.01 | AdamW, weight decay 0.01 |
| Method | Macro-P ↑ | Macro-R ↑ | Macro-F1 ↑ | Hamming ↓ | Accuracy ↑ |
|---|---|---|---|---|---|
| Traditional ML Baselines | |||||
| SVM + TF-IDF | 0.7286 | 0.5045 | 0.5648 | 0.0250 | 0.5607 |
| Random Forest + TF-IDF | 0.5704 | 0.2769 | 0.3411 | 0.0352 | 0.4032 |
| Deep Neural Networks | |||||
| TextCNN | 0.7875 | 0.5014 | 0.5714 | 0.0261 | 0.5602 |
| MPBFN | 0.7277 | 0.5984 | 0.6424 | 0.0242 | 0.6215 |
| LADAN | 0.7229 | 0.6186 | 0.6517 | 0.0265 | 0.6176 |
| Mulan | 0.7840 | 0.5301 | 0.5897 | 0.0256 | 0.5860 |
| CBA | 0.8057 | 0.6035 | 0.6587 | 0.0237 | 0.6415 |
| Pre-trained Language Models | |||||
| BERT-base-Chinese | 0.8456 | 0.7843 | 0.8137 | 0.0178 | 0.7912 |
| Large Language Models | |||||
| GPT-2 (with LoRA) | 0.7789 | 0.6412 | 0.7024 | 0.0294 | 0.6518 |
| DeepSeek-1.5B (with LoRA) | 0.8267 | 0.7534 | 0.7885 | 0.0218 | 0.7456 |
| Our Approach | |||||
| LawLLM-DS (Stage 1) | 0.8821 | 0.8612 | 0.8715 | 0.0167 | 0.8134 |
| LawLLM-DS (Stage 2) | 0.9066 | 0.8984 | 0.8893 | 0.0155 | 0.8786 |
| Stage 1 LR | Stage 2 LR | Strategy | Macro-P | Macro-F1 | Hamming ↓ |
|---|---|---|---|---|---|
| Two-Stage (Ours) | 0.9066 | 0.8893 | 0.0155 | ||
| Uniform LR | 0.8756 | 0.8634 | 0.0173 | ||
| Low LR | 0.8623 | 0.8512 | 0.0189 | ||
| High LR | 0.8712 | 0.8578 | 0.0181 | ||
| Reversed | 0.8589 | 0.8467 | 0.0196 |
| LoRA Rank | Trainable Params | Macro-F1 |
|---|---|---|
| 4.2M (0.11%) | 0.8612 | |
| (Ours) | 8.4M (0.21%) | 0.8893 |
| 16.8M (0.42%) | 0.8901 | |
| 33.6M (0.84%) | 0.8915 |
| Target Modules | Macro-F1 | Accuracy |
|---|---|---|
| All 7 modules (Ours) | 0.8893 | 0.8786 |
| Attention only () | 0.8734 | 0.8623 |
| FFN only () | 0.8598 | 0.8456 |
| Query & Value only () | 0.8467 | 0.8234 |
| Training Strategy | Macro-F1 | Hamming Loss |
|---|---|---|
| Two-Stage Sequential (Ours) | 0.8893 | 0.0155 |
| Single-Stage | 0.8547 | 0.0189 |
| Joint Optimization (both stages) | 0.8723 | 0.0171 |
| Alternating Stage Training | 0.8801 | 0.0163 |
| Stage 2 only (w/o Stage 1) | 0.8412 | 0.0198 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).