A location-aware collaborative recommendation method and device

Through the position-aware collaborative recommendation method, Graph Transformer and node position coding technology are used to solve the problem of insufficient global collaborative signal capture capabilities of the graph recommendation model, and improve the generalization performance and recommendation effect of the model.

CN118656550BActive Publication Date: 2024-11-22DATA SPACE RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411124053.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-22
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The graph recommendation model lacks the ability to capture global collaborative signals, resulting in induction deviation problems, which are difficult to effectively alleviate, and lacks node location information, making it difficult to mine reliable global information.

Method used

The position-aware collaborative recommendation method is adopted. By obtaining the location encoding of the user and the item node, it is converted into node embedding, and injecting it into Graph Transformer, local interactive signals and global collaboration signals are captured, and node representation is generated after fusing, which is used for user recommendation.

Benefits of technology

Effectively alleviate the inductive deviation problem of graph recommendation model, improve the model's ability to capture global node relationships, enhance generalization effect, and improve recommendation performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656550B_ABST
    Figure CN118656550B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for location-aware collaborative recommendation, which includes: obtaining the position codes of user and item nodes, converting the dimensions of the position codes of user and item nodes into node embedding dimensions and injecting them into the initial embedding of nodes; feeding the nodes after the position codes are embedded into each Transformer layer of Graph Transformer for calculation, respectively obtaining the local interaction signal and the global collaboration signal of the target node; fusing the local interaction signal and the global collaboration signal and outputting them to obtain the node representations of each layer of Graph Transformer; inputting the L-layer representation of the node into the readout function to obtain the final representation of the node, and obtaining the target recommendation of the user. The present invention utilizes Graph Transformer technology to alleviate the inductive bias limitations faced by graph recommendation methods. The node position coding technology is used to effectively improve the modeling ability of the attention calculation module for node relationships, enhance the model's ability to capture global node relationships, thereby alleviating the inductive bias problem of the graph model and improving the generalization effect of the graph neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of recommendation systems, and more specifically to a location-aware collaborative recommendation method and device. Background Art

[0002] Recommender systems have gained increasing importance in various real-world applications as an indispensable tool that helps users explore and discover items of interest. Recently, graph recommendation models have attracted widespread attention in the field of recommendation systems because they can capture the complex interactions between users and items. By leveraging the modeling capabilities of graph neural networks, these methods generally surpass traditional recommendation techniques. Although graph recommendation models have achieved advanced performance, they still have an important flaw: they rely too much on local neighbor aggregation techniques and suffer from serious inductive bias problems. They are insufficient in capturing global collaborative signals, resulting in weak model generalization performance. Although graph recommendation models can capture long-range / global collaborative signals through multiple rounds of neighbor aggregation, they face the problems of over-smoothing and over-squashing, resulting in suboptimal node representation.

[0003] Currently, many technologies are dedicated to solving the problem of local information limitation faced by graph recommendation models. One type of method is based on enhanced interaction graph training to additionally explore and learn user preferences. The EGLN method implements this idea by capturing potential interactions using trained user and item representations, augmenting the original interaction graph, and then retraining the graph recommendation model. Furthermore, in order to capture more implicit relationships between nodes, GraphDA also constructs connections between users and users and between items and items, exploring more possible interactions. Another type of method implicitly utilizes more data based on self-supervised learning graph models, which can achieve exploration and utilization of potential interactions. The GFormer method proposes a generative self-supervised learning automatic data enhancement to extract informative user-item interaction patterns, and achieves selective enhancement of data in a parameterized manner, retaining globally perceived user-item relationships, helping to alleviate the inductive bias problem faced by graph recommendation models.

[0004] Existing technologies aim to expand the learning capabilities of graph recommendation models by enhancing interaction graphs, or to enhance the generalization performance of models by implicitly encoding global information into the representation of user and item nodes. These methods are unable to learn relationships between node pairs one by one, and lack node position information, making it difficult to mine reliable global information. Therefore, it is difficult to effectively alleviate the inductive bias problem of graph recommendation models. Summary of the invention

[0005] In this embodiment, a location-aware collaborative recommendation method and device are provided to solve the problems in the related art that the relationship between node pairs cannot be learned one by one, node location information is lacking, reliable global information is difficult to mine, and the inductive bias of the graph recommendation model is difficult to effectively alleviate.

[0006] In a first aspect, an embodiment of the present invention provides a location-aware collaborative recommendation method, which obtains user and item node position codes, converts the user and item node position code dimensions into node embedding dimensions and injects them into node initial embeddings;

[0007] Feed the node after position encoding embedding to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and global collaboration signal of the target node respectively;

