<p>Extracting relevant clauses from legal contracts is a challenging task due to the complex structure and specialized language of legal documents. Accurate clause identification is critical for contract analysis but often requires legal expertise and significant manual effort. In this paper, we propose an efficient framework for extracting clauses from legal contracts by formulating the task as a Question Answering (QA) problem, enhanced through knowledge distillation in a teacher–student architecture. The teacher model, built upon a transformer from the BERT family pre-trained on contract-specific data, is fine-tuned to capture deep contextual understanding, while a lightweight student model learns to replicate the teacher’s performance with reduced resource demands. To support this, we develop a custom extractive QA dataset using contracts from the SEC EDGAR database by integrating selected span-based question-answer pairs from the CUAD dataset and manually annotating additional clause types. Through a comprehensive evaluation, our distilled model achieves an AUPR of 0.723 and a precision of 0.682 at 80% recall, outperforming several strong transformer baselines. These results highlight the effectiveness of knowledge distillation in delivering scalable, high-performance solutions for legal contract analysis.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Efficient legal contract clause extraction using a QA-based knowledge distillation approach

  • Bajeela Aejas,
  • Abdelhak Belhi,
  • Abdelaziz Bouras

摘要

Extracting relevant clauses from legal contracts is a challenging task due to the complex structure and specialized language of legal documents. Accurate clause identification is critical for contract analysis but often requires legal expertise and significant manual effort. In this paper, we propose an efficient framework for extracting clauses from legal contracts by formulating the task as a Question Answering (QA) problem, enhanced through knowledge distillation in a teacher–student architecture. The teacher model, built upon a transformer from the BERT family pre-trained on contract-specific data, is fine-tuned to capture deep contextual understanding, while a lightweight student model learns to replicate the teacher’s performance with reduced resource demands. To support this, we develop a custom extractive QA dataset using contracts from the SEC EDGAR database by integrating selected span-based question-answer pairs from the CUAD dataset and manually annotating additional clause types. Through a comprehensive evaluation, our distilled model achieves an AUPR of 0.723 and a precision of 0.682 at 80% recall, outperforming several strong transformer baselines. These results highlight the effectiveness of knowledge distillation in delivering scalable, high-performance solutions for legal contract analysis.