Next Article in Journal
Evaluation of Petrographic and Geomechanical Properties of Inzari Formation Rocks for Their Suitability as Building Materials in the Nizampur Basin, Pakistan
Previous Article in Journal
Ground Ivy (Glechoma hederacea L.) as an Innovative Additive for Enriching Wheat Bread: Study on Flour Fermentation Properties, Dough Rheological Properties and Bread Quality
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hierarchical Self-Supervised Learning for Knowledge-Aware Recommendation

College of Intelligence Science and Technology, National University of Defense Technology, Changsha 410073, China
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Appl. Sci. 2024, 14(20), 9394; https://doi.org/10.3390/app14209394
Submission received: 24 July 2024 / Revised: 16 September 2024 / Accepted: 9 October 2024 / Published: 15 October 2024

Abstract

:
Knowledge-aware recommendation systems have shown superior performance by connecting user item interaction graph (UIG) with knowledge graph (KG) and enriching semantic connections collected by the corresponding networks. Among the existing methods, self-supervised learning has attracted the most attention for its significant effects in extracting node self-discrimination auxiliary supervision, which can largely improve the recommending rationality. However, existing methods usually employ a single (either node or edge) perspective for representation learning, over-emphasizing the pair-wise topology structure in the graph, thus overlooking the important semantic information among neighborhood-wise connection, limiting the recommendation performance. To solve the problem, we propose Hierarchical self-supervised learning for Knowledge-aware Recommendation (HKRec). The hierarchical property of the method is shown in two perspectives. First, to better reveal the knowledge graph semantic relations, we design a Triple-Graph Masked Autoencoder (T-GMAE) to force the network to estimate the masked node features, node connections, and node degrees. Second, to better align the user-item recommendation knowledge with the common knowledge, we conduct contrastive learning in a hybrid way, i.e., both neighborhood-level and edge-level dropout are adopted in a parallel way to allow more comprehensive information distillation. We conduct an in-depth experimental evaluation on three real-world datasets, comparing our proposed HKRec with state-of-the-art baseline models to demonstrate its effectiveness and superiority. Respectively, Recall@20 and NDCG@20 improved by 2.2% to 24.95% and 3.38% to 22.32% in the Last-FM dataset, by 7.0% to 23.82% and 5.7% to 39.66% in the MIND dataset, and by 1.76% to 34.73% and 1.62% to 35.13% in the Alibaba-iFashion dataset.

1. Introduction

Recommender systems play a crucial role in helping users discover interest items by analyzing their historical preferences and behaviors, addressing the challenge of information overload caused by the exponential growth of data on the Internet [1]. These systems have become widely applied in various domains, including e-commerce platforms [2], social websites [3], and music streaming services [4]. Among contemporary approaches, collaborative filtering (CF) [5,6] is a typical framework that leverages users’ behavioral data to measure user-item similarity, leading to effective recommendation services. However, CF-based methods heavily rely on historical user–item interactions, making them inadequate for addressing challenges like data sparsity and cold start, thus restricting the accurate predictions of user preference. To overcome these limitations, we incorporate the structured knowledge graph (KG) into recommender systems. The KG offers additional item-wise connectivity information beyond the user-item interaction graph (UIG), as well as provides fine-grained attribute features, facilitating the capture of the true relatedness behind user behavior and interests [7,8].
The KG serves as a valuable resource, containing rich factual information about items and their relationships. By introducing meaningful inherent semantic relatedness into user behavior data, we generate high-quality user and item representations, mitigating data sparsity and ensuring better recommendation performance. The prevalent KG-aware methods can be divided into three categories: embedding-based, path-based, and GNN-based. Specifically, early embedding-based methods [8,9,10,11] leverage knowledge graph embedding algorithms, such as TransE [12] and TransR [13], to encode entities as vector representations, subsequently integrating them into the recommendation framework. Despite being effective, the aforementioned methods suffer from the deficiency of exploiting the high-order connection within the KG, failing to provide reasonable explanations about user preferences [14]. To capture multi-hop interactions between users and items, the path-based methods enhance representations by considering the meaningful long-range structure within KG [15,16,17]. This structure serves as propagation paths for user preferences, providing an intuitive demonstration of interpretability. Nevertheless, these methods rely on manually constructed meta paths, demanding substantial human effort and exhibiting poor scalability. Recently, with the rise of graph neural network (GNN), there has been a strong research interest in leveraging GNN for recursive information propagation among KG nodes, capturing high-order information [18,19,20,21,22].
Although these methods have shown strong performance, the integration of KG also introduces novel challenges, particularly concerning data sparsity and the long-tail issue inherent in the KG [23]. To address the scarcity of the supervision signal in sparse data scenarios, self-supervised learning (SSL) [24], which can be generally categorized into generative and contrastive, has garnered significant attention as an emerging learning paradigm capable of reducing dependency on manual labels. Several recent SSL-based methods [25,26] leverage different data augmentation strategies to construct contrasting views of the UIG, thereby exploiting the intrinsic structure and patterns within the UIG data to enhance recommendation performance. Furthermore, SSL-based methods that incorporate KG, such as KGCL [27], KGTN [28] and HCVCL [29], aim to create contrasting views within both the KG and UIG data, enabling items and users to learn from the rich semantic and contextual information embedded in the KG. KAUR [30] unifies UIG and KG as a collaborative knowledge graph and treats neighbor nodes as contrastive positive pairs. KGRec [31] proposes a unified framework that combines two self-supervised learning paradigms, namely generative and contrastive learning. These methods learn user and item representations from the available original data autonomously. As we can see, SSL-based methods for recommendation mitigate sparsity and cold-start issues by eliminating model dependence on large volumes of labeled data.
Even with the success of the methods mentioned above, most SSL-based efforts in knowledge-aware recommendation typically focus on uniform frameworks for learning representations, with limited exploration into hierarchical learning. They commonly employ contrastive learning paradigms, either by constructing multiple contrasting views between the KG and UIG (e.g., HCVCL [29]) or by introducing cross-knowledge graph structures to form multiple contrasting views (e.g., KGIN [23], MCCLK [32]). In the process of graph augmentation, they particularly emphasize edge-level disruption and learning, over-emphasizing the pair-wise topology structure, which refers the one-to-one connections between nodes. As a result, they overlook the richness of the KG structure, especially the important semantic and structural information inherent in neighborhood-wise connections—the many-to-one connections where a node is linked to multiple neighboring nodes. This limitation restricts their ability to deeply explore the neighborhood-wise semantic connections between KG entities and UIG nodes. It is noteworthy that the coarse-grained semantic understanding can result in the generation of low-quality user–item interaction representations, negatively impacting recommendation performance.
To overcome this limitation, we emphasize a comprehensive strategy that sufficiently processes KG facts and UIG data in a more effective and fine-grained manner. We capture implicit relevant relatedness between entities and items, obtaining high-quality representations for recommendation. Therefore, we propose a method named Hierarchical self-supervised learning for Knowledge-aware Recommendation (HKRec), which seeks to maximize the utilization of explicit hierarchical knowledge to acquire valuable implicit semantics. This enables the model to enhance user–item representations from two perspectives. First, we introduce the Triple-Graph Masked Autoencoder (T-GMAE) designed to better reveal the representation of inherent semantic relations within the KG. T-GMAE achieves this by hierarchically reasoning the masked node features, connections, and degrees. Second, we incorporate contrastive learning in a hybrid manner, employing both neighborhood-level and edge-level augmentation in a parallel way. This bridges the latent information mining of the KG with the user–item interaction modeling via two augmentation operators to achieve more comprehensive information distillation. The parallel contrastive learning paradigm is intended to distill auxiliary supervision signals, ensuring that the model can effectively integrate information hierarchically for improved entity–item alignment.
In summary, we outline the contributions of HKRec as follows:
  • We highlight the significance of the hierarchical learning mechanism in both KG and UIG for knowledge graph-aware recommendation within a joint self-supervised learning paradigm. This is crucial as it generates more valuable self-supervised signals for item and user representations, enhancing the ability to mine useful knowledge in scenarios of data sparsity.
  • We present a model HKRec to unify the generative and the contrastive learning paradigms in a hierarchical manner. HKRec captures the implicit semantic information from the knowledge graph incorporating a multi-perspective hierarchy and integrates representations into recommender systems through hierarchical entity–item alignments.
  • We perform extensive experiments on three real-world benchmark datasets to verify that HKRec achieves significant performance compared to recent state-of-the-art baselines.
