随着大语言模型(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.
Evaluating Test-Time Scaling LLMs for Legal Reasoning: OpenAI o1, DeepSeek-R1, and Beyond
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);Guanghua Law School, Zhejiang University(浙江大学光华法学院);School of Software Technology, Zhejiang University(浙江大学软件学院);Law & AI Lab, Zhejiang University(浙江大学法律与人工智能实验室);Shanghai AI Laboratory(上海人工智能实验室)
DLawBench: Evaluating LLMs Through Multi-Turn Legal Consultation
University of Pittsburgh(匹兹堡大学);Alibaba Group(阿里巴巴集团);University of Waterloo(滑铁卢大学);Shandong University(山东大学);Skylenage;China University of Political Science and Law(中国政法大学);Qwen Team, Alibaba Group(阿里巴巴集团Qwen团队);Fordham University(福特汉姆大学);Shanghai Jiao Tong University(上海交通大学);Carnegie Mellon University(卡内基梅隆大学);Tsinghua University(清华大学)
LegalAgentBench: Evaluating LLM Agents in Legal Domain
Tsinghua University(清华大学);Zhipu AI(智谱AI);Shanghai Amarsoft Enterprise Credit Information Service Co.,Ltd(上海安硕企业征信服务有限公司);Central South University(中南大学);University of Waterloo(滑铁卢大学);University of Notre Dame(圣母大学)
PLawBench: A Rubric-Based Benchmark for Evaluating LLMs in Real-World Legal Practice
Alibaba Group(阿里巴巴集团);Skylenage;Shanghai Jiao Tong University(上海交通大学);Tsinghua University(清华大学);University of Waterloo(滑铁卢大学);University of Pittsburgh(匹兹堡大学);University of Bologna(博洛尼亚大学)
LegalCiteTrust: Benchmarking Citation Trustworthiness in Chinese Long-Form Legal Research Reports
Faculty of Data Science, City University of Macau(澳门城市大学数据科学学院);Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);Southern University of Science and Technology(南方科技大学)
Evaluating LLM-based Approaches to Legal Citation Prediction: Domain-specific Pre-training, Fine-tuning, or RAG? A Benchmark and an Australian Law Case Study
Department of Data Science & AI, Monash University(数据科学与人工智能系,莫纳什大学);Faculty of Law, Monash University(法学院,莫纳什大学)
How Do LLMs Understand Legal Philosophy? Diagnosing Legal-Philosophical Reasoning in LLMs
The University of Osaka(大阪大学);UC Davis(加州大学戴维斯分校);UC Berkeley(加州大学伯克利分校);Peking University(北京大学);University of Wisconsin–Madison(威斯康星大学麦迪逊分校);Shanghai Jiao Tong University(上海交通大学);NII(信息学研究所(日本));City University of Hong Kong(香港城市大学)
BenGER: Benchmarking LLM Systems on Subsumption-Based Legal Reasoning in German Law
Technical University of Munich (TUM)(慕尼黑技术大学);Ludwig Maximilian University of Munich (LMU)(慕尼黑路德维希-马克西米利安大学);University of Konstanz(康斯坦茨大学);University of Saarbrücken(萨尔布吕肯大学)