# User Comment-Guided Cross-Modal Attention for Interpretable Multimodal Fake News Detection
## 3 Methodology
### Fake News Detection
#### 3.6.3 Training Objectives  
We adopt multiple loss functions to optimize different aspects of the model:  
Primary Classification Loss:  
\[\mathcal{L}_{cls}=\text{CrossEntropy}(y_{true},y_{final}) \tag{35}\]  
Auxiliary Classification Loss:  
\[\mathcal{L}_{aux}=\text{CrossEntropy}(y_{true},y_{1})+\text{CrossEntropy}(y_ {true},y_{2}) \tag{36}\]  
Attention Regularization Loss:  
\[\mathcal{L}_{att}=\|A_{CI}\|_{F}+\|A_{CT}\|_{F} \tag{37}\]  
Total Training Loss:  
\[\mathcal{L}_{total}=\mathcal{L}_{cls}+\alpha_{aux}\cdot\mathcal{L}_{aux}+ \alpha_{att}\cdot\mathcal{L}_{att} \tag{38}\]  
where \(\alpha_{aux}\) and \(\alpha_{att}\) are hyperparameters controlling the relative importance of auxiliary objectives.  
Algorithm 3 implements a multi-objective training strategy that balances primary classification performance with auxiliary learning goals. The comprehensive loss function ensures that each model component learns effective representations independently while maintaining overall system coherence, leading to robust performance across different types of misinformation scenarios.The algorithm designs multi-level loss functions to achieve comprehensive model optimization:Primary Classification Loss (\(\mathcal{L}_{cls}\)): Uses cross-entropy loss to train the final binary classification prediction, which is the main optimization objective of the model and directly relates to the accuracy of fake news detection.  
Auxiliary Classification Loss (\(\mathcal{L}_{aux}\)): Provides supervised training for cross-modal branches and comment integration branches separately. This design ensures that each branch can independently learn effective feature representations, avoiding over-dependence of one branch on others and improving model robustness.  
Attention Regularization Loss (\(\mathcal{L}_{att}\)): Regularizes attention matrices through the Frobenius norm to prevent attention weights from being overly concentrated on a few positions, promoting the model to learn more balanced and generalizable attention distributions.  
```
0: Ground truth labels \(y_{true}\), primary prediction \(y_{1}\), auxiliary prediction \(y_{2}\), final prediction \(y_{final}\), attention matrices \(A_{CI}\), \(A_{CT}\), hyperparameters \(\alpha_{aux},\alpha_{att}\)
0: Total loss \(\mathcal{L}_{total}\)
1:// Primary Classification Loss
2:\(\mathcal{L}_{cls}\leftarrow\) CrossEntropy(\(y_{true},y_{final}\))
3:// Auxiliary Classification Loss
4:\(\mathcal{L}_{aux1}\leftarrow\) CrossEntropy(\(y_{true},y_{1}\))\(\triangleright\) Cross-modal branch
5:\(\mathcal{L}_{aux2}\leftarrow\) CrossEntropy(\(y_{true},y_{2}\))\(\triangleright\) Comment integration branch
6:\(\mathcal{L}_{aux}\leftarrow\mathcal{L}_{aux1}+\mathcal{L}_{aux2}\)
7:// Attention Regularization Loss
8:\(\mathcal{L}_{att,CI}\leftarrow\|A_{CI}\|_{F}\)\(\triangleright\) Comment-image attention regularization
9:\(\mathcal{L}_{att,CI}\leftarrow\|A_{CT}\|_{F}\)\(\triangleright\) Comment-text attention regularization
10:\(\mathcal{L}_{att}\leftarrow\mathcal{L}_{att,CI}+\mathcal{L}_{att,\mathcal{CI}}\)
11:// Total Loss Computation
12:\(\mathcal{L}_{total}\leftarrow\mathcal{L}_{cls}+\alpha_{aux}\cdot\mathcal{L}_{ aux}+\alpha_{att}\cdot\mathcal{L}_{att}\)
13:return\(\mathcal{L}_{total}\)
```  
**Algorithm 3** Multi-objective training algorithm.  
Through weighted combination of these three types of losses, the algorithm achieves a balance between main task performance, branch independence, and attention distribution quality. Hyperparameters \(\alpha_{aux}\) and \(\alpha_{att}\) allow adjustment of the relative importance of different loss terms according to specific datasets and task requirements, providing flexibility for model optimization.