The remainder of the paper is organized as follows. Section 2 summarizes the related works. Section 3 formally presents our studied task. Section 4 introduces the HKRec model, providing an in-depth introduction to its key components. Section 5 compares the recommendation performance of the proposed model with other benchmark model-based real-world datasets and includes ablation studies, analyses of the benefits of HKRec, and a visual case study. Finally, Section 6 concludes the paper.

2. Related Work

2.1. Knowledge-Aware Recommendation

Embedding-based. Embedding-based methods [9,10,11,33,34] leverage relations and entities in the KG to enhance the semantic representations in recommender systems [14]. The earliest works trace back to CKE [11] which incorporates different types of side information into the collaborative filtering framework and the embedding of items’ structural knowledge is encoded with TransR [13]. Another representative solution is KTUP [10], which employs a joint learning mechanism of KG completion and item recommendation. Specifically, TransH [35] is utilized to learn distributional representations of the KG, and a hyperplane-based translation component is designed to handle user preferences. Multi-Rec [34] proposes a multi-task learning framework that combines CF-based and embedding-based to simultaneously learn user features in UIG and item features in KG. MFPRKG [8] proposes a multi-feature augmented model that not only embeds structured information from the KG, but also fuses temporal and textual information. However, one problem shared by embedding-based methods lies in their incapacity to handle higher-order connectivities, coupled with a lack of interpretability for recommendation.
Path-based. Path-based methods [4,16,17,36,37,38] are devoted to exploring the high-order connectivity information within the KG to guide the recommendation. They are explicable as the designed meta-paths guide the recommendation process based on their comparison between the candidate item and the historical interactions. For example, PER [38] pre-defines various types of meta-paths and subsequently extracts all paths that conform to the defined meta-path for each user–item pair. MCRec [4] uses CNN to explicitly embed user–item pairs to obtain the representation of meta-paths. Additionally, KPRN [16] employs LSTM to generate path representations by integrating the semantics of entities and relations. PGPRs [36] design a series of quantitative properties to explain reasoning paths from the user’s perspective. Despite the interpretability of successful recommendation, a deficiency is that these methods highly depend on manually designed meta-paths. This makes them insufficiently scalable to other domain knowledge and overly reliant on human efforts.
GNN-based. GNN-based methods [18,19,21,23,39,40,41] are emerging, which can be attributed to their compatibility with the graph structure inherent in recommendation data and recursively propagate the embeddings to capture multi-hop neighbors. For instance, KGAT [19] leverages the relation-aware aggregation mechanisms to model high-order relations effectively. KGCN [18] proposes a mini-batch training strategy and integrates neighbor information with bias to update KG entity representations, allowing for a better exploration of the local proximity structure. KGNN-LS [39] learns the item representations based on the designed user-specific weights to different relations. KGIN [23] is a state-of-the-art method that models user intents for relations and employs relational path-aware aggregation to effectively capture rich information on the KG.

2.2. Self-Supervised Learning

Self-supervised learning has gained widespread attention in the fields of CV [42,43,44], NLP [45,46], and graph [47,48] as it can learn valuable feature representations from extensive unlabeled data. Typically, several attempts introduce self-supervised learning into recommendation, effectively addressing the challenge of data sparsity to achieve improvements in recommendation performance [25,30,31,32,49,50]. The typical exploration is SGL [25], which leverages three data augmentation operators to construct structured views for contrastive learning in the collaborative filtering framework. AdaGCL [26] designs an adaptive graph generation model and a graph denoising model to create contrastive views to enhance the CF paradigm. In recent explorations, the self-supervised paradigm for knowledge-aware recommendation has shown great potential through data self-discrimination to learn richer latent semantic information. KGCL [27] attempts to leverage a joint contrastive learning paradigm to bridge the knowledge graph and the user–item interaction graphs to address noisy and sparse issues. KGTN [28] introduces a novel local–global contrast mechanism in its contrastive learning module, enhancing the robustness of user and item representation learning. KGRec [31] is the first attempt to unify generative and contrastive learning for extracting implicit semantics from the KG in a rationale-aware manner. HCVCLs [29] design a hierarchically coupled view-crossing contrastive learning paradigm to addresses noise issues. Motivated by the above self-supervised learning frameworks, we design a new SSL-based method for knowledge-aware recommendation by hierarchically refining node representations and aligning multi-view semantics across the KG and the UIG.

3. Preliminaries

This section introduces key notations used throughout the paper and formalizes our studied task.
User–Item interaction graph. For the recommendation scenario, we define the user–item interaction graph as G u = { ( u , y u i , i ) | u U , i I } . Herein, U represents the set of users, I represents the set of items, and V = U I is the node set. The user–item interaction matrix is denoted as Y , where y u i = 1 indicates an interaction (e.g., view and purchase) between user u and item i while y u i = 0 signifies no interaction. Graph G u contains information about the connections between users and items, forming the basis for recommendation models.
Knowledge graph. Knowledge graphs serving as graphical representations of information depict entities as nodes and their relations as edges. The structured format facilitates the organization and retrieval of information. A knowledge graph is formally represented as triplets G k = { ( h , r , t ) | h , t E , r R } , where E denotes the set of entities, R denotes the set of relations, and each triple ( h , r , t ) signifies relation r connecting the head entity h to the tail entity t.
Task Description. We formally describe the recommendation task addressed in this paper:
  • Input: a user–item interaction graph G u and a knowledge graph G k .
  • Output: a predictive function y u i that estimates how likely a user would adopt an item.

4. Methodology

We present the proposed Hierarchical self-supervised learning for Knowledge-aware Recommendation (HKRec). HKRec aims to hierarchically leverage two self-supervised learning paradigms to unearth the valuable latent semantics of the KG, enabling the acquisition of high-quality user and item representations. Figure 1 shows the overall framework, which comprises two main components: the triple-graph masked autoencoder and the parallel cross-view contrastive learning.

4.1. Triple-Graph Masked Autoencoder

Inspired by the success of masked autoencoder techniques in natural language processing [51] and image processing [52], we propose the T-GMAE module of HKRec. The T-GMAE selectively masks portions of the input signals, forcing the model to learn underlying semantics and adapt to the masked structure, which enhance the learned node representations. In particular, T-GMAE employs dual masking strategies (i.e., node connections masking and node features masking) and incorporates three reasoning strategies: (1) edge reconstruction; (2) degree restoration; (3) feature reconstruction. Among these, both edge reconstruction and degree restoration can be categorized as forms of node connection reconstruction.

4.1.1. Node Connection Reconstruction