[0008] The local interaction signal and the global collaboration signal are fused and outputted to obtain the node representations of each layer of the Graph Transformer;

[0009] The L-layer representation of the node is input into the readout function to obtain the final representation of the node. The inner product of the final representation vectors of the user and item nodes is calculated and the items are sorted to obtain the user's target recommendation.

[0010] In an optional embodiment, the user and item node position coding is one of spectrum coding, degree coding, PageRank coding and type coding.

[0011] In an optional embodiment, the Graph Transformer includes L Transformer layers, each of which has a graph convolution module and a NodeFormer convolution module, the graph convolution module is used to capture local interaction signals of the target node, and the NodeFormer convolution module is used to capture global collaboration signals of the target node.

[0012] In an optional embodiment, the node after the position encoding is embedded is fed to each Transformer layer of GraphTransformer for calculation, and the local interaction signal and the global collaboration signal of the target node are obtained respectively, including:

[0013] Feed the node to Graph Transformer;

[0014] The local interaction signal is captured by the graph convolution module, and the global collaboration signal is captured by the NodeFormer convolution module.

[0015] In an optional embodiment, the node representations of each layer of the Graph Transformer obtained by fusing and outputting the local interaction signal and the global collaboration signal include:

[0016] The local interaction signal and the global collaboration signal are fused and outputted according to a certain fusion ratio to obtain a target node representation of the current Transformer layer;

[0017] After calculation by the graph convolution module and the Nodeformer convolution module of L Transformer layers, the node representation of each layer is obtained.

[0018] In an optional embodiment, the L-layer representation of the node is input into the readout function to obtain the final representation of the node, and the inner product of the final representation vectors of the user and item nodes is calculated and the items are sorted to obtain the target recommendation for the user, which includes:

[0019] The inner product of the final representation vector of the user and item nodes is calculated to obtain several values ​​with the highest inner product results;

[0020] Get target recommendations for users.

[0021] In an optional embodiment, the readout function may be replaced by an arbitrary graph recommendation model.

[0022] Compared with the prior art, the location-aware collaborative recommendation method of the present invention has the following beneficial effects:

[0023] The present invention uses Graph Transformer technology to alleviate the inductive bias limitations faced by graph recommendation methods. The node position encoding technology is used to effectively improve the attention calculation module's ability to model node relationships, enhance the model's ability to capture global node relationships, and thus alleviate the inductive bias problem of the graph model and improve the generalization effect of the graph neural network.

[0024] In a second aspect, the present invention provides a location-aware collaborative recommendation device, comprising:

[0025] A preprocessing injection module, used to obtain user and item node position codes, convert the user and item node position code dimensions into node embedding dimensions and inject them into the node initial embedding;

[0026] A node calculation module, used to feed the node after position encoding is embedded to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and the global collaboration signal of the target node respectively;

[0027] A node updating module, used for fusing and outputting the local interaction signal and the global collaboration signal to obtain node representations of each layer of the Graph Transformer;

[0028] The recommendation output module is used to input the L-layer representation of the node into the readout function to obtain the final representation of the node, calculate the inner product of the final representation vector of the user and item nodes and sort the items to obtain the user's target recommendation.

[0029] In a third aspect, the present invention provides an electronic device comprising a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory communicate with each other via the bus, and the processor can call logic instructions in the memory to execute the steps of the method provided in the first aspect.

[0030] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the location-aware collaborative recommendation method as described in the first aspect.

[0031] Compared with the prior art, the beneficial effects of the location-aware collaborative recommendation device, electronic device, and storage medium of the present invention are the same as those of the location-aware collaborative recommendation method described in the first aspect, so they will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 is a flow chart of a location-aware collaborative recommendation method according to an embodiment of the present invention;

[0034] Figure 2 Schematic diagram of the overall framework of PGTR in an embodiment of the present invention;

[0035] Figure 3 This is a performance comparison diagram of PGTR at different sparsity levels in an embodiment of the present invention;

[0036] Figure 4 This is a performance comparison diagram of PGTR under different noise levels in an embodiment of the present invention;

[0037] Figure 5 This is a performance comparison diagram under different position encodings in an embodiment of the present invention;

[0038] Figure 6is a structural block diagram of a location-aware collaborative recommendation device in an embodiment of the present invention;

