## 2 The Proposed Model Algorithm
### Item Representation Learning Module for the Global Domain Layer
#### 2.3.2 Item Representation Learning for the Global Graph  
In the global graph, we use the attention mechanism to represent the different degrees of contribution of different items in the global graph to the representation of the current item. Secondly, we integrate the feature information of the item and use the graph neural network to deeply mine the item preference hidden in the item feature information. The ultimate goal of constructing the global neighborhood graph is to select useful information from the global sequence without introducing noise. We calculate the relevance of the current node and the neighborhood node on the neighborhood graph to represent the influence of the neighborhood set node on the prediction of the current node. The calculation formula of relevance \(\omega\big{(}v_{i},v_{j}\big{)}\) is as follows:  
\[\omega\big{(}v_{i},v_{j}\big{)}=q_{1}^{T}LeakyRelu\big{(}W_{1}[s\odot h_{v_{ j}}||W_{ij}]\big{)} \tag{15}\]  
\(h_{v_{j}}\) is the representation vector of node \(v_{j}\), \(W_{1}\in\ R^{(d+1)(d+1)}\) and \(q_{1}\in\ R^{d+1}\) are trainable parameters, and \(W_{ij}\) is the weight of edge \(\mathrm{e_{ij}}\), which is the sum of the frequency weight and the \"gap\" weight of the edge. s is the feature vector of the current conversation S, which is the result of mean pooling over all nodes in conversation S, calculated as follows:  
\[s=\frac{1}{l}\sum_{i=1}^{l}h_{v_{i}},(v_{i}\in S) \tag{16}\]  
Equations (3)-(17) normalize the relevance and uses the softmax function to obtain the relevance probability of all neighborhood nodes of the current node:  
\[\omega\big{(}v_{i},v_{j}\big{)}=softmax\bigg{(}\frac{\exp\big{(}\omega\big{(}v _{i},v_{j}\big{)}\big{)}}{\sum_{v_{1}\in N_{a}(v_{i})}\exp(\omega(v_{i},v_{k}) )}\bigg{)} \tag{17}\]Based on the relevance probability, we linearly combine the vector representations of each neighbor node in the neighbor set of the node, and obtain the vector representation of the neighbor node as follows:  
\[h_{N_{a}(v_{i})}=\sum_{v_{j}\in N_{a}(v_{i})}\omega\big{(}v_{i},v_{j}\big{)}h_{v_ {j}} \tag{18}\]  
The representation of the item relies on both itself and its neighbor representations. Therefore, we aggregate the current node vector \(h_{v_{i}}\) and the vector representation of its domain node \(h_{N_{a}(v_{i})}\), and the implementation of the aggregation function is as follows:  
\[h_{v_{i}}^{g}=relu(W_{2}[h_{v_{i}}]\Big{|}h_{N_{a}(v_{i})}]) \tag{19}\]  
\(W_{2}\in\ R^{d*2d}\) is the transformation weight. We can use the aggregator to perform multiple aggregations and merge more relevant information into the representation of the target item. We represent the representation of a item in the k-th step as follows:  
\[h_{v_{i}}^{g,(k)}=agg(h_{v_{i}}^{(k-1)},h_{N_{v_{i}}^{g}}^{(k-1)}) \tag{20}\]  
\(h_{v_{i}}^{g,(k-1)}\) is the item representation generated by the previous term through the information propagation process, and its initial value \(h_{v_{i}}^{g,(0)}\) is \(h_{v_{i}}^{g}\). Therefore, the k-th order aggregated representation of the item is the result of integrating its initial embedding representation and the embedding representations of all its neighbors in the global graph, which makes the final item representation more efficient.  
Finally, based on the item feature representation vector, h\({}_{f_{i}}\), that we obtained earlier, we concatenate h\({}_{f_{i}}\) and \(h_{v_{i}}^{g}\) to obtain the final global domain layer item output vector h\({}_{h_{v_{i}}^{g}}\), as shown in the following formula:  
\[h_{v_{i}}^{g}=concat\Big{(}\text{h}_{f_{i}},h_{v_{i}}^{g,(k)}\Big{)} \tag{21}\]