# AI-Driven Framework for Evaluating Climate Misinformation and Data Quality on Social Media
## 3 Materials and Method
### Misinformation Detection Module
Techniques such as dropout and label smoothing are applied to enhance generalization. The process includes early stopping based on the validation F1-score to prevent overfitting, and the final output is the best-performing fine-tuned model. The credibility score of a social media post, denoted as Credibility(\(P\)), is computed using a weighted linear combination of three key factors: source reputation \(R(P)\), factual consistency \(F(P)\), and social consensus \(S(P)\). Each factor is scaled by its corresponding weight--\(\alpha\), \(\beta\), and \(\gamma\)--to reflect its relative importance in the overall assessment. The formula is expressed as:  
\[\text{Credibility}(P)=\alpha\cdot R(P)+\beta\cdot F(P)+\gamma\cdot S(P)\]  
Here, \(R(P)\) quantifies the source's trustworthiness, often derived from domain authority or prior verification. \(F(P)\) measures the degree of factual alignment by comparing the content against established fact-checking databases. \(S(P)\) captures the social consensus by analyzing user interactions such as agreement in comments, likes, or shares. The weights \(\alpha\), \(\beta\), and \(\gamma\) can be tuned based on empirical validation or domain-specific requirements to optimize the detection of misinformation. Figure 4: Misinformation Detection Module. This figure shows how transformer-based models are fine-tuned on climate-specific data, integrated with knowledge graphs and credibility scoring mechanisms. Softmax-based classification probabilities are used to categorize posts. The transformer model produces classification outputs modeled using the softmax function to detect misinformation. Given the logit output \(z_{i}\) from the final layer of the transformer for class \(i\), the predicted probability \(\hat{y}_{i}\) for that class is computed as:  
\[\hat{y}_{i}=\frac{e^{z_{i}}}{\sum_{j=1}^{C}e^{z_{j}}}\quad\text{for $i=1,\dots,C$}\]  
Here, \(\hat{y}_{i}\) represents the probability assigned to class \(i\), where each class corresponds to a misinformation category such as factual, misleading, or false. The term \(z_{i}\) denotes the un-normalized logit score from the transformer's output, and \(C\) is the total number of classification categories. The softmax function ensures that the resulting probabilities across all classes sum to 1, enabling effective categorization based on the model's confidence in each label. ```
Input: Labeled dataset \(D=\{(x_{1},y_{1}),...,(x_{n},y_{n})\}\) Output: Fine-tuned model \(M^{*}\)
1 Initialize pre-trained RoBERTa model \(M\);
2 Tokenize text using RoBERTa tokenizer (max_length = 256);
3 Apply padding and generate attention masks;
4 Define weighted cross-entropy loss function;
5 forachepoch\(E\)do
6 forach mini-batch\(B\) in \(D\)do
7 Perform forward pass to obtain logits \(z\);
8 Compute softmax probabilities \(\hat{y}_{i}=\frac{e^{z_{i}}}{\sum_{j=1}^{C}e^{z_{j}}}\);
9 Compute loss and backpropagate gradients;
10 Update model parameters using AdamW optimizer;
11 Apply dropout and label smoothing;
12 Evaluate validation F1-score for early stopping;
13
14 return best-performing model \(M^{*}\)
```  
**Algorithm 1**Fine-tuning RoBERTa for climate misinformation classification.