[0039] Figure 7 1 is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0041] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0042] In an embodiment of the present invention, a position-aware collaborative recommendation method (Position-aware Graph Transformer for Recommendation, PGTR) is provided. It is a position-aware Graph Transformer recommendation method that applies Graph Transformer technology to collaborative recommendation scenarios to model the relationship between users and items and capture global collaborative signals. The core of the PGTR method is to design node position encodings for characterizing and learning the relationship between users and items. Specifically, the four interactive characteristics of users and items in the recommendation scenario are carefully considered, and four corresponding node position encodings are constructed accordingly. The use of these encodings can effectively capture and learn the relationship between users and items, and explore more complete user preferences.

[0043] According to the problem definition, coding design and the proposed PGTR method in the present invention, it can be understood at another level that a PGTR model is constructed. The PGTR model needs to be explained in combination with specific position coding, problem definition and coding design.

[0044] First, we introduce the basic symbols that need to be used. Represents the dataset The user-item interaction matrix constructed in and Represent the number of users and items respectively. and Represent the user set and item set respectively. Each item in is a binary value, 0 or 1, indicating whether the user has interacted with the item. Create a user-item bipartite graph ,in It is composed of a collection of user nodes and item nodes, and represents a set of edges. If , then there is an edge between the user and the item. Denotes the first-order neighbor items (users). Degree( ) is the degree of the node in the graph. is the adjacency matrix. Given the user-item interaction records, the present invention aims to predict the K items that the user may interact with. Therefore, given or In the case of f (PGTR model), to achieve each user in the item set Effective prediction of potential interactions in .

[0045] Figure 1is a flow chart of the location-aware collaborative recommendation method of the present invention. Figure 1 As shown, the process includes the following steps:

[0046] S100, obtaining user and item node position codes, converting the user and item node position code dimensions into node embedding dimensions and injecting them into the node initial embedding;

[0047] In this embodiment, four types of position encoding are used as examples, and the position encoding is one of spectrum encoding, degree encoding, PageRank encoding and type encoding. The details are described below. By converting the position encoding dimension into the node embedding dimension and injecting it into the initial node embedding, position recognition and perception are achieved in the node representation. Specifically, for a given node (user or item) have:

[0048] ,

[0049] in, Is a node The initial embedding representation of Control the strength of location information and Is a node Positional representation of

[0050] Specifically, the node The position is characterized as follows:

[0051] ,

[0052] In the formula, and To learn parameters for different transformations between objects and users, and is a learnable transformation matrix; it transforms the corresponding position encoding dimension into the node embedding dimension; It is a specific location code used to represent the node location information from different angles.

[0053] S200, feeding the node after the position code is embedded to each Transformer layer of Graph Transformer for calculation, and obtaining the local interaction signal and the global collaboration signal of the target node respectively;

[0054] First of all, it should be noted that Graph Transformer includes L Transformer layers, each of which has a graph convolution module and a NodeFormer convolution module. The graph convolution module is used to capture the local interaction signals of the target nodes, and the NodeFormer convolution module is used to capture the global collaboration signals of the target nodes.

[0055] Specifically, the node after position encoding embedding is fed to each Transformer layer of Graph Transformer for calculation, and the local interaction signal and global collaboration signal of the target node are obtained respectively, including:

[0056] Feed the node to Graph Transformer;

[0057] The local interaction signals are captured through the graph convolution module, and the global collaboration signals are captured through the NodeFormer convolution module.