We design the attention-based node connection masking strategy hierarchically and divide the reconstruction into two tasks: edge reconstruction and degree restoration, aiming to unveil the underlying semantic information.
Masking. We adopt a generative paradigm, wherein a proportion of edges with high weights in the KG are selectively masked. The main objective is to reconstruct these masked edges, allowing the model to learn crucial information. T-GMAE selects the top-n edges with the highest weights as the masked node connections. To this end, given a triplet ( i , r i j , j ) , we employ an attention mechanism [31] to calculate the weight of relation r i j between the head entity i and the tail entity j within the KG, evaluating the significance of r i j and its associated triplets. Hence, we formulate the attention-based weighting function as follows:
α i , j = σ e i W Q e j W K r i j d k β i
where e i , e j , and r i j denote the embedding of entity i and entity j, along with the relation between them, respectively. W Q and W K denote the weights transformation matrix. d k denotes the scale factor and σ denotes the softmax function. We denote the node connections that are masked and remained as R m a s k and R r e m a i n , respectively, where R m a s k R r e m a i n = R . By doing so, we obtain the masked knowledge graph G m as the input data:
G m = ( E , R r e m a i n ) , R r e m a i n = R R m a s k
Edge reconstruction. We utilize a traditional encoder–decoder architecture to reasoning node connections that are as close as possible to the original structure and encode essential information from the knowledge graph to low-dimensional representations. To be more specific, we use the GNN encoder, such as GCN [53], GraphSAGE [54], HGCN [55], to encode G m .
During the neighbor aggregation process, we integrate the weights of the edges into the embedding learning of entities:
e i ( l ) = 1 N i ( i , r i j , j ) N i α i , j r i , j e j ( l 1 )
where N i denotes the subgraph centered around the node i and containing all its first-order neighbors. The node representation can be updated by incorporating the embeddings of both itself and its neighboring nodes, as depicted by
e j ( l + 1 ) = Com e j ( l ) , Agg { e i ( l ) | i N i }
where the function Agg is used to aggregate the embedding vectors of the neighboring nodes. The combination function Com refers to an operation that combines the aggregated neighbor information with its own from the previous layer. It is worth pointing out that the final representation is obtained by summing the aggregated embeddings from different layers.
The decoder is responsible for mapping the node representations back to input embeddings for the reconstruction task. We aim to reconstruct both edges and degrees about the masked node connections and we utilize the GNN as the edge decoder. Note that the edge reconstruction loss function is devised by minimizing the dot product logarithmic loss of KG triplets:
L e d g e = ( i , r , j ) G m a s k log ( σ ( e i · ( e j r i j ) ) )
Degree restoration. To fully capture the KG’s structure, we introduce a degree restoration task. While the edge decoder focuses on reconstructing pair-wise connections, the degree decoder is designed to capture the global structural properties of first-order neighborhood-wise connections. Specifically, based on the connectivity patterns, the degrees are divided into out-degree d e g m , o and in-degree d e g m , i within the masked subgraph G m as well as the degree d e g k in the entire original knowledge graph G k , considering both local and global perspectives. The local-based degree restoration exploits the remaining data for training, focusing on recovering the node degree information by mining important features of the KG. The global-based degree restoration learns node representations from the original KG and attempts to preserve the KG structural information during the reconstruction process.
To measure how well the restored node degree aligns with the actual degree in both the masked KG and original KG, a multilayer perceptron (MLP) is then employed as the degree decoder, and we utilize the mean squared error (MSE) to measure the prediction loss:
L d e g = 1 | E | i E ( d e g ^ m , ( i ) d e g m , ( i ) ) 2 + ( d e g ^ k ( i ) d e g k ( i ) ) 2
where d e g ^ denotes the restored degree and d e g m , denotes the node degree in the masked graph G m . Notation ( i , o ) denotes in-degree and out-degree properties. Therefore, the final connection objective to be minimized is
L c o n = λ 1 L e d g e + λ 2 L d e g

4.1.2. Node Feature Reconstruction

Distinct from the edge reconstruction and the degree restoration that focuses on the structural-wise learning of the KG, the node feature masking reconstruction we propose focuses on enhancing entity representations from a node-wise perspective. Specifically, we randomly mask a certain proportion of the first-order neighborhood structural features of nodes, followed by reasoning and reconstruction.
Node feature extraction. Considering the prevalent absence of attribute information in real-world KG, we extract the first-order neighborhood structural features of the nodes as the initial features to enrich the structural information of node attributes. Inspired by the entity–entity adjacency matrix in the KG, we construct the entity–relation association matrix X as input features:
x i k = count ( r k ) if ( i , r k , · ) in the KG 0 otherwise
where x i k is the element in the ith row and the kth column of X , k denotes the number of types of r, count ( r k ) represents the count of triplets involving node i and relation r k within the KG. If there is no triplet between relation r k and node i, the value of corresponding x i k is zero. This strategy addresses the challenge associated with the dimension explosion of the traditional adjacency matrix.
Masked feature reconstruction. At a predefined masking rate, we selectively disturb a subset of entities E m a s k . For each entity i within this masked set, its initial feature x i is replaced with a masking token [MASK] represented as x [ M ] . We feed the perturbed matrix X into the GNN encoder for information propagation and aggregation, where the x i for i E can be defined as
x i = x [ M ] if i E m a s k x i if i E m a s k
Then, we choose MLP as the decoder. Motivated by the challenge of MSE to handle values close to zero, we opt the scaled cosine error (SCE) as the loss function. The training objective is to compute the loss between the predicted feature x ^ i and the original feature x i using SCE:
L f = 1 | E m a s k | i E m a s k ( 1 x i x ^ i x i x ^ i ) γ
where the scaling factor γ > = 1 .
Finally, the overall objective to be minimized about T-GMAE is
L m = L c o n + λ 3 L f
The designed T-GMAE, integrating three reconstruction strategies, achieves enhanced node embeddings, which effectively capture the global structural characteristics of the KG.
Algorithm 1 is the pseudo-code of the T-GMAE algorithm.
Algorithm 1 Triple-Graph Masked Autoencoder (T-GMAE)
  • Input: Knowledge graph G k = ( E , R ) , encoder, edge decoder, degree decoder, feature decoder, connection masking rate φ , feature masking rate μ , weights λ 1 , λ 2 , λ 3 ;
1:
while not converged do
2:
    Mask G k with rate φ to obtain R m a s k and R r e m a i n ;
3:
    Mask G k with rate μ to get entity sets entities E m a s k ;
4:
    Obtain the perturbed feature matrix X of E m a s k according to Equation (9);
5:
    Perform GNN encoding on R r e m a i n and X according to Equation (4);
6:
    Calculate loss L e d g e according to Equation (5);
7:
    Calculate loss L d e g according to Equation (6);
8:
    Calculate loss L f according to Equation (7);
9:
    Calculate L m = λ 1 L e d g e + λ 2 L d e g + λ 3 L f ;
10:
  Update model by minimizing the reconstruction loss L m ;
11:
end while
12:
Return the trained T-GMAE.

4.2. Parallel Cross-View Contrastive Learning

We apply dual graph-based augmentation strategies on both the KG and the UIG to construct multiple structural views. Subsequently, we perform parallel cross-view contrastive learning between the KG and the UIG, achieving entity–item alignment as shown in Figure 2.

4.2.1. Graph Augmentations

