# A Comprehensive Approach to Bias Mitigation for Sentiment Analysis of Social Media Data
## 3 Proposed Methodology
### Data Preprocessing
\begin{table}
\begin{tabular}{l c c} \hline \hline
**Demographic Group** & **Number of Instances** & **Percentage of Total** \\ \hline \hline \multicolumn{3}{c}{**Race and Ethnicity**} \\ \hline Asian (ethnicity) & 396,383 & 20.09\% \\ Black (race) & 507,751 & 25.74\% \\ White (race) & 461,295 & 23.41\% \\ Latino (ethnicity) & 452,083 & 22.92\% \\ Other (ethnicity/race) & 154,312 & 7.82\% \\ \hline \hline \multicolumn{3}{c}{**Gender**} \\ \hline Male & 1,085,162 & 54.98\% \\ Female & 800,673 & 40.67\% \\ Transgender & 48,525 & 2.46\% \\ Other (gender) & 37,556 & 1.90\% \\ \hline \hline \multicolumn{3}{c}{**Sexual Orientation**} \\ \hline Heterosexual & 1,601,163 & 81.26\% \\ Homosexual (gay/lesbian) & 235,669 & 11.96\% \\ Bisexual & 77,050 & 3.91\% \\ Other (sexual orientation) & 56,034 & 2.84\% \\ \hline \hline \multicolumn{3}{c}{**Religion**} \\ \hline Christian & 787,217 & 39.94\% \\ Jewish & 122,202 & 6.20\% \\ Muslim & 255,480 & 12.95\% \\ Hindu & 144,209 & 7.31\% \\ Buddhist & 82,057 & 4.16\% \\ Atheist & 148,418 & 7.52\% \\ Other (Religion) & 432,233 & 21.91\% \\ \hline \hline \multicolumn{3}{c}{**Disability**} \\ \hline Physical disabilities & 198,010 & 10.04\% \\ Intellectual disabilities & 154,512 & 7.84\% \\ Psychiatric/mental illness & 106,748 & 5.41\% \\ Other (disabilities) & 64,445 & 3.27\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Demographic distribution of the Jigsaw Unintended Bias in Toxicity Classification dataset. our model not only achieved high accuracy, but also treated each group fairly, minimizing biased predictions. #### 4.7.1 Race and Ethnicity

Table 14 presents the results of the bias evaluation in different demographic groups for various models. In this study, the proposed method significantly outperformed baseline models and other models with bias-awareness in precision, recall, and F1-score across all racial and ethnic categories. For the Asian group, the proposed method achieved a precision of 92.4%, recall of 92.8%, and an F1-score of 92.6%, while Logistic Regression showed considerably lower performance with 73.5%, 71.0%, and 72.2%, respectively. Similarly, in the Black group, the proposed method achieved the highest F1 score of 93.5%, while the next-best model, the Bias-Regularized Neural Network, scored only 79.6%. Across Latino, White, and other groups, the proposed method consistently achieved superior results, with F1-scores of 92.9%, 94.3%, and 93.7%, respectively. Furthermore, RoBERTa and DistilBERT showed strong performance, with F1-scores ranging from 84.6% to 85.2%, demonstrating their competitiveness compared to the proposed method. These results highlight the robustness of the proposed method in providing a fair and accurate sentiment analysis in various racial and ethnic groups, effectively minimizing bias in the process. #### 4.7.2 Gender

Table 15 presents the results of the bias evaluation between different gender groups, comparing precision, recall, and F1-score for various models. The proposed method consistently outperformed both the baseline and existing bias-aware models in all metrics. For the male group, the proposed method achieved 93.1% precision, 93.7% recall, and a 93.4% F1-score, significantly outperforming Logistic Regression (F1-score of 71.6%), SVM (73.5%), MLP (75.5%), and LSTM (77.5%). Among bias-aware models, the Bias-Regularized Neural Network provided the best performance with an F1-score of 79.6% but still fell short compared to the proposed method. Similarly, for the female group, the proposed method achieved 93.0% precision, 93.6% recall, and a 93.3% F1-score, far surpassing both baseline and bias-aware models. RoBERTa, DistilBERT, and BiasFinder also performed well with F1-scores of 92.9%, 92.5%, and 92.4%, respectively, demonstrating strong performance, though still behind the proposed method. For the transgender and other gender groups, the proposed method attained F1-scores of 93.1% and 93.5%, respectively, again outperforming all other models.