# Dual-Channel Feature Enhanced Collaborative Filtering Recommendation Algorithm
## 3 DCFECF Model
### Local Convolutional Channel  
Like the setting of DCCF, DCFEC introduces the transition matrix [14] into the process of graph convolution operation, and the transition matrix is defined as Equation (5). \[P=D^{-1}A \tag{5}\]  
\(A\) is the adjacency matrix of bipartite interactive graph, and \(D\) is the degree matrix of the adjacency matrix. Each component \(\left[P\right]_{ij}\) in the first-order transition matrix \(P\) represents the transition probability of node \(i\) taking one step to reach node \(j\). For the higher-order transition matrix \(P^{k}(k\geq 2)\), each component \(\left[P^{k}\right]_{ij}\) of the matrix represents the probability of node \(i\) taking \(k\) steps to reach node \(j\). In the local convolution channel, when determining the neighborhood range of user nodes and item nodes in the graph, the first-order neighborhood is determined by the adjacency matrix \(A\). For high-order neighborhoods with order \(k\) greater than or equal to 2, the transition probability threshold \(P^{k}_{\Theta}\) for each order is set based on the corresponding transition matrix to determine the range of neighborhoods for each order of the node. The transition probability threshold in DCCF is set to a fixed value of 0.5, and the neighborhood information filtered for different sample data is different. In fact, the process of determining the range of neighborhoods of different orders is progressive step by step. For example, when calculating the range of second-order neighborhoods, it is performed on the basis of first-order neighborhoods. The filtered second-order neighborhoods have strong correlation with the first-order neighborhoods, and nodes with high transfer probabilities are selected into the second-order neighborhoods. It can be considered that first-order neighborhood nodes play a certain role in determining the nodes of the second-order neighborhoods, and the weight values of the connecting edges of the two nodes become the basis for determining the strength of the correlation between the two nodes. By introducing the self-attention mechanism, the weight value of each edge can be obtained. By combining the weight value with the transfer probability, the weighted average value is obtained, which is the transfer probability threshold within the neighborhood of that order. Based on the above analysis, the next step is to determine the transition probability threshold \(P^{k}_{\Theta}\) for each order. Firstly, the self-attention mechanism [15] is used to obtain the weight values of each edge. The self-attention mechanism can independently calculate attention weights at each position, which has advantages over traditional attention mechanisms. Assuming there are a total of \(m\) items, taking user \(u\)'s interaction with items \(i\) as an example to calculate the weight value, where _Query_ represents different items and _Key_ represents the user's rating on the items. The specific process is as follows. Step 1: Input source information. Enter the rating information \(X=\{x_{1},x_{2},\ldots,x_{m}\}\) for \(m\) items. Step 2: Calculate attention weight distribution. In the basic attention mechanism, \(Key=Value=X\), calculate the attention distribution using Equation (6). \[\alpha_{l}=soft\text{max}(s(key_{l},q))=soft\text{max}(s(X_{l},q))=\frac{e^{s( X_{l},q)}}{\sum\limits_{l=1}^{m}e^{s(X_{l},q)}} \tag{6}\]where \(\alpha_{l}\) is the distribution of attention weights, representing the importance of information. \(s(X_{l},q)\) is the attention scoring mechanism, and we use the scaled dot product model as the scoring mechanism. The calculation formula is shown in Equation (7), and \(soft\text{max}(s(X_{l},q))\) represents that \(s(X_{l},q)\) has been normalized:  
\[s(X_{l},q)=\frac{x_{l}^{T}q}{\sqrt{d}} \tag{7}\]  
Step 3: Weighted summation of information. From \(\alpha_{l}\), we can obtain the degree of attention to \(l\)-th information when querying \(q\) and then weigh and sum each value of \(Value\) according to Equation (8).