arXiv:2412.19482cs.CL2024-12被引 4

三阶段框架提升法律问答精准度,解决领域知识不足问题。

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

  • 分三步:领域预训练、任务微调、上下文重排,逐步优化检索能力。
  • 在人工标注数据集上超越强基线模型,显著提升法律问答准确率。
  • 适合法律AI研发者或需要高精度法律信息检索的场景使用。

法律问答(QA)近年来受到越来越多寻求法律建议者的关注,旨在从大规模问答对数据库中检索最相关的答案。以往方法主要采用双编码器架构学习问题与答案的密集表示,但存在领域知识缺乏和标注数据不足的问题。本文提出一种三阶段(预训练、微调、重排)法律QA框架(PFR-LQA),通过双编码器架构促进细粒度文本表示学习并提升密集检索性能。具体而言,首先基于自监督目标在法律问答数据上进行领域特定预训练,使模型适应法律领域;其次利用监督学习目标对双编码器在法律问答对上进行任务特定微调,获得高质量下游任务编码器;最后引入上下文重排目标,进一步优化文档编码器输出的问题表示,通过增强锚点与困难负样本间的语义差异,提升问题重排效果。我们在一个手工标注的法律问答数据集上进行了大量实验,结果表明,PFR-LQA方法在法律问答任务中优于多个强基线模型。

原文摘要 · Abstract (English)

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问答系统双编码器

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。