Graph augmentations enhance the learning of robust and generalized data representations by deriving new training data from the original graph [25]. We devise two attention-based dropout strategies, namely edge-level dropout and neighborhood-level dropout, to remove low-value information from the KG and construct multiple augmented views. Edge-level dropout selectively removes node connections, while neighborhood-level dropout deletes nodes along with their associated edges. Graph augmentations enable the recommender system to capture comprehensive patterns and information within the graph more effectively, improving the learning quality and robustness of graph representations.
Edge-level dropout. The weight of edge in the KG reflects the significance of the associated entity and relation. By considering the top n edges with the lowest weights, we selectively remove these edges from the KG. This approach is based on the understanding that edges with lower weights indicate less value in the KG. As a result, the dropout of these edges helps filter out redundant noise information and capture the useful connectivity patterns of nodes, enhancing the overall quality of the KG. The edge-level dropout operators can be formalized as
T 1 ( G k ) = ( E , M 1 R ) , T 1 ( G u ) = ( V , M 2 Y )
where M 1 denote the top n lowest weight-based masking vector on the KG and M 2 { 0 , 1 } | Y | denote the masking vector on the UIG edge set generated by a Bernoulli distribution. Following this operator, we can generate enhanced views G k 1 and G u 1 for both the KG and the UIG.
Neighborhood-level dropout. Neighborhood-level dropout operator refers to the removal of nodes and their associated connections from the original graph at a certain proportion. The neighborhood-level dropout operators can be formalized as
T 2 ( G k ) = ( E M 3 , R M 3 ) , T 2 ( G u ) = ( V M 4 , Y M 4 ) )
where M 3 and M 3 denote the masking vector on the node set and the relation sets related to top n low weights in KG. M 4 and M 4 denote the masking vector on the node set and the masking vector on the associated edges, respectively. After, we can create augmented views G k 2 and G u 2 for both the KG and the UIG.

4.2.2. Contrastive Learning

In cases where augmented KG views and UIG views are generated, we employ the message propagation strategy of LightGCN [41] on UIG views due to its effectiveness and lightweight architecture for learning user–item representations, which is updated as follows:
e u ( l + 1 ) = i N u e i ( l ) | N u | | N i |
e i ( l + 1 ) = u N i e u ( l ) | N i | | N u |
where e u ( l + 1 ) and e i ( l + 1 ) denote the ( l + 1 ) th layer’s representations of user and item. N u and N i denote the interaction items of user u and the set of connected users of item i, respectively. To create a unified representation space for subsequent contrastive learning, facilitating the comparison of embeddings of cross-views, we take the representations as inputs of an MLP to map them to a shared space where the contrastive loss is calculated:
z u , i = σ ( ( e i G u ) W 1 G u + b 1 G u ) W 2 G u + b 2 G u
z k , i = σ ( ( e i G k ) W 1 G k + b 1 G k ) W 2 G k + b 2 G k
where ( 1 , 2 ) denote the superscripts of structural views constructed by edge-level dropout and neighbor-level dropout, respectively, and W ( · ) , b ( · ) are trainable parameters.
Positive pairs (i.e., item embedding z u , i 1 in UIG view G u 1 and its corresponding entity embedding z k , i 1 in KG view G k 1 ) promote consistency among different perspectives of the same node. On the other hand, negative pairs (i.e., any two node representations in cross-views without relatedness) emphasize distinctions between different nodes. In what follows, we design the contrastive learning loss based on InfoNCE loss [42] to minimize the distance of positive pairs and maximize that of negative pairs:
L C = ( 1 , 2 ) i I log e s ( z u , i , z k , i ) / τ e s ( z u , i , z k , i ) / τ + j { i . i , i } e s ( z u , j , z k , i ) / τ )
where s ( ) denotes cosine similarity function and i , i denote the randomly sampled negative candidates for item i. Multiple cross-view contrastive learning creates augmented data from two perspectives, enhancing the robustness of our HKRec.

4.2.3. Joint Learning Strategy

To integrate the two self-supervised tasks into the recommendation objective, we combine reconstruction loss L m , contrastive loss L c , and recommendation loss L r e c . When utilizing a multi-task joint learning paradigm, we concurrently optimize HKRec by incorporating the above loss as integral components of the training process. In particular, the prediction function for user–item interactions can be defined as the inner product of user and item representations:
y ^ u i = e u e i
HKRec is optimized by utilizing bayesian personalized ranking (BPR) [56] loss, which is designed for pairwise ranking tasks to reconstruct the historical data:
L r e c = ( u , i , j ) O ln σ ( y ^ u i y ^ u j )
where O = { ( u , i , j ) | ( u , i ) O + , ( u , j ) O } is the training instances including the observed interactions O + and unobserved counterparts O . To optimize the aforementioned three losses, the comprehensive loss of the HKFRec is defined as
L = L r e c + L m + λ 4 L c

5. Experiments

To demonstrate the superiority of our model and uncover the reasons behind its outstanding performance, we conducted an extensive series of experiments aimed at addressing the following questions.
  • RQ1: How does our model’s performance compare to state-of-the-art methods?
  • RQ2: What is the effectiveness of the key components in our model?
  • RQ3: How effective is our model when tackling cold start and long-tail issues?
  • RQ4: Does the self-supervised paradigm of our model lead to improved item representations?

5.1. Experimental Settings

5.1.1. Datasets

We conduct experiments on three benchmark datasets that differ in size and sparsity: Last-FM [19], MIND [31], and Alibaba-iFashion [23]. These datasets reflect different real-world applications.
  • Last-FM: Last-FM is a dataset commonly used in the field of music recommender systems that collects user music listening history and tagging data from the Last.fm platform.
  • MIND: The MIND dataset is collected from the Wikidata platform for news recommendation tasks. It contains a considerable amount of user browsing behavior data and news topic information.
  • Alibaba-iFashion. The Alibaba-iFashion dataset comprises fashion outfits with various fashion items, categorized according to a fashion taxonomy, collected from the Alibaba-iFashion online shopping platform.
We summarize the statistics of three datasets in Table 1.

5.1.2. Evaluation Metrics

We consider all non-interacted items of the target user as negative samples to infer their preferences in the recommender system. For fair comparisons, we use the full-ranking strategy. To evaluate top-K recommendation results, we measure the performance of our proposed model using Recall@K and Normalized Discounted Cumulative Gain (NDCG)@K, where K is set as 20 by default. It is worth noting that NDCG is a metric that captures the quality and relevance of the recommended items by considering their positions in the recommendation list. It assigns higher scores to lists where the most relevant items appear higher up.

5.1.3. Baseline Models

To ensure a diverse and representative evaluation of our model, we compare our HKRec model with various baseline models: conventional collaborative filtering (BPR, LightGCN), embedding-based knowledge-aware recommendation (CKE), GNN-based knowledge-aware recommendation (KGAT, KGIN), self-supervised learning recommendation (SGL), knowledge-aware self-supervised learning recommendation (KGCL, KGRec).
  • BPR [56]: A widely used recommendation model that employs Bayesian analysis to rank items and generate user preference predictions.
  • LightGCN [41]: A simplified collaborative filtering method that integrates GCN.
  • CKE [11]: A typical method that integrates collaborative filtering with knowledge graph feature learning, incorporating three key components to learn representations including structural, textual, and visual information.
  • KGAT [19]: This model initially utilizes the TransR model for KG vectorization learning and a GNN for information propagation and aggregation.
  • KGIN [21]: KGIN explores the relational modeling of user intents and provides explainable semantics captured from knowledge graphs for recommendation tasks.
  • SGL [25]: This method introduces contrastive learning into recommendation data by generating multi-views through techniques such as node removing, edge removing, and random walk.
  • KGCL [27]: This model generates auxiliary self-supervised signals through data augmentation strategies to construct contrastive views on both KG and UIG.
  • KGRec [31]: This method generates rational scores for knowledge graph triplets and designs a self-supervised learning framework based on the scores.

5.2. Performance Comparison (RQ1)

