{"title":"Law LLM unlearning via interfere prompt, review output and update parameter: new challenges, method and baseline","authors":"Rui Shao, Yiping Tang, Lingyan Yang, Fang Wang","doi":"10.1016/j.eswa.2025.128612","DOIUrl":null,"url":null,"abstract":"<div><div>Law large language models (Law LLMs) often generate hallucinations, one of the reasons is due to memorizing sensitive, inaccurate, or outdated information, and unlearning such information has important research value, yet the legal domain lacks publicly available datasets and effective methods for LLM unlearning tasks and evaluations. This work innovatively proposes three unlearning tasks in legal field, providing new datasets for unlearning tasks. In addition, proposes a Law LLM unlearning method via loss adjustment with only need forgotten sequence (UNFS), providing a new baseline and unlearning method for the unlearning tasks. Further, after UNFS unlearning, proposing an inference method for Law LLMs that combines interfering input and reviewing output, reinforcing that Law LLMs avoid including erroneous information in the output. Designing a new metric for law LLM unlearning, the legal data memory evaluation method (LawME), LawME automatically judges the output quality of Law LLMs by comparing the content output by Law LLMs with the ground truth. Real-world dataset experiments and analyses validate UNFS’s effectiveness: on the three proposed legal unlearning datasets, UNFS’s accuracy decreases by 16.53 %, perplexity increased by 3.94, and AUC decreased by 16.09 %. On the retained datasets, UNFS’s accuracy only decreased by 0.02 %-0.26 %, and on the generalized task MMLU by only 0.07 %-0.15 %. These results demonstrate that UNFS has excellent unlearning performance and does not harm the performance on other data that do not participate in unlearning. Other experiments and analyses verified the validity of the proposed inference approach, LawME metrics.</div></div>","PeriodicalId":50461,"journal":{"name":"Expert Systems with Applications","volume":"292 ","pages":"Article 128612"},"PeriodicalIF":7.5000,"publicationDate":"2025-06-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Expert Systems with Applications","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0957417425022316","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0
Abstract
Law large language models (Law LLMs) often generate hallucinations, one of the reasons is due to memorizing sensitive, inaccurate, or outdated information, and unlearning such information has important research value, yet the legal domain lacks publicly available datasets and effective methods for LLM unlearning tasks and evaluations. This work innovatively proposes three unlearning tasks in legal field, providing new datasets for unlearning tasks. In addition, proposes a Law LLM unlearning method via loss adjustment with only need forgotten sequence (UNFS), providing a new baseline and unlearning method for the unlearning tasks. Further, after UNFS unlearning, proposing an inference method for Law LLMs that combines interfering input and reviewing output, reinforcing that Law LLMs avoid including erroneous information in the output. Designing a new metric for law LLM unlearning, the legal data memory evaluation method (LawME), LawME automatically judges the output quality of Law LLMs by comparing the content output by Law LLMs with the ground truth. Real-world dataset experiments and analyses validate UNFS’s effectiveness: on the three proposed legal unlearning datasets, UNFS’s accuracy decreases by 16.53 %, perplexity increased by 3.94, and AUC decreased by 16.09 %. On the retained datasets, UNFS’s accuracy only decreased by 0.02 %-0.26 %, and on the generalized task MMLU by only 0.07 %-0.15 %. These results demonstrate that UNFS has excellent unlearning performance and does not harm the performance on other data that do not participate in unlearning. Other experiments and analyses verified the validity of the proposed inference approach, LawME metrics.
期刊介绍:
Expert Systems With Applications is an international journal dedicated to the exchange of information on expert and intelligent systems used globally in industry, government, and universities. The journal emphasizes original papers covering the design, development, testing, implementation, and management of these systems, offering practical guidelines. It spans various sectors such as finance, engineering, marketing, law, project management, information management, medicine, and more. The journal also welcomes papers on multi-agent systems, knowledge management, neural networks, knowledge discovery, data mining, and other related areas, excluding applications to military/defense systems.