计算机科学 ›› 2026, Vol. 53 ›› Issue (5): 276-285.doi: 10.11896/jsjkx.250400141

• 人工智能 • 上一篇    下一篇

负例感知的生成式规则抽取提升方法

纪文迪1,2, 王永全1,2, 沈奕程1   

  1. 1 华东政法大学刑事法学院 上海 201620
    2 华东政法大学智能科学与信息法学系 上海 201620
  • 收稿日期:2025-04-28 修回日期:2025-07-27 发布日期:2026-05-08
  • 通讯作者: 王永全(wangyongquan@ecupl.edu.cn)
  • 作者简介:(wendyg8886@gmail.com)
  • 基金资助:
    国家重点研发计划(2023YFC3306100,2023YFC3306103,2023YFC3306105)

Boosting Generative Rule Extraction via Negative-aware Approach

JI Wendi1,2, WANG Yongquan1,2, SHEN Yicheng1   

  1. 1 School of Law and Criminal Justice, East China University of Political Science and Law, Shanghai 201620, China
    2 Department of Intelligent Science and Information Law, East China University of Political Science and Law, Shanghai 201620, China
  • Received:2025-04-28 Revised:2025-07-27 Online:2026-05-08
  • About author:JI Wendi,born in 1988,Ph.D,lecturer,is a member of CCF(No.D8438M).Her main research interests include na-tural language processing,information retrieval and computational law.
    WANG Yongquan,born in 1964,Ph.D,professor,Ph.D supervisor.His main research interests include big data and artificial intelligence,cyberspace security and cybercrime,digital forensics.
  • Supported by:
    National Key Research and Development Program of China(2023YFC3306100,2023YFC3306103,2023YFC3306105).

摘要: 法律规则是由主管机关制定,具有法律约束力和效力的行为规则,与社会的正常运行密切相关。作为实现法律人工智能的基础,目前已有许多研究试图将自然语言法律文本转换为对应的机器可读的规则集合,但其成果仍不尽如人意。为解决法律规则形式化表示与规则抽取问题,提出一套系统化的法律规则抽取范式,并构建基于大语言模型的生成式法律规则抽取提升方法。该法律规则抽取范式定义了法律规则模式(Legal Rule Schema),将一项法规规则解析为由主体、客体、条件及后果构成的四元组,明确法律规则的适用场景、对象和作用。在此基础上,提出基于大语言模型的生成式法律规则抽取提升方法,引入“从错误中学习”的思想,构建负例感知规则抽取训练框架,提升大语言模型对难负例的识别能力,缓解生成式规则抽取中的幻觉问题。实验结果表明,基于中型模型Mistral-Small-24B的规则抽取模型比通用大模型(Deepseek-r1)的规则抽取性能提高了18.23%,甚至高于人类标注得分1.5%,验证了负例感知训练有效提升了模型的规则抽取能力。

关键词: 规则抽取, 负例感知训练, 大语言模型, 语料库构建, 有监督微调

Abstract: Legal rules are behavior norms formulated by competent authorities with binding legal force and effectiveness,essential to maintaining social order.As the preliminary of Legal AI,numerous studies have attempted to convert natural-language legal texts into machine-readable rule sets,however the results remain unsatisfactory.To address the challenges of formal representation and extraction of legal rules,this paper proposes a systematic legal rule extraction paradigm and introduces a negative-aware approach to boosting generative rule extraction with large language models(LLMs).The paradigm defines a legal rule schema by decomposing a legal rule into a tetrad of subject,object,conditions and consequences,thus clarifying its applicability,targets and effects.Building on this,this paper proposes a generative legal rule extraction enhancement method leveraging LLMs,which incorporates the concept of “learning from errors” by constructing a negative-aware training framework to improve the model’s ability to recognize hard negative cases and mitigate hallucination issues in generative rule extraction.Experimental results show that the rule extraction model based on Mistral-Small-24B(a mid-size LLM) outperforms the general-purpose LLM(Deepseek-r1) by 18.23% and even surpasses human-annotated performance by 1.5%,demonstrating that the negative-aware training framework significantly enhances the rule extraction capability of the model.

Key words: Rule extraction, Negative-aware training, Large language model, Corpus construction, Supervised fine-tuning

中图分类号: 

  • TP391
