# A Comprehensive Approach to Bias Mitigation for Sentiment Analysis of Social Media Data
## 2 Related Work
### Sentiment Analysis  
Sentiment analysis, a key area within Natural Language Processing (NLP), revolves around identifying and categorizing emotions or sentiments found in text. The primary aim is to classify the text into categories like positive, negative, or neutral. In the early days of sentiment analysis [16; 17], lexicon-based methods were the most popular. These approaches relied on predefined lists of words, each assigned a sentiment score to reflect whether the word conveyed a positive or negative meaning [18]. The overall sentiment of a text was then calculated by adding up the sentiment scores of all the words in the text [19; 20]. While straightforward and not requiring labeled data, lexicon-based approaches struggled with context-sensitive words and idiomatic phrases, making it hard for them to pick up on more nuanced sentiments. As machine learning techniques evolved, sentiment analysis shifted towards more data-driven methods. Algorithms such as support vector machines (SVMs) [21] and naive Bayes [22] became popular for this task. These models require labeled data for training, where each text sample is tagged with its respective sentiment [23; 24]. Once trained, these models can predict the sentiment of new unlabeled text. While more accurate than lexicon-based methods, machine learning models are computationally demanding and require large quantities of labeled data.  
Deep learning has completely transformed sentiment analysis by enabling models to detect more complex patterns and relationships in text [25; 26]. Recurrent Neural Networks (RNNs) and Convolutional Neural Networks (CNNs) [27] are often used in this space. RNNs [28] are particularly effective in analyzing sequences, which makes them great for processing sentences and longer texts. On the other hand, CNNs, originally designed for image processing, have also been proven effective in text classification [29; 30]. Although these models generally outperform traditional machine learning methods, they come with higher computational costs and complexity [31]. Recently, transformer-based architectures [32], especially BERT (Bidirectional Encoder Representations of Transformers) [33], have set new performance benchmarks in NLP, including sentiment analysis. Developed by Google, BERT is pre-trained on a massive corpus and can be fine-tuned for specific tasks, providing a powerful and flexible framework for modern NLP applications. BERT's strength comes from its ability to capture context using a self-attention mechanism [30; 34], allowing it to understand the sentiment of a word based on its surrounding text. This is particularly useful in sentiment analysis, where the context can drastically change the meaning of a word.  
Various transformer variants such as GPT [35], RoBERTa [36], and DistilBERT [37] have been developed to improve BERT or address specific challenges. These models highlight the adaptability and strength of transformer architectures, with fine-tuning allowing them to specialize in tasks like sentiment analysis across different domains. However, the high computational demands of these models remain a challenge, often requiring specialized hardware for optimal performance.