Long-tail graph node commodity recommendation method based on pseudo label dynamic threshold

By adopting the graph node product recommendation method with dynamic threshold of pseudo-label under long-tail distribution, the problem of pseudo-label impact on data imbalance is solved, the generalization ability and recommendation accuracy of the model are improved, and more accurate product recommendation services are provided .

CN119090575APending Publication Date: 2024-12-06BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410852739.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology ignores the effect of pseudo-label samples on the imbalance of the training data set under the long-tail distribution, resulting in the model being overconfident in the head category samples and lacking confidence in the tail category samples, which in turn affects the generalization ability and classification performance of the model. .

Method used

The graph node product recommendation method based on the dynamic threshold of pseudo-label is adopted. By adopting a specific sampling strategy during the stage of adding pseudo-label samples, adjusting the dynamic threshold to adapt to the characteristics of different categories, optimizing the pseudo-label generation process, alleviating the problem of uneven data distribution, and Use graph neural networks and multi-layer perceptron models to improve recommendation accuracy.

Benefits of technology

It significantly improves the generalization ability of the model on unbalanced data sets, provides more accurate and personalized product recommendations, and enhances the practicality of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090575A_ABST
    Figure CN119090575A_ABST
Patent Text Reader

Abstract

The invention relates to a long-tail graph node commodity recommendation method based on a pseudo tag dynamic threshold, and belongs to the field of commodity recommendation systems. The method comprises the following steps: S1, training a graph neural network to obtain graph node representation; s2, obtaining a classification probability by using a multi-layer perceptron and an activation function; s3, reasoning is carried out on graph commodity nodes without labels; s4, setting a threshold function according to different categories, and carrying out pseudo label sample screening; s5, repeating the steps S1 to S4 until a model f (., theta0) is obtained through convergence; and S6, reasoning and sorting are carried out on the graph commodity test set nodes without labels, and the classification labels of the nodes are predicted to be the categories arranged at the first position. According to the method, not only is the generalization ability of the model on the unbalanced data set enhanced, but also more accurate and personalized commodity recommendation service is provided through refined node classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a long-tail graph node commodity recommendation method based on a pseudo-label dynamic threshold, and belongs to the field of commodity trading network recommendation systems. Background Art

[0002] In recent years, the commodity transaction graph network technology of semi-supervised learning (SSL) has developed rapidly, which not only greatly enriches the user's shopping experience and helps users find more commodities that meet their personal preferences, but also enables enterprises to accurately locate potential customer groups, promote sales growth and market expansion, and bring significant economic benefits to enterprises.

[0003] In the existing technology, people mainly use two types of methods to improve the effect of long-tail graph node product recommendation. In the first type of method, when the model is very confident about the classification of a node, the pseudo-label of the node is considered to be of high quality and is then added to the training set to help the model learn better and improve its performance in data-sparse environments; in the second type of method, more unlabeled node selection criteria are explored during the training process. This method uses dropout variational inference and dropedge variational inference to evaluate the information gain of each pseudo-label, so as to accurately select samples that can bring the greatest benefit to the model.

[0004] However, existing methods usually ignore the impact that pseudo-label samples may have on the imbalance of training datasets. Specifically, due to the sample sparsity caused by the long-tail distribution, the graph neural network model may show overconfidence in samples of the head category and insufficient confidence in samples of the tail category during training. When adding samples through pseudo-labeling technology, this biased model tends to select samples with high confidence, and most of these samples belong to the head category. Therefore, the addition of new pseudo-labeled datasets not only fails to alleviate the problem of class imbalance, but may further aggravate the imbalance of the training set. In this case, the generalization ability of the model and the ability to identify the tail category may be negatively affected by the further skewness of the data distribution, resulting in a decrease in the overall performance of graph node commodity classification. Therefore, exploring how to effectively use pseudo-labeling technology under long-tail distribution and how to adjust the model strategy to better handle class imbalance has become the key to improving the classification performance of graph neural networks. Summary of the invention

