构建多语言法律嵌入数据集,提升跨语言法律检索准确率。
LEMUR: A Corpus for Robust Fine-Tuning of Multilingual Law Embedding Models for Retrieval
- 从2.5万份欧盟环保法规PDF构建高质量多语言语料库。
- 在低资源语言上提升检索准确率,跨语言迁移效果显著。
- 开源数据与代码,支持法律AI模型的可靠微调。
大型语言模型在法律信息获取中应用日益广泛,但在多语言法律场景中受限于检索不可靠及缺乏领域适配的开源嵌入模型。现有多语言法律语料库未针对语义检索设计,且基于PDF的立法文件因文本提取不完整引入大量噪声。为此,我们提出LEMUR,一个基于24,953份官方EUR-Lex PDF文档构建的大规模多语言欧盟环境法语料库,覆盖25种语言。通过词汇一致性评分(LCS)量化PDF转文本的保真度,对比权威HTML版本。基于LEMUR,在单语和双语设置下使用对比学习目标微调三个顶尖多语言嵌入模型,模拟真实法律检索场景。跨低/高资源语言实验表明,领域微调持续提升Top-k检索准确率,尤其在低资源语言上增益明显。跨语言评估显示改进可迁移到未见语言,说明微调主要增强语言无关的内容级法律表征,而非语言特定线索。代码与数据已开源。
原文摘要 · Abstract (English)
Large language models (LLMs) are increasingly used to access legal information. Yet, their deployment in multilingual legal settings is constrained by unreliable retrieval and the lack of domain-adapted, open-embedding models. In particular, existing multilingual legal corpora are not designed for semantic retrieval, and PDF-based legislative sources introduce substantial noise due to imperfect text extraction. To address these challenges, we introduce LEMUR, a large-scale multilingual corpus of EU environmental legislation constructed from 24,953 official EUR-Lex PDF documents covering 25 languages. We quantify the fidelity of PDF-to-text conversion by measuring lexical consistency against authoritative HTML versions using the Lexical Content Score (LCS). Building on LEMUR, we fine-tune three state-of-the-art multilingual embedding models using contrastive objectives in both monolingual and bilingual settings, reflecting realistic legal-retrieval scenarios. Experiments across low- and high-resource languages demonstrate that legal-domain fine-tuning consistently improves Top-k retrieval accuracy relative to strong baselines, with particularly pronounced gains for low-resource languages. Cross-lingual evaluations show that these improvements transfer to unseen languages, indicating that fine-tuning primarily enhances language-independent, content-level legal representations rather than language-specific cues. We publish code\footnote{\href{https://github.com/nargesbh/eur_lex}{GitHub Repository}} and data\footnote{\href{https://huggingface.co/datasets/G4KMU/LEMUR}{Hugging Face Dataset}}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。