نموذج توقع الحكم القانوني قائم على دمج المعرفة وإخفاء الاعتماد A legal judgment prediction model based on knowledge fusion and dependency masking

شارك:
المجلة: PLoS ONE، المجلد: 21، العدد: 1
DOI: https://doi.org/10.1371/journal.pone.0340717
PMID: https://pubmed.ncbi.nlm.nih.gov/41544123
تاريخ النشر: 2026-01-16
المؤلف: Yishan Chen وآخرون
الموضوع الرئيسي: الذكاء الاصطناعي في القانون

نظرة عامة

تناقش هذه القسم التقدم في توقع الأحكام القانونية (LJP)، وهو مهمة حاسمة في أنظمة الذكاء الاصطناعي القانوني التي تهدف إلى التنبؤ بالنتائج القانونية بناءً على حقائق القضية. على الرغم من التقدم في أساليب التعلم العميق لأنظمة القانون المدني، لا تزال هناك قيود رئيسية: عدم كفاية دمج المعرفة القضائية الخارجية وعدم فعالية تصفية الاعتماديات الخاطئة في الأطر متعددة المهام. للتغلب على هذه التحديات، يقترح المؤلفون نموذج LJP جديد يدمج تقنيات دمج المعرفة وتغطية الاعتماديات.

يعزز النموذج المقترح طريقة استخراج المعرفة القانونية المعتمدة على BERT من خلال دمج مكون تحسين دلالي محلي قائم على CNN، مما يسهل استخراج أعمق للمعرفة الأساسية من الوثائق القضائية. بالإضافة إلى ذلك، تهدف مقدمة الانتباه التفاضلي إلى تقليل الضوضاء أثناء دمج المعرفة القانونية الخارجية وحقائق القضية، مما يحسن قدرة النموذج على تحديد المعلومات الأساسية. كما تم تقديم آلية تغطية معلومات الاعتماديات متعددة المهام لتحديد وإزالة الاعتماديات الخاطئة بدقة، مما يعزز أداء النموذج في النهاية. تؤكد النتائج التجريبية على مجموعات البيانات الواقعية فعالية هذه الابتكارات، مما يظهر تحسينات كبيرة في دقة LJP.

مقدمة

تسلط مقدمة هذه الورقة البحثية الضوء على التقدم الكبير في معالجة اللغة الطبيعية (NLP) وتطبيقاتها في الذكاء الاصطناعي القانوني (الذكاء الاصطناعي القانوني). تظهر أنظمة الذكاء الاصطناعي القانوني أنها تخفف من عبء العمل على المحترفين القانونيين، وتعزز كفاءة الموظفين القضائيين في تحليل القضايا، وتوفر المساعدة القانونية الأساسية للأفراد، مما يعزز الوصول العادل إلى الموارد القضائية. عنصر حاسم في الذكاء الاصطناعي القانوني هو توقع الأحكام القانونية (LJP)، الذي يهدف إلى التنبؤ بالمقالات القانونية، والاتهامات، والعقوبات بناءً على حقائق القضية. يتم تصنيف طرق LJP الحالية بشكل أساسي إلى نماذج مهمة واحدة وأساليب التعلم متعدد المهام (MTL)، حيث تظهر MTL كاستراتيجية مهيمنة بسبب قدرتها على التعامل بفعالية مع المهام الفرعية المترابطة.

على الرغم من التقدم المحرز في طرق LJP المعتمدة على MTL، تحدد الورقة قيودًا رئيسية، بما في ذلك عدم كفاية استكشاف المعرفة القضائية من الوثائق القانونية واستراتيجيات غير فعالة لإدارة الاعتماديات الخاطئة في علاقات المهام. لمعالجة هذه القضايا، يقترح المؤلفون وحدة استخراج المعرفة القانونية التي تعزز الطرق الحالية من خلال دمج مكون قائم على CNN لتحسين الدلالات المحلية ونهج جديد لدمج المعرفة القضائية في تمثيلات القضية باستخدام الانتباه التفاضلي. بالإضافة إلى ذلك، يقدمون آلية تغطية معلومات الاعتماديات متعددة المهام لتصفية معلومات الاعتماديات الخاطئة، مما يحسن دقة التنبؤات. توضح الورقة مساهماتها وتوفر خارطة طريق للأقسام التالية، والتي تشمل الأعمال ذات الصلة، النموذج المقترح، الإعدادات التجريبية، والاستنتاجات.

طرق

في هذه الدراسة، استخدم المؤلفون نهجًا للتكيف باستخدام نموذج اللغة المدرب مسبقًا LERT-base لتكييفه لمهمتهم المحددة. تم تحديد طول حقائق القضية المدخلة بـ 500 رمز. تضمنت المعلمات الرئيسية للتدريب حجم دفعة قدره 8، ومعدل تعلم قدره $2 \times 10^{-5}$، وحد أقصى من 16 دورة تدريبية، وتحديد قص للانحدار بمقدار 5. تم استخدام مُحسِّن AdamW لتحديث المعلمات، وتم تنفيذ تسخين لمعدل التعلم، والذي يتوافق مع عُشر إجمالي الخطوات لكل دورة. لتقليل الإفراط في التكيف، تم دمج آلية إيقاف مبكر مع صبر قدره 5 دورات. يتم تقديم إعدادات المعلمات التفصيلية في الجدول 2.