[0005] In view of the problems existing in the prior art, the inventors proposed a novel graph node product recommendation method based on pseudo-label dynamic thresholds. The method of the present invention mainly utilizes the differences in the head and tail categories of the graph neural network in the long-tail data distribution, and adopts a specific sampling strategy for nodes of different categories in the stage of adding pseudo-label samples, thereby effectively alleviating the imbalance problem of data distribution while maintaining the quality of pseudo-labels. The method of the present invention not only optimizes the pseudo-label generation process, but also adapts to the characteristics of different categories by intelligently adjusting the dynamic threshold, further improving the accuracy and efficiency of product recommendations.

[0006] The present invention uses Graph Neural Network (GNN) to conduct in-depth analysis and modeling of the complex interactive relationships between product nodes. By converting product reviews into bag-of-words representations, valuable semantic features are extracted, and these features are input into the model together with the interactive relationships of the products. In addition, in order to deal with the problem of category imbalance, the present invention uses a dynamic threshold mechanism to adjust the generation of pseudo-labels, and adopts different strategies for different categories of products to ensure the accuracy and representativeness of pseudo-labels.

[0007] In the parameter optimization stage, the present invention uses a gradient descent-based optimization algorithm to adjust the model weights to maximize the prediction accuracy.

[0008] The objective of the present invention is achieved through the following technical solutions:

[0009] A graph node product recommendation method based on pseudo-label dynamic threshold includes the following steps:

[0010] Each attribute product picture The adjacency matrix data is as follows:

[0011]

[0012] Among them, the node set V = {v1,…,v n} contains n product nodes. If two product nodes v i With product v j were purchased together, then there is an edge between them, denoted by here is the set of edges. The node attribute matrix X∈R n ×d The d-dimensional features of each node are derived from the bag-of-words representation of product reviews. i , whose feature vector is represented by X[i,:]. This structural design makes it possible to process complex commodity co-purchase relationships through graph neural networks and effectively classify or recommend commodities.

[0013] Step 1: Train the graph neural network to get graph node representation

[0014] In the long-tail distribution of training set V l Train the graph neural network teacher model on.

[0015] Select the backbone architecture f(·,θ) of the graph neural network, where θ represents the model parameters, such as classic graph neural network models such as GCN (Graph Convolutional Networks), GAT (Graph Attention Networks) and GraphSage (Sample and aggregate). The node update rule of GCN is as follows:

[0016]

[0017] Among them, H (l) is the node feature matrix of the lth layer, is the adjacency matrix with self-connection added, A is the original adjacency matrix, I N is the identity matrix, D is the degree matrix of A, W (l) is the weight matrix of the lth layer.

[0018] The node update rules of GAT are as follows:

[0019]

[0020]

[0021] where h i and h j The feature vectors of a node and its neighbors, W is the weight matrix, is the parameter vector of the attention mechanism, α ij is the attention coefficient of node j to node i, || represents splicing, represents the neighborhood of node i.

[0022] GraphSage's node update rules are as follows:

[0023]

[0024]

[0025] where h i is the feature vector of node i, W is the learned linear transformation matrix, and AGGREGATE is an aggregation function, such as mean (MEAN), pooling, or long short-term memory (LSTM). For consistency, the process is represented as h = f (G, θ)

[0026] Step 2: Use multi-layer perceptron and activation function to get classification probability

[0027] In order to obtain the classification probability from the node features, a multilayer perceptron (MLP) and an activation function are used to process each node feature. A multilayer perceptron is usually composed of multiple linear layers and nonlinear activation function layers alternating to enhance the learning ability and expressiveness of the model. In the graph node classification task, MLP accepts the feature vector of each node and generates the corresponding classification probability through a series of transformations to predict the category of each node.

[0028] Specifically, for each node v i , its feature hi will first be processed by a linear transformation layer W1 and bias b1, and then by a nonlinear activation function σ (such as ReLU), and then may go through more such layers. The final output layer is a layer with a softmax activation function, which is used to convert the output into a probability distribution. The classification probability can be expressed by the following formula:

[0029] Z i =softmax(W k σ(...σ(W1h i +b1)...+b k-1 )+b k )

[0030] Among them, W1…W k and b1…b k are the weight and bias parameters in the MLP, σ is the nonlinear activation function, and Z i is node v i The classification probability vector, softmax ensures that the output is a valid probability distribution.

