## 3 Methods of DDM
### Candidate News Module  
The candidate news module is used to learn news representations from news titles and consists of three layers. The first layer is word embedding, which is used to convert a news title from a sequence of words into a low-dimensional embedded vector sequence. Let us say a news title is represented by \([M]\) words \([W_{1},W_{2},W_{3},\cdots,W_{M}]\). Through this layer, it is transformed into a vector sequence \([E_{1},E_{2},E_{3},\cdots,E_{M}]\). Figure 1: The framework of our DDM approach. The second layer consists of the word-level two-layer residual connections and two multi-head attention mechanism modules designed in this paper. The interaction between words is crucial when learning news representations. However, long-distance interactions are often challenging to capture using CNNs. Additionally, a single word may interact with multiple words within the same news article. Therefore, in this paper, two-layer residual connections and two multi-head self-attention modules are employed to capture the interactions between words and learn the contextual representations of the words. The specific formulation of the multi-head self-attention mechanism in this module can be expressed as follows:  
\[Attention(Q,K,V)=softmax(Qk^{T}/\sqrt{dk})V \tag{1}\]  
where Q, K, and V, respectively, represent the query, key, and value matrices. They are projected into the \(E_{t}\) matrix using different learning projection matrices, as described in the equation. \(1/\sqrt{dk}\) is a scaling factor that serves as a proportionality factor, generating a softer attention distribution to prevent vanishing gradients. Multi-head self-attention applies h-attention functions in parallel to generate connected output representations:  
\[h_{i}^{w}=Attention(E_{t}W_{i}^{Q},E_{t}W_{i}^{K},E_{t}W_{i}^{V}) \tag{2}\]  
\[h_{i}^{w}=[h_{i,1}^{w},h_{i,2}^{w},\cdots,h_{i,h}^{w}] \tag{3}\]  
\(E_{t}\) represents the token matrix of words, while \(W_{i}^{Q}\), \(W_{i}^{K}\), and \(W_{i}^{V}\) are learnable parameters, with i denoting the \(i\)-th head. In the case of multi-head attention, information from different representation subspaces at different positions can be jointly learned, aiding in capturing match signals between different words. \(h_{i}^{w}\) represents the combination of results from multiple independent self-attention heads for feature extraction of the \(i\)-th word. The following will introduce the core contribution of this article. The equations for the DDM module are as follows:  
\[\left\{ \begin{aligned} H=h_{i}^{w}\\ H_{1}=LN(MA(H)+H)\\ H_{2}=LN(MA(H_{1})+H_{1})\\ H_{3}=LN(MA(H_{2})+H)\end{aligned} \right. \tag{4}\]  
LN represents the layer normalization layer, while \(MA(H)\) represents the comprehensive processing of upper-level data outputs by a multi-head attention layer. Through multiple iterations, we have found that the experimental performance is optimal using this set of equations. The DDM module significantly enhances the model performance compared to that of many classical models. Specific results will be presented in the experimental section. Additionally, the data structure of \(h_{i}^{w}\) is the same as \(H_{1}\), \(H_{2}\), and \(H_{3}\). Therefore, H can be considered as the reinforced version of \(h_{i}^{w}\). In the subsequent equations, \(h_{i}^{w}\) is used to represent the reinforced results of the H layer, i.e., \(h_{i}^{w}=H_{3}\). The third layer is an additive attention network. Different words within the same news article may have varying importance when representing said news. Therefore, various methods for selecting important words are compared in this article, including additive attention mechanisms, local attention mechanisms, and three other methods. Through ablation experiments, the additive attention mechanism that best suits the dataset and structure of this article is selected.