[1]OLIVEIRA F D,JOSE M O.A RDF-based graph to representing and searching parts of legal documents[J].Artificial Intelligence and Law,2024,3(32):667-695.
[2]LOVE N,MICHAEL G.Computational law[C]//Proceedings of the 10th International Conference on Artificial Intelligence and Law.2005:205-209.
[3]LI J,LU Q,LIU P,et al.Construction of Legal Knowledge Graph Based on Knowledge-Enhanced Large Language Models[J].Information,2024,11:666.
[4]NEEL G,NYARKO J,HO D,et al.Legalbench:A collaboratively built benchmark for measuring legal reasoning in large language models[J].Advances in Neural Information Proces-sing Systems,2023,36:44123-44279.
[5]ANTOINE L,DIJCK G,GERASIMOS S.Interpretable long-form legal question answering with retrieval-augmented large language models[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:22266-22275.
[6]HOLLI S,IZZIDIEN A,STEFFEK F.Topic classification ofcase law using a large language model and a new taxonomy for UK law:AI insights into summary judgment[J/OL].Artificial Intelligence and Law.https://doi.org/10.1007/S10506-025-09434-0.
[7]KATZ D M,BOMMARITO M J,GAO S,et al.Gpt-4 passes the bar exam[J].Philosophical Transactions of the Royal Society,2024,2270:2023-0254.
[8]MARTÍNEZ E.Re-evaluating GPT-4’s bar exam performance[J].Artificial Intelligence and Law,2025,33:581-604.
[9]CHEONG I,XIA K,FENG K,et al.(A) I am not A lawyer,but…:engaging legal experts towards responsible LLM policies for legal advice[C]//Proceedings of the 2024 ACM Conference on Fairness,Accountability,and Transparency.2024,2454-2469.
[10]ATKINSON K,TREVOR B,DANUSHKA B.Explanation inAI and law:Past,present and future[J].Artificial Intelligence,2020,289:103-387.
[11]SHI J,GUO Q,LIAO Y,et al.Legal-lm:Knowledge graph enhanced large language models for law consulting[C]//In International Conference on Intelligent Computing.2024:175-186.
[12]CHEN H,ZHANG L,LIU Y,et al.Rethinking the Develop-ment of Large Language Models from the Causal Perspective:A Legal Text Prediction Case Study[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:20958-20966.
[13]TANG Y,QIU R,YIN H,et al.Caselink:Inductive graph lear-ning for legal case retrieval[C]//Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval.2024:2199-2209.
[14]RICHMOND K M,MUDDAMSETTY S M,GAMMELTOFT-HANSEN T,et al.Explainable AI and law:An evidential survey[J].Digital Society,2024,3,(1):1.
[15]HE Q,TANG Y,HUANG Y.The Research and Implementation of Ontology-based Legal Knowledge Base[J].Computer Science,2007,34(2):175-177.
[16]SPANGHER A,XUE Z,WU T,et al.LegalDiscourse:Interpreting When Laws Apply and To Whom[C]//Proceedings of the 2024 Conference of the NAACL.2024:8528-8551.
[17]WYNER A,PETERS W.On rule extraction from regulations[M]//Legal Knowledge and Information Systems.IOS Press,2011:113-122.
[18]WANG S,WANG Y,WANG Q,et al.Research on detection of Android application privacy compliance[J].Selected Excellent Works of Information Security Competition,2023,42(1):4-14.
[19]MORENO S J,REHM G,MONTIEL-PONSODA E,et al.Lynx:A knowledge-based AI service platform for content processing,enrichment and analysis for the legal domain[J].Information Systems,2022(106):101966.
[20]LI X,PAN Z,DENG Q,et al.Relation Enhanced Embedding Based Entities Relation Extraction from Legal Documents[J].Journal of Chinese Information Processing,2023,37(4):90-97.
[21]WEI J,BOSMA M,ZHAO V Y,et al.Finetuned language mo-dels are zero-shot learners[C]//International Conference on Learning Representations.2021.
[22]LI J,LU Q,LIU P,et al.Construction of Legal KnowledgeGraph Based on Knowledge-Enhanced Large Language Models[J].Information,2024,15(11):666.
[23]TONG S,YUAN J,ZHANG P,et al.Legal Judgment Prediction via graph boosting with constraints[J].Information Process Management,2024,61:103663.
[24]XU D,CHEN W,PENG W,et al.Large language models for generative information extraction:A survey[J].Frontiers of Computer Science,2024,18(6):186357.
[25]WEI X,CUI X,CHENG N,et al.Chatie:Zero-shot informationextraction via chatting with chatgpt[J].arXiv:2302.10205,2023.
[26]OLIVEIRA V,NOGUEIRA G,FALEIROS T,et al.Combining prompt-based language models and weak supervision for labeling named entity recognition on legal documents[J].Artificial Intelligence and Law,2025,33:361-381.
[27]ADIBHATLA H,PAVAN B,MANISH S.Fine-grained Con-tract NER using instruction based mode[C]//Proceedings of the 37th Pacific Asia Conference on Language,Information and Computation.2023:889-902.
[28]GUI H,YUAN L,YE H,et al.IEPile:unearthing large scale schema-conditioned information extraction corpus[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics.2024:27-146.
[29]HUANG J,YAN D,CAI Y.PMRC:Prompt-Based MachineReading Comprehension for Few-Shot Named Entity Recognition[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:18316-18326.
[30]DAGDELEN J,DUNN A,LEE S,et al.Structured information extraction from scientific text with large language models[J].Nature Communications,2024,15(1):1418.
[31]LEI L.Logical Structure of a Legal Rule[J].Chinese Journal of Low,2013(1):66-86.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!