[0031] Step 3: Perform inference on unlabeled graph product nodes

[0032] The graph neural network model is fully trained on the training set to obtain the teacher model, and then the unlabeled graph product node v u ∈V U Inference is performed on them to obtain their classification probabilities for each category, where V U is the set of unlabeled commodity nodes

[0033] h=f(G,θ)

[0034] Z u =softmax(W k σ(...σ(W1h u +b1)...+b k-1 )+b k )

[0035] Step 4: Set threshold functions according to different categories to filter pseudo-label samples

[0036] Select the appropriate threshold function th according to the needs type (i) Screen samples of different categories. Specifically, if the confidence of a sample is confidence = max(Z u )>th type (c), where c = argmax(Z u ), then the sample is judged to belong to category c.

[0037] According to the needs of different categories, a specific threshold function th can be set type (i) to screen samples. The specific operation is to calculate the confidence level of each sample: confidence = max(Z u ), where Z u is the output category probability vector of sample u; then determine the predicted category c = argmax(Z u ), if the confidence of this sample exceeds the threshold th set for this category type (c), that is, confidence>th type (c), then the sample is judged to belong to category c.

[0038] The type is li,

[0039]

[0040] The type is r,

[0041] Where l represents the low threshold, j represents the high threshold, n represents the number of categories, and i represents the current category. Type li means that the threshold curve is a linear function; type ds means that the threshold curve is a parabolic function with an opening downward; type us means that the threshold curve is a parabolic function with an opening downward; type r means that the threshold curve is a square root function;

[0042] Add pseudo-label samples that meet the conditions to the training node set V l middle.

[0043] Step 5: Repeat steps 1 to 4 until convergence to obtain the model f(·,θ0).

[0044] Step 6: Perform inference and sorting on the unlabeled graph product test set nodes, and predict the classification label of the node as the category ranked first.

[0045] Beneficial effects:

[0046] The present invention designs a pseudo-label model with dynamic thresholds based on the sample size differences of each category, which significantly improves the generalization ability of the model on unbalanced data sets. In addition, through refined commodity node classification, the method of the present invention can provide more accurate and personalized commodity recommendation services, meet the diverse needs of users, and enhance the practicality of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 The relationship diagram of classification accuracy under different imbalance ratios of traditional neural network models;

[0048] Figure 2 This is a schematic diagram of how the imbalance degree after mixing changes with the proportion of newly added samples when the imbalance degree of the pseudo-label data set is smaller than the imbalance degree of the original training set;

[0049] Figure 3 This is a schematic diagram of how the imbalance degree after mixing changes with the proportion of newly added samples when the imbalance degree of the pseudo-label data set is greater than the imbalance degree of the original training set;

[0050] Figure 4 The relationship between model classification recall and class index under multiple imbalance levels;

[0051] Figure 5 The relationship between model classification accuracy and class index under multiple imbalance levels;

[0052] Figure 6 It is the class-specific pseudo-label selection process;

[0053] Figure 7 This is a performance comparison chart of different models;

[0054] Figure 8 The present invention is a flowchart of a method for recommending products on graph nodes based on a dynamic threshold of pseudo-labels according to an embodiment of the present invention.

[0055] in, Figure 1 The classification accuracy performance of three mainstream graph neural networks—GCN, GAT, and GraphSage—under different class imbalance ratios is shown. As the imbalance ratio of the dataset increases, the classification accuracy of all these graph neural network models shows a downward trend. This phenomenon shows that when the gap between the number of minority classes and majority classes in the dataset increases, these models perform worse in distinguishing less common classes, which in turn affects the overall performance. Although these models perform well on balanced datasets, they have difficulty maintaining the same high level of performance in an unbalanced data environment. This emphasizes the need to pay special attention to dealing with data imbalance when designing and training graph neural network models.

