A long tail recommendation method based on three-channel representation decoupling and counterfactual inference
By constructing a long-tail recommendation method based on three-channel representation decoupling and counterfactual inference, the problems of difficulty in discovering tail items and bias are solved, user interests are learned independently, and the accuracy and diversity of the recommendation system are improved.
Patent Information
- Application Number
- CN202611410727.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-24
AI Technical Summary
In existing recommendation systems, items at the bottom of the list are difficult for users to discover, and there are biases caused by various factors, making it impossible to effectively separate genuine user interests.
A long-tail recommendation method with three-channel representation decoupling and counterfactual inference is constructed, including interest representation channel, project popularity representation channel and user herd representation channel. Through multi-task supervised learning and orthogonal constraint mechanism, the influence of bias is eliminated and user interests are learned independently.
It improves the accuracy and fairness of long-tail recommendations, reduces popularity bias, and enhances the model's generalization ability and recommendation diversity.
Smart Images

Figure CN123157985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of recommendation technology, specifically to a long-tail recommendation method based on three-channel representation decoupling and counterfactual inference. Background Technology
[0002] Recommender systems play a vital role in social life, with widespread applications in e-commerce, social networking, travel, and local services. Collaborative filtering, which effectively leverages users' historical interaction behavior, has been widely used in the field of recommender systems. However, with continuous development, collaborative filtering, which relies solely on interaction information, is insufficient to fully uncover all relationships between items. Therefore, in recent years, there has been an increasing trend of combining recommender systems with knowledge graphs.
[0003] Compared to collaborative filtering, knowledge graphs can leverage entities and the relationships between them to provide richer information for projects, making knowledge graph-based recommendation methods a hot research topic. For example, KGAT uses graph attention mechanisms to propagate knowledge graph information, while KGIN uses relation-aware aggregation to enhance user interest representations. While these methods can improve recommendation accuracy, they generally model user interest representations as single embeddings, failing to differentiate between various factors in detail.
[0004] Most recommendation systems tend to prioritize recommending top-ranked items, making it difficult for users who need them to discover lower-ranked items. This highlights the importance and necessity of long-tail recommendation. The current challenge in the field of knowledge graph long-tail recommendation is how to simultaneously eliminate biases caused by various factors and capture genuine user interests. Summary of the Invention
[0005] The purpose of this invention is to solve the problem in the prior art that it is difficult for users who need the tail items to find them, and how to simultaneously eliminate the deviations caused by different factors and strip away the real user interests.
[0006] To address the aforementioned problems, this invention provides a long-tail recommendation method based on three-channel representation decoupling and counterfactual inference, characterized by the following steps:
[0007] Step 1: Construct a collaborative knowledge graph;
[0008] User set , This represents the Mth user, and each user... Each user has a unique identifier and historical interaction information, including: clicks, browsing, playing, purchasing, favorites, ratings, sharing, and comments.
[0009] Get project collection , This represents the Nth item, and each item... Each project is assigned a unique identifier and includes project identification information and project attribute information. The project attribute information includes: project name, category, tags, description information, and information representing the characteristics of the project content.
[0010] Building a collaborative knowledge graph Including: For project nodes Associate knowledge graph entity identifiers that are the same as project identifiers, and determine the entity nodes corresponding to project nodes in the knowledge graph;
[0011] Step 2: Construct a three-channel representation decoupling, including:
[0012] Interest embeddings are obtained by constructing interest representation channels based on collaborative knowledge graphs, project popularity embeddings are obtained by constructing project popularity representation channels, and user conformity embeddings are obtained by constructing user conformity representation channels.
[0013] Step 3: Construct monitoring signals for project popularity and user conformity, and use these monitoring signals to supervise and constrain the embedding of project popularity and user conformity, thereby obtaining the overall orthogonal loss;
[0014] Step 4: For users A collection of historical interactive projects: , Obtain the corresponding project interest embedding, calculate the interest center based on the project interest embedding, calculate the user's interest concentration through the interest center, and input the interest concentration into the gating network to obtain [ ], Indicates the weight of the interest channel. Indicates the channel weight of project popularity. The sum of the three factors is 1. The interest matching score, project popularity score, and user conformity score are calculated separately and combined with the interest channel weight, project popularity channel weight, and user conformity channel weight to obtain the observation effect score. The BPR loss is obtained based on the observation effect score.
[0015] Step 5: Construct a joint loss function based on BPR loss and overall orthogonal loss;
[0016] Step 6: Based on interest matching score, project popularity score, user conformity score, interest channel weight, project popularity channel weight, and user conformity channel weight, the counterfactual inference method is used to eliminate the influence of project popularity bias and user conformity bias in user interests to obtain the final recommendation score;
[0017] Step 7: Based on the final recommendation score obtained in Step 6, sort the scores from highest to lowest and select the highest-scoring candidate. The selected projects will be the final recommendations.
[0018] In the preferred approach, constructing a three-channel decoupling characterization includes:
[0019] Construct interest representation channels and build an initial interest embedding matrix. The formula is:
[0020]
[0021] in, Represents the real number field. The matrix represents the dimension of interest representation, and E is the set of entities in the knowledge graph. Each row of this matrix corresponds to the initial interest embedding of a node, which serves as the starting point for subsequent message passing in the graph neural network.
[0022] Collaborative Knowledge Graph , This represents the set of nodes in a collaborative knowledge graph. To represent the connection relationships between nodes, a sparse graph structure matrix Ain is constructed based on the node connection relationships in Eckg.
[0023] Based on graph neural networks in collaborative knowledge graphs The interest embedding of a node is obtained by performing multi-level message passing, and the formula is as follows:
[0024]
[0025]
[0026] in, Represents a node In the Interest embeddings obtained after propagation in a layered graph neural network (∙) is the activation function. For the neighbor aggregation formula, This represents the connection weight between node h and its neighbor node t. Representing neighboring nodes In the Layer interest embedding; and Let each represent a set of trainable parameter matrices. The interest embeddings are concatenated by linking the first and last nodes together to obtain the final interest embedding. The user interest embeddings are then segmented according to node type. Embedding project interests ;
[0027] Construct a project popularity representation channel and randomly initialize the project popularity embedding matrix, using the following formula:
[0028]
[0029] in, This indicates the embedded dimension of project popularity. The popularity embedding matrix is a matrix where each row corresponds to the initial popularity embedding of a project. The popularity embedding matrix is then subjected to a non-linear transformation, as shown in the formula:
[0030]
[0031] in, Perform feature transformation on a nonlinear transform mapping network. Embedded to project popularity;
[0032] Construct user conformity representation channels and initialize the user conformity embedding matrix using the following formula:
[0033]
[0034] in, This indicates the user's conformity embedding dimension. Embedded by users following the crowd.
[0035] In the preferred embodiment, step 3 includes:
[0036] Embed the project's popularity Input the data into the project popularity predictor to obtain predicted values of the project's statistical characteristics. Embedding users into the herd Input into the user crowd forecaster to obtain the predicted value of average user interaction activity. ;
[0037] For each project Based on user-project interaction data and project interaction frequency And based on the knowledge graph data, the degree of knowledge graph connectivity of the corresponding entities of the project is statistically analyzed. , and Used as a supervisory signal for project popularity embedding, enabling project popularity embedding to learn project popularity information represented by project interaction frequency and project knowledge graph connectivity.
[0038] Project popularity monitoring losses The mean squared error is used to calculate the difference between the predicted value and the true statistical characteristics. The formula is as follows:
[0039]
[0040] Based on historical user interaction data, the average activity level of user interactions is statistically analyzed to obtain user herd supervision signals. Embedding users into the herd Input into the user crowd forecaster to obtain the predicted value of average user interaction activity. And based on the predicted value and The differences between them allow users to monitor the loss.
[0041] User herd oversight leads to losses Using the average error, the formula is:
[0042]
[0043] The orthogonality constraint between user interest embeddings and user conformity embeddings is given by the following formula:
[0044]
[0045] in, The orthogonal constraint loss between the interest-based user embedding and the conformity-based user embedding is used to constrain the Dudley representation information learned by the user interest channel and the user conformity channel.
[0046] The meaning of this loss is: when the user interest embedding and the conformity embedding tend to be consistent, the inner product value increases and the loss increases, thereby forcing the two to tend to be orthogonal in the vector space, so that the interest channel and the conformity channel capture the user's true preferences and conformity tendency respectively.
[0047] The project interest embedding and project popularity embedding are orthogonally constrained, and the formula is as follows:
[0048]
[0049] in, The orthogonal constraint loss between the project interest embedding and the project popularity embedding is used to constrain the project interest channel and the project popularity channel to learn mutually independent representation information.
[0050] The meaning of this loss is: when the project interest embedding and popularity embedding tend to be consistent, the inner product value increases and the loss increases, thereby forcing the two to tend to be orthogonal in the vector space, so that the interest channel and popularity channel capture the content semantics and popularity information of the project respectively.
[0051] The overall orthogonal loss is obtained by formulating:
[0052]
[0053] in, This represents the overall orthogonal loss.
[0054] In the preferred embodiment, step 4 includes:
[0055] The formula for calculating the center of interest is:
[0056]
[0057] Through interest centers Calculate the concentration of user interests The formula is:
[0058]
[0059] Calculate interest matching score The formula is:
[0060]
[0061] The project popularity score is calculated by summing the data across various dimensions. The formula is:
[0062]
[0063] in, The first embedding vector represents the first embedding vector. Elements of each dimension;
[0064] The sum of user conformity embeddings across various dimensions is used as the user conformity score. The formula is:
[0065]
[0066] The formula for calculating the observed effect score is:
[0067]
[0068] Calculate BPR loss based on observed effect score. The formula is:
[0069]
[0070] in, Represents the training sample set, Represents the natural logarithm function. This represents the Sigmoid function. This represents negative sample items where no user interaction occurred. Indicates user For the project The observed effect score.
[0071] In the preferred embodiment, step 5 includes: constructing a joint loss function. The formula is:
[0072]
[0073] in, This is the learning loss for knowledge graphs, used to learn the semantic representations of entities and relations; To predict the supervised loss function, , These are the loss weight parameters;
[0074]
[0075] in, The supervised loss is used to predict project popularity and is used to supervise the learning of project popularity embeddings. The supervised loss is used to predict user conformity and is used to supervise user conformity embedding learning. The orthogonal constraint loss is used to constrain the decoupling between interest embedding, project popularity embedding, and user conformity embedding. Regularization loss is used to apply a regularization factor to the model parameters. Norm constraints are used to prevent overfitting. These are the loss weight parameters;
[0076] The entire model is trained by backpropagation using the joint loss function, which updates the trainable parameters in the interest representation channel, project popularity representation channel, user conformity representation channel, knowledge perception gating, and prediction supervisor until the model training converges.
[0077] In the preferred approach, the counterfactual inference formula in step 6 is:
[0078]
[0079] in, Indicates user With the project The final recommendation rating, after being corrected for counterfactual bias, retains only the user's genuine interest in the project. To represent a user's complete interest matching score, This indicates the score corresponding to the deviation in project popularity. This indicates the rating corresponding to user conformity bias. For counterfactual intervention parameters.
[0080] The beneficial effects of this invention are as follows: By constructing user's true interest representation channel, project popularity representation channel and user conformity representation channel respectively, user interest, project popularity and user conformity behavior can be learned independently. Combined with multi-task supervised learning and orthogonal constraint mechanism, the three different semantic information can be decoupled and learned, which can effectively reduce the interference between various factors, improve the accuracy of user interest representation and the model's ability to recommend long-tail projects.
[0081] The concentration of user interests is calculated, and the weights of each channel are obtained through a knowledge-aware gating network. In the prediction stage, counterfactual inference is used to eliminate the interference of item popularity and user herd behavior on the user's true interests, so that the recommendation results can remove other influencing factors as much as possible and get as close as possible to the user's true interests. This effectively reduces popularity bias and improves the accuracy, fairness and generalization ability of long-tail recommendations. Attached Figure Description
[0082] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0083] Example 1:
[0084] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0085] like Figure 1 As shown, Step 1: Obtain user-project interaction data and knowledge graph data, and construct a collaborative knowledge graph; obtain the user set. and project collection N represents the number of items in the set, and M represents the number of users in the set; construct a user-item interaction graph. Where R represents the relationship between users and projects; obtain the knowledge graph ,in, Represents a set of entities. Represents a set of relations. Represents a set of triples in a knowledge graph; maps project nodes to corresponding entity nodes in the knowledge graph to construct a collaborative knowledge graph; and allows user sets... and project collection The user-project interaction status is shown in Table 1, where 1 indicates interaction and 0 indicates no interaction.
[0086] Table 1
[0087] User / Project 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 1 0
[0088] As can be seen from Table 1, the project It was interacted with twice. It was also interacted with twice, and the interaction frequency of other items followed a similar pattern. The knowledge graph contains entities. and relationships The knowledge graph triples are shown in Table 2.
[0089] Table 2
[0090] Head entity h relation Tail entity t
[0091] Step 2: Three-channel representation decoupling: Construct three channels using collaborative knowledge graphs and initial embeddings, namely: interest representation channel, project popularity representation channel, and user conformity representation channel, and further use the three channels to decouple user and project information respectively;
[0092] Step 2.1: Interest Representation Channel: Initialize the interest embedding matrix: ,in, The interest representation dimension is represented; a graph neural network is used to perform multi-layer message passing on the collaborative knowledge graph to obtain the interest representation of the nodes; the propagation results of each layer are concatenated to obtain the final interest embedding, and user interest embeddings are obtained according to node type. Embedding project interests The values after random initialization are shown in Table 3.
[0093] Table 3
[0094] node Dimension 1 Dimension 2 Dimension 3 Dimension 4 0.26 0.32 0.56 0.62 0.38 0.44 0.68 0.74 0.50 0.56 0.80 0.86 0.62 0.68 0.92 0.98 0.74 0.80 1.04 1.10 0.26 0.32 0.80 0.86 0.38 0.44 0.92 0.98 0.50 0.56 1.04 1.10 0.62 0.68 1.16 1.22 0.74 0.80 1.28 1.34
[0095] Step 2.2: Project Popularity Representation Channel: Extract the initial project popularity embedding matrix using the project's historical interaction information and knowledge graph structure information, and initialize the project popularity embedding matrix: ,in To represent the embedding dimension of project popularity, a nonlinear transformation mapping network is used for feature transformation: , Get project popularity embedding, denoted as The initial values of the initial heat embedding vector are shown in Table 4.
[0096] Table 4
[0097] node Dimension 1 Dimension 2 Dimension 3 Dimension 4 0.62 0.68 0.74 0.80 0.74 0.80 0.86 0.92 0.86 0.92 0.98 1.04 0.98 1.04 1.10 1.16 1.10 1.16 1.22 1.28
[0098] Step 2.3: User conformity representation channel, initialize the user conformity embedding matrix: ,in, This represents the user conformity embedding dimension, obtained through parameter learning, denoted as . ;
[0099] The initial values of the initial conformity embedding vectors are shown in Table 5.
[0100] Table 5
[0101] node Dimension 1 Dimension 2 Dimension 3 Dimension 4 0.26 0.32 0.80 0.86 0.38 0.44 0.92 0.98 0.50 0.56 1.04 1.10 0.62 0.68 1.16 1.22 0.74 0.80 1.28 1.34
[0102] Step 3: Orthogonal constraint supervision;
[0103] Step 3.1: Predictive Supervision;
[0104] Set up two independent predictors, with the project popularity embedding as input. Input the predicted value into the project popularity predictor; input the user conformity embedding. The predicted value of average user interaction activity is output to the user herd prediction tool;
[0105] Step 3.1.1: Project popularity monitoring and learning;
[0106] Statistical features of the project are constructed based on the project's historical interaction frequency and knowledge graph connectivity: ,in, Indicates the frequency of project interactions. This represents the connectivity of the project knowledge graph. Project popularity is embedded as input into the project popularity predictor. Output Then, the project's heat monitoring loss was calculated. ;
[0107] Step 3.1.2: User Conformity Monitoring Learning: Construct conformity monitoring signals based on the average activity level of the user group interacting with the project. Embed user conformity into the input user conformity predictor Output 3. Then, the user herd supervision loss is derived. ;
[0108] Step 3.2 Orthogonal Constraint: Orthogonal regularization can separate channels as much as possible, allowing them to capture the content in the corresponding embedding space.
[0109] The orthogonality constraint between user interest embeddings and user conformity embeddings is given by the following formula:
[0110]
[0111] The project interest embedding and project popularity embedding are orthogonally constrained, and the formula is as follows:
[0112]
[0113] The overall orthogonal loss is obtained: ;
[0114] After training, the individual photometric propagation results are concatenated to obtain the final embedding representation. In this example, after three layers of propagation, the dimensions are 4, 2, and 1 respectively, and the total dimension after concatenation is 7. The user interest embedding and project interest embedding after concatenation are shown in Table 6, and the project popularity embedding is shown in Table 7.
[0115] Table 6
[0116] node Dimension 1 2V 3D 4D 5V Vitamin 6 7V 0.26 0.32 0.56 0.62 0.68 0.74 0.80 0.38 0.44 0.68 0.74 0.80 0.86 0.92 0.50 0.56 0.80 0.86 0.92 0.98 0.04 0.62 0.68 0.92 0.98 0.44 0.10 0.16 0.74 0.80 1.04 1.10 0.16 0.22 0.28 0.26 0.32 0.80 0.86 0.92 0.98 0.04 0.38 0.44 0.92 0.98 0.40 0.16 0.88 0.50 0.56 1.04 1.10 0.52 0.28 0.92 0.62 0.68 1.16 1.22 0.92 0.78 0.24 0.74 0.80 1.28 1.34 0.04 0.22 0.85
[0117] Table 7
[0118] node Dimension 1 2V 3D 4D 5V Vitamin 6 7V 0.62 0.68 0.74 0.80 0.32 0.40 0.80 0.74 0.80 0.86 0.92 0.74 0.80 0.86 0.86 0.92 0.98 0.04 0.48 0.92 0.86 0.98 0.44 0.10 0.16 0.80 0.84 0.33 0.10 0.16 0.22 0.28 0.92 0.40 0.67
[0119] Step 4: Knowledge perception gating;
[0120] Step 4.1: Calculate the center point of the user interaction item interest embedding, for users A collection of historical interactive projects: Obtain the corresponding project interest embedding: Therefore, the center of interest is calculated using the following formula:
[0121]
[0122] Step 4.2: Calculate the interest concentration and generate three-channel weights, using the interest center. The concentration of user interests can be calculated using the following formula:
[0123]
[0124] Inputting the interest concentration into the gating network yields [ ],in Indicates the weight of the interest channel. Indicates the channel weight of project popularity. This represents the weight of the user conformity channel; and the sum of the three factors is 1; the interest matching score is calculated based on the user interest embedding, project interest embedding, project popularity embedding, and user conformity embedding. Project popularity score User herd scoring The observed effect score during the training phase is obtained by weighting and summing the weights of the three channels obtained through the gating network with the three scores, using the following formula:
[0125]
[0126] Used to calculate BPR loss, denoted as The sum of the three weights is 1. The weights calculated in this example are shown in Table 8.
[0127] Table 8
[0128] user 0.23 0.45 0.32 0.46 0.28 0.26 0.69 0.15 0.16 0.21 0.52 0.27 0.87 0.05 0.08
[0129] As can be seen from the table The interest weight is 0.87, indicating that the behavior is mainly driven by personal interests. The project popularity weight is the highest at 0.52, indicating that this user's behavior is more easily influenced by popular projects.
[0130] Step 5: Joint Loss Function. Construct a joint loss function and optimize the model during training. Jointly optimize the ranking loss, knowledge graph learning loss, prediction supervision loss, orthogonality constraint loss, and regularization loss. The total loss function of the model is then:
[0131]
[0132] in:
[0133]
[0134] In the above total loss function, The ranking loss is used to optimize the ranking relationship between users and positive and negative samples; This is the learning loss for knowledge graphs, used to learn the semantic representations of entities and relations; For the prediction supervision loss function, where The supervised loss is used to predict project popularity and is used to supervise the learning of project popularity embeddings. The supervised loss is used to predict user conformity and is used to supervise user conformity embedding learning. The orthogonal constraint loss is used to constrain the decoupling between interest embedding, project popularity embedding, and user conformity embedding. , , These are the loss weight parameters.
[0135] The joint loss function is used to backpropagate the entire model for training, so as to update the trainable parameters in the interest representation channel, project popularity representation channel, user herd representation channel, knowledge perception gating and prediction supervisor until the model training converges.
[0136] Step 6: Counterfactual Inference Prediction. Counterfactual inference eliminates the influence of project popularity bias and user conformity bias in user interests. The counterfactual inference formula is:
[0137]
[0138] in To represent a user's complete interest matching score, This indicates the score corresponding to the deviation in project popularity. This indicates the rating corresponding to user conformity bias. Counterfactual intervention parameters; based on user For example, we calculated the scores for each item and the final counterfactual score, and the results are shown in Table 9.
[0139] Table 9
[0140] project Counterfact scoring 2.80 1.50 0.90 2.80 - 1.0×(0.28×1.50 + 0.26×0.90) = 2.13 3.58 2.80 1.20 3.58 - 1.0×(0.28×2.80 + 0.26×1.20) = 2.50 1.90 1.10 0.60 1.90 - 1.0×(0.28×1.10 + 0.26×0.60) = 1.53 3.50 2.60 1.10 3.50 - 1.0×(0.28×2.60 + 0.26×1.10) = 2.55 #imgpt266# 2.10 1.30 0.70 2.10 - 1.0×(0.28×1.30 + 0.26×0.70) = 1.62
[0141] Step 7: Generate Recommendation Results: After training is complete, based on the counterfactual scores between users and items obtained in Step 6, sort the items from highest to lowest score and select the top 10 items as the final recommendation results.
[0142] Taking user #imgpt269# as an example, the item they haven't interacted with is #imgpt270#. Based on counterfactual reasoning, the resulting ranking is #imgpt271#. If #imgpt272# is selected, #imgpt273# will ultimately be recommended to the user.
[0143] Experimental verification of the method according to the embodiments of the present invention is specifically included as follows:
[0144] (1) Use of public dataset: The dataset used in this invention is Last-FM, which is music listening data provided by the Last online music platform, where songs are identified as items; this dataset includes 3,034,796 interaction data points from 23,566 users and 48,123 items. Its corresponding knowledge graph has a total of 9 relationships and 58,266 entities;
[0145] (2) Evaluation metrics: This invention uses Aggregate Diversity (AD) and Precision as evaluation metrics for this experiment. AD shows the diversity of recommendation results, thus reflecting the performance of long-tail recommendations. The higher the value, the higher the performance of long-tail recommendations. The calculation formula is as follows:
[0146] #imgpt274#
[0147] Here, #imgpt275# represents the N items that are ultimately recommended to user u.
[0148] Precison displays the recommended level of accuracy; the higher the value, the higher the accuracy. The formula for calculating Precison is as follows:
[0149] #imgpt276#
[0150] Where M represents the number of users, #imgpt277# represents the number of items that the i-th user actually interacted with and were recommended, and N represents the number of items in the recommendation list.
[0151] Experimental Results Comparison and Analysis: Compared with KGAT, the example of this invention shows that KGAT has a slight advantage in the precision metric, but the AD value of this method is significantly higher. This indicates that we have achieved a significant improvement in recommendation diversity by sacrificing a small amount of precision, effectively alleviating the problem of popular projects monopolizing the market and giving long-tail projects more opportunities to be recommended. This demonstrates that this invention effectively alleviates the popularity bias problem and achieves the goal of long-tail recommendation.
[0152] The project popularity predictor and the user herding predictor in this invention are both multilayer perceptron networks.
[0153] The knowledge graph used in this invention is the knowledge graph provided by the KGAT public dataset: https: / / dl.acm.org / doi / 10.1145 / 3292500.3330989.
[0154] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the present invention. Various changes and modifications can be made to the present invention without departing from its spirit and scope. All such changes and modifications fall within the scope of the present invention as claimed, which is defined by the appended claims and their equivalents.
Claims
1. A long-tail recommendation method based on three-channel representation decoupling and counterfactual inference, characterized in that, Includes the following steps: Step 1: Construct a collaborative knowledge graph; User set , This represents the Mth user, and each user... Each user has a unique identifier and historical interaction information, including: clicks, browsing, playing, purchasing, favorites, ratings, sharing, and comments. Get project collection , This represents the Nth item, and each item... Each project is assigned a unique identifier and includes project identification information and project attribute information. The project attribute information includes: project name, category, tags, description information, and information representing the characteristics of the project content. Building a collaborative knowledge graph includes: for project nodes Associate with the knowledge graph entity identifier that is the same as the project identifier, and determine the entity node corresponding to the project node in the knowledge graph; Step 2: Based on the collaborative knowledge graph, construct an interest representation channel to obtain interest embedding, construct a project popularity representation channel to obtain project popularity embedding, and construct a user conformity representation channel to obtain user conformity embedding; Step 3: Construct monitoring signals for project popularity and user conformity, and use these monitoring signals to supervise and constrain the embedding of project popularity and user conformity, thereby obtaining the overall orthogonal loss; Step 4: For users A collection of historical interactive projects: , Obtain the corresponding project interest embedding, calculate the interest center based on the project interest embedding, calculate the user's interest concentration through the interest center, and input the interest concentration into the gating network to obtain [ ], Indicates the weight of the interest channel. Indicates the channel weight of project popularity. The sum of the three factors is 1. The interest matching score, project popularity score, and user conformity score are calculated separately and combined with the interest channel weight, project popularity channel weight, and user conformity channel weight to obtain the observation effect score. The BPR loss is obtained based on the observation effect score. Step 5: Construct a joint loss function based on BPR loss and overall orthogonal loss; Step 6: Based on interest matching score, project popularity score, user conformity score, interest channel weight, project popularity channel weight, and user conformity channel weight, the counterfactual inference method is used to eliminate the influence of project popularity bias and user conformity bias in user interests to obtain the final recommendation score; Step 7: Based on the final recommendation score obtained in Step 6, sort the scores from highest to lowest and select the highest-scoring candidate. The selected projects will be the final recommendations.
2. The long-tail recommendation method based on three-channel representation decoupling and counterfactual inference according to claim 1, characterized in that, The construction of the three-channel decoupling characterization includes: Construct interest representation channels and build an initial interest embedding matrix. The formula is: in, Represents the real number field. Let E represent the dimension of interest representation, and E be the set of entities in the knowledge graph. Collaborative Knowledge Graph , This represents the set of nodes in a collaborative knowledge graph. Represents the connection relationship between nodes, based on The node connection relationships in the graph construct the sparse graph structure matrix. ; Based on graph neural networks in collaborative knowledge graphs The interest embedding of a node is obtained by performing multi-level message passing, and the formula is as follows: in, Represents a node Interest embedding obtained after propagation in the l-th layer of the graph neural network (∙) is the activation function. This represents the connection weight between node h and its neighbor node t. Representing neighboring nodes In the Layer interest embedding; and Let each represent a set of trainable parameter matrices. The interest embeddings are concatenated by linking the first and last nodes together to obtain the final interest embedding. The user interest embeddings are then segmented according to node type. Embedding project interests ; Construct a project popularity representation channel and randomly initialize the project popularity embedding matrix, using the following formula: in, This indicates the embedded dimension of project popularity. The popularity embedding matrix is a matrix where each row corresponds to the initial popularity embedding of a project. The popularity embedding matrix is then subjected to a non-linear transformation, as shown in the formula: in, Perform feature transformation on a nonlinear transform mapping network. Embedded to project popularity; Construct user conformity representation channels and initialize the user conformity embedding matrix using the following formula: in, This indicates the user's conformity embedding dimension. Embedded by users following the crowd.
3. The long-tail recommendation method based on three-channel representation decoupling and counterfactual inference according to claim 2, characterized in that, Step 3 includes: Embed the project's popularity Input the data into the project popularity predictor to obtain predicted values of the project's statistical characteristics. Embedding users into the herd Input into the user crowd forecaster to obtain the predicted value of average user interaction activity. ; For each project Based on user-project interaction data and project interaction frequency And based on the knowledge graph data, the degree of knowledge graph connectivity of the corresponding entities of the project is statistically analyzed. , and Used as a supervisory signal for project popularity embedding, enabling project popularity embedding to learn project popularity information represented by project interaction frequency and project knowledge graph connectivity. Project popularity monitoring losses The mean squared error is used to calculate the difference between the predicted value and the true statistical characteristics. The formula is as follows: Based on historical user interaction data, the average activity level of user interactions is statistically analyzed to obtain user herd supervision signals. Embedding users into the herd Input into the user crowd forecaster to obtain the predicted value of average user interaction activity. And based on the predicted value and The differences between them allow users to monitor the loss. User herd oversight leads to losses Using the average error, the formula is: The orthogonality constraint between user interest embeddings and user conformity embeddings is given by the following formula: in, The orthogonal constraint loss between interest-based user embedding and user conformity embedding; The project interest embedding and project popularity embedding are orthogonally constrained, and the formula is as follows: in, The orthogonal constraint loss between project interest embedding and project popularity embedding; The overall orthogonal loss is obtained by formulating: in, This represents the overall orthogonal loss.
4. The long-tail recommendation method based on three-channel representation decoupling and counterfactual inference according to claim 3, characterized in that, Step 4 includes: The formula for calculating the center of interest is: Through interest centers Calculate the concentration of user interests The formula is: Calculate interest matching score The formula is: The project popularity score is calculated by summing the data across various dimensions. The formula is: in, The first embedding vector represents the first embedding vector. Elements of each dimension; The sum of user conformity embeddings across various dimensions is used as the user conformity score. The formula is: The formula for calculating the observed effect score is: Calculate BPR loss based on observed effect score. The formula is: in, Represents the training sample set, Represents the natural logarithm function. This represents the Sigmoid function. This represents negative sample items where no user interaction occurred. Indicates user For the project The observed effect score.
5. The long-tail recommendation method based on three-channel representation decoupling and counterfactual inference according to claim 4, characterized in that, Step 5 includes: constructing the joint loss function The formula is: in, This is the learning loss for knowledge graphs, used to learn the semantic representations of entities and relations; To predict the supervised loss function, , These are the loss weight parameters; in, The supervised loss is used to predict project popularity and is used to supervise the learning of project popularity embeddings. To predict and monitor losses based on user herd mentality; The loss is due to orthogonal constraints. For regularization loss, These are the loss weight parameters.
6. The long-tail recommendation method based on three-channel representation decoupling and counterfactual inference according to claim 5, characterized in that, The counterfactual inference formula in step 6 is: in, Indicates user With the project The final recommendation rating, after being corrected for counterfactual bias, retains only the user's genuine interest in the project. To represent a user's complete interest matching score, This indicates the score corresponding to the deviation in project popularity. This indicates the rating corresponding to user conformity bias. For counterfactual intervention parameters.