The performance of our HKRec is first compared with baselines based on Recall@20 and NDCG@20. The comparison results are presented in Table 2 where the best baselines are highlighted with underlined and the best performances with bold. We can find the following:
  • The proposed HKRec consistently outperforms all baselines across all three datasets, demonstrating its superiority in recommendation performance. Particularly noteworthy is that HKRec surpasses even the best-performing baseline. Recall@20 and NDCG@20 improved by 2.2% to 24.95% and 3.38% to 22.32% in the Last-FM dataset, by 7.0% to 23.82% and 5.7% to 39.66% in the MIND dataset, and by 1.76% to 34.73% and 1.62% to 35.13% in the Alibaba-iFashion dataset. We summarize the reasons for the usefulness of our HKRec as follows: (1) The design of T-GMAE effectively extracts semantic relatedness within the items that contribute to the recommendation tasks. (2) The incorporation of multiple contrastive cross-views assists HKRec in capturing deeper semantic relatedness and injecting entity representations into the user–item interaction.
  • Examining Table 1 and Table 2, it can be seen that when the KG contains more diverse entities and relations, our HKRec model, through its T-GMAE and cross-view contrastive learning mechanisms, can effectively discover more useful information from the KG. This process enriches the model with semantic information to understand and recommend item. Consequently, the model achieves the highest recall of 0.1192 on the Alibaba-iFashion dataset. In addition, compared with the strongest baseline, the recall improved by 2.2%, 7.0%, and 1.76% on different datasets, respectively. The model achieves the most notable performance improvement on the MIND dataset, which has the most sparse interactions. In such cases, the provision of more diverse information from the KG has the most significant impact.
  • The knowledge-aware methods outperform CF-based methods, underscoring the effective alleviation of data sparsity issues in recommender systems through the incorporation of KG.
  • The performance of the GNN-based methods (i.e, KGAT, KGIN) on the Last-FM and Alibaba-iFashion datasets outperforms the embedding-based approach, CKE. This outcome highlights the effectiveness of GNNs in capturing higher-order dependencies and attaining superior knowledge representations. However, such superiority is not observed in the MIND dataset. The rationale lies in its relatively small knowledge graph scale, where entities exhibit low connection density and lack high-order dependencies. Consequently, the efficacy of GNNs in this scenario is limited.
  • The two methods combining both contrastive and generative paradigms (i.e., KGRec, HKRec) demonstrate superior performance compared to others that employ a single contrastive learning paradigm (i.e., SGL, KGCL) only. This observation indicates that the generative facilitates the distilling of richer semantic information from the KG. Hence, leveraging this paradigm effectively is crucial for enhancing recommendation performance.

5.3. Ablation Study (RQ2)

Impact of self-supervised learning strategies. To study the effects of two modules, T-GMAE and cross-view contrastive learning, we compare the result of HKRec with the designed two variants and the KGRec as follows:
  • w/o ND: We remove the neighborhood-level dropout components from the contrastive learning module.
  • w/o T-GMAE: We remove the T-GAME module which includes the degree decoder component and the node feature masking reconstruction component.
The performance comparison results are presented in Table 3. It is observed that, compared to the best-performing baseline, each of the self-supervised designs makes a clear contribution to the overall performance. HKRec, which utilizes T-GMAE and parallel multi cross-view contrastive learning simultaneously, demonstrates optimal performance. It is worth noting that compared to solely removing the neighborhood-level dropout component in the contrastive learning module, the performance deterioration observed upon removing two decoders about degrees and features from T-GMAE suggests a more significant contribution of T-GMAE to performance enhancement. This can be attributed to T-GMAE’s adoption of a hierarchical triple masking reconstruction strategy, encompassing both structure-level and node-level information. This facilitates a more comprehensive exploration of semantics within the KG. In general, these findings underscore the importance of hierarchical learning in enhancing model performance.
Hyperparameter sensitivit. We investigate the sensitivity of the performance to the key hyperparameters, namely the connection masking rate φ , the feature masking rate μ , and the node dropout rate ρ , which control the intensity of self-supervised learning. For these three hyperparameters, we conduct experiments with varying ranges of values. Figure 3 shows the model’s performance on three datasets with different values of hyperparameters.
First, we observe that the best performance is achieved with the connection masking rate φ = 0.25 across all three datasets. Subsequently, when gradually increasing the feature masking rate μ = 0.1 to μ = 0.5 , optimal performance is attained for MIND and Alibaba-iFashion, while the bset setting is μ = 0.3 for Last-FM. Furthermore, it is evident that the optimal neighborhood dropout rates ρ for Last-FM, MIND, and Alibaba-iFashion are ρ = 0.3 , ρ = 0.3 , and ρ = 0.5 , respectively. In particular, we find that the variation of hyperparameters within a specified range has a small relative impact on performance. This robustness can be attributed to the three well-designed self-supervised learning strategies, which enhance recommendation performance at multiple hierarchies. It should be noted that although value changes in hyperparameters do not have a great impact on performance, we still recommend using the optimal settings to achieve the best results.

5.4. Benefits of HKRec (RQ3)

Effective utilization of the KG offers a solution to mitigate the challenges of the cold-start and long-tail issues for recommender systems. In this subsection, we verify the performance of HKRec in addressing these challenges.
Cold-start recommendation. We divide the users in the Alibaba-iFashion dataset into five groups based on the number of interactions. The lower the group number, the fewer interactions with the user. As can be seen, the experimental results regarding Recall@20 and NDCG@20 are illustrated in Figure 4. Notably, even under cold-start scenarios where user interaction data are limited, the HKRec model consistently demonstrates superior recommendation performance compared to all baseline models. These results emphasize the effectiveness of the hierarchical self-supervised learning strategy in providing enhanced solutions for addressing the cold-start challenge.
Long-tail item recommendation. To evaluate the model’s efficacy in mitigating the long-tail issue, we divided the datasets into five groups with different interaction density degrees of items. Each group maintains an equal item count while witnessing a progressive rise in interaction density. Figure 5 illustrates the empirical results for our HKRec and several state-of-the-art knowledge-aware recommendation baselines. By distilling the semantic relatedness under item contexts, HKRec can effectively handle the imbalances present in long-tail distributions. Overall, the experimental result empirically shows that HKRec not only captures popular items but also understands the fewer interaction items, leading to improved performance in addressing the long-tail issue.

5.5. Item Embedding Visualization (RQ4)

To evaluate whether the proposed HKRec can better distill implicit semantics from the KG and strengthen item representations, we conduct visual experiments on item similarity within the MIND news recommendation dataset by extracting embeddings of diverse item topics and subsequently computing a similarity matrix. Specifically, three items are selected from each of the topics (i.e., actor, institution, and sports). We calculate the cosine similarity between items, where the similarity value range is [−1, 1]. The visual comparison results between our mode and KGCL are illustrated in Figure 6. Briefly, the darker the color, the lower the similarity between items, and the lighter the color, the higher the similarity. From the results, we summarize the following observations:
  • We find that the lightest colors are observed among items of the same topic and the highest similarity between items of the same topic. Specifically, Figure 6a presents the experimental result of HKRec, showcasing a similarity range of [0.82, 1] for actor items, [0.95, 1] for institutions, and [0.79, 1] for sport items. This is because in recommender systems, items of the same topic typically share similar features, exhibit similar contexts in the KG, and produce simultaneous interactions in the UIG. Yet, as illustrated in Figure 6b, when employing KGCL, the similarity ranges are [0.45, 1], [0.20, 1], and [0.58, 1] separately. Overall, HKRec effectively learns the correlations among items of the same topic, enabling their close positions to each other in the embedding space and performing high-quality item embeddings. However, KGCL exhibits limitations in its node representation learning ability, especially for sports-related items.
  • Compared to items of the same topic, the visualization matrix colors between items of different topics are darker, indicating lower similarity. Specifically, for institutional items, the colors of the similarity matrix between institutions and actors and sports items are the darkest. This is attributed to the fact that in UIG, only one or two users simultaneously click on both institutional and actor items or both institutional and sports items. And there is no correlation between institutions and the other two types of items in KG.
  • There is similarity between actors and sports, ranging from 0.55 to 0.81. This phenomenon arises from users clicking on both types of items concurrently in the UIG, while the correlation between these two categories in the KG further contributes to the observed distinctions in similarities. For example, in the case of HKRec, the similarity values between the actor Jennifer Lopez and the sports of World Series and Pittsburgh Steelers are measured at 0.79 and 0.61, respectively. As shown in Figure 7, the rationale behind these findings lies in the fact that almost 30 users concurrently click news related to Jennifer Lopez and World Series, as well as Jennifer Lopez and Pittsburgh Steelers. This limited interaction results in a weaker correlation between Jennifer Lopez and World Series, as well as between Jennifer Lopez and Pittsburgh Steelers. However, the correlation relationship between these two sets of items in the KG provides useful information to the user and makes the correlation between these two sets of items stronger. Specifically, as shown in Figure 7a, the analysis of KG reveals that, in comparison to Pittsburgh Steelers, there is one three-hop path between Jennifer Lopez and World Series, while no three-hop path exists between Jennifer Lopez and Pittsburgh Steelers. Additionally, as shown in Figure 7b, there are twenty-six four-hop paths between Jennifer Lopez and World Series, whereas only eleven paths exist between Jennifer Lopez and Pittsburgh Steelers. Thus, the similarity between Jennifer Lopez and World Series is 0.79 higher than the similarity between Jennifer Lopez and Pittsburgh Steelers, which is 0.61.
  • Distinct from HKRec, the results of KGCL show corresponding values of only 0.40 and 0.34. This could be due to the inherent limitations of single graph augmentation or single cross-view contrastive learning, which are insufficient for extracting meaningful semantic information and fail to capture user interests effectively. These experimental findings indicate that HKRec exhibits superior node representation learning capabilities compared to KGCL. The resulting high-quality item embeddings effectively capture and reflect the complex correlations between items.