[0056] In many methods of semi-supervised learning SSL, when pseudo-labels are generated by a primary model that is biased towards the majority class, continuing to use these biased pseudo-labels may further exacerbate the bias of the model and thus degrade the overall performance. L Distribution and Pseudo-labeled Data V P The distributions obey the long-tail distributions with imbalanced degrees ρ1 and ρ2, and the sample sizes of the last categories are n1 and n2, respectively. The imbalanced degree ρ is defined as the number of samples of the category with the largest sample size in the data set divided by the number of samples of the category with the smallest sample size. Calculate the mixed data distribution:

[0057]

[0058] For convenience, Recorded as k, it can reflect the ratio of the amount of pseudo-label data to the amount of training data to a certain extent. The above formula can be further simplified as:

[0059]

[0060] When k approaches 0, that is, the amount of pseudo-label data is much smaller than the amount of training data, ρρ1, that is, the mixed data distribution is closer to the training data distribution. On the contrary, when k approaches ∞, that is, the amount of pseudo-label data is much larger than the amount of training data, ρ mix It approaches ρ2, that is, the mixed data distribution is closer to the pseudo-label data distribution.

[0061] Derivative k, analyze ρ mix With the changing trend of k, we can get:

[0062]

[0063] Figure 3 It shows that when the training set V L The original imbalance is greater than the pseudo-label dataset V P When the degree of imbalance is greater, that is, ρ1>ρ2, ρ mix It increases with the increase of k, that is, the imbalance degree of mixed data increases with the increase of the amount of pseudo-label data. Figure 4 It shows that when the training set V L The original imbalance is smaller than the pseudo-label dataset V P When the degree of imbalance is small, that is, ρ1<ρ2, ρ mix It decreases with the increase of k, that is, the imbalance degree of mixed data decreases with the increase of pseudo-label data. In summary, the increase of pseudo-label data will make the distribution of mixed data closer to the distribution of pseudo-label data.

[0064] Figure 4 and Figure 5 The changing trends of category recall and precision of the GCN model under different data imbalance levels are shown respectively. Figure 4 It can be seen that as the number of training samples decreases, the category recall rate of the model generally decreases, especially when the data imbalance increases, the recall rate of the minority category decreases significantly, while the recall rate of the majority category is relatively stable. This shows that the GCN model has obvious bias when processing unbalanced data sets, and is more inclined to predict a large number of head categories.

[0065] In contrast, Figure 5 The data show that the category accuracy generally increases with the reduction of training samples, especially in the case of high imbalance, the accuracy of the tail category is relatively high. This shows that the model is more cautious when classifying tail category samples, and only classifies samples into this category when it is very sure, thus ensuring high accuracy. However, due to overconfidence in the head category, the model often misclassifies multiple samples with similar appearance or features as the head category, resulting in reduced accuracy of the head category. DETAILED DESCRIPTION

[0066] The method of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments of the specification. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0067] The original data is the purchase records of all Amazon users, so it needs to be processed to mine the product recommendation services that users may be interested in, such as Figure 8 As shown, the specific steps are as follows:

[0068] 1. Purchase data usually contains the user's commodity purchase history. This type of data can be used to analyze the user's purchase behavior and preferences. By applying the association rule algorithm, we can effectively mine the co-purchase relationship between commodities. These relationships can be used to construct a commodity association graph, where each node represents a commodity and the edges between nodes represent the co-purchase relationship between commodities. The weight of the edge reflects the frequency with which two commodities are purchased together. To ensure the validity and manageability of the graph, we will set a threshold and only retain the edges with a weight greater than the threshold, and delete those with lower weights.

[0069] 2. Model the relationship between product nodes. The process of training the graph neural network to obtain graph node representation involves iIn this process, we first need to select a suitable graph neural network architecture, such as GCN (Graph Convolutional Network), GAT (Graph Attention Network) or GraphSage. These models are classic methods for processing graph data, and they learn node feature representations in different ways. In order to maintain consistency, the process is represented as h = f (G, θ)

[0070] 3. Model the embedding representation and category relationship of the products. In order to obtain the classification probability in the graph node classification, a multi-layer perceptron (MLP) combined with an activation function can be used to process the features of each node. The multi-layer perceptron consists of multiple linear layers and nonlinear activation function layers alternating. This structure helps to enhance the learning and expression capabilities of the model. Specifically, for each node v in the graph i , its characteristic h i First, it is processed through a linear transformation layer and bias, then activated by a nonlinear activation function (such as ReLU), and may go through more similar processing layers. Finally, the final output is transformed through an output layer with a softmax activation function, turning it into a probability distribution to predict the category of each node. The mathematical representation of this process can be described by the following formula:

[0071] Z i =softmax(W k σ(...σ(W1h i +b1)...+b k-1 )+b k )

[0072] Among them, W1…W k and b1…b k are the weight and bias parameters in the MLP, σ is the nonlinear activation function, and Z i is node v i The softmax ensures that the output is a valid probability distribution and provides an intuitive mapping from node features to category predictions.

[0073] 4. Migration of unlabeled product data. After the graph neural network model is fully trained on the training set, an excellent teacher model is obtained. This model can be used to transfer unlabeled graph product nodes v u ∈V U Inference is performed on , in order to predict the category probability corresponding to each commodity node. Here, V URefers to all unlabeled commodity nodes in the set. The reasoning process usually involves forward propagating the features of unlabeled nodes through the teacher model to obtain the probability distribution of each node belonging to each category. Calculate confidence confidence = max(Z u ), and find the category with the highest confidence c = argmax(Z u ). According to the predicted category c to which the sample belongs and the corresponding threshold function th type (c) Check whether its confidence exceeds the predetermined category threshold. type (c), the sample is considered reliable enough and can be added to the training set V as a pseudo-label sample. l middle.

[0074] 5. Repeat steps 2 to 4 until the model converges.

[0075] 6. Perform inference and sorting on the nodes of the unlabeled graph product test set. Use the trained graph neural network model to perform forward propagation calculations on each unlabeled node in the test set and output the predicted probability of each node for each category. For each node, sort all possible categories according to the probability value output by the model. The category with the highest probability will be considered the most likely category for the node and recommended to users who are paying attention to products in this category.

[0076] Evaluation indicators:

[0077] The performance of the long-tail data distribution commodity graph node classification based on semi-supervised learning in the present invention is evaluated below. The performance of the long-tail data distribution commodity graph node classification is evaluated by defining the accuracy rate:

[0078]

[0079] Precision, Recall and F1 are also used to evaluate the performance of the model. The relevant formulas are as follows. The categories are divided into three subsets, including head, middle and tail, based on the number of samples in each category. At the same time, in order to explore the model performance in detail, the Precision, Recall and F1 of each category / subset are also taken into consideration.

[0080]

[0081]

[0082]

[0083] Among them, TP (True Positives) is the true class, that is, the number of instances correctly predicted by the model as the positive class, TN (True Negatives) is the true negative class, that is, the number of instances correctly predicted by the model as the negative class, FP (False Positives) is the false positive class, that is, the number of instances incorrectly predicted by the model as the positive class, and FN (False Negatives) is the false negative class, that is, the number of instances incorrectly predicted by the model as the negative class.

[0084] Dataset:

[0085] In this experiment, we selected the subset of Amazon co-purchase dataset, Amazon-photo, for research. In this subset, nodes represent products, and edges represent two products that are often purchased together.

[0086] The feature of each node is a bag-of-words encoding based on product reviews, and the 745-dimensional feature represents a wide range of product attributes. This dataset covers 8 different product categories and shows clear category imbalance, with a total of 7,650 nodes and 241,812 edges.

[0087] In order to study the model performance under extreme imbalance conditions, different imbalance levels ρ (20, 50, 100, 200) were set in the experiment. Under these settings, the number of samples in the head category in the training set is fixed to 400, while the number of samples in other categories decays exponentially according to the category order.

[0088] When evaluating the model performance, in order to reduce the impact of class imbalance in the training data on the results, 250 node samples were uniformly extracted from each category in the test set.

[0089] Experimental results:

[0090] In the present invention, continuous POI recommendation and check-in time interval prediction are completed at the same time. Therefore, this experiment will be divided into two parts. The first part is the experimental results and analysis of continuous POI recommendation, and the second part is the experimental results and analysis of check-in time interval prediction.

[0091] In the task of continuous POI recommendation, we compare our method with the following algorithms:

[0092] (1) Classic Graph Neural Network (RAW): The original graph neural network model. This experiment specifically selected three types of classic GNNs, namely GCN, GAT and GraphSage, and trained them directly on the training set without using pseudo labels.

[0093] (2) Pseudo-labeling algorithm based on fixed threshold (origin_PL): This algorithm uses the confidence prediction of the base model for unlabeled samples as the label. Specifically, if the maximum probability of a class is greater than the threshold th, then the class is taken as the target label. In particular, in the experiment, we set the high threshold th = 0.9 and the low threshold th = 0.6, respectively marked with subscripts h and l.

[0094] (3) Multi-Stage Training Algorithm (MST): This algorithm combines the DeepCluster method and uses the clustering results to construct pseudo labels for unlabeled data in the embedding space in each self-supervised iteration. These pseudo labels are then used for further training to improve the model’s adaptability and prediction accuracy for a small number of labeled data.

[0095] (4) Distribution Recovered Graph Self-Training framework (DR-GST): In order to avoid the distribution shift introduced by high-confidence pseudo-labels, this algorithm proposes a method to estimate information gain through dropout and dropedge variational inference, and incorporates a loss correction strategy into self-training to mitigate the negative impact of erroneous pseudo-labels.

[0096] (5) Cautious Pseudo-Labeling (CPL): This algorithm selectively labels samples with the highest confidence and the strongest consistency in multiple views, aiming to reduce the impact of noise and improve learning effects. The algorithm includes using a teacher model to calculate the confidence of unlabeled samples and refining learning with a student model based on pseudo-labeled data. Its goal is to maximize the confidence threshold of the pseudo-label, thereby reducing prediction errors and enhancing convergence.

[0097] Table 1, Table 2, Table 3, Table 4 and Figure 7 The experimental results of graph node commodity classification are listed. We use the training set to optimize the model parameters and use the optimal values ​​of the parameters for the test set. The experimental results are as follows:

[0098] A. The report on the Amazon-photo dataset shows that under different imbalance levels (20, 50, 100, 200), by observing RAW and the present invention, it can be found that in all imbalance level tests, the present invention shows a certain performance improvement, which verifies the effectiveness of the present invention. In comparison with other baseline methods, whether using GCN or GraphSAGE as the backbone network, the present invention shows significant performance improvement. However, when the backbone network is replaced with GAT, although the performance of the present invention lags slightly behind the best-performing DR-GST, the gap is only in thousandths, and it is still better than all other baseline methods. This result not only demonstrates the advantages of the present invention in processing imbalanced datasets, but also highlights its robustness under various network configurations.

[0099] B. Compared with other recommendation algorithms, the present invention has the best recall performance in the tail category (Tail) and the overall (All), and has achieved the best precision performance in the head category (Head) and the overall (All), and the best F1 performance in the head, medium (Medium), tail (Tail) and the overall (All). This result not only demonstrates the efficiency of the present invention in improving the overall model performance, but also highlights its ability to balance the performance of each category when processing unbalanced data sets.

[0100] C. Figure 7 The relationship between the degree of imbalance and the accuracy of pseudo-labeling is shown. As can be seen from the figure, the Coat model is closest to the upper left corner among many baseline models, which means that it generates the highest quality and most balanced data distribution, corresponding to the best performance in the table.

[0101] Table 1 Accuracy of each method in node product classification on the Amazon-photo dataset

[0102]

[0103]

[0104]

[0105] Table 2 Recall rate of each method when the imbalance degree is 200

[0106] Model Header Category Central Category Tail Category overall DR-GST 0.958 0.956 0.871 0.728 MST 0.942 0.968 0.768 0.8865 CPL 0.950 0.953 0.732 0.869 Ours 0.938 0.961 0.891 0.929

[0107] Table 3. Accuracy of each method when the imbalance degree is 200

[0108] Model Header Category Central Category Tail Category overall DR-GST 0.726 0.92 0.9938 0.899 MST 0.793 0.906 0.988 0.909 CPL 0.729 0.923 0.995 0.902 Ours 0.863 0.948 0.96 0.931

[0109] Table 4 F1 of each method when the imbalance degree is 200