[0058] For example, in any ( Transformer layer, the nodes The input representation It is fed into the graph convolution module (the single graph convolution operation process of Graph Transformer) and the Nodeformer convolution module (the Transformer operation process applied to GraphTransformer) to realize the target node Capturing local interaction signals and global collaboration signals. Specifically, there are the following steps:

[0059] ,

[0060] in, and They are the combination function and aggregation function in the graph convolution module, which can be implemented in many ways and can be directly implemented by any traditional graph recommendation model.

[0061] In this step, the target node is Complete the capture of local interaction signals and accurately describe the local interaction mode of the target node. The global collaboration signal is used to model the potential global interaction mode of the target node. The Nodeformer convolution module is used for calculation. The specific implementation method is defined as follows:

[0062] ,

[0063] in, This means that the position information is reinjected into the output representation of the graph convolution module, and the injection strength is also controlled. is a low-dimensional feature mapping function with random transformations. For any input ,have:

[0064] ,

[0065] , is the h-dimensional unit matrix.

[0066] S300, fusing and outputting the local interaction signal and the global collaboration signal to obtain node representations of each layer of GraphTransformer;

[0067] Furthermore, the local interaction signal and the global collaboration signal are fused and outputted to obtain the node representations of each layer of GraphTransformer, including:

[0068] The local interaction signal and the global collaboration signal are fused and outputted according to a certain fusion ratio to obtain a target node representation of the current Transformer layer;

[0069] After calculation by the graph convolution module and the Nodeformer convolution module of L Transformer layers, the node representation of each layer is obtained.

[0070] Finally, by merging the nodes The local interaction signal and global collaboration signal can be output to obtain the current ( The target node j of the Transformer layer is represented by:

[0071] ,

[0072] in Control the mixing ratio between local interaction signals and global collaboration signals. After L Tansformer layers of graph convolution modules and Nodeformer convolution modules, the PGTR method obtains the final node representation.

[0073] S400, inputting the L-layer representation of the node into the readout function to obtain the final representation of the node, calculating the inner product of the final representation vectors of the user and item nodes and sorting the items to obtain the user's target recommendation.

[0074] Specifically, the L-layer representation of the node is input into the readout function to obtain the final representation of the node, and the inner product of the final representation vector of the user and item nodes is calculated and the items are sorted to obtain the target recommendation for the user, including:

[0075] The inner product of the final representation vector of the user and item nodes is calculated to obtain several values ​​with the highest inner product results;

[0076] Get target recommendations for users.

[0077] It should be noted that the readout function can be replaced by any graph recommendation model.

[0078] It should be further explained that the final node representation is:

[0079] .

[0080] in, To characterize the readout function, the readout function of any graph recommendation model can also be used for implementation. The final node representation is input into the readout function. The role of the readout function is to convert the node-level features into a feature representation of the entire graph or subgraph. In a recommendation system, this usually means converting the representation of user nodes and item nodes into a form that can be used to predict user preferences for items.

[0081] The representation vectors of users and items are usually multi-dimensional real vectors, which can be regarded as points in a high-dimensional space. The inner product (also called dot product) calculation is a type of vector operation that can measure the direction and length of two vectors. By obtaining the inner product values ​​of all items for the user, these inner product values ​​can be sorted. The purpose of sorting is usually to find the top N items that the user may be most interested in, that is, those with the largest inner product values. This process can be simply achieved by selecting the highest few values ​​in the inner product results.

[0082] The present invention designs a total of four position encoding schemes to characterize the position of the node in the graph network from different angles, namely spectral encoding, degree encoding, PageRank encoding and type encoding. The encoding design is combined with the problem definition, and combined with the above-mentioned PGTR method, a PGTR model is essentially constructed. Specifically, to construct the PGTR model, the problem definition is first determined, such as constructing a user-item interaction matrix, defining user and item sets, and interaction relationships; creating a user-item bipartite graph, in which nodes include users and items, and edges represent interaction relationships; the goal is to predict K items that the user may interact with after given the user-item interaction records.

[0083] The second is position coding design. Four position coding schemes are designed, including spectral coding, degree coding, PageRank coding and type coding, to characterize the position of nodes in the graph network from different perspectives. Among them, spectral coding is based on Laplace eigenvectors and is used to encode the relative position information between nodes. Degree coding is based on the popularity of items and the activity of users, reflecting the quality of items and user behavior patterns. PageRank coding is based on PageRank values, reflecting the importance and influence of nodes in the graph. Type coding distinguishes different attributes and relationship patterns between users and items.

[0084] Then, we build the overall framework of PGTR, and combine it with the above-mentioned location-aware collaborative recommendation method to obtain the final node representation through the location-aware collaborative recommendation method to complete the construction of the overall framework of PGTR;

[0085] It should be noted that the PGTR model is finally trained by sampling Softmax (SSM) loss, namely:

[0086] ,

[0087] in , and They are user node representations and item node representation The normalized representation of is the temperature coefficient, is the negative sample of user 𝑢. Here, we use the intra-batch negative sampling technique to take the positive samples of other users in the same training sample batch as negative samples to facilitate parallel calculation. By optimizing the above formula, we can complete the training of PGTR.

[0088] The four position encoding schemes are introduced one by one below.

[0089] The first is spectral coding. In graph learning related tasks, Laplace position coding is usually used in the graph spectral domain. This position coding can encode the relative position information between nodes, and adjacent nodes will have similar encodings. The present invention uses this method to encode the position information of each user and item in the user-item interaction graph. Specifically, for the interaction adjacency matrix , pre-compute its Laplace eigenvector.

[0090] ,

[0091] in, yes The degree matrix of is the identity matrix, and are eigenvalues ​​and eigenvectors respectively. Usually, The eigenvector of the smallest non-trivial eigenvalue is used as the Laplace positional encoding. Get Laplace position code ,in and Represent the Laplace position encoding of users and items respectively.

[0092] In actual recommendation scenarios, it is of great significance to establish user-user and item-item relationships. Therefore, the present invention encodes the location information of each user and item on the user-side and item-side interaction graphs respectively. Specifically, the present invention constructs the user-side adjacency matrix and the item-side adjacency matrix , where the elements are 0 or 1, indicating The existence or non-existence of the second-order connection relationship in . So we have:

[0093]

[0094] Likewise, the present invention selects The eigenvectors corresponding to the smallest non-trivial eigenvalues ​​are used as the Laplace position encodings of the user and item on their respective interaction graphs (user side and item side). Obtained ,from Obtained . Further, there are Finally, the present invention combines and Create a spectral encoding, namely:

[0095] ,

[0096] in, is a hyperparameter that controls the ratio of different Laplace position encodings, Each user (item) can be identified by its spectral encoding on the user-item interaction graph and the user-side interaction graph (item-side interaction graph), respectively, which helps the model understand the relationship between users and items more clearly.

[0097] The second is degree coding. In the recommendation system, the popularity of items and the activity of users are important indicators that reflect the quality of items and user behavior patterns. From the perspective of items, when two items have similar popularity, they tend to appear in similar contexts or scenarios, such as in similar recommendation lists, purchase histories, or social circles. For another example, some users have been attracted to popular songs, while other users pay attention to niche or little-known music. Therefore, items with similar popularity are more likely to show connections in user behavior data. From the user's perspective, when two users have similar activity, it means that they show similar behavior patterns and engagement on the platform. For example, based on similar preferences, they may jointly discover and explore similar items, or follow each other on social networks. Based on this, the present invention designs degree coding for each user and item.

[0098] Specifically, for each item There is an associated popularity , so we have:

[0099] ,

[0100] The present invention sorts the items in ascending order of their popularity and divides them evenly into groups. For item 𝑖, the degree encoding is:

[0101] ,

[0102] in, is the item's degree grouping encoder, is the group to which item 𝑖 belongs. Finally, we obtain the degree encoding of all items, expressed as , is the encoding dimension.

[0103] Similarly, for users, each user All have corresponding activity Degree , as well as ;

[0104] The present invention sorts users in ascending order of user activity and evenly divides them into group. The degree encoding of user 𝑢 is:

[0105]

[0106] in is the user's degree grouping encoder, is the group to which user 𝑢 belongs. We can further obtain the degree encoding of all users .

[0107] It should be noted that this encoding is not completely effective for items (users) in key positions within a group, because there are some items (users) with similar popularity (activity) that are in different groups. But in general, the model improves To make the degree encoding work.

[0108] The third is PageRank encoding, which can be used to describe the importance or influence of items and users on the interaction graph. The PageRank value of an item (or user) is not only related to its own degree, but also depends on the importance of its neighbors in the graph. When two items have similar PageRank values, it means that they are similarly liked by users. If a user likes one of the items, then they are likely to like the other item as well. On the other hand, when the PageRank values ​​of two items are significantly different, liking one does not mean liking the other. For users, when two users have similar PageRank values, their interaction patterns are often similar. For this reason, the present invention proposes PageRank encoding.

[0109] The present invention pre-calculates all users and items in the interaction graph Then, each item 𝑖 has a PageRank value , further we can have:

[0110] ;

[0111] The present invention sorts the items in ascending order according to their PageRank values, and then divides the items evenly into 𝑁𝑟 groups. For item 𝑖, its PageRank position is encoded as:

[0112] ,

[0113] in is the item PageRank grouping encoder, is the group to which item 𝑖 belongs. You can get the PageRank position encoding of all items , is the encoding dimension. Similar to degree encoding, from the user's perspective, the present invention can also obtain the PageRank position encoding corresponding to all users , I will not go into details here.

[0114] Encoding by grouping faces similar challenges as degree encoding. However, by adjusting the number of groups, the present invention can also achieve its effectiveness in building relationships between users and items. For simplicity, the present invention sets the number of groups for both items and users to 𝑁𝑟.

[0115] The fourth is type coding. In the recommendation system, users and items have different relationship patterns and attributes. For example, the items displayed on a website or application (such as organized and sorted by type or popularity) are different from the user's interaction method (such as random clicks). By distinguishing the node types in the graph, the interaction and connection between users and items can be better understood. To this end, the present invention proposes type coding based on node types.

[0116] In this scheme, type position codes are assigned to item groups and user groups respectively. All items share the same type position code, and so do all users, that is:

[0117] ,

[0118] in is the node type encoder. The present invention can obtain the type position encoding of all items and users, which are respectively expressed as and is the encoding dimension.

[0119] In general, the four position codes proposed in the present invention consider the relationship between users and items from different perspectives, so that the model can capture and model various relationships. Input in the above formula, the PGTR model can learn and represent relevant information.

[0120] The present invention proposes to use a graph recommendation model to learn local interaction information, and the node representation after fusion of position encoding and local feature encoding is sent to the Transformer module to capture reliable node relationships and aggregate global node information, and then use local-global collaborative aggregation technology to effectively alleviate the inductive bias problem of the graph recommendation model. The present invention has demonstrated through extensive experiments on multiple real-world data sets that the proposed method has significant effects in alleviating the inductive bias problem and improving the generalization ability of the graph recommendation model. The statistical information of the data set is shown in Table 1. In order to simulate different degrees of sparsity, the present invention divides the data set into 20% / 40% / 60% / 80% as a training set. In the training set, 20% is used as a validation set for adjusting hyperparameters. The remaining 80% / 60% / 40% / 20% is regarded as a test set. In the model evaluation stage, the present invention uses the All-ranking Protocol to evaluate the top-K recommendation performance. For each user in the test set, all items that have not been interacted with in the training set will be used as candidate items, and all items that have been actually interacted with will be recorded as positive samples. The present invention uses the evaluation indicators Recall@20 and NDCG@20 to illustrate the beneficial effects of the proposed method. Next, the beneficial effects of the proposed method will be introduced from the perspectives of prediction accuracy, generalization and robustness, and method rationality.

[0121] Table 1: Dataset statistics

[0122]

[0123] First, the overall performance comparison:

[0124] Table 2 shows the overall performance of the proposed method and all baselines. The following observations are made from the results. First, LightGCN generally outperforms NGCF, but is weaker than NGCF on the Amazon-elec and Douban-book datasets. This may be because these two datasets have more complex node interactions, and the NGCF architecture is easier to model and capture. On the remaining datasets, LightGCN and UltraGCN achieved effective improvements. UltraGCN approximates infinite layers of graph convolution during training and uses the item-item relationship matrix to enhance collaborative signals, which enables it to achieve the best performance on multiple datasets. Secondly, it can be observed that SGL is trained based on the LightGCN architecture using self-supervised learning, and its performance exceeds LightGCN on Amazon-elec, Douban-book, and LastFM, verifying the superiority of self-supervised learning. EGLN and GFormer are also based on self-supervised learning. Although they claim to utilize global collaborative signals, they still have the problem of weak construction of global relationships in extremely sparse scenarios. This shows that it is necessary to propose a practical node relationship knowledge guidance model to capture collaborative signals in this case. Finally, the proposed method achieves significant performance improvements over various benchmark models. On the one hand, this is because the proposed method can guide the model learning process by incorporating prior knowledge of the relationship between users and items into the model. On the other hand, the Transformer architecture enables the model to achieve true global collaborative signal capture, overcoming the limitations of traditional graph recommendation models.

[0125] The second is generalization and robustness:

[0126] In order to evaluate the generalization of the present invention under different degrees of data sparsity, this section conducts model training on training data with different sparsities and tests model performance. Specifically, experiments are conducted on different training set ratios (20%, 40%, 60%, and 80% of the original data set are used for training, and the rest is used for testing) to simulate different degrees of sparsity. The comparison methods are LightGCN and GFormer. LightGCN is used to compare the backbone model of this method. GFormer is the latest technology. In order to capture global collaborative signals, it uses a technology that samples a set of anchor nodes as global information agents. Figure 3The performance results on the Douban-book and LastFM datasets are shown. It can be observed from the figure that under different sparsity levels, the proposed method is always better than LightGCN and GFormer. It can be considered that in the current sparse data situation, it is effective and necessary to use PGTR to explicitly model the relationship between users and items and capture global collaborative signals. PGTR can help improve the exploration and modeling of user preferences, thereby alleviating the inductive bias problem faced by graph recommendation models.

[0127] In order to demonstrate the robustness of the proposed method in the case of noisy data, this section randomly inserts different proportions (10%, 20%, 30%) of noise interactions into the training set. Here, noise interaction is defined as randomly sampling some items from the items that the user has not interacted with, and introducing them into the user's interaction history as a virtual interaction behavior. Since the item set is generally large, these noise interaction items are usually inconsistent with the items that the user is actually interested in. Figure 4 As shown, Figure 4 The performance comparison results are shown. Here, the relative performance index is used, that is, the performance without adding noise is set to 1, and the performance after adding noise is recorded according to the relative value. First, it can be observed that the performance of LightGCN on the two data sets (Amazon-elec and Douban-book) has dropped the most. This shows that the use of this fixed neighbor aggregation technology is sensitive to noise and leads to performance degradation, and it is necessary to improve the aggregation technology. Secondly, it can be observed that SGL and GFormer have a certain resistance to noise, which proves the robustness of self-supervised learning against noise. From the final results, it can be seen that the method of the present invention has the smallest performance drop on the two data sets, which shows that the proposed method has good noise recognition ability when processing interactive data. This is due to the fact that the present invention adopts node relationship design and uses Transformer architecture to capture the interaction between nodes, which can well identify noise interactions. Therefore, the PGTR method can integrate multiple location information to judge the authenticity of the interaction, which is the source of the advancement of the present invention.

[0128] Finally, the rationality of the method. In order to verify the rationality of the core design of the PGTR method proposed in the present invention, this section experimentally verifies the four types of positional encodings. Specifically, the four types of positional encodings and all positional encodings are removed from the PGTR model separately, and the performance after removal is tested, where "-PL" means removing spectral encoding, "-DG" means removing degree encoding, "-PR" means removing PageRank encoding, "-TP" means removing node type encoding, and "-All" means removing all positional encodings. The present invention demonstrates performance results on the Amazon-elec and Douban-book datasets, as shown in the figure. Figure 5As shown. Overall, it can be seen that after removing each position encoding separately, the recommendation performance has different degrees of decline. This means that each position encoding contributes to the PGTR model. In particular, when all position encodings are removed, the performance drops significantly, which fully demonstrates the importance of position encoding. Each position encoding contributes differently to the performance. This shows that they play different roles in building different aspects of user-item relationships. For example, on the Amazon-elec data, degree encoding is more obvious than the other three encodings, which shows that in this data, because users may see their sales and popularity when purchasing electronic products, there is a strong connection between products, which makes this information important. On the Douban-book dataset, PageRank encoding shows a strong effect. Since PageRank encoding indicates the importance of a node, it is not only composed of heat, but also shows the importance of neighbors. It can be seen that on the book review website, the user's interaction pattern may be affected by different important authors or characters, so it shows that this encoding has a strong effect. Different encodings have different effects on different data. This is essentially because the data sets are collected from platforms, and users on different platforms obviously have different interaction modes, and even the push modes of items are different. In general, the method proposed in this application uses four types of position encoding information to capture different user and item interaction relationships, and enhances the recommendation performance of the model in different scenarios.

[0129] Table 2: Overall performance comparison

[0130]

[0131] The present invention uses Graph Transformer technology to alleviate the inductive bias limitations faced by graph recommendation methods. The node position encoding technology is used to effectively improve the attention calculation module's ability to model node relationships, enhance the model's ability to capture global node relationships, and thus alleviate the inductive bias problem of the graph model and improve the generalization effect of the graph neural network.

[0132] The embodiment of the present invention also provides a location-aware collaborative recommendation device, which is used to implement the above method embodiment, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware or a combination of software and hardware is also possible and conceivable.

[0133] like Figure 6 As shown, Figure 6 : is a structural block diagram of a location-aware collaborative recommendation device in the present invention, the device comprising:

[0134] A preprocessing injection module, used to obtain user and item node position codes, convert the user and item node position code dimensions into node embedding dimensions and inject them into the node initial embedding;

[0135] A node calculation module, used to feed the node after position encoding is embedded to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and the global collaboration signal of the target node respectively;

[0136] A node updating module, used for fusing and outputting the local interaction signal and the global collaboration signal to obtain node representations of each layer of the Graph Transformer;

[0137] The recommendation output module is used to input the L-layer representation of the node into the readout function to obtain the final representation of the node, calculate the inner product of the final representation vector of the user and item nodes and sort the items to obtain the user's target recommendation.

[0138] Graph Transformer technology is used to alleviate the inductive bias limitations faced by graph recommendation methods. Node position encoding technology is used to effectively improve the attention calculation module's ability to model node relationships and enhance the model's ability to capture global node relationships, thereby alleviating the inductive bias problem of the graph model and improving the generalization effect of the graph neural network.

[0139] Figure 7 A structural block diagram of an electronic device provided by an embodiment of the present invention, such as Figure 7 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the following method:

[0140] Obtaining user and item node position codes, converting the user and item node position code dimensions into node embedding dimensions and injecting them into the node initial embedding;

[0141] Feed the node after position encoding embedding to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and global collaboration signal of the target node respectively;

[0142] The local interaction signal and the global collaboration signal are fused and outputted to obtain the node representations of each layer of the Graph Transformer;

[0143] The L-layer representation of the node is input into the readout function to obtain the final representation of the node. The inner product of the final representation vectors of the user and item nodes is calculated and the items are sorted to obtain the user's target recommendation.

[0144] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0145] An embodiment of the present invention further provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method provided in each of the above embodiments is implemented, for example, including:

[0146] Obtaining user and item node position codes, converting the user and item node position code dimensions into node embedding dimensions and injecting them into the node initial embedding;

[0147] Feed the node after position encoding embedding to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and global collaboration signal of the target node respectively;

[0148] The local interaction signal and the global collaboration signal are fused and outputted to obtain the node representations of each layer of the Graph Transformer;

[0149] The L-layer representation of the node is input into the readout function to obtain the final representation of the node. The inner product of the final representation vectors of the user and item nodes is calculated and the items are sorted to obtain the user's target recommendation.

[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A location-aware collaborative recommendation method, It is characterized in that The recommended methods include: Obtaining user and item node position codes, converting the user and item node position code dimensions into node embedding dimensions and injecting them into the node initial embedding; Feed the node after position encoding embedding to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and global collaboration signal of the target node respectively; The Graph Transformer includes L Transformer layers, each of which has a graph convolution module and a NodeFormer convolution module, wherein the graph convolution module is used to capture the local interaction signal of the target node, and the NodeFormer convolution module is used to capture the global collaboration signal of the target node; The local interaction signal and the global collaboration signal are fused and outputted to obtain the node representations of each layer of the Graph Transformer; After the local interaction signal and the global collaboration signal are fused and outputted, the node representations of each layer of the Graph Transformer are obtained, including: The local interaction signal and the global collaboration signal are fused and outputted according to a certain fusion ratio to obtain a target node representation of the current Transformer layer; After calculation by the graph convolution module and the Nodeformer convolution module of L Transformer layers, the node representation of each layer is obtained; The L-layer representation of the node is input into the readout function to obtain the final representation of the node. The inner product of the final representation vectors of the user and item nodes is calculated and the items are sorted to obtain the user's target recommendation.

2. The location-aware collaborative recommendation method according to claim 1, It is characterized in that The user and item node position coding is one of spectrum coding, degree coding, PageRank coding and type coding.

3. The location-aware collaborative recommendation method according to claim 1, It is characterized in that The node after position encoding embedding is fed to each Transformer layer of Graph Transformer for calculation, and the local interaction signal and global collaboration signal of the target node are obtained respectively, including: Feed the node to Graph Transformer; The local interaction signal is captured by the graph convolution module, and the global collaboration signal is captured by the NodeFormer convolution module.

4. The location-aware collaborative recommendation method according to claim 1, It is characterized in that The L-layer representation of the node is input into the readout function to obtain the final representation of the node. The inner product of the final representation vector of the user and item nodes is calculated and the items are sorted to obtain the target recommendation for the user, including: The inner product of the final representation vector of the user and item nodes is calculated to obtain several values ​​with the highest inner product results; Get target recommendations for users.

5. The location-aware collaborative recommendation method according to claim 4, It is characterized in that The readout function can be replaced by any graph recommendation model.

6. A location-aware collaborative recommendation device, It is characterized in that include: A preprocessing injection module, used to obtain user and item node position codes, convert the user and item node position code dimensions into node embedding dimensions and inject them into the node initial embedding; A node calculation module, used to feed the node after position encoding is embedded to each Transformer layer of Graph Transformer for calculation, and obtain the local interaction signal and the global collaboration signal of the target node respectively; the Graph Transformer includes L Transformer layers, each of which has a graph convolution module and a NodeFormer convolution module, the graph convolution module is used to capture the local interaction signal of the target node, and the NodeFormer convolution module is used to capture the global collaboration signal of the target node; A node updating module, used for fusing and outputting the local interaction signal and the global collaboration signal to obtain node representations of each layer of GraphTransformer; After the local interaction signal and the global collaboration signal are fused and outputted, the node representations of each layer of the Graph Transformer are obtained, including: The local interaction signal and the global collaboration signal are fused and outputted according to a certain fusion ratio to obtain a target node representation of the current Transformer layer; After calculation by the graph convolution module and the Nodeformer convolution module of L Transformer layers, the node representation of each layer is obtained; The recommendation output module is used to input the L-layer representation of the node into the readout function to obtain the final representation of the node, calculate the inner product of the final representation vector of the user and item nodes and sort the items to obtain the user's target recommendation.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the location-aware collaborative recommendation method according to any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the location-aware collaborative recommendation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Article recommendation method based on collaborative filtering

    CN110781409A

  • Information recommendation method, system and equipment based on graph neural network, and storage medium

    CN113468227A

  • Recommendation method based on combination of graph neural network and Transform and applied to intelligent recommendation system

    CN116561424A

  • Transform-based article-behavior cross-sequence recommendation method

    CN116644226A