A user recommendation method based on end-to-end hyperbolic space
By mapping the representations of users and projects to hyperbolic space and using pure hyperbolic spatial graph convolution neural network and attention mechanism, the problem of handling user-project interaction and social relationships in the existing recommendation system is solved, and personalized recommendations with higher accuracy are achieved.
Patent Information
- Application Number
- CN202210996583.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-08-19
AI Technical Summary
When the existing recommendation system learns the representation of users and projects in the Euclidean space, it is unable to effectively handle complex user-project interaction relationships, resulting in low accuracy of recommendation prediction results and the inability to fully capture the potential hierarchical structure in the user-user social relationship.
Map the representation of users and projects into hyperbolic space, use pure hyperbolic spatial graph convolutional neural network to extract social information, and process multi-dimensional user preferences through attention mechanisms, build an end-to-end user recommendation model, and directly process data in hyperbolic space to preserve hierarchical relationships.
It improves the prediction accuracy of the recommendation system, can effectively handle complex user-project interaction and user-user social relationships, provide personalized product recommendations, and improve user experience.
Smart Images

Figure CN115186197B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to fields such as artificial intelligence, deep learning, machine learning, social recommendation systems, hyperbolic space, and in particular to a user recommendation method based on end-to-end hyperbolic space, a user recommendation model training method and device based on end-to-end hyperbolic space, an electronic device, and a storage medium. Background Art
[0002] In the ever-exploding online environment, users face increasing difficulty making decisions. To alleviate the inconvenience of this information overload, recommendation systems have taken a leading role. Their goal is to provide personalized services to users by recommending suitable items (such as products), rather than requiring them to search for them on their own. In recent years, recommendation systems or methods have become the cornerstone of improving user experience in many applications, such as e-commerce, music recommendations, and travel recommendations, achieving tremendous success in numerous fields, including these. Existing recommendation methods typically predict user preferences by exploring user-item interactions.
[0003] However, existing recommendation systems or methods typically only learn representations of users and items in Euclidean space, which significantly limits their ability to explore the underlying hierarchical relationships within data. Furthermore, existing recommendation methods or systems often struggle to effectively handle complex interactions between users and items (products and / or items), resulting in low accuracy in recommendation predictions. Summary of the Invention
[0004] In view of the above problems, the present invention provides a user recommendation method based on end-to-end hyperbolic space, a training method and device for a user recommendation model based on end-to-end hyperbolic space, an electronic device and a storage medium, in order to solve at least one of the above technical problems.
[0005] According to a first aspect of the present invention, a user recommendation method based on an end-to-end hyperbolic space is provided, comprising:
[0006] Obtain the item representation and the user representation of the target user in the Euclidean space. The user representation includes social relationships and interaction information with the item, and the item representation includes item attribute information. Build a user recommendation model and use the user recommendation model to perform the following operations:
[0007] Map the user representation and item representation into the hyperbolic space respectively to obtain the user hyperbolic representation and item hyperbolic representation;
[0008] A pure hyperbolic space graph convolutional neural network is used to process user hyperbolic representations in hyperbolic space to obtain user social information and new user hyperbolic representations.
[0009] Decomposing the new user hyperbolic representation into multiple hyperbolic component vectors in the hyperbolic space, and obtaining the user preference information based on the multiple hyperbolic component vectors;
[0010] Based on user preference information, the attention mechanism is used to process new user hyperbolic representations and item hyperbolic representations in the hyperbolic space to obtain new user-item interaction information;
[0011] Recommend items to target users based on user social information and new user-item interaction information.
[0012] According to an embodiment of the present invention, the above-mentioned mapping of the user representation and the item representation into the hyperbolic space to obtain the user hyperbolic representation and the item hyperbolic representation includes:
[0013] Adding additional dimensions with preset values to the user representation and the item representation to obtain the user additional representation and the item additional representation;
[0014] The user additional representation and the item additional representation are respectively embedded into the tangent space of the origin of the Euclidean space to obtain the user representation on the tangent space and the item representation on the tangent space;
[0015] The exponential mapping at the origin is used to map the user representation on the tangent space and the item representation on the tangent space into the Lorenz model, respectively, to obtain the user hyperbolic representation and the item hyperbolic representation.
[0016] According to an embodiment of the present invention, the above-mentioned processing of user hyperbolic representations in hyperbolic space using a pure hyperbolic space graph convolutional neural network to obtain user social information and new user hyperbolic representations includes:
[0017] Transforming the user hyperbolic representation using a preset matrix to obtain an intermediate user hyperbolic representation;
[0018] Transform the intermediate user hyperbolic representation from the Lorenz model to the Klein model to obtain the user hyperbolic representation under the Klein model;
[0019] Based on the target user's neighborhood node information and the first Lorenz factor, the user's hyperbolic representation under the Klein model is aggregated in hyperbolic space using the Einstein midpoint method to obtain the hyperbolic aggregate average.
[0020] The hyperbolic aggregate mean value is transformed from the Klein model to the Lorenz model to obtain the hyperbolic aggregate mean value under the Lorenz model;
[0021] The hyperbolic aggregate mean value under the Lorenz model is projected onto the Poincare sphere model to obtain a projection result, and the projection result is mapped to the Lorenz model using a predefined nonlinear function to obtain a new user hyperbolic representation.
[0022] According to an embodiment of the present invention, the above-mentioned preset matrix is composed of a transformation matrix and an orthogonal matrix, and the orthogonal matrix is obtained by optimization on a Stifel manifold.
[0023] According to an embodiment of the present invention, the predefined nonlinear function includes a nonlinear activation function.
[0024] According to an embodiment of the present invention, the new user-item interaction information is obtained by processing the new user hyperbolic representation in the hyperbolic space using the attention mechanism based on the user preference information, including:
[0025] Calculate the inverse of the inverse hyperbolic cosine of the new user hyperbolic representation and item representation to obtain the user-item weight;
[0026] Perform a transformation from the Lorenz model to the Klein model on the new user hyperbolic representation to obtain a new user hyperbolic representation under the Klein model;
[0027] Based on the user-item weight and the second Lorenz factor, the Einstein midpoint method is used to aggregate user preference information to obtain a hyperbolic representation of user preference information under the Klein model.
[0028] The hyperbolic representation of users with preference information under the Klein model is transformed from the Klein model to the Lorenz model to obtain the hyperbolic representation of users with preference information under the Lorenz model;
[0029] The Fermi-Dirac method is used to calculate the user hyperbolic representation and item hyperbolic representation with preference information under the Lorenz model to obtain new user-item interaction information.
[0030] According to a second aspect of the present invention, a method for training a user recommendation model based on an end-to-end hyperbolic space is provided, comprising:
[0031] Build a user recommendation model and randomly initialize the parameters of the user recommendation model;
[0032] Obtain user training samples and project training samples, wherein the user training samples include user training positive samples and user training negative samples, and the project training samples include project training positive samples and project training negative samples;
[0033] Input user training samples and item training samples into the user recommendation model to obtain user-item interaction information of positive samples and user-item interaction information of negative samples;
[0034] Input the user-item interaction information of positive samples and the user-item interaction information of negative samples into the loss function to obtain the loss value, and optimize the parameters of the user recommendation model based on the loss value;
[0035] The interactive information acquisition operation, the loss value acquisition operation, and the optimization operation are iterated until the loss value meets the preset conditions, thereby obtaining a trained user recommendation model. The trained user recommendation model is applied to the above-mentioned end-to-end hyperbolic space-based user recommendation method.
[0036] According to a third aspect of the present invention, there is provided a training device for a user recommendation model based on an end-to-end hyperbolic space, comprising:
[0037] A construction module is used to build a user recommendation model and randomly initialize the parameters of the user recommendation model;
[0038] A sample acquisition module is used to acquire user training samples and project training samples, wherein the user training samples include user training positive samples and user training negative samples, and the project training samples include project training positive samples and project training negative samples;
[0039] The interaction information acquisition module is used to input user training samples and item training samples into the user recommendation model to obtain user-item interaction information of positive samples and user-item interaction information of negative samples;
[0040] The optimization module is used to input the user-item interaction information of positive samples and the user-item interaction information of negative samples into the loss function to obtain the loss value, and optimize the parameters of the user recommendation model based on the loss value;
[0041] An iteration module is used to iteratively perform interaction information acquisition operations, loss value acquisition operations, and optimization operations until the loss value meets preset conditions, thereby obtaining a trained user recommendation model, wherein the trained user recommendation model is applied to the above-mentioned end-to-end hyperbolic space user recommendation method.
[0042] According to a fourth aspect of the present invention, there is provided an electronic device, comprising:
[0043] one or more processors;
[0044] a storage device for storing one or more programs,
[0045] When one or more programs are executed by one or more processors, the one or more processors execute the above-mentioned end-to-end hyperbolic space user recommendation method and the training method of the user recommendation model based on the end-to-end hyperbolic space.
[0046] According to a fifth aspect of the present invention, a computer-readable storage medium is provided, on which executable instructions are stored. When the instructions are executed by a processor, the processor executes the above-mentioned end-to-end hyperbolic space user recommendation method and the training method of the user recommendation model based on the end-to-end hyperbolic space.
[0047] The above-mentioned user recommendation method based on end-to-end hyperbolic space provided by the present invention, through a recommendation method of user multi-dimensional representation and social information working directly on the hyperbolic space, mines social information and social relationships from user representation, and obtains user preferences for products in multiple dimensions, realizes user preference prediction for products, and recommends different products to different users, thereby being able to provide results with high prediction accuracy to target users, greatly improving the user experience. At the same time, the above-mentioned recommendation method provided by the present invention can effectively handle complex user-item (products and / or items) interaction relationships and complex user-user social relationships. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is an example diagram of user multi-party preferences according to an embodiment of the present invention;
[0049] Figure 2 is a flow chart of a user recommendation method based on an end-to-end hyperbolic space according to an embodiment of the present invention;
[0050] Figure 3 is a flowchart of a user recommendation method based on end-to-end hyperbolic space according to an embodiment of the present invention;
[0051] Figure 4 is a flowchart of obtaining a user hyperbolic representation and an item hyperbolic representation according to an embodiment of the present invention;
[0052] Figure 5 is a flow chart for obtaining user social information and a new user hyperbolic representation according to an embodiment of the present invention;
[0053] Figure 6 is a flow chart of new user-item interaction information according to an embodiment of the present invention;
[0054] Figure 7 is a flow chart of a training method for an end-to-end hyperbolic space-based user recommendation model according to an embodiment of the present invention;
[0055] Figure 8 2 is a schematic structural diagram of a training device for a user recommendation model based on an end-to-end hyperbolic space according to an embodiment of the present invention;
[0056] Figure 9 A block diagram of an electronic device suitable for implementing the above-mentioned end-to-end hyperbolic space-based user recommendation method and end-to-end hyperbolic space-based user recommendation model training method according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0057] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0058] Recommender systems are a hot topic in the fields of information retrieval and data mining, and have achieved tremendous success in a variety of applications, including e-commerce, music recommendations, location-based social networks, tourism, and smart education. Their primary goal is to design an optimal algorithm that recommends the best items to users, rather than requiring them to search for them on their own. Traditionally, research has aimed to explore the interactive relationships between users and items in order to make recommendations based on explicit user feedback (such as ratings) or implicit user feedback (such as clicks, favorites, and followers). Factorization models played a leading role in the early days, projecting users and items into a latent space to describe user-item preference relationships. Taking into account the richness of side features, factorization machines (FMFMs) were proposed to model high-order user-item relationships. Despite their significant success, these models only capture the user-item interactions using linear relationships (i.e., inner products), potentially overlooking the complex user-item interactions in practice.
[0059] Inspired by the remarkable performance of deep learning in different fields, such as computer vision and natural language processing, researchers have tried to apply neural network architectures to recommendation systems. For example, the Neural Collaborative Filtering (NCF) model explores nonlinear and complex user-item relationships by combining matrix decomposition and feedforward neural networks. Others such as NFM and xDeepFM improve recommendation performance by considering high-order feature interactions and explicit-implicit feature interactions. In addition, in order to improve the feature selection ability in the user-item latent space, other existing technologies have proposed neural attention mechanisms to measure the importance of features for recommendation, such as AFM and LRML. In addition, HyperSoRec in the existing technology makes good use of the advantages of hyperbolic space in representing the tree-like hierarchical relationship between users and items, and also conducts in-depth research on the social relationships between users and the user's preferences for items.
[0060] In social recommendation systems, the most critical issue is to design an appropriate algorithm that can model the social relationships between users and predict user preferences for items. It is necessary to learn good representations for user-user and user-item to describe their interactions. Along this line of thought, traditional methods explore user-user and user-item relationships by projecting users and items into a latent space with low-dimensional representations, including their linear or nonlinear relationships. However, they usually learn user and item representations in Euclidean space. This cannot fully capture the underlying structural relationships existing in relational users and items. Specifically, user-user social relationship graphs and user-item interaction graphs usually follow an intrinsic power-law distribution, which can often be traced back to a hierarchical structure. Such hierarchical data cannot usually be effectively embedded in Euclidean space, but can be embedded in a more reliable hyperbolic space. For example: if the radius is given as r, the perimeter and area of the Euclidean space can be calculated as 2πr and πr 2 In such a space, the number of nodes should grow polynomially from the center to the surroundings relative to the radius r. Therefore, the general representation ability of Euclidean space can be summarized as polynomial level. If the hierarchical relationship user-item data is modeled in Euclidean space (Euclidean space), it may cause data distortion. In hyperbolic space, given the radius r, the two-dimensional hyperbolic space (curvature ξ 2 , ξ>0) are 2πsinh(ξr) and 2π(cosh(ξ)-1), which are exponential with respect to the radius r.
[0061] Clearly, hyperbolic space has stronger representational power than Euclidean space because, given the same radius, it has a larger area and can accommodate more nodes. This type of hyperbolic space is more suitable for modeling user and item data in recommendation systems. Compared to Euclidean space, it is easier to preserve inherent hierarchical relationships in the same dimensional space.
[0062] In addition, the interaction between users and items is usually influenced by different aspects, and multiple potential aspects are often weighed to make a decision. Users may have different preferences for items. For example, Figure 1 is an example diagram of user multi-party preferences (i.e., multi-dimensional representation) according to an embodiment of the present invention, such as Figure 1 As shown, user A considers three basic factors when choosing a mobile phone, including price, brand and appearance, and then makes the final decision because he pays more attention to the price aspect.
[0063] Social recommendation systems play a key role in addressing the problem of information overload. To better extract the underlying hierarchical attributes in the data, traditional social recommendation methods (e.g., MCNE and HyperSoRec) typically explore user-user connections and user-item interactions in hyperbolic space. Existing hyperbolic space methods often utilize tangent space as a bridge to perform some operations on the hyperbolic manifold (e.g., matrix multiplication, aggregation of neighbor information in GCN). However, frequent mappings between hyperbolic space and tangent space will destroy the global structure of the hyperbolic manifold and reduce the accuracy of recommendation prediction results.
[0064] In response to various technical problems existing in the prior art, the present invention provides a user recommendation method based on end-to-end hyperbolic space, a user recommendation model training method device based on end-to-end hyperbolic space, an electronic device and a storage medium.
[0065] Figure 2 4 is a flow chart of a user recommendation method based on an end-to-end hyperbolic space according to an embodiment of the present invention.
[0066] like Figure 2 As shown, the user recommendation method provided by the present invention first maps the vector representations of users and items in Euclidean space to hyperbolic space. Second, a hyperbolic model is used to extract social relationships between users. Unlike previous methods, this process operates directly in hyperbolic space rather than relying on tangent space. Next, considering the diversity of user preferences, a multidimensional representation of users is obtained by modeling user preferences from multiple aspects. Finally, based on the above multidimensional representation of users and the representation of items, the user's preference weight for items in each dimension is obtained. The user recommendation method provided by the present invention is based on an end-to-end multidimensional representation of users in hyperbolic space, namely H2HMSR. First, it describes how to embed users and items in Euclidean space and map them to hyperbolic space. Second, a GCN (graph convolutional neural network) operating directly in hyperbolic space is used to extract social information between users. Third, the unified user embedded in hyperbolic space is decomposed into multiple vector representations to capture the user's different preferences in multiple aspects. Finally, an attention mechanism is designed in hyperbolic space to calculate the interactions between users with multifaceted preferences and items.
[0067] Figure 3 4 is a flowchart of a user recommendation method based on end-to-end hyperbolic space according to an embodiment of the present invention.
[0068] like Figure 3 As shown, the above-mentioned user recommendation method based on end-to-end hyperbolic space includes operations S310 to S360.
[0069] In operation S310, a project representation and a user representation of a target user in Euclidean space are obtained, wherein the user representation includes social relationships and interaction information with the project, and the project representation includes project attribute information. A user recommendation model is constructed, and operations S320 to S360 are performed using the user recommendation model.
[0070] The above end-to-end hyperbolic space represents that the user recommendation method provided by the present invention performs data processing operations for user / item representation completely in the hyperbolic space.
[0071] The item representation (or vector or tensor) in the above Euclidean space comes from the item set in, Indicates the number of items. It should be understood by those skilled in the art that items can be commodities or articles. The user representation (or vector or tensor) of the target user is derived from the user set in, Represents the number of users. There are social relationships between users in the user set, and there are also interactive relationships (or interactive relationships) between users and items. At the same time, users can evaluate an item from multiple dimensions. For example, users can rate the taste, aroma, appearance, mouthfeel, and overall quality of a beer. The interaction between users and items is stored in the matrix If user u i With Project V j There is an interaction relationship, then the value of the matrix is equal to 1, otherwise it is 0. The task of the present invention is to learn the multi-dimensional preferences of multiple users for items and the latent hierarchical attributes of users' social relationships, and recommend items of interest to users.
[0072] In operation S320 , the user representation and the item representation are respectively mapped into a hyperbolic space to obtain a user hyperbolic representation and an item hyperbolic representation.
[0073] Assuming there is a user-item interaction matrix R, in order to preserve the hierarchical attributes between users and items, the Euclidean embedding of users and items is implemented into the Lorentz model according to the following formula (1).
[0074]
[0075] Among them, MLP(*) represents multi-layer perceptron, x E represents a representation (or vector, tensor) in Euclidean space, Represents the tangent space, and Proj represents the mapping function projected to the tangent space.
[0076] First, users and items are projected into a Euclidean space, and their embedding form can be expressed as and Respectively, where d0 represents the dimension of embedding; secondly, embed the Euclidean at the origin The tangent space middle.
[0077] Again, add an additional dimension with value 0 to obtain the Euclidean embedding in tangent space at the origin o (0, x ε ), this embedding vector must satisfy formula (2):
[0078]
[0079] in, represents the Lorentz inner product.
[0080] Again, using the exponential mapping at the origin o (as shown in formula (3))
[0081]
[0082] Map this embedding vector to the Lorentz model In (as shown in formula (4)):
[0083]
[0084] Among them, exp o (*) represents the exponential mapping function, x L represents the representation under the Lorentz model, represents the number of items under the Lorentz model, cosh(*) represents the hyperbolic cosine function, and sinh(*) represents the hyperbolic sine function.
[0085] After these operations, all users and items can be mapped into the hyperbolic space and represented as and Through hyperbolic mapping, more representative user and item representations can be obtained in the hyperbolic space, thereby better preserving the hierarchical relationship between users and items.
[0086] In operation S330 , a pure hyperbolic space graph convolutional neural network is used to process the user hyperbolic representation in the hyperbolic space to obtain user social information and a new user hyperbolic representation.
[0087] After the hyperbolic embedding mapping, the social relationships between users are modeled. Inspired by H2H-GCN, a pure hyperbolic GCN is used, which directly operates on the hyperbolic manifold to extract feature information to maintain the global hyperbolic structure without relying on the tangent space.
[0088] Pure hyperbolic GCN consists of two parts: hyperbolic feature transformation and hyperbolic neighborhood aggregation. The transformation matrix is constrained to be a diagonal matrix consisting of a scalar 1 and an orthogonal matrix, and the transformed vector still remains in the hyperbolic space. Given the representation of user i on the l-1 layer of GCN (i.e. ), the user is obtained on the l layer through the feature transformation of pure hyperbolic GCN As shown in formula (5) to formula (7):
[0089]
[0090]
[0091]
[0092] Among them, W l is a transformation matrix, is an orthogonal matrix that can be optimized on the Stiefel manifold. Here 0 is a zero column vector, I is an identity matrix, and the above formulas (5) to (7) show that for The matrix for transformation needs to satisfy formula (6) and formula (7).
[0093] Unlike Euclidean space, the present invention uses the Einstein midpoint method to aggregate the information of its neighboring nodes from the hyperbolic space. The Einstein midpoint must be run on the Klein model. Therefore, it is necessary to project the vector from the Lorentz model (Lorentz model or Lorentz model) to the Klein model (Klein model), then calculate the aggregated average, and finally project this average back to the Lorentz model. For example, if a given neighbor node Intermediate representation of Then the neighborhood aggregation in pure hyperbolic space is defined as shown in formula (8) to formula (10):
[0094]
[0095]
[0096]
[0097] in, and represents the mutual mapping between the Lorentz model and the Klein model, Model to Klein model mapping, Model to Lorentz model mapping, represents the neighbor users (or nodes) of user i, represents the user representation under the Klein model, Represents the user representation under the Lorentz model.
[0098] The first Lorentz factor is determined by formula (11):
[0099]
[0100] Indicates that the aggregation comes from adjacent nodes on the Klein model The hyperbolic aggregate average of the messages of . Mapping to the Lorentz model to obtain the final Lorentz model The activation function can increase the nonlinear properties of the model. However, common nonlinear activation functions will break the manifold constraint structure of the Lorentz model. Therefore, Project to the Poincaréball model and define the nonlinear function (as shown in formula (12)):
[0101]
[0102] in and It is the mutual mapping between the Lorentz model and the Poincaré ball model. σ represents a nonlinear activation function (such as the ELU activation function). By aggregating the neighbor node information of the l-th layer, the final user representation can be obtained.
[0103] In operation S340 , the new user hyperbolic representation is decomposed into a plurality of hyperbolic component vectors in the hyperbolic space, and user preference information is obtained according to the plurality of hyperbolic component vectors.
[0104] Typically, users have multiple potential preferences when making decisions. Therefore, the present invention utilizes several transformation matrices to decompose the user embedded in the hyperbolic space into multiple aspects of user preferences, as shown in formula (13):
[0105]
[0106] in express The transformation matrix Rm is constrained to consist of a scalar 1 and an orthogonal matrix A diagonal matrix composed of , to ensure that the vector of each user dimension still resides in the hyperbolic space.
[0107] In operation S350 , based on the user preference information, the new user hyperbolic representation and the item hyperbolic representation are processed in the hyperbolic space using an attention mechanism to obtain new user-item interaction information.
[0108] In hyperbolic space, new representations are obtained using the attention mechanism As shown in formula (14) to formula (16):
[0109]
[0110]
[0111]
[0112] in represents the hyperbolic representation of the mth aspect of user i. i|m represents the weight score of the aspects of user i’s m face and item j’s m face, γ m The present invention uses the Einstein midpoint method to aggregate multiple aspects of user preferences and obtain the final new user representation. i|m The weight of the representation dimension is defined as shown in formula (17):
[0113]
[0114] Among them, arcosh(*) represents the inverse hyperbolic cosine function, represents the jth item under the Lorentz model, represents the Lorentz distance.
[0115] Assign higher weights to aspects of the project that the user is more interested in, and use the Fermi-Dirac method to calculate the score S between the user and the project, as shown in formula (18):
[0116]
[0117] In operation S360 , items are recommended to the target user based on the user social information and the new user-item interaction information.
[0118] The above method randomly selects a target user from the user set for recommendation. At the same time, the above method can also make recommendations to multiple users or any other users.
[0119] The above-mentioned user recommendation method based on end-to-end hyperbolic space provided by the present invention, through a recommendation method of user multi-dimensional representation and social information working directly on the hyperbolic space, mines social information and social relationships from user representation, and obtains user preferences for products in multiple dimensions, realizes user preference prediction for products, and recommends different products to different users, thereby being able to provide results with high prediction accuracy to target users, greatly improving the user experience. At the same time, the above-mentioned recommendation method provided by the present invention can effectively handle complex user-item (products and / or items) interaction relationships and complex user-user social relationships.
[0120] Figure 4 4 is a flowchart of obtaining a user hyperbolic representation and an item hyperbolic representation according to an embodiment of the present invention.
[0121] like Figure 4 As shown, the above-mentioned mapping of the user representation and the item representation into the hyperbolic space to obtain the user hyperbolic representation and the item hyperbolic representation includes operations S410 to S430.
[0122] In operation S410 , additional dimensions with preset values are added to the user representation and the project representation respectively to obtain the user additional representation and the project additional representation.
[0123] In operation S420 , the user additional representation and the item additional representation are respectively embedded in the tangent space of the origin of the Euclidean space to obtain the user representation on the tangent space and the item representation on the tangent space.
[0124] In operation S430 , the user representation on the tangent space and the item representation on the tangent space are respectively mapped into the Lorenz model using an exponential mapping at the origin to obtain a user hyperbolic representation and an item hyperbolic representation.
[0125] By mapping the representations in the Euclidean space to the hyperbolic space, the hierarchical properties between the representations, ie, the hierarchical properties between users and items in the present invention, can be better preserved.
[0126] Figure 5 4 is a flowchart of obtaining user social information and a new user hyperbolic representation according to an embodiment of the present invention.
[0127] like Figure 5 As shown, the above-mentioned process of processing the user hyperbolic representation in the hyperbolic space using the pure hyperbolic space graph convolutional neural network to obtain the user social information and the new user hyperbolic representation includes operations S510 to S550.
[0128] In operation S510, a user hyperbolic representation is transformed using a preset matrix to obtain an intermediate user hyperbolic representation.
[0129] In operation S520 , the intermediate user hyperbolic representation is transformed from a Lorenz model to a Klein model to obtain a user hyperbolic representation under the Klein model.
[0130] In operation S530 , the user's hyperbolic representation under the Klein model is aggregated in a hyperbolic space according to the information of the target user's neighborhood nodes and the first Lorenz factor and using the Einstein midpoint method to obtain a hyperbolic aggregate average.
[0131] In operation S540 , the hyperbolic aggregate mean value is transformed from a Klein model to a Lorenz model to obtain a hyperbolic aggregate mean value under the Lorenz model.
[0132] In operation S550 , the hyperbolic aggregate mean value under the Lorenz model is projected onto the Poincare sphere model to obtain a projection result, and the projection result is mapped onto the Lorenz model using a predefined nonlinear function to obtain a new user hyperbolic representation.
[0133] The acquisition of user social information and new user hyperbolic representations is performed entirely in the hyperbolic space. This is because the pure hyperbolic GCN (graph convolutional neural network) is used to directly act on the hyperbolic manifold to extract feature information to maintain the global hyperbolic structure, thus eliminating the need to rely on the tangent space.
[0134] According to an embodiment of the present invention, the above-mentioned preset matrix is composed of a transformation matrix and an orthogonal matrix, and the orthogonal matrix is obtained by optimization on a Stifel manifold.
[0135] According to an embodiment of the present invention, the predefined nonlinear function includes a nonlinear activation function.
[0136] Figure 6 4 is a flow chart of new user-item interaction information according to an embodiment of the present invention.
[0137] like Figure 6 As shown, the above-mentioned process of processing new user hyperbolic representations in the hyperbolic space based on user preference information using the attention mechanism to obtain new user-item interaction information includes operations S610 to S650.
[0138] In operation S610 , the inverse values of the inverse hyperbolic cosine values of the new user hyperbolic representation and the item representation are calculated to obtain the user-item weight.
[0139] In operation S620 , a transformation from a Lorenz model to a Klein model is performed on the new user hyperbolic representation to obtain a new user hyperbolic representation under the Klein model.
[0140] In operation S630 , the user preference information is aggregated using the Einstein midpoint method according to the user-item weight and the second Lorenz factor to obtain a user hyperbolic representation with preference information under the Klein model.
[0141] In operation S640 , the hyperbolic representation of the user with the preference information under the Klein model is transformed from the Klein model to the Lorenz model to obtain the hyperbolic representation of the user with the preference information under the Lorenz model.
[0142] In operation S650 , the user hyperbolic representation and the item hyperbolic representation with preference information under the Lorenz model are calculated using the Fermi-Dirac method to obtain new user-item interaction information.
[0143] By utilizing the attention mechanism and using the Lorenz model, Klein model, and Fermi-Dirac method, we can better explore the potential relationship between users and items.
[0144] Figure 7 4 is a flow chart of a method for training a user recommendation model based on an end-to-end hyperbolic space according to an embodiment of the present invention.
[0145] like Figure 7 As shown, the training method of the end-to-end hyperbolic space-based user recommendation model includes operations S710 to S750.
[0146] In operation S710 , a user recommendation model is constructed and parameters of the user recommendation model are randomly initialized.
[0147] In operation S720 , user training samples and item training samples are obtained, wherein the user training samples include user training positive samples and user training negative samples, and the item training samples include item training positive samples and item training negative samples.
[0148] In operation S730 , the user training samples and the item training samples are input into a user recommendation model to obtain user-item interaction information of positive samples and user-item interaction information of negative samples.
[0149] In operation S740 , the user-item interaction information of the positive sample and the user-item interaction information of the negative sample are input into a loss function to obtain a loss value, and the parameters of the user recommendation model are optimized according to the loss value.
[0150] In operation S750, the interaction information acquisition operation, the loss value acquisition operation, and the optimization operation are iterated until the loss value meets the preset conditions, thereby obtaining a trained user recommendation model, wherein the trained user recommendation model is applied to the above-mentioned end-to-end hyperbolic space-based user recommendation method.
[0151] Bayesian Personalized Ranking (BPR) can be used to learn the multifaceted preferences of users and the interactive relationships between items. Given the user-item record matrix R, the above loss function can be defined as shown in formula (19):
[0152]
[0153] By optimizing the above formula, users can be more inclined to positive samples (i.e., sample categories corresponding to the true value) rather than negative samples (i.e., all other sample categories that do not correspond to the true value). i , v p ) and S(u i , v n ) corresponds to the predicted scores of items p and n. i is the embedding of user i. Items p and n are positive and negative samples of user i, respectively. n is randomly selected from non-interactive samples. λ|Θ| 2 is the regularization term, and Θ represents all the parameters of the model.
[0154] Benefiting from the characteristics of hyperbolic space, the above method provided by this paper can move a point a certain distance with a smaller cost than Euclidean space, which can enable H2HMSR to better learn the hyperbolic representation between users and items and easily preserve the potential hierarchical attributes.
[0155] Figure 8 4 is a structural diagram of a training device for a user recommendation model based on an end-to-end hyperbolic space according to an embodiment of the present invention.
[0156] like Figure 8 As shown, the training device 800 of the end-to-end hyperbolic space-based user recommendation model includes a construction module 810 , a sample acquisition module 820 , an interaction information acquisition module 830 , an optimization module 840 and an iteration module 850 .
[0157] The construction module 810 is used to construct a user recommendation model and randomly initialize the parameters of the user recommendation model.
[0158] The sample acquisition module 820 is used to acquire user training samples and project training samples, wherein the user training samples include user training positive samples and user training negative samples, and the project training samples include project training positive samples and project training negative samples.
[0159] The interaction information acquisition module 830 is used to input user training samples and item training samples into the user recommendation model to obtain user-item interaction information of positive samples and user-item interaction information of negative samples.
[0160] The optimization module 840 is used to input the user-item interaction information of the positive samples and the user-item interaction information of the negative samples into the loss function to obtain the loss value, and optimize the parameters of the user recommendation model according to the loss value.
[0161] The iterative module 850 is used to iteratively perform the interactive information acquisition operation, the loss value acquisition operation, and the optimization operation until the loss value meets the preset conditions, thereby obtaining a trained user recommendation model, wherein the trained user recommendation model is applied to the above-mentioned end-to-end hyperbolic space user recommendation method.
[0162] Figure 9 A block diagram of an electronic device suitable for implementing the above-mentioned end-to-end hyperbolic space-based user recommendation method and end-to-end hyperbolic space-based user recommendation model training method according to an embodiment of the present invention is schematically shown.
[0163] like Figure 9 As shown, the electronic device 900 according to an embodiment of the present invention includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. The processor 901 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0164] The RAM 903 stores various programs and data required for the operation of the electronic device 900. The processor 901, ROM 902, and RAM 903 are connected to each other via a bus 904. The processor 901 executes the programs in the ROM 902 and / or RAM 903 to perform various operations according to the method flow of the embodiment of the present invention. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and RAM 903. The processor 901 may also execute the programs stored in the one or more memories to perform various operations according to the method flow of the embodiment of the present invention.
[0165] According to an embodiment of the present invention, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may further include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or a modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.
[0166] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.
[0167] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0168] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0169] Those skilled in the art will appreciate that various combinations and / or combinations of features described in the various embodiments and / or claims of the present invention may be made, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, various combinations and / or combinations of features described in the various embodiments and / or claims of the present invention may be made, without departing from the spirit and teachings of the present invention. All such combinations and / or combinations fall within the scope of the present invention.
[0170] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A user recommendation method based on end-to-end hyperbolic space, comprising: Obtain an item representation and a user representation of a target user in Euclidean space, wherein the user representation includes social relationships and interaction information with the item, and the item representation includes item attribute information, and construct a user recommendation model. Utilize the user recommendation model to perform the following operations: Mapping the user representation and the item representation into a hyperbolic space to obtain a user hyperbolic representation and an item hyperbolic representation; Processing the user hyperbolic representation in the hyperbolic space using a pure hyperbolic space graph convolutional neural network to obtain user social information and a new user hyperbolic representation; Decomposing the new user hyperbolic representation into a plurality of hyperbolic component vectors in a hyperbolic space, and obtaining user preference information according to the plurality of hyperbolic component vectors; According to the user preference information, the new user hyperbolic representation and the item hyperbolic representation are processed in a hyperbolic space using an attention mechanism to obtain new user-item interaction information; Recommending items to the target user based on the user social information and the new user-item interaction information; The user representation and the item representation are mapped into a hyperbolic space respectively to obtain the user hyperbolic representation and the item hyperbolic representation, including: Adding additional dimensions with preset values to the user representation and the item representation respectively to obtain a user additional representation and an item additional representation; Embedding the user additional representation and the item additional representation into the tangent space of the origin of the Euclidean space respectively to obtain the user representation on the tangent space and the item representation on the tangent space; The user representation on the tangent space and the item representation on the tangent space are respectively mapped into the Lorenz model using an exponential mapping at the origin to obtain the user hyperbolic representation and the item hyperbolic representation.
2. The method according to claim 1, wherein The user hyperbolic representation is processed in the hyperbolic space using a pure hyperbolic space graph convolutional neural network to obtain user social information and a new user hyperbolic representation including: Transforming the user hyperbolic representation using a preset matrix to obtain an intermediate user hyperbolic representation; Transforming the intermediate user hyperbolic representation from a Lorenz model to a Klein model to obtain a user hyperbolic representation under the Klein model; Aggregating the user's hyperbolic representation under the Klein model in a hyperbolic space using the Einstein midpoint method based on the information of the target user's neighborhood nodes and the first Lorenz factor to obtain a hyperbolic aggregate average; Transforming the hyperbolic aggregate mean from a Klein model to a Lorenz model to obtain a hyperbolic aggregate mean under the Lorenz model; The hyperbolic aggregate mean value under the Lorenz model is projected onto the Poincare sphere model to obtain a projection result, and the projection result is mapped onto the Lorenz model using a predefined nonlinear function to obtain the new user hyperbolic representation.
3. The method according to claim 2, wherein: The preset matrix is composed of a transformation matrix and an orthogonal matrix, and the orthogonal matrix is obtained by optimization on a Stifel manifold.
4. The method according to claim 2, wherein: The predefined nonlinear function includes a nonlinear activation function.
5. The method according to claim 1, wherein According to the user preference information, the new user hyperbolic representation is processed in the hyperbolic space using the attention mechanism to obtain new user-item interaction information including: Calculating the inverse value of the inverse hyperbolic cosine value of the new user hyperbolic representation and the item representation to obtain a user-item weight; Performing a transformation from a Lorenz model to a Klein model on the new user hyperbolic representation to obtain a new user hyperbolic representation under the Klein model; Aggregating the user preference information using the Einstein midpoint method according to the user-item weight and the second Lorenz factor to obtain a hyperbolic representation of the user with the preference information under the Klein model; Performing a Klein model to Lorenz model transformation on the user hyperbolic representation with preference information under the Klein model to obtain the user hyperbolic representation with preference information under the Lorenz model; The user hyperbolic representation and the item hyperbolic representation with preference information under the Lorenz model are calculated using the Fermi-Dirac method to obtain the new user-item interaction information.
6. A method for training a user recommendation model based on an end-to-end hyperbolic space, comprising: Constructing a user recommendation model and randomly initializing parameters of the user recommendation model; Obtaining user training samples and project training samples, wherein the user training samples include user training positive samples and user training negative samples, and the project training samples include project training positive samples and project training negative samples; Inputting the user training samples and the item training samples into the user recommendation model to obtain user-item interaction information of positive samples and user-item interaction information of negative samples; Inputting the user-item interaction information of the positive sample and the user-item interaction information of the negative sample into a loss function to obtain a loss value, and optimizing the parameters of the user recommendation model according to the loss value; Iteratively perform interactive information acquisition operations, loss value acquisition operations, and optimization operations until the loss value meets preset conditions, thereby obtaining a trained user recommendation model, wherein the trained user recommendation model is applied to any one of the methods described in claims 1-5.
7. A training device for a user recommendation model based on an end-to-end hyperbolic space, comprising: A construction module, used to construct a user recommendation model and randomly initialize the parameters of the user recommendation model; A sample acquisition module is used to acquire user training samples and project training samples, wherein the user training samples include user training positive samples and user training negative samples, and the project training samples include project training positive samples and project training negative samples; An interaction information acquisition module, configured to input the user training samples and the item training samples into the user recommendation model to obtain user-item interaction information of positive samples and user-item interaction information of negative samples; an optimization module, configured to input the user-item interaction information of the positive sample and the user-item interaction information of the negative sample into a loss function to obtain a loss value, and optimize the parameters of the user recommendation model according to the loss value; An iterative module is used to iteratively perform interactive information acquisition operations, loss value acquisition operations, and optimization operations until the loss value meets a preset condition, thereby obtaining a trained user recommendation model, wherein the trained user recommendation model is applied to any of the methods described in claims 1-5.
8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Entity alignment method and device suitable for multi-modal knowledge graph
CN112287126A
Network alignment model fusing multiple spatial features and application thereof
CN114840775A