# Enhancing Propaganda Detection in Arabic News Context Through Multi-Task Learning
## 3 Methodology
### Task-Weighting
#### 3.6.3 Task-Weighting Schemes  
As MTO plays a critical role in the performance of MTL, as discussed in Section 3.6.1, various weighting schemes were proposed and developed in the experimental study conducted, as will be detailed in Section 5. Specifically, the following seven loss-balanced task-weighting schemes were proposed for inclusion in the MTL training objective. 1. Uniform Averaging Weighting (UAW)  
This approach, commonly known as equal weighting or average loss aggregation, allocated equal importance to all tasks by averaging their loss values. It was considered one of the simplest and most direct methods. Equation (8) demonstrates this calculation:  
\[\text{L}_{\text{global}}=\frac{1}{\text{T}}\text{$\sum$}_{t=1}^{\text{T}}\text {L}_{t} \tag{8}\]  
where the loss function for the \(t^{th}\) task \(L_{t}\) is calculated, as in Equation (9):  
\[\text{L}_{t}=\text{L}_{\text{Pro}}+\text{L}_{\text{Sen}}+\text{L}_{\text{Emo}} \tag{9}\]  
where  
* \(T\) represents the total number of tasks. * \(t\) represents each individual task in the summation. * \(L_{t}\) represents the loss function for the \(t^{th}\) task. * \(\frac{1}{\text{T}}\) represents the normalization of the total loss across tasks. * \(L_{\text{Pro}}\), \(L_{\text{Sen}}\), and \(L_{Emo}\) represent propaganda, sentiment, and emotion loss, respectively, and calculated as in Equation (10):  
\[L_{t}=\left\{ \begin{aligned} & BCE\ (logist,y_{t}),\ if\ t=propaganda\\ &\ \ \ \ \ CCE(logist,y_{t}),\ otherwise\end{aligned} \right. \tag{10}\]  
Binary cross-entropy (BCE) was employed to calculate the loss for the propaganda classification task. The main goal of BCE loss was to measure the difference between the predicted probability and the true label for each class. Moreover, BCE treated each class independently and calculated the loss separately; it is formally defined in Equation (11). For sentiment and emotion classification tasks, categorical cross-entropy was calculated as seen in Equation (13). \[\text{L}_{\text{BCE}}=-(\text{t}\log{(\text{p})}+(1-\text{t})\text{log}(1- \text{p})) \tag{11}\]  
where  
* \(t\) is the true label (either 0 or 1). * \(p\) is the sigmoid probability output of the positive class. The sigmoid activation function applies an independent probability estimation to each class by mapping the output scores to the range (0, 1). Thus, it allows each class to be predicted independently. The probability \(P(C_{i})\) for class C\({}_{i}\) is computed as seen in Equation (12):  
\[P(c_{i})=\text{Sigmoid}(y_{i})=\frac{1}{1+\text{e}^{-y_{i}}} \tag{12}\]  
\[\text{L}_{\text{Emotion or Sentiment}}=-\sum_{i=1}^{K}t_{i}\text{log}(p(c_{i})) \tag{13}\]  
where  
* \(K\) is the total number of classes. * \(t_{i}\) represents the true category distribution in one-hot encoding, where 1 represents the correct class and 0 represents the others. * \(p(c_{i})\) is the softmax probability distribution for class \(i\). * The negative sum ensures that incorrect predictions are penalized by minimizing the negative log-likelihood of the correct prediction. * Linear Scalarization (LS)  
This approach, commonly referred to as unweighted sum loss aggregation, involves summing the losses of all tasks without any normalization. The calculation is represented by Equation (14):  
\[L_{global}=\sum_{t=1}^{T}L_{t} \tag{14}\]  
where the loss function for the \(t^{th}\) task \(L_{t}\) is calculated as seen in Equation (15):  
\[L_{t}=L_{Pro}+L_{Sen}+L_{Emo} \tag{15}\]  
3. Dynamic Difficulty Weighting (DDW)  
Instead of traditional weighting schemes, we introduced a DDW scheme, a hybrid approach combining both static and dynamic elements. Based on the intuition that tasks with higher training loss should receive more attention, and inspired by the work in [51], which utilized dynamic weight averaging, DDW uniquely prioritized the primary task, propaganda detection, by training the network to learn a single parameter (\(w\)), while assigning relatively smaller weights to the sentiment and emotion tasks.