Next Article in Journal
Advances in Social Bots
Previous Article in Journal
MoE-World: A Mixture-of-Experts Architecture for Multi-Task World Models
Previous Article in Special Issue
Enhancing Clinical Named Entity Recognition via Fine-Tuned BERT and Dictionary-Infused Retrieval-Augmented Generation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

A Domain-Finetuned Semantic Matching Framework Based on Dynamic Masking and Contrastive Learning for Specialized Text Retrieval

1
Common Platform Technology Department, Nanjing Research Institute of Electronic Engineering, Nanjing 210023, China
2
School of Communications and Information Engineering, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
*
Author to whom correspondence should be addressed.
Electronics 2025, 14(24), 4882; https://doi.org/10.3390/electronics14244882
Submission received: 6 November 2025 / Revised: 4 December 2025 / Accepted: 7 December 2025 / Published: 11 December 2025
(This article belongs to the Special Issue Advances in Text Mining and Analytics)

Abstract

Semantic matching is essential for understanding natural language, but traditional models like BERT face challenges with random masking strategies, limiting their ability to capture key information. Additionally, BERT’s sentence vectors may “collapse,” making it difficult to distinguish between different sentences. This paper introduces a domain-finetuned semantic matching framework that uses dynamic masking and contrastive learning techniques to address these issues. The dynamic masking strategy enhances the model’s ability to retain critical information, while contrastive learning improves sentence vector representations using a small amount of unlabeled text. This approach helps the model better align with the needs of various downstream tasks. Experimental results show that after private domain training, the model improves semantic similarity between entities by 16.9%, outperforming existing models. It also demonstrates an 8.0% average improvement in semantic matching for diverse text. Performance metrics such as A@1, A@3, and A@5 are at least 26.1% higher than those of competing models. For newly added entities, the model achieves a 44.3% average improvement, consistently surpassing other models by at least 30%. These results collectively validate the effectiveness and superiority of the proposed framework in domain-specific semantic matching tasks.
Keywords: domain-finetuned semantic matching; private domain training; dynamic masking; contrastive learning domain-finetuned semantic matching; private domain training; dynamic masking; contrastive learning

Share and Cite

MDPI and ACS Style

Zhang, Y.; Zhu, Y.; Zhu, Z.; Liu, P.; Xie, P.; Wu, C. A Domain-Finetuned Semantic Matching Framework Based on Dynamic Masking and Contrastive Learning for Specialized Text Retrieval. Electronics 2025, 14, 4882. https://doi.org/10.3390/electronics14244882

AMA Style

Zhang Y, Zhu Y, Zhu Z, Liu P, Xie P, Wu C. A Domain-Finetuned Semantic Matching Framework Based on Dynamic Masking and Contrastive Learning for Specialized Text Retrieval. Electronics. 2025; 14(24):4882. https://doi.org/10.3390/electronics14244882

Chicago/Turabian Style

Zhang, Yiming, Yong Zhu, Zijie Zhu, Pengzhong Liu, Pengfei Xie, and Cong Wu. 2025. "A Domain-Finetuned Semantic Matching Framework Based on Dynamic Masking and Contrastive Learning for Specialized Text Retrieval" Electronics 14, no. 24: 4882. https://doi.org/10.3390/electronics14244882

APA Style

Zhang, Y., Zhu, Y., Zhu, Z., Liu, P., Xie, P., & Wu, C. (2025). A Domain-Finetuned Semantic Matching Framework Based on Dynamic Masking and Contrastive Learning for Specialized Text Retrieval. Electronics, 14(24), 4882. https://doi.org/10.3390/electronics14244882

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop