arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.11699cs.CLcs.AIcs.LG

Legal2LogicICL: 通过多样少量样本学习提升将法律案例转换为逻辑公式的一般化能力

Legal2LogicICL: Improving Generalization in Transforming Legal Cases to Logical Formulas via Diverse Few-Shot Learning

Center for Juris-Informatics, ROIS-DS(法信息学中心,ROIS-DS);Japan Advanced Institute of Science and Technology(日本先端科学技术大学)

Jieying Xue, Phuong Minh Nguyen, Ha Thanh Nguyen, May Myo Zin, Ken Satoh

AI总结:

本文提出Legal2LogicICL框架,通过检索增强生成实现有效上下文学习,构建信息丰富且稳定的少量样本演示,提升法律案例转逻辑表示的准确性与稳定性。

摘要:

本工作旨在通过整合NLP最新进展与法律领域适应性少量样本学习技术,提升基于逻辑的法律推理系统的泛化能力。现有逻辑基于法律推理管道通常依赖微调模型将自然语言法律案例映射为逻辑公式后再传给符号推理器。然而,此类方法受限于高质量标注训练数据的稀缺性。为解决此限制,我们提出一个基于LLM的法律推理框架,通过检索增强生成实现有效上下文学习。具体而言,我们引入Legal2LogicICL,一种少量样本检索框架,在潜在语义表示层面和法律文本结构层面平衡示例的多样性和相似性。此外,我们的方法通过减轻法律文本中实体诱导的检索偏差,明确考虑法律结构,其中长且高度特定的实体提及常主导语义表示并掩盖法律上重要的推理模式。我们的Legal2LogicICL构建了信息丰富且稳健的少量样本演示,无需额外训练即可实现准确且稳定的逻辑规则生成。此外,我们构建了一个新数据集,名为Legal2Proleg,标注了法律案例与PROLEG逻辑公式之间的对齐关系以支持法律语义解析的评估。在开源和专有LLM上的实验结果表明,我们的方法显著提高了将自然语言法律案例描述转换为逻辑表示的准确性、稳定性和泛化能力,突显了其在可解释和可靠法律推理中的有效性。我们的代码可在https://github.com/yingjie7/Legal2LogicICL获取。

英文摘要:

This work aims to improve the generalization of logic-based legal reasoning systems by integrating recent advances in NLP with legal-domain adaptive few-shot learning techniques using LLMs. Existing logic-based legal reasoning pipelines typically rely on fine-tuned models to map natural-language legal cases into logical formulas before forwarding them to a symbolic reasoner. However, such approaches are heavily constrained by the scarcity of high-quality annotated training data. To address this limitation, we propose a novel LLM-based legal reasoning framework that enables effective in-context learning through retrieval-augmented generation. Specifically, we introduce Legal2LogicICL, a few-shot retrieval framework that balances diversity and similarity of exemplars at both the latent semantic representation level and the legal text structure level. In addition, our method explicitly accounts for legal structure by mitigating entity-induced retrieval bias in legal texts, where lengthy and highly specific entity mentions often dominate semantic representations and obscure legally meaningful reasoning patterns. Our Legal2LogicICL constructs informative and robust few-shot demonstrations, leading to accurate and stable logical rule generation without requiring additional training. In addition, we construct a new dataset, named Legal2Proleg, which is annotated with alignments between legal cases and PROLEG logical formulas to support the evaluation of legal semantic parsing. Experimental results on both open-source and proprietary LLMs demonstrate that our approach significantly improves accuracy, stability, and generalization in transforming natural-language legal case descriptions into logical representations, highlighting its effectiveness for interpretable and reliable legal reasoning. Our code is available at https://github.com/yingjie7/Legal2LogicICL.

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

↑