6. Conclusions

In this work, we propose HKRec for knowledge-aware recommendation. HKRec is a hierarchical method that can deeply mine implicit semantics in knowledge graphs by utilizing both generative and contrastive learning paradigms. The T-GMAE module is conducted that can efficiently extract latent semantically relations from the KG while reconstructing the masked knowledge through triple hierarchies of node connection, node degree, and node feature. Furthermore, we adopt the neighborhood-level and edge-level dropout strategies to construct self-supervised signals and perform hierarchical cross-view contrastive learning between KG and UIG for further information distillation, aiming to enhance the alignment between representations of entities and items. Our HKRec facilitates a comprehensive understanding of user preferences to strengthen recommendation performance. Extensive experimental results on three real-world datasets indicate the strong performance of HKRec against the state-of-the-art baselines. In future works, we plan to address the noise problem in the KG and explore methods for highlighting important information while filtering out irrelevant knowledge. In addition to the item KG used in this work, the exploration of user–item KG-aware recommendation is also worthwhile.

Author Contributions

Conceptualization, C.Z.; methodology, C.Z.; validation, C.Z. and S.Z.; investigation, C.Z.; writing—original draft preparation, C.Z. and S.Z.; visualization, D.W.; supervision, J.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

The authors thank the support from the National University of Defense Technology.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Niu, Y.; Lin, R.; Xue, H. Research on learning resource recommendation based on knowledge graph and collaborative filtering. Appl. Sci. 2023, 19, 10933. [Google Scholar] [CrossRef]
  2. Lei, C.; Liu, Y.; Zhang, L.; Wang, G.; Tang, H.; Li, H.; Miao, C. Semi: A sequential multi-modal information transfer network for e-commerce micro-video recommendations. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Singapore, 14–18 August 2021; pp. 3161–3171. [Google Scholar]
  3. Long, X.; Huang, C.; Xu, Y.; Xu, H.; Dai, P.; Xia, L.; Bo, L. Social recommendation with self-supervised metagraph informax network. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, Gold Coast, QLD, Australia, 1–5 November 2021; pp. 1160–1169. [Google Scholar]
  4. Hu, B.; Shi, C.; Zhao, W.; Yu, P. Leveraging meta-path based context for top-n recommendation with a neural co-attention model. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 19–23 August 2018; pp. 1531–1540. [Google Scholar]
  5. Sarwar, B.; Karypis, G.; Konstan, J.; Riedl, J. Item-based collaborative filtering recommendation algorithms. In Proceedings of the 10th International Conference on World Wide Web, Hong Kong, China, 1–5 May 2011; pp. 285–295. [Google Scholar]
  6. He, X.; Liao, L.; Zhang, H.; Nie, L.; Hu, X. Neural collaborative filtering. In Proceedings of the 26th International Conference on World Wide Web, Perth, WA, Australia, 3–7 April 2017; pp. 173–182. [Google Scholar]
  7. Wang, Y.; Javari, A.; Balaji, J.; Shalaby, W.; Derr, T.; Cui, X. Knowledge graph-based session recommendation with session-adaptive propagation. In Proceedings of the The ACM Web Conference 2024, Singapore, 13–17 May 2024; pp. 264–273. [Google Scholar]
  8. Wang, L.; Du, W.; Chen, Z. Multi-feature-enhanced academic paper recommendation model with knowledge graph. Appl. Sci. 2024, 14, 5022. [Google Scholar] [CrossRef]
  9. Ai, Q.; Azizi, V.; Chen, X.; Zhang, Y. Learning heterogeneous knowledge base embeddings for explainable recommendation. Algorithms 2018, 11, 137. [Google Scholar] [CrossRef]
  10. Cao, Y.; Wang, X.; He, X.; Hu, Z.; Chua, T. Unifying knowledge graph learning and recommendation: Towards a better understanding of user preferences. In Proceedings of the WWW’19: The World Wide Web Conference, San Francisco, CA, USA, 13–17 May 2019; pp. 151–161. [Google Scholar]
  11. Zhang, F.; Yuan, N.; Lian, D.; Xie, X.; Ma, W. Collaborative knowledge base embedding for recommender systems. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 353–362. [Google Scholar]
  12. Bordes, A.; Usunier, N.; Garcia-Duran, A.; Weston, J.; Yakhnenko, O. Translating embeddings for modeling multi-relational data. In Proceedings of the 26th International Conference on Neural Information Processing Systems, Lake Tahoe, NV, USA, 5–10 December 2013; Volume 26, pp. 1–9. [Google Scholar]
  13. Lin, Y.; Liu, Z.; Sun, M.; Liu, Y.; Zhu, X. Learning entity and relation embeddings for knowledge graph completion. In Proceedings of the 29-th AAAI Conference on Artificial Intelligence, Austin, TX, USA, 25–30 January 2015; pp. 2181–2187. [Google Scholar]
  14. Guo, Q.; Zhuang, F.; Qin, C.; Zhu, H.; Xie, X.; Xiong, H.; He, Q. A survey on knowledge graph-based recommender systems. J. Internet Technol. 2020, 34, 3549–3568. [Google Scholar] [CrossRef]
  15. Wang, H.; Zhang, F.; Wang, J. Ripplenet: Propagating user preferences on the knowledge graph for recommender systems. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, Torino, Italy, 22–26 October 2018; pp. 417–426. [Google Scholar]
  16. Wang, X.; Wang, D.; Xu, C.; He, X.; Cao, Y.; Chua, T. Explainable reasoning over knowledge graphs for recommendation. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; pp. 5329–5336. [Google Scholar]
  17. Zhao, H.; Yao, Q.; Li, J.; Song, Y.; Lee, D. Meta-graph based recommendation fusion over heterogeneous information networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, 13–17 August 2017; pp. 635–644. [Google Scholar]
  18. Wang, H.; Zhao, M.; Xie, X.; Li, W.; Guo, M. Knowledge graph convolutional networks for recommender systems. In Proceedings of the WWW’19: The World Wide Web Conference, San Francisco, CA, USA, 13–17 May 2019; pp. 3307–3313. [Google Scholar]
  19. Wang, X.; He, X.; Cao, Y.; Liu, M.; Chua, T.S. KGAT: Knowledge graph attention network for recommendation. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 950–958. [Google Scholar]
  20. Wu, S.; Sun, F.; Zhang, W.; Xie, X. Graph neural networks in recommender systems: A survey. ACM Comput. Surv. 2022, 55, 1–37. [Google Scholar] [CrossRef]
  21. Zou, D.; Wei, W.; Wang, Z.; Mao, X.; Zhu, F.; Fang, R.; Chen, D. Improving knowledge-aware recommendation with multi-level interactive contrastive learning. In Proceedings of the 31th ACM International Conference on Information & Knowledge Management, Atlanta, GA, USA, 17–21 October 2022; pp. 2817–2826. [Google Scholar]
  22. Duan, H.; Liang, X.; Zhu, Y.; Zhu, Z.; Liu, P. Reducing noise-triplets via differentiable sampling for knowledge-enhanced recommendation with collaborative signal guidance. Neurocomputing 2023, 558, 126771. [Google Scholar] [CrossRef]
  23. Wang, X.; Huang, T.; Wang, D.; Yuan, Y.; Liu, Z.; He, X.; Chua, T. Learning intents behind interactions with knowledge graph for recommendation. In Proceedings of the Web Conference 2021, Ljubljana, Slovenia, 19–23 April 2021; pp. 878–887. [Google Scholar]
  24. Wu, L.; Lin, H.; Tan, C.; Gao, Z.; Li, S.; Engineering, D. Self-supervised learning on graphs: Contrastive, generative, or predictive. IEEE Trans. Knowl. Data Eng. 2021, 35, 4216–4235. [Google Scholar] [CrossRef]
  25. Wu, J.; Wang, X.; Feng, F.; He, X.; Chen, L.; Lian, J.; Xie, X. Self-supervised graph learning for recommendation. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual, 11–15 July 2021; pp. 726–735. [Google Scholar]
  26. Jiang, Y.; Huang, C.; Huang, L. Adaptive graph contrastive learning for recommendation. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Long Beach, CA, USA, 6–10 August 2023; pp. 4252–4261. [Google Scholar]
  27. Yang, Y.; Huang, C.; Xia, L.; Li, C. Knowledge graph contrastive learning for recommendation. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, Madrid, Spain, 11–15 July 2022; pp. 1434–1443. [Google Scholar]
  28. Zou, D.; Wei, W.; Zhu, F. Knowledge enhanced multi-intent transformer network for recommendation. In Proceedings of the The Web Conference 2024, Sigapore, 13–17 May 2024; pp. 151–159. [Google Scholar]
  29. Chen, S.; Li, Z. Hierarchically Coupled View-Crossing Contrastive Learning for Knowledge Enhanced Recommendation. Access 2024, 12, 75532–75541. [Google Scholar] [CrossRef]
  30. Ma, Y.; Zhang, X.; Gao, C.; Tang, Y.; Li, L.; Zhu, R.; Yin, C. Enhancing recommendations with contrastive learning from collaborative knowledge graph. Neurocomputing 2023, 523, 103–115. [Google Scholar] [CrossRef]
  31. Yang, Y.; Huang, C.; Xia, L.; Huang, C. Knowledge graph self-supervised rationalization for recommendation. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Long Beach, CA, USA, 6–10 August 2023; pp. 3046–3056. [Google Scholar]
  32. Zou, D.; Wei, W.; Mao, X.; Wang, Z.; Qiu, M.; Zhu, F.; Cao, X. Multi-level cross-view contrastive learning for knowledge-aware recommender system. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, Madrid, Spain, 11–15 July 2022; pp. 1358–1368. [Google Scholar]
  33. Wang, H.; Zhang, F.; Zhao, M.; Li, W.; Xie, X.; Guo, M. Multi-task feature learning for knowledge graph enhanced recommendation. In Proceedings of the WWW’19: The World Wide Web Conference, San Francisco, CA, USA, 13–17 May 2019; pp. 2000–2010. [Google Scholar]
  34. Shu, H.; Huang, J. Multi-task feature and structure learning for user-preference based knowledge-aware recommendation. Neurocomputing 2023, 532, 43–55. [Google Scholar] [CrossRef]
  35. Wang, Z.; Zhang, J.; Feng, J.; Chen, Z. Knowledge graph embedding by translating on hyperplanes. In Proceedings of the AAAI Conference on Artificial Intelligence, Québec City, QC, Canada, 27–31 July 2014; pp. 1112–1119. [Google Scholar]
  36. Balloccu, G.; Boratto, L.; Fenu, G.; Marras, M. Reinforcement recommendation reasoning through knowledge graphs for explanation path quality. Knowl.-Based Syst. 2023, 260, 110098. [Google Scholar] [CrossRef]
  37. Catherine, R.; Cohen, W. Personalized recommendations using knowledge graphs: A probabilistic logic programming approach. In Proceedings of the 10th ACM Conference on Recommender Systems, Boston, MA, USA, 15–19 September 2016; pp. 325–332. [Google Scholar]
  38. Yu, X.; Ren, X.; Sun, Y.; Gu, Q.; Sturt, B.; Khandelwal, U.; Norick, B.; Han, J. Personalized entity recommendation: A heterogeneous information network approach. In Proceedings of the 7th ACM International Conference on Web Search and Data Mining, New York, NY, USA, 24–28 February 2014; pp. 283–292. [Google Scholar]
  39. Wang, H.; Zhang, F.; Zhang, M.; Leskovec, J.; Zhao, M.; Li, W.; Wang, Z. Knowledge-aware graph neural networks with label smoothness regularization for recommender systems. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 968–977. [Google Scholar]
  40. Du, Y.; Zhu, X.; Chen, L.; Zheng, B.; Gao, Y. Hakg: Hierarchy-aware knowledge gated network for recommendation. In Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval, Madrid, Spain, 11–15 July 2022; pp. 1390–1400. [Google Scholar]
  41. He, X.; Deng, K.; Wang, X.; Li, Y.; Zhang, Y.; Wang, M. Lightgcn: Simplifying and powering graph convolution network for recommendation. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, Virtual Event, 25–30 July 2020; pp. 639–648. [Google Scholar]
  42. Chen, T.; Kornblith, S.; Norouzi, M.; Hinton, G. A simple framework for contrastive learning of visual representations. In Proceedings of the 37th International Conference on Machine Learning, PMLR, Vienna, Austria, 12–18 July 2020; pp. 1597–1607. [Google Scholar]
  43. Jing, L.; Tian, Y. Self-supervised visual feature learning with deep neural networks: A survey. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 43, 4037–4058. [Google Scholar] [CrossRef] [PubMed]
  44. Misra, I.; Maaten, L. Self-supervised learning of pretext-invariant representations. In Proceedings of the Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 6707–6717. [Google Scholar]
  45. Lan, Z.; Chen, M.; Goodman, S.; Gimpel, K.; Sharma, P.; Soricut, R. Albert: A lite bert for self-supervised learning of language representations. arXiv 2019, arXiv:1909.11942. [Google Scholar]
  46. Yang, Z.; Dai, Z.; Yang, Y.; Carbonell, J.; Salakhutdinov, R. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv 2020, arXiv:1906.08237. [Google Scholar]
  47. Xia, J.; Wu, L.; Chen, J.; Hu, B.; Li, S. Simgrace: A simple framework for graph contrastive learning without data augmentation. In Proceedings of the ACM Web Conference 2022, Virtual Event, 25–29 April 2022; pp. 1070–1079. [Google Scholar]
  48. You, Y.; Chen, T.; Sui, Y.; Chen, T.; Wang, Z.; Shen, Y. Graph contrastive learning with augmentations. Adv. Neural Inf. Process. Syst. 2020, 33, 5812–5823. [Google Scholar]
  49. Hao, B.; Zhang, J.; Yin, H.; Li, C.; Chen, H. Pre-training graph neural networks for cold-start users and items representation. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, Israel, 8–12 March 2021; pp. 265–273. [Google Scholar]
  50. Yao, T.; Yi, X.; Cheng, D.; Yu, F.; Chen, T. Self-supervised learning for large-scale item recommendations. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, Gold Coast, QLD, Australia, 1–5 November 2021; pp. 4321–4330. [Google Scholar]
  51. Devlin, J.; Chang, M.; Lee, K.; Toutanova, K. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv 2015, arXiv:1511.03791. [Google Scholar]
  52. He, K.; Chen, X.; Xie, S.; Li, Y.; Dollar, P.; Girshick, R. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LO, USA, 18–24 June 2022; pp. 16000–16009. [Google Scholar]
  53. Kipf, T.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
  54. Hamilton, W.; Ying, Z.; Leskovec, J. Inductive representation learning on large graphs. In Proceedings of the 31st Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 1025–1035. [Google Scholar]
  55. Guo, K.; Hu, Y.; Sun, Y.; Qian, S.; Gao, J.; Yin, B. Hierarchical graph convolution network for traffic forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 2–9 February 2021; pp. 151–159. [Google Scholar]
  56. Rendle, S.; Freudenthaler, C.; Gantner, Z.; Schmid, L. BPR: Bayesian personalized ranking from implicit feedback. In Proceedings of the 25-th Conference on Uncertainty in Artificial Intelligence, Montreal, QC, Canada, 18–21 June 2009; pp. 452–461. [Google Scholar]
