# Knowledge-Aware Enhanced Network Combining Neighborhood Information for Recommendations
## 3 Our Approach
### Recommendation Module
#### 3.3.2 IRL  
The IRL mainly samples the neighboring entities of the item entity in the KG, and then combines the neighboring entity information with a bias, to complement the embedded representation of the item entity. We can also extend the perceptual depth of items in the KG to multi-hop, to obtain potential personalized preferences of users over long distances. We assume that there are users \(u\) and items \(v\), and we use \(\mathcal{Q}(v)\) to denote the set of first-order entities in the KG, corresponding to item \(v\). To enrich the embedding representation vector of items, we have the bias to aggregate these entities as follows:  
\[v_{\mathcal{Q}(v)}^{u}=\sum_{e\in\mathcal{Q}(v)}\tilde{\pi}_{r_{v}}^{u}e_{r}, \tag{14}\]  
where \(r_{v,e}\) is the relational representation of entities \(v\) and \(e\) in the KG, and \(\tilde{\pi}_{r_{v,e}}^{u}\) is the score between \(u\) and \(r\), defined as follows:  
\[\tilde{\pi}_{r_{v,e}}^{u}=\frac{\exp(\pi_{r_{v,e}}^{u})}{\sum_{e\in\mathcal{Q} (v)}\exp(\pi_{r_{v,e}}^{u})}, \tag{15}\]  
where  
\[\pi_{r}^{u}=\Delta(u,r), \tag{16}\]  
where \(u\) and \(r\) are user embedded representations and relation embedded representations, respectively, \(\pi_{r}^{u}\) denotes the score between a user and a relation, and \(\tilde{\pi}_{r_{v,e}}^{u}\) is the normalization operation on \(\pi_{r}^{u}\). The function \(\Delta(\cdot)\) (inner product), is used to calculate the score \(\pi_{r}^{u}\). This operates because we consider that different relations are important to users in different ways. For example, a particular user may have more personalized preferences for music they have historically enjoyed by the same artists, while other users may be more concerned with the genre of the music. Therefore, we use the user and relationship scores as a filter for the user's personalized preferences, allowing us to bias specific scores when aggregating neighborhood information. Note that, in the real world, the \(\mathcal{Q}(v)\) of some entities may be large. Therefore, to ensure higher computational efficiency, we draw the set  
Figure 3: Knowledge-aware attention network. of neighbors of the same size uniformly for each entity. Briefly, we denote the neighborhood representation of entity \(v\) as \(v^{u}_{\mathcal{O}(v)}\), where \(\mathcal{O}(v)=\{e|e\in\mathcal{Q}(v)\}\) and \(|\mathcal{O}(v)|=K\). \(K\) denotes the size of the nearest neighbor, which is a tunable parameter, and we will discuss its effect on the model in the experimental section. As shown in Figure 4, we give examples of the two-layer depth of perception of the item entity. Finally, we have to combine the initial embedding representation of item \(v\), with its aggregated neighborhood representation \(v^{u}_{\mathcal{O}(v)}\), to obtain the neighborhood-enhanced representation \(v^{u}_{agg}\), of item \(v\). This paper implements the following four types of aggregators:  
* _Summation aggregator_[27] directly sums \(v\) and \(v^{u}_{\mathcal{O}(v)}\), and then goes through a nonlinear layer, which is defined as follows: \[v^{u}_{aggs_{sum}}=ReLU(w\cdot(v+v^{u}_{\mathcal{O}(v)})+b).\] (17)
* _Concat aggregator_[28] concatenates \(v\) and \(v^{u}_{\mathcal{O}(v)}\) before going through the nonlinear layer, which is defined as follows: \[v^{u}_{aggs_{concat}}=ReLU(w\cdotconcat(v,v^{u}_{\mathcal{O}(v)})+b).\] (18)
* _Neighbor aggregator_[29] only considers \(v^{u}_{\mathcal{O}(v)}\) as the output representation, which is defined as follows: \[v^{u}_{aggs_{neighbor}}=ReLU(w\cdot v^{u}_{\mathcal{O}(v)}+b).\] (19)
* _Bi-interaction aggregator_[30] considers two information interactions of \(v\) and \(v^{u}_{\mathcal{O}(v)}\), defined as follows: \[v^{u}_{aggs_{ii}}=ReLU(w_{1}\cdot(v+v^{u}_{\mathcal{O}(v)}))+ReLU(w_{2}\cdot( v\odot v^{u}_{\mathcal{O}(v)})).\] (20)  
Among the above four aggregators, \(w_{*}\) and \(b\) denote the weights and bias, respectively. In particular, the \(\odot\) in the bi-interaction aggregator represents the Hadamard product.