A diversified item recommendation method and device based on graph contrastive learning
Patent Information
- Application Number
- CN202410322639.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-03-20
AI Technical Summary
进一步地,调研准确性和多样性之间存在明显的此消彼长的问题
[0063]通过使用随机高斯噪声来扰动编码器来改进图增强的方式,简化和改进了高斯噪声增强的视图,并融入多样化信息;通过从集合选择的角度优化目荐目标,设计了一种基于DPP似然的损失函数来平衡推荐准确性和多样性;通过联合优化对比学习损失和基于DPP似然损失,能够生成更加均匀且鲁棒的表征,进而计算目标用户最喜欢且更加多样化的物品推荐列表,能够提高用户对推荐结果的满意度,提升推荐效果。
Smart Images

Figure CN118364167B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of supervised recommendation, and more particularly to a method and apparatus for recommending diverse items using graph contrast learning. Background Technology
[0002] In recent years, an important component of Self-supervised Recommendation (SSR), Contrastive Learning (CL), has been able to effectively address the data sparsity problem by comparing the original data with the enhanced data representation, and has achieved remarkable results in the recommendation field.
[0003] However, graph contrastive learning (GCL) methods, which focus on improving accuracy, often favor recommending popular items, while less popular long-tail items rarely get a chance to be recommended. This leads to significant redundancy in the recommendation list, ultimately harming user satisfaction and company profits. Secondly, most current research on diverse recommendation methods focuses on post-processing, such as re-ranking the generated candidate recommendations. Furthermore, there is a clear trade-off between research accuracy and diversity.
[0004] Further research is needed to maximize the effectiveness of recommendation systems. Summary of the Invention
[0005] This application aims to at least partially address one of the technical problems in the related art.
[0006] Therefore, the first objective of this application is to propose a graph contrastive learning-based method for recommending diverse items, in order to compute a more diverse list of recommended items that the target user prefers.
[0007] The second objective of this application is to propose a diverse item recommendation device based on graph contrast learning.
[0008] The third objective of this application is to propose an electronic device.
[0009] To achieve the above objectives, a first aspect of this application proposes a method for recommending diverse items using graph contrast learning, comprising:
[0010] Random Gaussian noise is used to perturb the encoder, resulting in an enhanced view based on the original image.
[0011] Design a contrast paradigm between the original image and the enhanced view, and calculate the contrastive learning loss;
[0012] Based on the user and item representations obtained from contrastive learning, a positive semidefinite kernel matrix is constructed in the determinant point process DPP.
[0013] Based on the aforementioned positive semi-definite kernel matrix, an objective function based on DPP likelihood is designed from the perspective of set selection, and the loss based on DPP likelihood is calculated.
[0014] The contrastive learning loss and the DPP-based likelihood-based loss are jointly optimized to output a diverse list of target items. Optionally, the original graph can be represented by the following expression, including:
[0015] G = (U, I, R)
[0016] Among them U={u1,…u m} represents the set of user nodes, I = {i1, ..., i} n} represents the set of item nodes, and R represents the interaction records between the user and the items.
[0017] Optionally, the step of using random Gaussian noise to perturb the encoder to obtain an enhanced view based on the original image includes:
[0018] For a given user node i and its embedding representation vector in the original graph in The embedded representation vector corresponding to user node i after perturbation for:
[0019]
[0020] Where η is a constant used to measure the amplitude of the disturbance. By using a mean of 0 and a variance of The samples were obtained from a Gaussian distribution.
[0021] Optionally, designing the contrast paradigm between the original image and the enhanced view, and calculating the contrastive learning loss, includes:
[0022] Calculate the loss at the user level and loss at the level of items The user-level loss and loss at the level of items The expressions are as follows:
[0023]
[0024]
[0025] Among them, Z u ,z ′ u ,z v ′ Z represents the embedding representation vectors of user nodes in the graph before and after enhancement, respectively.i ,z i ′ ,z j ′ Let s(z, z) represent the embedding representation vectors of the item nodes in the graph before and after enhancement, respectively. ′ ) is the cosine similarity function, used to measure the similarity between two vectors, and τ is a hyperparameter representing temperature;
[0026] Based on user-level losses and loss at the level of items Calculate the final loss of the contrastive learning task. The expression is:
[0027]
[0028] Optionally, the step of constructing the positive semi-definite kernel matrix in the determinant point process DPP based on the user representation and item representation obtained from contrastive learning includes:
[0029] Based on the user and item representations obtained from contrastive learning, a similarity matrix between items and a user preference matrix for items are constructed respectively.
[0030] Based on the similarity matrix between the items and the user's preference matrix for the items, a positive semidefinite kernel matrix in DPP is calculated for each user.
[0031] Optionally, the step of calculating a positive semi-definite kernel matrix in DPP for each user based on the similarity matrix between the items and the user's preference matrix for the items includes:
[0032] Model the probability distribution on the power set of I based on a DPP representation of the set of item nodes I. For any set... A DPP can be defined by an N×N positive semidefinite kernel matrix L, with the following formula:
[0033]
[0034] Where det() represents the determinant of a matrix, L Y =[L i,j ] i,j∈Y This is obtained by using the row and column indices in L corresponding to the elements in Y. Taking item i and item j as examples, transforming the above equation yields:
[0035]
[0036] Among them, the equation Established, scalar Describes the user's predicted preferences for items, row vectors The standardized feature vectors representing item i and item j;
[0037] Based on the transformed equation, the positive semi-definite kernel matrix L corresponding to the user is obtained. u The formula is as follows:
[0038]
[0039] Where S = [S i,j ] i,j∈I This represents an N×N similarity matrix used to measure the similarity between items [S]. i,j ], S u The similarity matrix represents user u. This indicates the user's predicted preference for an item.
[0040] Optionally, the step of designing a DPP-based likelihood objective function from the perspective of set selection based on the positive semi-definite kernel matrix, and calculating the DPP-based likelihood loss, includes:
[0041] From the perspective of set selection, the item recommendation objective is defined. If the positive items interacted with by the user are considered as a distributed set of DPP (Distributed Product Probability), then the loss expression for DPP likelihood is:
[0042]
[0043] Where M represents the number of users, T u and Considered as a pair of positive and negative terms for user u, i.e., the observed positive term and the unobserved negative term, L u Let be the positive semi-definite kernel matrix constructed by user u.
[0044] Considering the calculation of the positive semidefinite kernel matrix L for each user u To reduce computational costs, we can divide the likelihood term in the DPP distributed set into a quality component and a diversity component. Then, the loss expression for the DPP likelihood can be rewritten as:
[0045]
[0046] The rewriting process takes into account user preferences for a particular item and the diversity weights between items.
[0047] Optionally, the joint optimization of the contrastive learning loss and the DPP-based likelihood-based loss outputs a target diversified item list, including:
[0048] The contrastive learning loss and the DPP-based likelihood loss are hyperparameterized to obtain a loss function for a joint learning mode with a trade-off hyperparameter, expressed as:
[0049]
[0050] Where α, λ, and θ are hyperparameters;
[0051] Select all interacted items as the user's positive itemset, and randomly sample the same number of negative items corresponding to the positive itemset from the items the user has not interacted with. Use Adam to optimize the joint loss.
[0052] Based on the optimized model, output the target diversified item list.
[0053] To achieve the above objectives, a second aspect of this application provides a diverse item recommendation device based on graph comparison learning, comprising:
[0054] An enhancement module is used to perturb the encoder with random Gaussian noise to obtain an enhanced view based on the original image.
[0055] The contrast loss calculation module is used to design the contrast paradigm between the original image and the enhanced view, and to calculate the contrast learning loss.
[0056] The positive semi-definite kernel matrix construction module is used to construct the positive semi-definite kernel matrix in the determinant point process DPP based on the user representation and item representation obtained by contrastive learning.
[0057] The DPP likelihood loss calculation module is used to design a DPP likelihood-based objective function from the perspective of set selection based on the semi-positive definite kernel matrix, and to calculate the DPP likelihood-based loss.
[0058] The output module is used to jointly optimize the contrastive learning loss and the DPP-based likelihood loss, and output a target diversified item list.
[0059] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0060] The memory stores computer-executed instructions;
[0061] The processor executes computer execution instructions stored in the memory to implement the method as described in any one of the first aspects above.
[0062] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:
[0063] By perturbing the encoder with random Gaussian noise, the graph augmentation method is improved, simplifying and refining the Gaussian noise-enhanced view and incorporating diverse information. A DPP-based likelihood-based loss function is designed to balance recommendation accuracy and diversity by optimizing the target recommendation from a set selection perspective. Joint optimization of the contrastive learning loss and the DPP-based likelihood-based loss generates a more uniform and robust representation, enabling the calculation of a more diverse and preferred item recommendation list for the target user. This improves user satisfaction with the recommendation results and enhances the recommendation performance.
[0064] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0065] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0066] Figure 1 This is a flowchart illustrating a method for recommending diverse items using graph comparison learning, according to an embodiment of this application.
[0067] Figure 2 This is a detailed framework diagram illustrating a diverse item recommendation method based on graph comparison learning according to an embodiment of this application;
[0068] Figure 3 These are the overall experimental results of this application and various representative methods as shown in the embodiments of this application;
[0069] Figure 4 These are ablation experiment results of this application and various representative methods, as shown in the embodiments of this application;
[0070] Figure 5 This is a block diagram illustrating a diverse item recommendation device based on graph comparison learning according to an embodiment of this application;
[0071] Figure 6 It is a block diagram of an electronic device. Detailed Implementation
[0072] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0073] With the advent of the information overload era, recommender systems, as an effective means of providing users with useful information from massive amounts of data, have received much attention and become irreplaceable. Traditional collaborative filtering (CF) methods predict items a user might like by modeling user-item interactions and then provide the user with a list of the highest-scoring items. Especially with the popularization and development of Generative Neural Networks (GNNs), most GNN-based CF models follow supervised learning methods, requiring a large amount of high-quality labeled data to train the model. However, recommender scenarios often face the problem of extremely sparse data. Recently, contrastive learning (CL) has attracted widespread attention from pioneers. Graph contrastive learning (GCL) has made significant progress in recommendation by comparing the interaction information of user and item representations in different augmented views.
[0074] While GCL-based recommendations have achieved significant results, further exploration is needed to maximize the utility of recommendation systems. Firstly, GCL methods focused on improving accuracy often favor popular items, while less popular long-tail items rarely get recommended. This leads to significant redundancy in the recommendation list, harming user satisfaction and enterprise profits. Most current research on diversity recommendation focuses on post-processing, specifically re-ranking the generated candidate recommendations. It's important to note that these two stages are independent, which often means that diversity information is interrupted throughout the recommendation process, resulting in suboptimal outcomes. Therefore, this application raises a meaningful question: how to incorporate diversity information into an end-to-end GCL model to maximize the performance of the recommendation system.
[0075] To investigate the aforementioned issues, this application conducted experiments with and without diverse information. The results show that accuracy is significantly sacrificed when recommendation results are diversified. In other words, the trade-off between accuracy and diversity is indeed present and quite challenging. This can lead to the inclusion of many less popular long-tail items in the recommendations, resulting in suboptimal recommendations. Therefore, to maximize user satisfaction with recommendations, recommendation models must consider the correlation between items and user preferences while ensuring diversity. Furthermore, the findings indicate that methods based on graph contrastive learning (GCL) to achieve a trade-off between recommendation accuracy and diversity have not yet been explored. This leads to the question: can graph contrastive learning be liberated from solely focusing on accuracy as a recommendation objective, and instead driven by both accuracy and diversity, while simultaneously striving for an ideal balance between the two?
[0076] To address the aforementioned issues, this application delves into the theoretical and experimental effectiveness of Gaussian Contrast Learning (GCL) for diversified recommendations, providing a novel perspective to demonstrate the advantages of GCL in balancing diversity and accuracy by injecting diverse signals. Based on these analyses, a GCL model for diversified recommendations, abbreviated as DivGCL, is proposed. On one hand, building upon SimGCL, DivGCL fully leverages contrastive learning loss and designs a simple yet novel graph-free augmented contrastive learning objective. Specifically, DivGCL maximizes the consistency between the original graph and its corresponding perturbation version, rather than two augmented views. Here, to achieve more accurate performance, the information-augmented perturbation version is obtained by applying Gaussian noise. On the other hand, to achieve a trade-off between diversity and accuracy, DivGCL fully utilizes the advantages of Deterministic Point Processes (DDP), designing a DDP-based likelihood loss to enhance the diversity of representations, and co-optimizing it with the improved contrastive learning objective to generate more uniform and robust representations for computing a more diverse list of recommended items favored by the target user.
[0077] The following describes in detail, with reference to the accompanying drawings, a method and apparatus for recommending diverse items using graph comparison learning, according to embodiments of this application.
[0078] Figure 1 This is a flowchart illustrating a diverse item recommendation method based on graph comparison learning according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0079] Step 101: Use random Gaussian noise to perturb the encoder to obtain an enhanced view based on the original image.
[0080] The original graph is represented by the following expressions, including:
[0081] G = (U, I, R)
[0082] Among them U={u1,…u m} represents the set of user nodes, I = {i1, ..., i} n} represents the set of item nodes, and R represents the interaction records between the user and the items.
[0083] To address the trade-off between accuracy and diversity in recommendations, this application aims to enhance the robustness of the representation while learning a uniform representation. Therefore, this patent improves the graph enhancement method by perturbing the encoder with random Gaussian noise to obtain a Gaussian noise-enhanced view, i.e., a Gaussian noise-perturbed view.
[0084] Specifically, by adding imperceptible perturbations within a certain range for representation-level data augmentation rather than graph structure-level augmentation, better performance can be achieved compared to recommendation models. Therefore, formally, for a given user node i and its embedding representation vector in the original graph... in The embedded representation vector corresponding to user node i after perturbation for:
[0085]
[0086] Where η is a small constant used to measure the magnitude of the disturbance. By using a mean of 0 and a variance of The samples were obtained from a Gaussian distribution.
[0087] Step 102: Design a contrast paradigm between the original image and the enhanced view, and calculate the contrastive learning loss.
[0088] It should be noted that current graph contrastive learning methods, represented by SimGCL, typically compare the node embeddings of two enhanced views, and do not directly involve the embedding of the main view (i.e., the original graph).
[0089] Considering the significant amount of information represented by the original main view, this application attempts to improve the performance of contrastive learning by introducing a main view embedding representation. Therefore, as Figure 2 As shown, based on the Gaussian noise perturbation view obtained in step 101, this application designs a contrast paradigm between the main view and the enhanced view to learn a more uniform and robust representation for subsequent recommendations.
[0090] Formally, at both the user and item levels, loss is based on contrastive learning. and They are described as follows:
[0091]
[0092]
[0093] Among them, Z u ,z ′ u ,z v ′ Z represents the embedding representation vectors of user nodes in the graph before and after enhancement, respectively. i ,z i ′ ,z j ′ Let s(z, z) represent the embedding representation vectors of the item nodes in the graph before and after enhancement, respectively. ′) is the cosine similarity function, used to measure the similarity between two vectors, and τ is a hyperparameter representing temperature.
[0094] Furthermore, based on the losses at the user level and loss at the level of items Calculate the final loss L for the contrastive learning task. cl The expression is:
[0095]
[0096] Understandably, through the final loss This is used to learn more uniform and robust representations for subsequent recommendations.
[0097] Step 103: Based on the user representation and item representation obtained from contrastive learning, construct the positive semidefinite kernel matrix in the determinant point process DPP.
[0098] Based on the user / item representations obtained through contrastive learning, this invention constructs two matrices: a similarity matrix between items and a user preference matrix for items. Then, based on these two matrices, a positive semi-definite kernel matrix is calculated for each user. Thus, this kernel matrix can uniformly model the relevance between users and items and the similarity between items, perfectly balancing the two objectives of accuracy and diversity.
[0099] In the embodiments of this application, such as Figure 2 As shown, based on the user representation and item representation obtained from contrastive learning, a similarity matrix between items and a user preference matrix for items are constructed respectively. Then, based on the similarity matrix between items and the user preference matrix for items, a positive semi-definite kernel matrix is calculated for each user. Thus, this kernel matrix can uniformly model the correlation between users and items and the similarity between items, and can perfectly balance the two objectives of accuracy and diversity.
[0100] Specifically, as a probabilistic model, DPP has a strong ability to capture negative correlations between items, and there are negative correlations between items.
[0101] Therefore, based on a DPP for the set of item nodes I, we model the probability distribution on the power set of I. The DPP is defined by an N×N positive semi-definite kernel matrix L. For any set... have:
[0102]
[0103] Where det() represents the determinant of a matrix, L Y =[L i,j ] i,j∈YThis is obtained by using the row and column indices in L corresponding to the elements in Y. Taking the two terms i and j as an example, transforming the above equation, we get:
[0104]
[0105] This means that if we consider the elements of L as a measure of the similarity between pairs of elements in I, then L j,i The larger the value, the lower the probability of i and j appearing together, which is exactly what this application aims to achieve. The repulsive correlation between item pairs is modeled, so... They prefer sets of items that are of higher quality and greater diversity. Furthermore, the equation... Established, scalar Describes the user's predicted preferences for items, row vectors A standardized representation of the characteristics of an item.
[0106] Specifically, based on the transformed equation, the positive semi-definite kernel matrix L corresponding to the user is obtained. u The formula is as follows:
[0107]
[0108] Where S = [S i,j ] i,j∈I This represents an N×N similarity matrix used to measure the similarity between items [S]. i,j ],S u The similarity matrix represents user u. This indicates the user's predicted preference for an item.
[0109] Ultimately, DPP achieves a perfect balance between accuracy and diversity by modeling quality and similarity as a unified model.
[0110] Step 104: Based on the positive semi-definite kernel matrix, design the objective function based on DPP likelihood from the perspective of set selection, and calculate the loss based on DPP likelihood.
[0111] In this step, based on the constructed kernel matrix, this application designs a DPP-likelihood-based objective function to learn the representations of users and items from the perspective of set selection. That is, it brings users closer to items they have interacted with (positive terms) while pushing away items they have not interacted with (negative terms). Moreover, according to the constructed kernel matrix, it can be found that this loss function simultaneously considers the user's preference for a certain item and the diversity factors among items.
[0112] Specifically, this application defines the item recommendation objective from the perspective of set selection, treating positively interacted items as a DPP distributed set. The loss expression for DPP likelihood is then:
[0113]
[0114] Where M represents the number of users, T u and It is considered as a positive-negative pair for user u, that is, the observed positive term and the unobserved negative term.
[0115] Considering the calculation of each user's personal core L u The computational cost is high. In this embodiment, the likelihood term in the DPP distributed set is further divided into a quality part and a diversity part. Then, the loss expression of the DPP likelihood can be rewritten as:
[0116]
[0117] The rewriting process takes into account user preferences for a particular item and the diversity factors among items.
[0118] Step 105: Jointly optimize the contrastive learning loss and the DPP-based likelihood loss, and output a list of diverse target items.
[0119] In this embodiment, the comparative learning loss and the DPP-based likelihood loss are jointly learned together with the hyperparameter α to generate a more uniform and robust representation for calculating a more diverse list of recommended items that the target user likes best.
[0120] Specifically, the expression for the loss function of the joint learning mode with trade-off hyperparameters is:
[0121]
[0122] Where α, λ, and θ are hyperparameters.
[0123] Understandably, in practice, all interacted items are selected as the user's positive itemset, i.e., T. u And randomly sample the same number of negative items from the items that the user has not interacted with, corresponding to the positive itemset. Then Adam is used to optimize the joint loss.
[0124] Ultimately, a more uniform and robust representation can be obtained, and a more diverse list of target-oriented items that are most favored by the target user can be output.
[0125] To verify the effectiveness of the graph contrastive learning-based diversified item recommendation method mentioned in the above embodiments, this application conducted comprehensive experiments on five widely used public datasets (Beauty, Douban-Book, Yelp, MovieLens-1M, Yelp, and Aminer) with different domains, densities, and sizes. The experiments used Recall@20 and NDCG@20 to evaluate accuracy, ILAD@20 and ILMD@20 to evaluate diversity, and Tradeoff@20 (T@20) to evaluate the performance of this application compared to other existing methods in balancing accuracy and diversity. The experiments verified the advantages of DivGCL over the six state-of-the-art methods, achieving significant performance improvements of up to 18.49%, 20.71%, and 23.47% in Recall@20, NDCG@20, and T@20 on the ML-1M dataset, respectively.
[0126] like Figure 3 As shown, through comparison with various representative methods (traditional methods MF-based, GNNs-based, and SSL-based, as well as the diversity-representing method DGRec), the proposed method outperforms other comparative methods in Recall@20 and NDCG@20. While it does not reach the optimal level in ILAD@20 and ILMD@20, its T@20 metric, which balances accuracy and diversity, is generally superior to the other comparative methods. This further verifies that the inherent challenge of the trade-off between accuracy and diversity addressed by this patent does indeed exist, and that this application has achieved initial success, providing novel ideas and directions for subsequent applications.
[0127] In addition, taking Douban-Book as an example, this application uses SimGCL as the basic coding model and conducts comprehensive ablation experiments to verify the necessity of each component in the method of this application.
[0128] Depend on Figure 4 The experimental results show that removing one or both components leads to performance degradation. Specifically, "-CL" (only CL) outperforms "-DPP" (only DPP), but both outperform the base model, at least in terms of accuracy. Furthermore, "-CL" outperforms DivGCL in terms of diversity, validating that the Gaussian noise-enhanced contrastive loss designed in this patent can learn a more uniform user / item representation, playing a crucial role in mitigating popularity bias. In addition, this demonstrates that the combined use of DPP likelihood loss and Gaussian noise in DivGCL is effective in graph collaborative filtering, and that the two complement each other, improving performance from different angles.
[0129] This application improves graph augmentation by perturbing the encoder with random Gaussian noise, simplifying and improving the Gaussian noise-enhanced view and incorporating diverse information. It optimizes the target recommendation from a set selection perspective and designs a DPP-based likelihood-based loss function to balance recommendation accuracy and diversity. By jointly optimizing the contrastive learning loss and the DPP-based likelihood-based loss, it generates a more uniform and robust representation, thereby calculating a more diverse and preferred item recommendation list for the target user. This improves user satisfaction with the recommendation results and enhances the recommendation performance.
[0130] Figure 5 This is a block diagram illustrating a diverse item recommendation device 10 based on graph comparison learning according to an embodiment of this application, comprising:
[0131] Enhancement module 100 is used to perturb the encoder with random Gaussian noise to obtain an enhanced view based on the original image;
[0132] The contrast loss calculation module 200 is used to design the contrast paradigm between the original image and the enhanced view, and to calculate the contrast learning loss.
[0133] The positive semi-definite kernel matrix construction module 300 is used to construct the positive semi-definite kernel matrix in the determinant point process DPP based on the user representation and item representation obtained by contrastive learning.
[0134] The DPP likelihood loss calculation module 400 is used to design the objective function based on DPP likelihood from the perspective of set selection based on the positive semi-definite kernel matrix, and to calculate the loss based on DPP likelihood.
[0135] Output module 500 is used to jointly optimize the contrastive learning loss and the DPP-based likelihood loss, and outputs a diverse list of target items.
[0136] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0137] Figure 6 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0138] like Figure 6 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0139] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0140] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the voice command response method. For example, in some embodiments, the voice command response method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the voice command response method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the voice command response method by any other suitable means (e.g., by means of firmware).
[0141] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0142] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0143] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0145] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0146] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0147] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0148] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for recommending diverse items using graph contrast learning, characterized in that, include: Random Gaussian noise is used to perturb the encoder, resulting in an enhanced view based on the original image. Design a contrast paradigm between the original image and the enhanced view, and calculate the contrastive learning loss; Based on the user and item representations obtained from contrastive learning, a positive semidefinite kernel matrix is constructed in the determinant point process DPP. Based on the aforementioned positive semi-definite kernel matrix, an objective function based on DPP likelihood is designed from the perspective of set selection, and the loss based on DPP likelihood is calculated. The contrastive learning loss and the DPP-based likelihood-based loss are jointly optimized to output a diverse list of target items. The construction of the positive semi-definite kernel matrix in the determinant point process DPP based on the user and item representations obtained from contrastive learning includes: Based on the user and item representations obtained from contrastive learning, a similarity matrix between items and a user preference matrix for items are constructed respectively. Based on the similarity matrix between the items and the user's preference matrix for the items, a positive semidefinite kernel matrix in DPP is calculated for each user; The step of calculating a positive semi-definite kernel matrix in DPP for each user based on the similarity matrix between the items and the user's preference matrix for the items includes: Based on the set of item nodes A DPP represents a pair Modeling the probability distribution on the power set, for any set It can be done × A positive semidefinite kernel matrix L defines a DPP, with the following formula: Here, det() represents the determinant of a matrix. Through L corresponding to The row and column indices of the elements are obtained by the item. and items Taking the above equation as an example, we can transform it to obtain: Among them, the equation Established, scalar Describes the user's predicted preferences for items, row vectors Representative items and items The standardized feature vector; Based on the transformed equation, the positive semi-definite kernel matrix corresponding to the user is obtained. The formula is as follows: in express × A similarity matrix is used to measure the similarity between items. , Indicates user u Similarity matrix This indicates the user's predicted preference for items; The step of designing an objective function based on DPP likelihood from the perspective of set selection, and calculating the loss based on DPP likelihood, based on the aforementioned positive semi-definite kernel matrix, includes: From the perspective of set selection, the item recommendation objective is defined. If the positive items interacted with by the user are considered as a distributed set of DPP (Distributed Product Probability), then the loss expression for DPP likelihood is: in, Represents the number of users. and regarded as user The positive and negative pairs, that is, the observed positive terms and the unobserved negative terms. Represented as user u The constructed positive semi-definite kernel matrix; Considering the calculation of the positive semidefinite kernel matrix for each user To reduce computational costs, we can divide the likelihood term in the DPP distributed set into a quality component and a diversity component. Then, the loss expression for the DPP likelihood can be rewritten as: The rewriting process takes into account user preferences for a particular item and the diversity weights between items.
2. The method according to claim 1, characterized in that, The original graph is represented by the following expression, including: in Represents a set of user nodes. A set representing item nodes. This represents the interaction records between the user and the item.
3. The method according to claim 1, characterized in that, The method of perturbing the encoder with random Gaussian noise to obtain an enhanced view based on the original image includes: For the given user node in the original graph and its embedding representation vector ,in User nodes after disturbance Corresponding embedding representation vector for: in, It is a constant used to measure the magnitude of the disturbance. By using a mean of 0 and a variance of The samples were obtained from a Gaussian distribution.
4. The method according to claim 1, characterized in that, Designing a contrast paradigm between the original image and the enhanced view, and calculating the contrastive learning loss, includes: Calculate the loss at the user level and loss at the level of items The user-level loss and loss at the level of items The expressions are as follows: in, , These represent the embedding representation vectors of user nodes in the graph before and after enhancement, respectively. These represent the embedding vectors of the item nodes in the graph before and after enhancement, respectively. This is the cosine similarity function, used to measure the similarity between two vectors. It is a hyperparameter representing temperature; Based on user-level losses and loss at the level of items Calculate the final loss of the contrastive learning task. The expression is: 。 5. The method according to any one of claims 1-4, characterized in that, The joint optimization of the contrastive learning loss and the DPP-based likelihood loss outputs a diverse list of target items, including: The contrastive learning loss and the DPP-based likelihood loss are hyperparameterized to obtain a loss function for a joint learning mode with a trade-off hyperparameter, expressed as: in, , and For hyperparameters; Select all interacted items as the user's positive itemset, and randomly sample the same number of negative items corresponding to the positive itemset from the items the user has not interacted with. Use Adam to optimize the joint loss. Based on the optimized model, output the target diversified item list.
6. A diverse item recommendation device based on graph comparison learning, characterized in that, include: An enhancement module is used to perturb the encoder with random Gaussian noise to obtain an enhanced view based on the original image. The contrast loss calculation module is used to design the contrast paradigm between the original image and the enhanced view, and to calculate the contrast learning loss. The positive semi-definite kernel matrix construction module is used to construct the positive semi-definite kernel matrix in the determinant point process DPP based on the user representation and item representation obtained by contrastive learning. The DPP likelihood loss calculation module is used to design a DPP likelihood-based objective function from the perspective of set selection based on the semi-positive definite kernel matrix, and to calculate the DPP likelihood-based loss. The output module is used to jointly optimize the contrastive learning loss and the DPP-based likelihood loss, and output a target diversified item list; The construction of the positive semi-definite kernel matrix in the determinant point process DPP based on the user and item representations obtained from contrastive learning includes: Based on the user and item representations obtained from contrastive learning, a similarity matrix between items and a user preference matrix for items are constructed respectively. Based on the similarity matrix between the items and the user's preference matrix for the items, a positive semidefinite kernel matrix in DPP is calculated for each user; The step of calculating a positive semi-definite kernel matrix in DPP for each user based on the similarity matrix between the items and the user's preference matrix for the items includes: Based on the set of item nodes A DPP represents a pair Modeling the probability distribution on the power set, for any set It can be done × A positive semidefinite kernel matrix L defines a DPP, with the following formula: Here, det() represents the determinant of a matrix. Through L corresponding to The row and column indices of the elements are obtained by the item. and items Taking the above equation as an example, we can transform it to obtain: Among them, the equation Established, scalar Describes the user's predicted preferences for items, row vectors Representative items and items The standardized feature vector; Based on the transformed equation, the positive semi-definite kernel matrix corresponding to the user is obtained. The formula is as follows: in express × A similarity matrix is used to measure the similarity between items. , Indicates user u Similarity matrix This indicates the user's predicted preference for items; The step of designing an objective function based on DPP likelihood from the perspective of set selection, and calculating the loss based on DPP likelihood, based on the aforementioned positive semi-definite kernel matrix, includes: From the perspective of set selection, the item recommendation objective is defined. If the positive items interacted with by the user are considered as a distributed set of DPP (Distributed Product Probability), then the loss expression for DPP likelihood is: in, Represents the number of users. and regarded as user The positive and negative pairs, that is, the observed positive terms and the unobserved negative terms. Represented as user u The constructed positive semi-definite kernel matrix; Considering the calculation of the positive semidefinite kernel matrix for each user To reduce computational costs, we can divide the likelihood term in the DPP distributed set into a quality component and a diversity component. Then, the loss expression for the DPP likelihood can be rewritten as: The rewriting process takes into account user preferences for a particular item and the diversity weights between items.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-5.