Intelligent Domain Text Classification through Fine-Grained Semantic Representation Learning
Main Article Content
Abstract
This study focuses on fine-grained discriminative feature extraction for domain text classification and proposes a BERT-based feature enhancement method to address the limitations of traditional models in domain adaptation and fine-grained modeling. The approach first uses a pretrained language model to generate contextual representations of input texts, and then introduces a multi-head attention mechanism to capture both global dependencies and local semantic details, leading to more discriminative feature representations. A contrastive learning constraint is further designed to optimize the separability of positive and negative samples in the semantic space, enabling the model to maintain strong discriminative ability even under blurred category boundaries and subtle semantic differences. In addition, regularization and joint optimization strategies are employed to ensure feature separability while preserving stability and generalization. To evaluate the effectiveness of the method, sensitivity experiments were conducted on key hyperparameters, including learning rate, weight decay, maximum sequence length, contrastive learning temperature coefficient, number of attention heads, and hidden dimension, followed by comparative analyses of model performance under different conditions. Experimental results show that the proposed method achieves superior performance on accuracy, precision, recall, and F1-score, demonstrating higher-level fine-grained discrimination in complex domain text classification tasks. The study not only presents innovation in method design but also shows robustness and effectiveness through multi-dimensional experimental validation, providing new technical insights and practical directions for domain text classification.