نتائج

في هذا القسم، يقدم المؤلفون نتائج نموذج KFDM الخاص بهم المطبق على مجموعة بيانات CAIL2018، مع معالجة عدم توازن البيانات من خلال مقاييس تقييم مختلفة: الدقة (Acc)، الاسترجاع الكلي (MR)، الدقة الكلية (MP)، وF1 الكلي (MF1). أظهر نموذج KFDM أداءً متفوقًا في توقعات المقالات القانونية، محققًا أعلى درجات MF1 على كل من مجموعات بيانات CAIL-small وCAIL-big. يُعزى هذا النجاح إلى دمج المعرفة القضائية الخارجية—تحديدًا المقالات القانونية وتفسيرات الاتهامات—في متجهات تمثيل حقائق القضية، مما يعزز قدرة النموذج على التقاط العناصر الأساسية للقضية. بالإضافة إلى ذلك، تعمل آلية الانتباه التفاضلي متعددة الرؤوس على دمج المعرفة القضائية مع حقائق القضية بشكل فعال، مما يعزز متجهات التمثيل.

كما حسّن نموذج KFDM بشكل كبير دقة توقع الاتهامات مقارنة بالنماذج الأساسية، مستفيدًا من تحسين التمثيل الدلالي لحقائق القضية واستراتيجية تغطية الاعتماديات متعددة المهام التي تقلل من تحيزات التنبؤ. في مهمة توقع مدة العقوبة، تفوق نموذج KFDM على جميع النماذج الأساسية، مستفيدًا من التعريفات الواضحة لنطاقات الجمل في المقالات القانونية لإثراء حقائق القضية. تشير النتائج إلى أن نموذج KFDM لا يتفوق فقط في المهام المحددة ولكن أيضًا يظهر قابلية قوية للتعميم عبر قضايا قانونية متنوعة، كما يتضح من أدائه على مجموعة بيانات PKU. بشكل عام، تؤكد النتائج على فعالية دمج المعرفة الخارجية وآليات الانتباه المتقدمة في مهام التنبؤ القانونية.

نقاش

في قسم النقاش من الورقة البحثية، يستعرض المؤلفون تطور منهجيات توقع الأحكام القانونية (LJP)، مسلطين الضوء على الانتقال من تقنيات التعلم الآلي التقليدية، مثل آلات الدعم الناقل (SVM) ومصنفات الغابات العشوائية، إلى أساليب التعلم العميق المتقدمة. عانت الطرق المبكرة من صعوبة استخراج الميزات العميقة والعلاقات المعقدة بين المهام الفرعية في مهام LJP. لقد حسّن ظهور الشبكات العصبية متعددة الطبقات بشكل كبير القدرة على تعلم تمثيلات معقدة تلقائيًا من بيانات النصوص القانونية. تشمل التقدمات الملحوظة استخدام الشبكات العصبية التلافيفية (CNNs) وآليات الانتباه، التي حسّنت دقة التصنيف والتعميم في السياقات القانونية.

يحدد المؤلفون ثلاثة مجالات بحث رئيسية في طرق LJP الحالية المعتمدة على التعلم العميق: (1) الاستفادة من علاقات الاعتماد بين المهام الفرعية لتعزيز دقة التصنيف، (2) دمج المعرفة القانونية في تمثيلات حقائق القضية لتحسين التعبير الدلالي، و(3) استخدام التعلم التبايني والشبكات العصبية الرسومية لتعزيز قدرات التمييز للنموذج. على الرغم من هذه التقدمات، لا تزال الطرق الحالية تواجه تحديات في استخدام المعرفة القضائية الخارجية بفعالية وإدارة المعلومات الخاطئة في الاعتماديات متعددة المهام. لمعالجة هذه القيود، يقترح المؤلفون نموذجًا جديدًا لتوقع الأحكام القانونية، يسمى دمج المعرفة وتغطية الاعتماديات (KFDM)، والذي يهدف إلى تعزيز استخراج ودمج المعرفة القانونية مع استخدام آلية تغطية الاعتماديات متعددة المهام لتحسين دقة التنبؤ عبر المهام الفرعية.

Journal: PLoS ONE, Volume: 21, Issue: 1
DOI: https://doi.org/10.1371/journal.pone.0340717
PMID: https://pubmed.ncbi.nlm.nih.gov/41544123
Publication Date: 2026-01-16
Author(s): Yishan Chen et al.
Primary Topic: Artificial Intelligence in Law

Overview

The section discusses advancements in Legal Judgment Prediction (LJP), a critical task in Legal AI systems that aims to forecast legal outcomes based on case facts. Despite progress in deep-learning approaches for civil law systems, two primary limitations persist: inadequate integration of external judicial knowledge and ineffective filtering of erroneous dependencies in multi-task frameworks. To overcome these challenges, the authors propose a novel LJP model that incorporates knowledge fusion and dependency masking techniques.