Figure 1. The overall framework of our proposed HKRec. For the triple-graph masked autoencoder module, we introduce two masking strategies, namely pair-wise connections masking and node features masking based on neighborhood-wise connections to corrupt the inputs. Hereafter, the masked KG are fed into the encoder–decoders and then optimized through three training strategies: edge reconstruction, degree restoration, and node feature reconstruction. For the parallel cross-view contrastive learning module, we employ the edge-level and neighborhood-level dropout strategies to perturb the original KG and UIG separately, creating multiple structural views. Then, parallel contrastive learning is employed between the KG views and the UIG views.
Figure 1. The overall framework of our proposed HKRec. For the triple-graph masked autoencoder module, we introduce two masking strategies, namely pair-wise connections masking and node features masking based on neighborhood-wise connections to corrupt the inputs. Hereafter, the masked KG are fed into the encoder–decoders and then optimized through three training strategies: edge reconstruction, degree restoration, and node feature reconstruction. For the parallel cross-view contrastive learning module, we employ the edge-level and neighborhood-level dropout strategies to perturb the original KG and UIG separately, creating multiple structural views. Then, parallel contrastive learning is employed between the KG views and the UIG views.
Applsci 14 09394 g001
Figure 2. The overview of the parallel cross-view contrastive learning module.
Figure 2. The overview of the parallel cross-view contrastive learning module.
Applsci 14 09394 g002
Figure 3. Hyperparameter sensitivity study of HKRec with respect to different connection masking rates, feature masking rates, and node dropout rates.
Figure 3. Hyperparameter sensitivity study of HKRec with respect to different connection masking rates, feature masking rates, and node dropout rates.
Applsci 14 09394 g003
Figure 4. Comparison results in different user groups. The lower group number indicates the scarcity of historical interaction information, leading to a more pronounced cold-start effect.
Figure 4. Comparison results in different user groups. The lower group number indicates the scarcity of historical interaction information, leading to a more pronounced cold-start effect.
Applsci 14 09394 g004
Figure 5. Comparison results in different item sparsity levels.
Figure 5. Comparison results in different item sparsity levels.
Applsci 14 09394 g005
Figure 6. Visualization of item similarity on MIND.
Figure 6. Visualization of item similarity on MIND.
Applsci 14 09394 g006
Figure 7. Example subgraph of our selected item on MIND. Here, light green circles and light grey lines constitute the KG, while light green and light blue circles with orange lines form the UIG. Ellipses are used to indicate nodes and relations that are not displayed in the subgraphs.
Figure 7. Example subgraph of our selected item on MIND. Here, light green circles and light grey lines constitute the KG, while light green and light blue circles with orange lines form the UIG. Ellipses are used to indicate nodes and relations that are not displayed in the subgraphs.
Applsci 14 09394 g007
Table 1. Statistics of the datasets.
Table 1. Statistics of the datasets.
Dataset Last-FMMINDAlibaba-iFashion
User–Item graph#Users23,566100,000114,737
#Items48,12330,57730,040
#Interactions3,034,7962,975,3191,781,093
#Density 2.7 × 10 3 9.7 × 10 4 5.2 × 10 4
Knowledge graph#Entities58,26624,73359,156
#Relations951251
#Triplets464,567148,568279,155
Table 2. Performance comparisons of different methods on Last-FM, MIND, and Alibaba-iFashion. The best results are bolded and the second-best are underlined.
Table 2. Performance comparisons of different methods on Last-FM, MIND, and Alibaba-iFashion. The best results are bolded and the second-best are underlined.
Last-FMMINDAlibaba-iFashion
RecallNDCGRecallNDCGRecallNDCG
BPR [56]0.08470.07200.03920.02640.08210.0506
LightGCN [41]0.07160.06440.04030.02790.09990.0614
CKE [11]0.08530.07070.03850.02760.07780.0482
KGAT [19]0.08730.07430.03390.02940.09610.0582
KGIN [23]0.09140.07860.03820.02450.11710.0730
SGL [25]0.07680.06790.03390.02100.11180.0702
KGCL [27]0.08760.07890.03520.02210.10970.0693
KGRec [31]0.0933 0.08010.04140.03280.11700.0731
HKRec0.09540.08290.04450.03480.11920.0743
Table 3. Ablation study of the HKRec. The comparison model of w/o ND refers to a variant obtained by removing the neighborhood-level dropout component in HKRec, whereas the model w/o T-GMAE signifies the removal of the degree decoder and the masked feature decoder. The best results are bolded.
Table 3. Ablation study of the HKRec. The comparison model of w/o ND refers to a variant obtained by removing the neighborhood-level dropout component in HKRec, whereas the model w/o T-GMAE signifies the removal of the degree decoder and the masked feature decoder. The best results are bolded.
MODELMINDAlibaba-iFashion
RecallNDCGRecallNDCG
HKRec0.04450.03480.11920.0743
w/o ND0.04380.03460.11850.0741
w/o T-GMAE0.04320.03340.11800.0737
KGRec0.04140.03280.11700.0731
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhou, C.; Zhou, S.; Huang, J.; Wang, D. Hierarchical Self-Supervised Learning for Knowledge-Aware Recommendation. Appl. Sci. 2024, 14, 9394. https://doi.org/10.3390/app14209394

AMA Style

Zhou C, Zhou S, Huang J, Wang D. Hierarchical Self-Supervised Learning for Knowledge-Aware Recommendation. Applied Sciences. 2024; 14(20):9394. https://doi.org/10.3390/app14209394

Chicago/Turabian Style

Zhou, Cong, Sihang Zhou, Jian Huang, and Dong Wang. 2024. "Hierarchical Self-Supervised Learning for Knowledge-Aware Recommendation" Applied Sciences 14, no. 20: 9394. https://doi.org/10.3390/app14209394

APA Style

Zhou, C., Zhou, S., Huang, J., & Wang, D. (2024). Hierarchical Self-Supervised Learning for Knowledge-Aware Recommendation. Applied Sciences, 14(20), 9394. https://doi.org/10.3390/app14209394

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop