# A Multi-Behavior Recommendation Method for Users Based on Graph Neural Networks
## 3 Methodology
### Embedding Module Incorporating First-Order Neighborhood Information  
In a realistic scenario, the behavior habits of different users are very different. For example, User A is used to collect most of the products in the process of browsing, while User B only collects the products he is most interested in, which shows that the collection behavior has little reference value for User A, while for User B, the collection behavior has little reference value for user A, but has great influence on the products collected by user B. Therefore, the design goal of this module is to capture the first-order neighborhood information of entities in the interaction graph under different behavior categories and inject their corresponding weights into the initial embedding of goods and users, so as to generate a feature representation incorporating the first-order neighborhood information. In the bipartite graph composed of user entities and commodity entities, this module learns the representations of commodity entities and user entities under different behavioral categories, respectively, by combining the initialized IDs of user \(u_{i}\) and \(v_{j}\) by aggregating  
Figure 1: Model architecture diagram of multi-behavior perception.  
the initialized ID embedding representations \(E_{i}\) and \(E_{j}\) of user \(u_{i}\) and commodity \(v_{j}\) with the first-order neighborhood information to obtain the fused contextual feature vector.  
Given the ID embedding representation \(E_{i}\) of the initialized user \(u_{i}\), the following formula is used to learn personalized specific behavior embedding.  
\[\left\{\begin{array}{l}P_{i,k}=\frac{E_{i}\|\sum_{j\in N_{i}^{k}}E_{j}}{\sqrt{ \left|N_{i}^{k}\right|\left|N_{j}^{k}\right|}}\\ W_{j,k}=M\cdot P_{j,k}+Z\\ \widetilde{E}_{j}=W_{j,k}E_{j}\end{array}\right. \tag{1}\]  
where \(N_{i}^{k}\) denotes the set of goods that user \(u_{i}\) interacts with under \(k\) behavior types, and \(N_{j}^{k}\) denotes the set of users that interact with good \(v_{j}\) under \(k\) behavior types. \(\|\) denotes the splicing operation of the vector. Here, \(\sqrt{\left|\ N_{i}^{k}\ \right|\ \left|N_{j}^{k}\right|}\) is the normalization factor. \(P_{i,k}\) is the interaction pattern of user \(u_{i}\) under a specific behavior type \(k\). \(W_{i,k}\) is the learned parameter matrix of user \(u_{i}\). \(W_{i,k}\) is the parameter matrix of the learned personalization of user \(u_{i}\), which injects a specific type of behavioral context into the user \(u_{i}\) representation, and \(M\) and \(Z\) are transformation parameters. \(i\) is the personalized representation of the user \(u_{i}\) that incorporates the contexts.  
Given the ID embedding representation \(E_{j}\) of the initialized good \(v_{j}\), the personalized representation \(E_{j}\) of the good \(v_{j}\) of the fused context is obtained using the same method of learning as above. The specific formula is as follows:  
\[\left\{\begin{array}{l}P_{j,k}=\frac{E_{j}\|\sum_{i\in N_{j}^{k}}E_{i}}{\sqrt {\left|N_{i}^{k}\right|\left|N_{i}^{k}\right|}}\\ W_{j,k}=M\cdot P_{j,k}+Z\\ \widetilde{E}_{j}=W_{j,k}E_{j}\end{array}\right. \tag{2}\]  
where \(P_{j,k}\) holds information about the users who interact with commodity \(v_{j}\) for a specific type of behavior. \(W_{j,k}\) is the learned parameter matrix of the personalization of the commodity \(v_{j}\), which injects a specific type of behavioral context into the representation of the commodity \(v_{j}\), and \(M\) and \(Z\) are transformation parameters. \(\widetilde{E}_{j}\) is the personalized representation of the commodity \(v_{j}\) incorporating the contexts.