用6000万专利数据训练专用BERT模型,提升专利文本理解能力。
Patent Language Model Pretraining with ModernBERT
- 基于ModernBERT架构,用6000万专利数据预训练专用于专利的模型。
- 在4个专利分类任务中,3个任务超越通用BERT,性能接近PatentBERT。
- 模型推理速度超PatentBERT 3倍,适合对速度敏感的应用场景。
基于Transformer的语言模型如BERT已成为自然语言处理的基础,但在包含长篇技术性与法律结构化文本的专利领域,其表现显著下降。以往专利自然语言处理方法主要依赖微调通用模型或使用有限数据进行领域适配的变体。本文提出使用ModernBERT架构,基于超过6000万条专利记录的精选语料库,预训练三个针对专利领域的掩码语言模型。方法包含FlashAttention、旋转位置编码和GLU前馈层等架构优化。我们在四个下游专利分类任务上评估模型表现,ModernBERT-base-PT在三个数据集上持续优于通用ModernBERT基线,并达到与PatentBERT相当的性能。额外实验表明,扩大模型规模(ModernBERT-base-VX)和定制分词器(Mosaic-BERT-large)进一步提升了部分任务的表现。值得注意的是,所有ModernBERT变体的推理速度均比PatentBERT快3倍以上,凸显其在时间敏感场景中的适用性。结果证明,领域专用预训练与架构改进对专利自然语言处理任务具有显著价值。
原文摘要 · Abstract (English)
Transformer-based language models such as BERT have become foundational in NLP, yet their performance degrades in specialized domains like patents, which contain long, technical, and legally structured text. Prior approaches to patent NLP have primarily relied on fine-tuning general-purpose models or domain-adapted variants pretrained with limited data. In this work, we pretrain 3 domain-specific masked language models for patents, using the ModernBERT architecture and a curated corpus of over 60 million patent records. Our approach incorporates architectural optimizations, including FlashAttention, rotary embeddings, and GLU feed-forward layers. We evaluate our models on four downstream patent classification tasks. Our model, ModernBERT-base-PT, consistently outperforms the general-purpose ModernBERT baseline on three out of four datasets and achieves competitive performance with a baseline PatentBERT. Additional experiments with ModernBERT-base-VX and Mosaic-BERT-large demonstrate that scaling the model size and customizing the tokenizer further enhance performance on selected tasks. Notably, all ModernBERT variants retain substantially faster inference over - 3x that of PatentBERT - underscoring their suitability for time-sensitive applications. These results underscore the benefits of domain-specific pretraining and architectural improvements for patent-focused NLP tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。