[0110] Model Header Category Central Category Tail Category overall DR-GST 0.824 0.936 0.819 0.864 MST 0.856 0.933 0.942 0.88 CPL 0.819 0.936 0.818 0.862 Ours 0.899 0.954 0.923 0.929

[0111] Through comparative tests, it can be seen that the method of the present invention is significantly superior to the prior art in various indicators, which effectively proves the application potential and practical effect of the method of the present invention in the task of online shopping product recommendation.

[0112] The present invention has been described in detail above through specific embodiments. It is worth pointing out that the embodiments do not limit the scope of protection of the present invention, but are used to help understand the method of the present invention. It is understandable that various technical solutions obtained by those skilled in the art by equivalently replacing or reasonably extending the technical features or execution steps in the present invention without departing from the spirit of the present invention will fall within the scope of protection of the present invention.

Claims

1. A method for recommending products on long-tail graph nodes based on pseudo-label dynamic thresholds, characterized in that: The recommendation method comprises the following steps: S1, training a graph neural network to obtain a graph node representation; S2, using a multi-layer perceptron and an activation function to obtain a classification probability; S3, performing reasoning on an unlabeled graph commodity node; S4, setting a threshold function according to different categories to perform pseudo-label sample screening; S5, repeating steps S1 to S4 until convergence to obtain a model f(·,θ); S6, performing reasoning on an unlabeled graph commodity test set node and performing sorting, and predicting the classification label of the node as the category ranked first.

2. According to claim 1, a method for recommending long-tail graph nodes based on pseudo-label dynamic thresholds is characterized by: In step S1, in the training set V of the long-tail distribution l The graph neural network teacher network is trained on the network. The model selects the backbone architecture of the graph neural network, including graph convolutional network, graph attention network, graph sampling and aggregation network. The node update rules of the graph convolutional network are as follows: Among them, H (l) is the node feature matrix of the lth layer, is the adjacency matrix with self-connection added, A is the original adjacency matrix, I N is the identity matrix, D is the degree matrix of A, W (l) is the weight matrix of the lth layer; the node update rule of the graph attention network is as follows: where h i and h j The feature vectors of a node and its neighbors, W is the weight matrix, is the parameter vector of the attention mechanism, α ij is the attention coefficient of node j to node i, || represents splicing, represents the neighborhood of node i; the node update rules of graph sampling and aggregation network are as follows: Among them, h i is the feature vector of node i, W is the learned linear transformation matrix, and AGGREGATE is the aggregation function, including mean, pooling, or long short-term memory.

3. According to claim 2, a method for recommending long-tail graph nodes based on pseudo-label dynamic thresholds is characterized by: In step S2, each node feature is processed using a multilayer perceptron and an activation function. i , its characteristic h i It will first be processed through a linear transformation layer W1 and bias b1, then through a nonlinear activation function σ, and then through more such layers, and finally through an output layer with a softmax activation function to convert the output into a probability distribution. The classification probability can be expressed as follows: Z i =softmax(W k σ(…σ(W1h i +b1)…+b k-1 )+b k ) Among them, W1…W k and b1…b k are the weight and bias parameters in the multilayer perceptron, σ is the nonlinear activation function, and Z i is node v i The classification probability vector, softmax ensures that the output is a valid probability distribution.

4. According to claim 3, a method for recommending long-tail graph nodes based on pseudo-label dynamic thresholds is characterized by: In step S3, the graph neural network model is fully trained on the training set to obtain a teacher model, and then the teacher model is trained on the unlabeled graph commodity node v u ∈V U Reasoning on V U is a set of unlabeled commodity nodes to obtain their classification probabilities for each category: Z u =softmax(W k σ(…σ(W1h u +b1)…+b k-1 )+b k ) 5. According to claim 4, a method for recommending long-tail graph node commodities based on pseudo-label dynamic threshold is characterized in that: In step S4, a suitable threshold function th is selected as required. type (i) For samples of different categories, if the confidence of a sample is confidence = max(Z u )>th type (c), then the sample is judged to belong to category c, where c = argmax(Z u ),Z u is the output category probability vector of sample u, and adds the pseudo-label samples that meet the conditions to the training node set V l middle.