The proposed model enhances a BERT-based legal knowledge extraction method by integrating a CNN-based local semantic refinement component, which facilitates deeper extraction of core knowledge from judicial documents. Additionally, the introduction of differential attention aims to minimize noise during the fusion of external legal knowledge and case facts, thereby improving the model’s ability to pinpoint essential information. A multi-task dependency information masking mechanism is also introduced to accurately identify and eliminate erroneous dependencies, ultimately enhancing the model’s performance. Experimental results on real-world datasets validate the effectiveness of these innovations, demonstrating significant improvements in LJP accuracy.

Introduction

The introduction of this research paper highlights the significant advancements in natural language processing (NLP) and their applications in legal artificial intelligence (legal AI). Legal AI systems are shown to alleviate the workload of legal professionals, enhance the efficiency of judicial personnel in case analysis, and provide essential legal assistance to individuals, thereby promoting equitable access to judicial resources. A critical component of legal AI is legal judgment prediction (LJP), which aims to forecast legal articles, charges, and penalties based on case facts. Current LJP methods are primarily categorized into single-task models and Multi-Task Learning (MTL) approaches, with MTL emerging as the dominant strategy due to its ability to handle interrelated subtasks effectively.

Despite the progress made in MTL-based LJP methods, the paper identifies key limitations, including insufficient exploration of judicial knowledge from legal documents and ineffective strategies for managing erroneous dependencies in task relationships. To address these issues, the authors propose a legal knowledge extraction module that enhances existing methods by integrating a CNN-based component for local semantic refinement and a novel approach for fusing judicial knowledge into case representations using differential attention. Additionally, they introduce a multi-task dependency information masking mechanism to filter out erroneous dependency information, thereby improving the accuracy of predictions. The paper outlines its contributions and provides a roadmap for the subsequent sections, which include related works, the proposed model, experimental settings, and conclusions.

Methods

In this study, the authors employed a fine-tuning approach using the pre-trained LERT-base language model to adapt it for their specific task. The input case-fact length was capped at 500 tokens. Key training hyperparameters included a batch size of 8, a learning rate of $2 \times 10^{-5}$, a maximum of 16 training epochs, and gradient clipping set to 5. The AdamW optimizer was utilized for parameter updates, and a learning rate warm-up was implemented, corresponding to one-tenth of the total steps per epoch. To mitigate overfitting, an early stopping mechanism with a patience of 5 epochs was also incorporated. Detailed hyperparameter settings are provided in Table 2.

Results

In this section, the authors present the results of their KFDM model applied to the CAIL2018 dataset, addressing data imbalance through various evaluation metrics: accuracy (Acc), macro-recall (MR), macro-precision (MP), and macro-F1 (MF1). The KFDM model demonstrated superior performance in law article predictions, achieving the highest MF1 scores on both CAIL-small and CAIL-big datasets. This success is attributed to the integration of external judicial knowledge—specifically law articles and charge explanations—into case fact representation vectors, which enhances the model’s ability to capture key case elements. Additionally, the multi-head differential attention mechanism effectively fuses judicial domain knowledge with case facts, strengthening the representation vectors.

The KFDM model also significantly improved charge prediction accuracy compared to baseline models, benefiting from enhanced semantic representation of case facts and a multi-task dependency masking strategy that mitigates prediction biases. In the term-of-penalty prediction task, the KFDM model outperformed all baseline models, leveraging the explicit definitions of sentence ranges in law articles to enrich case facts. The results indicate that the KFDM model not only excels in specific tasks but also exhibits strong generalizability across diverse legal cases, as evidenced by its performance on the PKU dataset. Overall, the findings underscore the effectiveness of integrating external knowledge and advanced attention mechanisms in legal prediction tasks.

Discussion

In the discussion section of the research paper, the authors review the evolution of legal judgment prediction (LJP) methodologies, highlighting the transition from classical machine learning techniques, such as Support Vector Machines (SVM) and Random Forest classifiers, to advanced deep learning approaches. Early methods struggled with deep feature extraction and the intricate relationships between subtasks in LJP tasks. The advent of multi-layer neural networks has significantly improved the ability to automatically learn complex representations from legal text data. Notable advancements include the use of Convolutional Neural Networks (CNNs) and attention mechanisms, which have enhanced classification accuracy and generalization in legal contexts.

The authors identify three primary research focuses in current deep learning-based LJP methods: (1) leveraging dependency relationships between subtasks to enhance classification accuracy, (2) integrating legal knowledge into case fact representations to improve semantic expressiveness, and (3) employing contrastive learning and graph neural networks to bolster model discrimination capabilities. Despite these advancements, existing methods still face challenges in effectively utilizing external judicial knowledge and managing erroneous information in multi-task dependencies. To address these limitations, the authors propose a novel legal judgment prediction model, termed Knowledge Fusion and Dependency Masking (KFDM), which aims to enhance the extraction and integration of legal knowledge while employing a multi-task dependency masking mechanism to improve prediction accuracy across subtasks.