3.1.1. GCN-Based CF Model
Collaborative filtering (CF) is one of the most classical approaches in recommendation systems [
18,
26,
27,
28]. Its core idea is to analyze historical interaction data between users and items to mine collaborative signals embedded within the interactions, thereby recommending items that users are likely to be interested in. Traditional CF methods [
26,
27,
28] typically rely only on first-order interaction information to learn user and item embeddings. Although this approach is simple and intuitive, it suffers from significant limitations. Specifically, first-order interactions capture only the direct relationships between users and items, while failing to reflect the higher-order associations among users or among items.
For instance, in the context of IPE book reading among university students, if two students have both read a particular IPE book, they are likely to share similar interests in other books on related topics. However, traditional collaborative filtering methods are unable to effectively exploit such indirect relationships, which limits their ability to improve recommendation accuracy.
To overcome the aforementioned limitations, the PPSM-GCN framework integrates a GCN to fully exploit the high-order interaction information between users and items. Specifically, the GCN models the user–item interaction data as a user–item bipartite graph [
18,
25] and introduces an embedding propagation mechanism to capture the high-order connectivity among nodes in this bipartite structure.
For example, taking node
u in
Figure 6, during the embedding propagation process along the graph structure, the embedding information of nodes
,
,
, and
is aggregated into node
u. After aggregation, node
u obtains a new embedding vector that encodes its first-order neighborhood information. By iteratively performing multiple rounds of embedding propagation, each node in the interaction bipartite graph gradually incorporates richer high-order neighborhood information from its surroundings. These enhanced feature representations enable the model to learn more expressive embeddings, thereby improving the predictive performance of the recommendation model.
In this study, the classical graph convolutional collaborative filtering model LightGCN is adopted as the base collaborative filtering component in the PPSM-GCN framework. Formally, given the embedding vectors at the
l-th layer, LightGCN updates the embeddings at the
-th layer as follows:
where
and
denote the embedding vectors of user node
u and item node
i after the
l-th layer of embedding propagation, respectively. Equations (
1) and (
2) correspond to the embedding propagation processes of user
u and item
i, respectively.
and
represent the sets of neighboring nodes of user
u and item
i. The term
is a symmetric normalization factor that balances the contributions of different neighbors during aggregation.
After the embedding propagation process, each node in the user–item bipartite graph obtains an embedding vector containing rich neighborhood feature information. As illustrated in
Figure 5, these embedding vectors are used to compute the predicted scores of users for both positive and negative samples (the detailed sampling strategy will be introduced in
Section 3.1.2). Specifically, we define the similarity between a user and an item as the inner product of their embedding vectors, which represents the user’s predicted preference score for the item:
where
and
denote the embedding vectors of user
u and item
i obtained after the embedding propagation, and
represents the predicted preference score of user
u for item
i.
3.1.2. Sampling Strategy
This section provides a detailed description of the sampling strategies employed in the PPSM-GCN framework, including random negative sampling, traditional positive sampling, and the proposed potential positive sample mining strategy.
Random Negative Sampling. In recommendation systems, we usually have access only to users’ implicit feedback, such as clicks, views, or purchases. These data indicate what users like as positive samples, but do not explicitly reveal what they dislike as negative samples. To enable the recommendation model to learn how to distinguish between “liked” and “disliked” items, it is common practice to sample negative items from the unobserved items, assuming that these items are those users are not interested in. The simplest approach is to randomly sample negative items from the set of non-interacted items [
29,
30], which is simple but effective. Consequently, we utilize this random negative sampling approach in this paper. By randomly selecting items from the user’s non-interacted data (i.e., the unobserved items shown in
Figure 5) as negative samples, we construct pairwise training data alongside the positive samples.
Traditional Positive Sampling. Users typically interact with items based on their own interests; therefore, the core idea of collaborative filtering lies in uncovering user preferences to provide accurate and personalized recommendations. Following this principle, previous studies have generally drawn positive training samples directly from user interaction data (i.e., the observed items shown in
Figure 5), which represents a reasonable positive sampling strategy. The traditional positive sampling process illustrated in
Figure 5 naturally follows this setting.
However, directly sampling positive examples only from the set of interacted items may fail to fully exploit the potential positive training samples, thus limiting the model’s performance. This limitation arises because there may exist items that users have not yet interacted with but would actually find interesting. To address this issue, we propose a PPSM strategy, which identifies latent positive samples from users’ non-interacted items. This strategy enhances the model’s ability to capture users’ potential interests, thereby improving the recommendation accuracy.
Potential Positive Sample Mining. Interacted items directly reflect a user’s interest preferences; therefore, potential positive samples can be mined from items that are similar to the interacted ones. This constitutes the core idea of the proposed PPSM strategy. In this section, the potential positive sample set for a user
u, denoted as
, is defined as follows:
where
denotes the set of neighbor nodes of user
u, i.e., all items with which user
u has interacted;
i represents an item in
;
I denotes the set of all items; and
represents the set of the top
items most similar to item
i. Specifically, for a given interacted item
i, we compute its similarity with all other items and select the
items with the highest similarity as potential positive samples.
The key to determining
lies in how to compute the similarity between an interacted item
i and other items. A study on simplifying GNN embedding propagation [
31] derived a method for calculating the similarity
between two items, such as item
i and item
j:
where
represents the user–item interaction matrix, and
denotes the item–item co-occurrence matrix, where
indicates the co-occurrence count of items
i and
j, and
and
represent the total co-occurrence counts of items
i and
j, respectively.
Based on Equations (
5) and (
6), we can compute the top
most similar items for each interacted item, thereby constructing the potential positive sample set
for user
u. By iterating over all interacted items of user
u, the complete potential positive sample set
can be obtained.
After obtaining the potential positive sample sets for all users, positive sampling can be performed either from the interacted positive sample set or from the potential positive sample set. Although potential positive samples may represent items of interest to the user, interacted positive samples directly reflect user preferences. Therefore, positive sampling should be biased toward selecting samples from the interacted item set. To this end, a sampling probability is introduced to control the likelihood of sampling from either the potential positive samples or the interacted positive samples. For instance, indicates that items are sampled from the potential positive sample set with probability 0.2, and from the interacted positive sample set with probability 0.8.
Probabilistic and Graph-Theoretic Interpretation of PPSM. The rationale behind mining potential positive samples from item co-occurrence can be formally justified from both probabilistic and graph-theoretic perspectives. (1) From a probabilistic perspective, item co-occurrence reflects the conditional probability that a user interested in one item also likes another. Let denote the probability that a user u is interested in item j given their interest in item i. This conditional probability can be estimated from collective user behaviors: if items i and j frequently co-occur across many users’ borrowing histories, the empirical estimate of this probability tends to be high. PPSM computes the co-occurrence similarity as a proxy for this conditional probability, identifying from unobserved items those most likely to match users’ latent interests, thereby enriching supervision signals in sparse interaction scenarios. From a graph-theoretic perspective, user–item interactions form a bipartite graph, where user and item nodes are connected via borrowing edges. In this graph, two item nodes are connected through length-2 paths via shared user nodes—the more users that have interacted with both items, the stronger their structural coupling. This coupling implies implicit similarity propagation: if item i is relevant to a user, other items structurally close to i in the bipartite graph (i.e., those with high co-occurrence) are also likely to be relevant. PPSM essentially precomputes this structural proximity, identifying items topologically similar to a user’s historical interactions via the co-occurrence matrix, and treats them as potential positives during training, enabling the model to capture implicit collaborative signals embedded in the graph structure.
Complexity Analysis of PPSM. The procedure of the PPSM strategy is shown in Algorithm 1. The algorithm comprises an offline pre-computation that constructs potential positive sample sets for all users based on item–item similarities derived from co-occurrence patterns. Let
denote the number of interacted items of user
u, and let
denote the number of non-zero entries. The overall computational complexity of PPSM includes three main components:
which correspond to (i) sparse co-occurrence matrix construction (Step 1 in Algorithm 1), (ii) sparse item–item similarity computation (Steps 6–9) together with top-
neighbor selection performed on non-zero entries (Steps 10–12), and (iii) potential positive sample aggregation for all users (Steps 13–19), respectively. Since real-world interaction data are highly sparse and
is a small constant, the complexity scales with interaction sparsity rather than the square of the item catalog size, making PPSM practical for large-scale recommendation scenarios. Moreover, PPSM is executed as an offline preprocessing step and therefore does not introduce additional overhead during model training or inference.
| Algorithm 1 Potential Positive Sample Mining (PPSM) Strategy |
| Input: : user–item interaction matrix (N users × M items); : number of potential positive samples per interacted item |
| Output: potential positive sample set for each user u in the training set |
- 1:
Compute item–item co-occurrence matrix () - 2:
for each item i in do - 3:
(total co-occurrence of i) - 4:
end for - 5:
Initialize similarity matrix as zero matrix () - 6:
for each item pair with and do - 7:
Compute similarity - 8:
- 9:
end for - 10:
for each item i in do - 11:
(indices of most similar items) - 12:
end for - 13:
for each user u in the training set do - 14:
(interacted positive sample set of user u) - 15:
Construct potential positive sample set - 16:
for each item i in do - 17:
(potential positive sample set of user u) - 18:
end for - 19:
end for - 20:
return for each user u in the training set
|
3.1.3. Loss Function
The Bayesian Personalized Ranking (BPR) loss function is specifically designed for learning personalized user preferences in collaborative filtering [
30]. It optimizes model parameters by maximizing the difference between the predicted scores of positive samples and those of negative samples for each user. The objective of the BPR loss is to ensure that users prefer items they have actually interacted with as positive samples over items they have not interacted with as negative samples. Specifically, the BPR loss function can be expressed as:
where
D denotes the training dataset, consisting of triplets of user
u, positive sample
i, and negative sample
j;
and
represent the predicted scores of user
u for the positive sample
i and negative sample
j, respectively;
is the sigmoid function, which maps the score difference into the probability space;
is the regularization parameter; and
denotes the
regularization term on model parameters to prevent overfitting.
In the original BPR loss function, the positive sample
i is drawn from the traditional positive sampling described in
Section 3.1.2, i.e., randomly sampled from the user’s interacted items. The sampling strategy designed in this work aims to provide the model with higher-quality positive training samples by integrating both traditional positive sampling and the proposed PPSM strategy. Under this setting, the BPR loss function is adjusted as follows:
where
denotes the training dataset obtained through the PPSM strategy, where
represents the positive sample derived from the PPSM strategy.
is a binary variable that controls whether the potential positive sample is used for training, and
is a hyperparameter representing the probability of using potential positive samples to train the model.
denotes a random number uniformly distributed in the interval
. When
, the model uses the potential positive samples for training, which helps the model uncover the user’s latent interests. Conversely, when
, the model relies on traditional positive sampling for training.