# Enhancing the Recommendation of Learning Resources for Learners via an Advanced Knowledge Graph
## 3 Materials and Methods
### Collaborative Propagation Layer  
Firstly, we extract the learning resources that directly interact with the learners from the interaction graph between learners and learning resources.  
\[\varsigma_{0}=(s|y_{ls}=1), \tag{1}\]  
Afterwards, we continue to explore higher-order collaborative signals among learners' interactions. We believe that if two learners are connected through an auxiliary node, it indicates that there is also an indirect relationship between them. That is to say that learners who have interacted with the same learning resources as the target learner share similarities, and the learning resources they have interacted with can be considered higher-order collaborative information for the target learner. The specific formula is as follows:  
\[\mathcal{L}_{sim}=\left\{l_{sim}\Big{|}s\in\{s|y_{ls}=1\}\text{ \emph{and} }y_{l_{sim}s}=1\right\}, \tag{2}\]  
\[\varsigma_{p}=\Big{\{}s_{p}\Big{|}l\in\mathcal{L}_{sim},\text{ \emph{and} }y_{l_{sp}}=1\Big{\}}, \tag{3}\]  
\(\mathcal{L}_{sim}\) and \(\varsigma_{p}\) represent learners similar to the target learner and the learning resources they have interacted with, respectively. We include the learning resources interacted with by learners similar to the target learner as part of the initial set for the target learner. Therefore, the final initial set for the learner is represented as  
\[\varsigma_{l}=\varsigma_{0}+\varsigma_{p}, \tag{4}\]  
Here, \"+\" represents the merging operation. Then, after entity alignment, \(\text{A}=\{(s,e)|s\in S,e\in E\}\), these learning resources are aligned with the knowledge graph, which can be represented as follows:  
\[\varsigma_{l}^{0}=\{e|(s_{l},e)\in A,\text{ \emph{and} }s_{l}\in\varsigma_{l}\}, \tag{5}\]  
Similarly, we believe that learners who interact with the same learning resource also contribute to the feature representation of the learning resource due to their similar behavioral preferences. Therefore, we consider other learning resources interacted with by the same learner collaborative signals for recommending learning resources, and the formula is represented as follows:  
\[\varsigma_{s}=\big{\{}s_{s}|l\in\{l|y_{ls}=1\}\text{ \emph{and} }y_{l_{s}}=1\big{\}}, \tag{6}\]  
Combining the collaborative information set and the alignment set of learning resources, the initial set of learning resources is represented as  
\[\varepsilon_{s}^{0}=\{e|(s_{s},e)\in A\text{ \emph{and} }s_{s}\in\varsigma_{s}\}, \tag{7}\]  
As shown in Figure 2, the multi-head attention mechanism allows the model to concurrently focus on different parts of the input across multiple subspaces. This enables the model to simultaneously capture various features and relationships. By concatenating or averaging the outputs of multiple attention heads, the multi-head attention mechanism can represent the input information more richly, thereby enhancing the model's expressive capability. The multi-head attention mechanism can identify complex relationships and patterns within the input data, as each attention head can focus on different features or information. In tasks such as natural language processing and computer vision, models that utilize the multi-head attention mechanism typically perform better than those usinga single attention head, leading to overall performance improvements. By attending to different parts of the input, the multi-head attention mechanism can more comprehensively utilize the input information, thus reducing information loss and enhancing the model's robustness. In summary, the multi-head attention mechanism enhances LKGA's flexibility and expressive power through parallel processing and diversified attention, leading to superior performance in complex tasks.