Language Model Adaptation to Specialized Domains through Selective Masking based on Genre and Topical Characteristics

Anas Belfathi, Ygor Gallina, Nicolas Hernandez, Richard Dufour, Laura Monceaux
2/19/2024
cs.CL

No official code found. Best implementation: ygorg/legal-masking (4 stars, last commit 2025-01-27).

Abstract

Recent advances in pre-trained language modeling have facilitated significant progress across various natural language processing (NLP) tasks. Word masking during model training constitutes a pivotal component of language modeling in architectures like BERT. However, the prevalent method of word masking relies on random selection, potentially disregarding domain-specific linguistic attributes. In this article, we introduce an innovative masking approach leveraging genre and topicality information to tailor language models to specialized domains. Our method incorporates a ranking process that prioritizes words based on their significance, subsequently guiding the masking procedure. Experiments conducted using continual pre-training within the legal domain have underscored the efficacy of our approach on the LegalGLUE benchmark in the English language. Pre-trained language models and code are freely available for use.

View on arXivView PDF

Code Implementations(1)

ygorg/legal-maskingCommunity100%
42Shell, PythonDec 13, 20231 years ago

Similar Papers

Cite this paper

@article{belfathi2024language,
  title  = {Language Model Adaptation to Specialized Domains through Selective Masking based on Genre and Topical Characteristics},
  author = {Anas Belfathi and Ygor Gallina and Nicolas Hernandez and Richard Dufour and Laura Monceaux},
  year   = {2024},
  eprint = {2402.12036},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.12036v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.12036.svg)](https://codeofpaper.com/paper/2402.12036)

Discussion