arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.18360cs.CL
收藏

J&H: 评估法律领域大语言模型在知识注入攻击下的鲁棒性

J&H: Evaluating the Robustness of Large Language Models Under Knowledge-Injection Attacks in Legal Domain

School of Law, Tsinghua University(清华大学法学院);University of Waterloo(滑铁卢大学)

Yiran Hu, Huanghai Liu, Qingjing Chen, Ning Zheng, Chong Wang, Yun Liu, Charles L. A. Clarke, Weixing Shen

AI总结:

该研究提出法律领域知识注入攻击评估框架J&H,通过攻击推理逻辑各环节测试大语言模型鲁棒性,发现现有模型易受误导,同时提出并对比了多种提升知识鲁棒性的方法。

摘要:

随着大语言模型(Large Language Models, LLMs)的规模与能力不断提升,其在法律领域等知识密集型场景的应用受到广泛关注。然而,这些大语言模型是否基于领域知识进行推理判断仍存疑。若大语言模型仅依据特定词汇或模式而非语言底层逻辑作出判断,“大语言模型担任法官”的范式在实际应用中将存在重大风险。为探究该问题,我们提出一种用于鲁棒性测试的法律知识注入攻击方法,以此推断大语言模型是否习得了法律知识与推理逻辑。本文提出J&H:一个用于检测法律领域大语言模型在知识注入攻击下鲁棒性的评估框架,该框架旨在探究大语言模型完成法律任务时是否进行演绎推理。为实现这一目标,我们针对这些任务底层推理逻辑的各个部分(大前提、小前提与结论生成)发起攻击。我们收集了现实世界中法律专家在司法判决中可能出现的错误,如拼写错误、法律同义词、外部法律条文检索不准确等。但在真实法律实践中,法律专家往往会忽略这些错误,基于逻辑作出判断;而大语言模型面对这些错误时,很可能被拼写错误误导,且可能未运用逻辑进行判断。我们对现有的通用大语言模型和领域专用大语言模型开展了知识注入攻击实验,结果表明当前大语言模型对我们实验中采用的攻击不具备鲁棒性。此外,我们还提出并对比了几种提升大语言模型知识鲁棒性的方法。

英文摘要:

As the scale and capabilities of Large Language Models (LLMs) increase, their applications in knowledge-intensive fields such as legal domain have garnered widespread attention. However, it remains doubtful whether these LLMs make judgments based on domain knowledge for reasoning. If LLMs base their judgments solely on specific words or patterns, rather than on the underlying logic of the language, the ''LLM-as-judges'' paradigm poses substantial risks in the real-world applications. To address this question, we propose a method of legal knowledge injection attacks for robustness testing, thereby inferring whether LLMs have learned legal knowledge and reasoning logic. In this paper, we propose J&H: an evaluation framework for detecting the robustness of LLMs under knowledge injection attacks in the legal domain. The aim of the framework is to explore whether LLMs perform deductive reasoning when accomplishing legal tasks. To further this aim, we have attacked each part of the reasoning logic underlying these tasks (major premise, minor premise, and conclusion generation). We have collected mistakes that legal experts might make in judicial decisions in the real world, such as typos, legal synonyms, inaccurate external legal statutes retrieval. However, in real legal practice, legal experts tend to overlook these mistakes and make judgments based on logic. However, when faced with these errors, LLMs are likely to be misled by typographical errors and may not utilize logic in their judgments. We conducted knowledge injection attacks on existing general and domain-specific LLMs. Current LLMs are not robust against the attacks employed in our experiments. In addition we propose and compare several methods to enhance the knowledge robustness of LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