# Enhancing Propaganda Detection in Arabic News Context Through Multi-Task Learning
## 3 Methodology
### Task-Weighting
#### 3.6.3 Task-Weighting Schemes
Simultaneously, it dynamically learned a task-specific difficulty score that reflected the difficulty of a task at any given moment during training. The difficulty score was adjusted based on task-specific losses. This method represented a key innovation by integrating the priority for the main task and dynamic weighting for auxiliary tasks based on real-time loss trends. The following Equation (16) demonstrates this calculation:  
\[L_{global}=w_{prop}.\;DS_{prop}+\frac{w_{Sen}}{4}.\;DS_{Sen}+\frac{w_{Emo}}{3}. \;DS_{Emo} \tag{16}\]  
where  
* \(w_{prop}\) represents a constant propaganda weighting that ensures that the propaganda task remains prioritized even if its loss decreases over time. * \(DS_{prop}\) represents the difficulty score of the propaganda task, which is based on its loss. * \(w_{Sen}\) and \(w_{Emo}\) represent a constant scaling factor for the sentiment and emotion task, respectively. * \(DS_{Sen}\) and \(DS_{Emo}\) represent difficulty scores for the sentiment and emotion tasks, respectively. \(w_{prop}\) was assigned to prioritize the propaganda detection task, while relatively smaller weights were assigned to the sentiment and emotion tasks. Based on our empirical analysis and the observation of loss values during model training, we concluded that setting these parameters to specified values, as shown in Equation (16), yielded the best performance for the developed MTL models. Section 4.3 provides a detailed explanation of how these parameters were selected. 4. Priority-Guided Random Weighting (PGRW)  
Motivated by a recent study in [52], original random loss weighting (RLW) was used to assign random weights to losses and treat all tasks equally. However, this approach may not be ideal when certain tasks, such as propaganda detection, are more important. To address this problem, we introduced a priority-guided parameter (\(\alpha\)) that assigned a higher priority to propaganda detection while maintaining a controlled degree of randomness in the learning process. The introduced scheme balanced the importance of tasks while maintaining the flexibility of random weighting, which helped in generalization and prevented overfitting. In the developed MTL model, several strategies for dynamically assigning task weights were employed, utilizing three distinct sampling distributions: normal, uniform, and Bernoulli. Each distribution introduced a unique behavior into how the task importance was stochastically determined during training. The normal distribution provided unbounded values centered around zero, introducing high variability. Further, uniform distribution generated values strictly within the range of [0.01, 1.0], ensuring that all weights remained positive and nonzero. In contrast, the Bernoulli distribution simulated a more binary decision process in which each task was assigned a high weight (0.99) or near-zero weight (0.01) with equal probability. Moreover, the priority-guided parameter (\(\alpha\)) was sampled from a uniform distribution. By systematically comparing these strategies, we sought to gain a deeper understanding of how varying levels of randomness and task prioritization influenced the overall model performance. This was particularly relevant when certain tasks, such as propaganda detection, were considered more critical and therefore required a higher priority in the learning process. Equation (17) shows the calculation:  
\[L_{global}=\sum_{t=1}^{T}w_{t}L_{t} \tag{17}\]  
where the learnable generated weight \(w_{t}\) is dynamically updated as seen in Equation (18):  
\[w_{t}=\frac{e^{\alpha.I_{pw}(t).\lambda_{t}+\lambda_{t}}}{\sum_{j\in T}e^{ \alpha.I_{pw}(j).\lambda_{t}+\lambda_{t}}} \tag{18}\]  
The simplified form of the above equation yields the following:  
\[w_{t}=\frac{e^{\lambda_{t}(1+\alpha.I_{pw}(t))}}{\sum_{j\in T}e^{\lambda_{t}( 1+\alpha.I_{pw}(j))}} \tag{19}\]  
where  
* \(T\) represents the total number of tasks. * \(t\) represents each individual task in the summation. * \(L_{t}\) represents loss function for the \(t^{th}\) task.