# Instance-Level Weighted Contrast Learning for Text Classification
## 1 Introduction  
With the rapid growth of text data in the era of information explosion, it has become essential to efficiently process and organize this information. Text classification, a core task in natural language processing (NLP), aims to automatically assign text to predefined categories [1, 2]. Text classification is crucial not only for the efficient management of large-scale text data but also for its wide application in fields such as sentiment analysis [3], spam filtering, and news recommendation [4]. Therefore, text classification remains a key and important research topic. With the rise in deep learning, text classification models have made substantial progress in recent years. Traditional machine learning methods, such as support vector machine (SVM) [5] and naive Bayes [6], remain effective in certain scenarios. However, with improvements in computing power and algorithm optimization, deep learning models have demonstrated greater potential in processing complex semantic information. Initially, researchers borrowed convolutional neural networks (CNNs) from computer vision and applied them to text classification tasks. Through the sliding window operation in theconvolutional layer, CNNs effectively capture local features in the text, aiding in the identification of keywords and phrases, particularly in short text classification tasks [7; 8]. Subsequently, recurrent neural networks (RNNs) were introduced to process sequence information, enabling the better capture of contextual dependencies in text [9]. However, traditional RNNs face the problem of vanishing and exploding gradients when processing long sequences, limiting their ability to model long texts. To address this issue, long short-term memory (LSTM) and gated recurrent units (GRUs) were proposed [10]. They successfully captured long-term dependencies in text through gating mechanisms, performed well in text classification tasks, and became essential tools for processing sequence information. With the advent of pre-trained models, deep learning-based text classification technology has made significant advancements. Pre-trained language models, such as BERT and GPT, have acquired extensive semantic knowledge by pre-training on large-scale corpora [11; 12; 13]. In text classification tasks, these models are initially trained on large-scale data to accumulate corpus knowledge and are subsequently fine-tuned to achieve optimal performance for specific tasks, significantly advancing the development of text classification technology. In recent years, contrastive learning, an emerging technology, has garnered significant attention in text classification [14]. By enabling the model to learn the similarities and differences between samples, its understanding of semantic information is enhanced, thereby improving text classification performance [15; 16]. Although existing contrastive learning methods have made progress, they still have notable shortcomings, primarily related to insufficient data utilization. Existing methods, such as autoencoders [17], contrastive learning based on dropout layers [18], and document metadata contrastive learning [19; 20], although effective, do not fully address the problem of data scarcity, resulting in limited robustness in model training. This study aims to address the aforementioned problems and focuses on improving data enhancement methods. By designing four effective text enhancement strategies (symbol insertion, affirmative auxiliary verbs, double negation, and repeated punctuation insertion), two types of data enhancement strategies are proposed: affirmative enhancement and negation transformation. Affirmative enhancement replaces the predicate verb with affirmative auxiliary verbs to adjust the sentence's positive semantics, while negation transformation alters the sentence's meaning by adding negative words before nouns and verbs. These data enhancement strategies can transform the data at a deeper level, thereby significantly increasing the volume of training data.