arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.19482cs.CL
收藏

预训练、微调与重排序:面向法律问答的三阶段框架

Pre-training, Fine-tuning and Re-ranking: A Three-Stage Framework for Legal Question Answering

Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);Shenzhen University of Advanced Technology(深圳理工大学)

Shiwen Ni, Hao Cheng, Min Yang

AI总结:

本文提出 PFR-LQA 三阶段框架,通过法律领域预训练、任务微调和上下文重排序提升双编码器在法律问答中的稠密检索性能,实验证明其优于现有强基线方法。

摘要:

法律问答(QA)已吸引越来越多寻求法律建议的人的关注,其目标是从大规模问答对数据库中检索最适用的答案。以往方法主要采用双编码器架构来学习问题和答案的稠密表示。然而,这些方法可能面临缺乏领域知识和充足标注训练数据的问题。在本文中,我们提出了一种面向法律问答的三阶段(预训练、微调和重排序)框架(称为 PFR-LQA),该框架促进细粒度文本表示学习,并提升双编码器架构下稠密检索的性能。具体而言,我们首先通过自监督训练目标对法律问题和答案进行领域特定预训练,使预训练模型能够适应法律领域。然后,我们利用监督学习目标在法律问答对上对双编码器进行任务特定微调,从而为特定的下游问答任务获得高质量的双编码器。最后,我们采用上下文重排序目标进一步细化文档编码器生成的问题输出表示,利用上下文相似性增大锚样本与困难负样本之间的差异,以实现更好的问题重排序。我们在一个人工标注的法律问答数据集上进行了大量实验。实验结果表明,我们的 PFR-LQA 方法在法律问答上取得了优于强竞争方法的性能。

英文摘要:

Legal question answering (QA) has attracted increasing attention from people seeking legal advice, which aims to retrieve the most applicable answers from a large-scale database of question-answer pairs. Previous methods mainly use a dual-encoder architecture to learn dense representations of both questions and answers. However, these methods could suffer from lacking domain knowledge and sufficient labeled training data. In this paper, we propose a three-stage (\underline{p}re-training, \underline{f}ine-tuning and \underline{r}e-ranking) framework for \underline{l}egal \underline{QA} (called PFR-LQA), which promotes the fine-grained text representation learning and boosts the performance of dense retrieval with the dual-encoder architecture. Concretely, we first conduct domain-specific pre-training on legal questions and answers through a self-supervised training objective, allowing the pre-trained model to be adapted to the legal domain. Then, we perform task-specific fine-tuning of the dual-encoder on legal question-answer pairs by using the supervised learning objective, leading to a high-quality dual-encoder for the specific downstream QA task. Finally, we employ a contextual re-ranking objective to further refine the output representations of questions produced by the document encoder, which uses contextual similarity to increase the discrepancy between the anchor and hard negative samples for better question re-ranking. We conduct extensive experiments on a manually annotated legal QA dataset. Experimental results show that our PFR-LQA method achieves better performance than the strong competitors for legal question answering.

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

↑