Personalized compatibility modeling method and system based on dynamic sampling and adaptive feature fusion
By constructing heterogeneous and isomorphic relationship graphs in graph neural networks, and performing dynamic sampling and adaptive feature fusion, the problem of insufficient information aggregation in fashion recommendation systems is solved, and accurate characterization and personalization of fashion entity features are achieved. recommend.
Patent Information
- Application Number
- CN202410888237.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Existing fashion recommendation systems lack isomorphic relationship modeling, dynamic relationship perception between entities, and dependency capture between features in graph neural networks, resulting in insufficiently comprehensive and accurate information aggregation.
A personalized compatibility modeling method based on dynamic sampling and adaptive feature fusion is used to construct user-item heterogeneous and isomorphic prototype relationship graphs, combine ViT and Bert models to extract multi-modal features, and use them in the graph neural network Perform dynamic neighbor sampling and adaptive feature fusion to capture inter-node relationships in heterogeneous and homogeneous spaces.
It improves the accuracy of personalized clothing compatibility modeling, can comprehensively characterize the characteristics of fashion entities in dual spaces, captures the compatibility or personalized relationships between different entities, and enhances the accuracy and efficiency of recommendations.
Smart Images

Figure CN118428993B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of personalized fashion recommendation systems, and in particular relates to a personalized compatibility modeling method and system based on dynamic sampling and adaptive feature fusion. Background Art
[0002] In recent years, the fashion industry has developed rapidly, with total sales exceeding 3 trillion US dollars, accounting for 2% of the world's GDP. Therefore, compatibility modeling methods for the fashion field have attracted extensive attention from academia and industry. Its main goal is to evaluate the compatibility scores of a set of complementary fashion items (such as tops, bottoms, shoes, and accessories) so as to provide people with reasonable dressing suggestions.
[0003] Although existing research has made some progress, the use of graph neural networks to model personalized multimodal compatibility of clothing in the field of fashion recommendation still faces the following three shortcomings: First, there is a lack of isomorphic relationship modeling. Existing work mainly learns the interactive relationship between users and items based on heterogeneous relationship graphs, lacks modeling of potential connections between similar entities, resulting in incomplete information aggregation; second, there is a lack of dynamic relationship perception between entities. Existing work usually samples neighbor nodes based on predefined thresholds to filter out noise information and enhance the aggregation of high-order information. However, this approach not only consumes a lot of parameter adjustment time, but also fails to dynamically adjust the sampling strategy according to the iterative representation of the entity; third, there is a lack of feature dependency capture. When fusing the features of the target node, the existing methods only use simple splicing or static weighting, which fails to fully consider the importance differences of different features in each layer of the graph neural network and under different relationship graphs, and thus cannot accurately capture the key information of each target node. Summary of the invention
[0004] The purpose of the present invention is to provide a personalized compatibility modeling method and system based on dynamic sampling and adaptive feature fusion to make up for the deficiencies of the prior art.
[0005] In order to achieve the above-mentioned object of the invention, the specific technical solution adopted by the present invention is:
[0006] A personalized compatibility modeling system based on dynamic sampling and adaptive feature fusion, the system comprises a fashion entity composition module, a user multimodal adaptive feature fusion module, a single product multimodal adaptive feature fusion module, a top-bottom complementary compatibility module, a user personalized preference module and a recommendation module; wherein the fashion entity composition module is connected to two modules, namely, the user multimodal adaptive feature fusion module and the single product multimodal adaptive feature fusion module, the single product multimodal adaptive feature fusion module is connected to the top-bottom complementary compatibility module, the single product multimodal adaptive feature fusion module and the user multimodal adaptive feature fusion module are connected to the user personalized preference module, and the top-bottom complementary compatibility module and the user personalized preference module are connected to the recommendation module.
[0007] Furthermore, the fashion entity composition module constructs a user-item heterogeneous prototype relationship diagram, a user-user homogeneous prototype relationship diagram, an item-user heterogeneous prototype relationship diagram, and an item-item homogeneous prototype relationship diagram according to the interactive relationship between the user and the fashion item.
[0008] The user multimodal adaptive feature fusion module is used to input the user-item heterogeneous prototype relationship graph, the user-user isomorphic prototype relationship graph, the fashion item multimodal features extracted by the ViT and Bert models, and the randomly initialized user multimodal features into the constructed graph neural network model, and obtain the updated user multimodal feature representation through dynamic neighbor sampling and adaptive feature fusion operations.
[0009] The single product multimodal adaptive feature fusion module is used to input the single product-user heterogeneous prototype relationship graph, the single product-single product homogeneous prototype relationship graph, the fashion single product multimodal features extracted by the ViT and Bert models, and the randomly initialized user multimodal features into the constructed graph neural network model, and obtain the updated single product multimodal feature representation through dynamic neighbor sampling and adaptive feature fusion operations;
[0010] The top-bottom complementary compatibility module: the multimodal feature representation of the top and bottom obtained from the single-item multimodal adaptive feature fusion module is sent as input information to the module to calculate the complementary compatibility score between the top and bottom;
[0011] The user personalized preference module: the multimodal feature representation of the bottoms obtained from the single product multimodal adaptive feature fusion module and the multimodal feature representation of the user obtained from the multimodal adaptive feature fusion module are input into the module to calculate the personalized preference score of the target user for the given bottoms;
[0012] The recommendation module takes the compatibility score between tops and bottoms obtained by the top-bottom complementary compatibility module and the user's personalized score for bottoms obtained by the user personalized preference module as input, calculates the compatibility score between tops and bottoms that incorporates the user's personalized dressing preference factors, and recommends clothing to the user based on the score.
[0013] Furthermore, the user multimodal adaptive feature fusion module includes a first representation submodule, a second representation submodule and a third representation submodule, wherein the first representation submodule and the second representation submodule are both connected to the third representation submodule;
[0014] The first representation submodule is used to obtain the multimodal feature representation of users from the heterogeneous space by using the graph neural network, attention mechanism and adaptive feature fusion method from the sampled user-item heterogeneous relationship graph;
[0015] The second representation submodule is used to obtain the multimodal feature representation of the user from the isomorphic space based on the sampled user-user isomorphic relationship graph, using the graph neural network, and based on the attention mechanism and adaptive feature fusion method;
[0016] The third representation submodule: takes the user multimodal feature representation output by the first representation submodule and the second representation submodule as input, and is used to fuse the user multimodal feature representation obtained from the heterogeneous space and the user multimodal feature representation obtained from the homogeneous space to obtain the final multimodal feature representation of the target user.
[0017] Furthermore, the single-product multi-modal adaptive feature fusion module includes a first representation submodule, a second representation submodule and a third representation submodule, wherein the first representation submodule and the second representation submodule are both connected to the third representation submodule:
[0018] The first representation submodule is used to obtain the multimodal feature representation of the product from the isomorphic space from the sampled product-product isomorphic relationship graph, using the graph neural network model, and based on the attention mechanism and adaptive feature fusion method;
[0019] The second representation submodule is used to obtain the multimodal feature representation of a single product from the heterogeneous space by using the graph neural network model, the attention mechanism and the adaptive feature fusion method from the sampled single product-user heterogeneous relationship graph;
[0020] The third representation submodule: takes the single product feature representation output by the first representation submodule and the second representation submodule as input, and is used to fuse the single product multimodal feature representation obtained from the heterogeneous space and the single product multimodal feature representation obtained from the homogeneous space to obtain the final multimodal feature representation of the target fashion item.
[0021] A personalized compatibility modeling method based on dynamic sampling and adaptive feature fusion includes the following steps:
[0022] S1: First, a graph neural network model with a total of L layers is constructed as a basic model, which is the personalized fashion compatibility model;
[0023] S2: Construct user-product heterogeneous prototype relationship diagram, user-user homogeneous prototype relationship diagram, product-user heterogeneous prototype relationship diagram, and product-product homogeneous prototype relationship diagram based on the interactive relationship between fashion entities;
[0024] S3: Based on the heterogeneous and homogeneous prototype relationship graph with the user as the target node created in S2, a multimodal feature representation matrix of the user is created, the multimodal feature representation matrix of the user is input into the graph neural network model, and an updated multimodal feature representation matrix of the user is obtained through dynamic neighbor sampling and adaptive feature fusion operations, i.e., user feature representation;
[0025] S4: Based on the heterogeneous and homogeneous prototype relationship graph with the single product as the target node created in S2, a multimodal feature representation matrix of the single product is created, and the feature representation matrix of the fashion single product is fed into the graph neural network model by using the graph neural network model, and an updated multimodal feature representation matrix of the fashion single product is obtained through dynamic neighbor sampling and adaptive feature fusion operations, including the multimodal feature representation of the top and the multimodal feature representation of the bottom;
[0026] S5: after S4, the multimodal feature representations of the top and bottom are obtained, and the two feature representations are sent to the top-bottom complementary compatibility module to calculate the complementary compatibility score between the top and bottom;
[0027] S6: After S3 and S4, the multimodal feature representations of the bottoms and the user are obtained respectively, and these two feature representations are sent to the user personalized preference module to obtain the personalized preference score of the target user for the given bottoms;
[0028] S7: The complementary compatibility scores of the tops and bottoms obtained from S5 and the personalized preference scores of the target user for the given bottoms obtained from S6 are sent to the recommendation module to obtain the compatibility score of the tops and bottoms that incorporates the user's personalized dressing preference factors.
[0029] Furthermore, in S1, the basic model is based on the GraphSAGE basic model, the difference being that a dynamic neighbor sampling strategy is designed that can dynamically perceive the isomorphic and heterogeneous relationships between nodes within the global neighborhood, and an adaptive feature fusion mechanism that flexibly captures the dependencies between entity features.
[0030] Furthermore, when aggregating the feature information of neighbor nodes, the graph neural network adopts a dynamic neighbor sampling strategy that can perceive the heterogeneous and homogeneous relationships between nodes within the global neighborhood of the node; based on the user-single-product heterogeneous prototype relationship graph Take this as an example, the detailed node sampling steps are as follows:
[0031] A1: When a target user node is given and its neighbor single product nodes , the user's personalized relationship perception score for the shirt Calculate using the following formula:
[0032] ;
[0033] in, and Represent the target user nodes respectively and adjacent top nodes Visual feature representation at layer l of graph neural network; and represents the learnable weight matrix;
[0034] A2: In order to adapt to the dynamic changes of node features in each layer of the graph neural network and to Related single product nodes ( ) is dynamically selected, first calculating the relationship between all single product nodes and the target user node The average correlation :
[0035] ;
[0036] A3: Target users The set of adjacent single product nodes obtained after dynamic sampling It is expressed as follows:
[0037] ;
[0038] in, is the indicator function. During the correlation sampling process, if the node Relative to the node Personalized relationship perception score Not less than the threshold , then the node will be sampled to engage target users feature aggregation.
[0039] Furthermore, in S2, the specific method of creating the heterogeneous and homogeneous interaction relationship diagrams of users, products, and the two is as follows:
[0040] S21: First, four symbols are defined to represent the user set. , Tops Collection , Bottoms Collection And fashion items collection .in, , , and Represent the total number of users, tops, bottoms, and fashion items respectively; it should be noted that each top and each bottom is a specific fashion item;
[0041] S22: Create a dictionary-style single-product isomorphic prototype relationship diagram ,in, and Indicates different target product nodes, and Node , The set of single-product neighbor nodes;
[0042] S23: Create a dictionary-style heterogeneous prototype relationship diagram between products and users ,in, and Indicates different target product nodes, and Node , The user's neighbor node set;
[0043] S24: Create a user-user isomorphic prototype relationship diagram in dictionary form ,in, and Represents different target user nodes, and Node , The user's neighbor node set;
[0044] S25: Create a dictionary-style user-product heterogeneous prototype relationship diagram ,in, and Represents different target user nodes, and Node , The set of single-product neighbor nodes.
[0045] Furthermore, the S3 is specifically:
[0046] S31: Constructing the visual modal feature matrix of fashion items and the text modality feature matrix ; Among them, the fashion item visual modal feature matrix Each row represents a fashion item Visual feature vector of fashion item text modality feature matrix Each row represents a fashion item The text feature vector of
[0047] S32: Feature representation of aggregated neighbor nodes in single product homogeneous space based on graph neural network model Update the feature vector to get the single product Visual feature representation at the kth layer and text feature representation ;
[0048] S33: Feature representation of aggregated neighbor nodes in user heterogeneous space based on graph neural network model, Update the feature vector to get the single product Visual feature representation at the kth layer and text feature representation ;
[0049] S34: The single product obtained from the single product isomorphic space Multimodal feature representation and , and items obtained from the user's heterogeneous space Multimodal feature representation and Perform feature fusion to obtain the final single product Multimodal feature representation and .
[0050] Furthermore, the step S4 is specifically as follows:
[0051] S41: Constructing user visual modality feature matrix and the text modality feature matrix ; Among them, the user visual modality feature matrix Each row represents each user Visual feature vector, user text modality feature matrix Each row represents each user The text feature vector of
[0052] S42: Feature representation of aggregated neighbor nodes in single-product heterogeneous space based on graph neural network, The feature vector is updated to get the user Visual feature representation at the kth layer and text feature representation ;
[0053] S43: Based on the graph neural network model, the feature representation of neighbor nodes is aggregated in the user homogeneous space to The feature vector of the user is updated to obtain Visual feature representation at the kth layer and text feature representation ;
[0054] S44: Users acquired from the single product heterogeneous space Multimodal feature representation and , and users obtained from the user isomorphic space Multimodal feature representation and Perform feature fusion to obtain the final user Multimodal feature representation and .
[0055] Furthermore, the step S5 is specifically as follows:
[0056] S51: The top obtained through S3 Multimodal feature representation (i.e. and ) and bottoms Multimodal feature representation (i.e. and ) is sent to the upper garment-lower garment compatibility modeling module;
[0057] S52: Calculate the compatibility score of tops and bottoms ;
[0058] In the formula, represents a non-negative trade-off parameter between (0, 1).
[0059] Furthermore, the S6 is specifically:
[0060] S61: The lower garment obtained in step S3 Multimodal feature representation (i.e. and ) and the user obtained in step S4 Multimodal feature representation (i.e. and ) is sent to the user personalized preference module;
[0061] S62: Calculate the user's like score for a given bottom ;
[0062] In the formula, represents a non-negative trade-off parameter between (0, 1).
[0063] Further, the S7 is specifically:
[0064] S71: Top-bottom compatibility score obtained from S52 and the user's preference score for the given bottoms obtained according to step S62 , calculating clothing compatibility that incorporates user personalized preferences :
[0065] ;
[0066] Where π is a non-negative trade-off parameter between (0, 1);
[0067] S72: Use BPR Loss to calculate the loss: ;
[0068] In the formula, , They represent tops that incorporate personalized elements. With bottoms , Bottoms compatibility score.
[0069] The method and system can be applied to fields such as clothing compatibility modeling and fashion recommendation.
[0070] The advantages and beneficial effects of the present invention are as follows:
[0071] The specific use of the graph neural network provided by the present invention in the field of personalized clothing compatibility modeling can comprehensively characterize the feature representation of fashion entities in dual spaces (i.e., isomorphic and heterogeneous), capture the compatibility or personalized relationships between different entities from multiple angles, and thus improve the accuracy of personalized compatibility modeling.
[0072] The present invention designs a dynamic neighbor sampling strategy and an adaptive feature fusion mechanism, which can accurately perceive and learn the features of the homogeneous and heterogeneous neighboring nodes of the target node, and flexibly fuse their features; it is used to dynamically perceive and learn the homogeneous and heterogeneous relationships between different nodes, and flexibly fuse the features of the target node and the neighboring nodes, so as to efficiently complete the personalized fashion compatibility modeling task and solve many problems in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 Schematic diagram of the overall framework of the modeling process of the present invention.
[0074] Figure 2 The present invention is a flow chart of the modeling method.
[0075] Figure 3 This is a comparison chart of the MRR effects of different methods in fashion product retrieval. DETAILED DESCRIPTION
[0076] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings.
[0077] Embodiment 1:
[0078] like Figure 1 As shown, a personalized compatibility modeling system based on dynamic sampling and adaptive feature fusion includes a fashion entity composition module, a dynamic neighbor sampling module, a user multimodal adaptive feature fusion module, a single product multimodal adaptive feature fusion module, a top-bottom complementary compatibility module, a user personalized preference module, and a recommendation module; wherein the fashion entity composition module is connected to the user multimodal adaptive feature fusion module and the single product multimodal adaptive feature fusion module through the dynamic neighbor sampling module, the single product multimodal adaptive feature fusion module is connected to the top-bottom complementary compatibility module, the single product multimodal adaptive feature fusion module and the user multimodal adaptive feature fusion module are connected to the user personalized preference module, and the top-bottom complementary compatibility module and the user personalized preference module are connected to the recommendation module;
[0079] Fashion entity composition module: Based on the interactive relationship between users and fashion items, construct user-item heterogeneous prototype relationship diagram, user-user homogeneous prototype relationship diagram, item-user heterogeneous prototype relationship diagram, and item-item homogeneous prototype relationship diagram;
[0080] User multimodal adaptive feature fusion module: used to input the user-single-product heterogeneous prototype relationship graph, the user-user homogeneous prototype relationship graph, the fashion single-product multimodal features extracted by the ViT and Bert models, and the randomly initialized user multimodal features into the constructed graph neural network model, and obtain the updated user multimodal feature representation through dynamic neighbor sampling and adaptive feature fusion operations. The user multimodal adaptive feature fusion module includes: a first representation submodule, a second representation submodule, and a third representation submodule, wherein the first representation submodule and the second representation submodule are both connected to the third representation submodule;
[0081] The first representation submodule is used to obtain the multimodal feature representation of users from the heterogeneous space by using the graph neural network, attention mechanism and adaptive feature fusion method from the sampled user-item heterogeneous relationship graph;
[0082] The second representation submodule is used to obtain the multimodal feature representation of the user from the isomorphic space based on the sampled user-user isomorphic relationship graph, using the graph neural network, and based on the attention mechanism and adaptive feature fusion method;
[0083] The third representation submodule: takes the user multimodal feature representation output by the first representation submodule and the second representation submodule as input, and is used to fuse the user multimodal feature representation obtained from the heterogeneous space and the user multimodal feature representation obtained from the homogeneous space to obtain the final multimodal feature representation of the target user.
[0084] Single product multimodal adaptive feature fusion module: used to input the single product-user heterogeneous prototype relationship diagram, the single product-single product homogeneous prototype relationship diagram, the fashion single product multimodal features extracted by the ViT and Bert models, and the randomly initialized user multimodal features into the constructed graph neural network model, and obtain the updated single product multimodal feature representation through dynamic neighbor sampling and adaptive feature fusion operations. The single product multimodal adaptive feature fusion module includes: a first representation submodule, a second representation submodule and a third representation submodule, wherein the first representation submodule and the second representation submodule are both connected to the third representation submodule;
[0085] The first representation submodule is used to obtain the multimodal feature representation of the product from the isomorphic space from the sampled product-product isomorphic relationship graph, using the graph neural network model, and based on the attention mechanism and adaptive feature fusion method;
[0086] The second representation submodule is used to obtain the multimodal feature representation of a single product from the heterogeneous space by using the graph neural network model, the attention mechanism and the adaptive feature fusion method from the sampled single product-user heterogeneous relationship graph;
[0087] The third representation submodule: takes the single product feature representation output by the first representation submodule and the second representation submodule as input, and is used to fuse the single product multimodal feature representation obtained from the heterogeneous space and the single product multimodal feature representation obtained from the homogeneous space to obtain the final multimodal feature representation of the target fashion item.
[0088] Top-Bottom Compatibility Module: The multimodal feature representation of tops and bottoms obtained from the single-item multimodal adaptive feature fusion module is fed into this module as input information to calculate the complementary compatibility score between tops and bottoms.
[0089] User personalization module: The multimodal feature representation of the bottoms obtained from the single product multimodal adaptive feature fusion module and the multimodal feature representation of the user obtained from the user multimodal adaptive feature fusion module are sent as input information to this module to calculate the personalized preference score of the target user for the given bottoms;
[0090] Recommendation module: The compatibility score between tops and bottoms obtained by the top-bottom complementary compatibility module and the user's personalized score for bottoms obtained by the user personalized preference module are used as input, and the compatibility score between tops and bottoms that incorporates the user's personalized dressing factors is calculated. Based on the score, clothing recommendations are made for users.
[0091] Embodiment 2:
[0092] like Figure 2 As shown in the figure, a personalized compatibility modeling method based on dynamic sampling and adaptive feature fusion is proposed. By constructing heterogeneous and homogeneous prototype interaction relationship diagrams among users, items and the two, accurate feature representation of fashion entities is achieved based on dynamic neighbor sampling and adaptive feature fusion methods in dual space, thereby realizing accurate clothing recommendations for specific users.
[0093] The specific steps include:
[0094] S1: Construct user-single-product heterogeneous prototype relationship diagram, user-user homogeneous prototype relationship diagram, single product-user heterogeneous prototype relationship diagram, single product-single product homogeneous prototype relationship diagram. The four prototype interaction relationship diagrams constructed are all undirected graphs. The detailed interaction diagram construction method is as follows:
[0095] S11: First, define four symbols to represent the user set. , Tops Collection , Bottoms Collection And fashion items collection .in, , , and They represent the total number of users, tops, bottoms and fashion items respectively; it should be noted that each top and each bottom is a specific fashion item.
[0096] S12: Create a dictionary-style product-product isomorphic prototype relationship diagram ,in, and Indicates different target product nodes, and Node , The set of single-product neighbor nodes.
[0097] S13: Create a dictionary-based heterogeneous prototype relationship diagram between products and users ,in, and Indicates different target product nodes, and Node , The set of user neighbor nodes.
[0098] S14: Create a dictionary-based user-user isomorphic prototype relationship graph ,in, and Represents different target user nodes, and Node , The set of user neighbor nodes.
[0099] S15: Create a dictionary-style user-product heterogeneous prototype relationship diagram ,in, and Represents different target user nodes, and Node , The set of single-product neighbor nodes.
[0100] In the above construction of the four heterogeneous and isomorphic prototype interaction diagrams, the following two points need to be noted: First, there is no self-loop in the diagram, that is, the dictionary form There is no element in the value set in the prototype interaction relationship diagram that is the same as the key; secondly, the length of the value set is the number of neighbor nodes of the target node.
[0101] The present invention adopts a dynamic neighbor sampling strategy that can perceive heterogeneous and homogeneous relationships between nodes within the global neighborhood of the node. Take this as an example, the detailed node sampling steps are as follows:
[0102] A1: When a target user node is given and its neighbor single product nodes , the user's personalized relationship perception score for the shirt It can be calculated by the following formula:
[0103] ;
[0104] in, and Represent the target user nodes respectively and adjacent top nodes Visual feature representation at layer l of a graph neural network. and represents the learnable weight matrix.
[0105] A2: In order to adapt to the dynamic changes of node features in each layer of the graph neural network and to Related single product nodes ( ) is dynamically selected, first calculating the relationship between all single product nodes and the target user node The average correlation :
[0106] ;
[0107] A3: Target users The set of adjacent single product nodes obtained after dynamic sampling It can be expressed as follows:
[0108] ;
[0109] in, is the indicator function. During the correlation sampling process, if the node Relative to the node Personalized relationship perception score Not less than the threshold , then the node will be sampled to engage target users feature aggregation.
[0110] S2: Based on the four heterogeneous and isomorphic prototype interaction diagrams created in S1, construct the user visual modality feature matrix and the text modality feature matrix ; Among them, the user visual modality feature matrix Each row represents each user Visual feature vector, user text modality feature matrix Each row represents each user The text feature vector.
[0111] Next, we describe in detail the process of aggregating user visual feature information based on graph neural networks in heterogeneous and homogeneous spaces:
[0112] S21: User feature representation based on heterogeneous spatial feature aggregation:
[0113] ;
[0114] in, Represents the aggregated neighbor node feature representation. and Respectively expressed in Medium User and adjacent single product nodes Visual feature representation in layer l of a graph neural network. is the attention coefficient.
[0115] When fusing the features of the target node and the aggregated neighbor nodes, in order to capture the dependency between entity features and make the feature fusion method more flexible, the present invention is inspired by the gating mechanism and proposes an adaptive feature fusion method. Specifically, the representation of the target node and the aggregated neighbor nodes after adaptive feature fusion is as follows:
[0116] ;
[0117] in, represents the trade-off parameter learned by the neural network. and denote the learnable weights and biases in the neural network, respectively, and the symbol ⊙ denotes the Hadamard product. In a similar way, the user Text features after aggregation in user-item heterogeneous space .
[0118] S22: User feature representation based on homogeneous space feature enhancement:
[0119] ;
[0120] in, and Respectively represent users and neighbor nodes In the graph neural network Visual feature representation in the layer. represents the adaptive trade-off parameter. is the attention coefficient. Similarly, we can obtain the user Text Feature Representation in Heterogeneous Space .
[0121] S23: Finally, the user visual features after the fusion of heterogeneous and homogeneous dual spaces and text features It is expressed as follows:
[0122] ;
[0123] Among them, the symbol Represents feature concatenation.
[0124] S3: Based on the four heterogeneous and isomorphic prototype interaction diagrams created in S1, the visual modal feature matrix of fashion items is constructed and the text modality feature matrix ; Among them, the fashion item visual modal feature matrix Each row represents a fashion item Visual feature vector of fashion item text modality feature matrix Each row represents a fashion item The text feature vector of . Next, put on Taking this as an example, the process of aggregating the visual feature information of tops based on graph neural networks in heterogeneous and homogeneous spaces is described in detail:
[0125] S31: Single product feature representation based on heterogeneous spatial feature aggregation:
[0126] ;
[0127] in, and Respectively indicate tops and adjacent user nodes In the graph neural network The visual feature representation in the layer, represents the aggregated neighbor node feature representation, represents the attention coefficient. Represents the adaptive trade-off parameter learned by the neural network. Similarly, the tops based on heterogeneous space aggregation can be obtained Text feature representation , bottoms Visual feature representation And text feature representation .
[0128] S32: Single product feature representation based on homogeneous space feature enhancement:
[0129] ;
[0130] in, and Respectively indicate tops and adjacent single product nodes In the graph neural network Visual feature representation in the layer. represents the attention coefficient. represents the adaptive trade-off parameter learned by the neural network. Similarly, the top can be obtained Text feature representation , bottoms Visual feature representation And text feature representation .
[0131] S33: Top based on the fusion of heterogeneous and homogeneous dual spaces Visual features and text features It is expressed as follows:
[0132] ;
[0133] Similarly, you can get the lower garment Final visual features and text features .
[0134] S4: The top obtained in step S3 Multimodal feature representation (i.e. and ), and bottoms The multimodal feature representation of and ) is fed into the upper-lower complementary compatibility module to calculate the upper With bottoms The compatibility score is calculated as follows:
[0135] ;
[0136] The above formula uses the dot product to calculate the complementary compatibility score between the top and the bottom.
[0137] S5: The lower garment obtained in step S3 The multimodal feature representation of and ), and the user multimodal feature representation obtained by step S2 (i.e. and ) is sent to the user personalization module to calculate the user's personalized preference score for a given bottom. The specific calculation process is as follows:
[0138] ;
[0139] The above formula uses the dot product to calculate the user's personalized like score for a given bottoms.
[0140] S6: The main goal of the recommendation module is to provide personalized recommendations for given bottoms. The detailed operation steps are as follows:
[0141] S61: After S4 and S5, the tops are obtained. With bottoms Compatibility score and users For bottoms Personalized preference , which integrates the clothing compatibility of users' personalized preferences It can be expressed as follows:
[0142] ;
[0143] S62: Construct a quadruple based on the existing data set:
[0144] ;
[0145] Among them, O in the quaternary group represents a set of suits consisting of tops and bottoms. Indicates that in a given top In this case, the user Prefer bottoms Rather than .
[0146] S63: Through the definition of BPR loss function, the objective function is as follows:
[0147] ;
[0148] ;
[0149] Among them, λ is a non-negative hyperparameter, Represents the learnable hyperparameters of the model.
[0150] S64: Based on the calculated loss value, the stochastic gradient descent method is used to update the learnable hyperparameters in the model until the model converges, thereby completing the model training task. It should be noted that the Adam optimizer is used during the model training process.
[0151] S65: In addition, the ratio of training set, validation set and test set in the experiment is 7:2:1. The role of the training set is to train the model parameters, the role of the validation set is to adjust the hyperparameters in the model, and the role of the test set is to evaluate the performance of the model recommendation.
[0152] Example 3: Verification Experiment
[0153] This embodiment conducts relevant experiments on the IQON3000 and Alibaba-iFashion datasets to demonstrate the effectiveness of the present invention.
[0154] (1) Recommendations for personalized complementary fashion items:
[0155] Tables 1 and 2 show the performance comparison of the present invention and different benchmark methods on the personalized complementary fashion item recommendation task. The evaluation index used in Table 1 is AUC, and the evaluation index used in Table 2 is HR and NDCG. The meanings of these three evaluation indexes are as follows:
[0156] AUC: measures the degree of compatibility between fashion items;
[0157] HR@K: measures whether the top K fashion items recommended by the model proposed in this invention are what the user is really interested in.
[0158] NDCG@K: It considers the hit position of the fashion items recommended by the model proposed in the present invention in the sorted list. If the hit item is at the front of the recommendation list, the system will give a higher score, otherwise, it will give a lower score;
[0159] From the experimental results shown in Table 1 and Table 2, the present invention has achieved the best experimental results compared with other benchmark methods.
[0160] (2) Ablation experiment:
[0161] In the ablation experiment part, the influence of heterogeneous and homogeneous relationship graphs, dynamic neighbor sampling strategy, contrast normalization and multimodal data on the experimental results are verified in turn. Table 3 shows the specific ablation experiment results. From the results, it can be seen that each key part of the present invention has played a role to varying degrees.
[0162] (3) Complementary fashion item search application:
[0163] In order to test the performance of the model in the complementary fashion item retrieval application, Figure 3 The performance comparison of different models on different numbers of candidate bottoms T is shown. It can be clearly seen from the figure that compared with other benchmark models, the present invention has good performance in personalized fashion compatibility modeling.
[0164] The personalized compatibility modeling method based on dynamic sampling and adaptive feature fusion proposed in the present invention achieves accurate feature representation of users and fashion items from multiple perspectives by learning high-order interactive relationships between fashion entities in heterogeneous and homogeneous dual spaces, thereby accurately and efficiently completing personalized fashion recommendation tasks.
[0165] Table 1 Performance comparison of different methods on AUC index
[0166] .
[0167] Table 2 Comparison of experimental results under different Top-K values under NDCG@K and HR@K evaluation indicators
[0168] .
[0169] Table 3 Ablation experiment data results
[0170] .
[0171] Finally, although the present invention is described in specific embodiments, not every embodiment is an independent technical solution. This narrative is intended to improve clarity. Those skilled in the art should view this document as a whole and can appropriately combine the technical solutions in various embodiments to form other understandable embodiments.
Claims
1. A personalized compatibility modeling system based on dynamic sampling and adaptive feature fusion, characterized in that: The system includes a fashion entity composition module, a user multimodal adaptive feature fusion module, a single product multimodal adaptive feature fusion module, a top-bottom complementary compatibility module, a user personalized preference module and a recommendation module; wherein the fashion entity composition module is connected to the user multimodal adaptive feature fusion module and the single product multimodal adaptive feature fusion module, the single product multimodal adaptive feature fusion module is connected to the top-bottom complementary compatibility module, the single product multimodal adaptive feature fusion module and the user multimodal adaptive feature fusion module are connected to the user personalized preference module, and the top-bottom complementary compatibility module and the user personalized preference module are connected to the recommendation module; the dynamic sampling is a dynamic neighbor sampling strategy that can perceive heterogeneous and isomorphic relationships between nodes within the global neighborhood of the node; based on the user-product heterogeneous prototype relationship graph G ui For example, the node sampling steps are as follows: A1: When a target user node u is given m and its neighbor single product node t i , the user's personalized relationship perception score for the shirt Calculate using the following formula: in, and Represent the target user node u respectively m and adjacent top node t i Visual feature representation at layer l of the graph neural network; W s1 and W s2 represents the learnable weight matrix; A2: In order to adapt to the dynamic changes of node features in each layer of the graph neural network and to m Related single product nodes t i (b j ) is dynamically selected. First, all single product nodes are calculated for the target user node u m The average correlation A3: Target user u m The set of adjacent single product nodes obtained after dynamic sampling It is expressed as follows: Among them, I(·) is the indicator function. In the process of correlation sampling, if the node t i Relative to node u m Personalized relationship perception score Not less than the threshold Then the node t i will be sampled so as to participate in the target user u m feature aggregation.
2. The personalized compatibility modeling system according to claim 1, characterized in that: The fashion entity composition module: constructs a user-item heterogeneous prototype relationship diagram, a user-user homogeneous prototype relationship diagram, an item-user heterogeneous prototype relationship diagram, and an item-item homogeneous prototype relationship diagram according to the interactive relationship between the user and the fashion item; The user multimodal adaptive feature fusion module is used to input the user-single-product heterogeneous prototype relationship graph, the user-user homogeneous prototype relationship graph, the fashion single-product multimodal features extracted by the ViT and Bert models, and the randomly initialized user multimodal features into the constructed graph neural network model, and obtain the updated user multimodal feature representation through dynamic neighbor sampling and adaptive feature fusion operations; The single product multimodal adaptive feature fusion module is used to input the single product-user heterogeneous prototype relationship graph, the single product-single product homogeneous prototype relationship graph, the fashion single product multimodal features extracted by the ViT and Bert models, and the randomly initialized user multimodal features into the constructed graph neural network model, and obtain the updated single product multimodal feature representation through dynamic neighbor sampling and adaptive feature fusion operations; The top-bottom complementary compatibility module: the multimodal feature representation of the top and bottom obtained from the single-item multimodal adaptive feature fusion module is sent as input information to the module to calculate the complementary compatibility score between the top and bottom; The user personalized preference module: the multimodal feature representation of the bottoms obtained from the single product multimodal adaptive feature fusion module and the multimodal feature representation of the user obtained from the multimodal adaptive feature fusion module are input into the module to calculate the personalized preference score of the target user for the given bottoms; The recommendation module takes the compatibility score between tops and bottoms obtained by the top-bottom complementary compatibility module and the user's personalized score for bottoms obtained by the user personalized preference module as input, calculates the compatibility score between tops and bottoms that incorporates the user's personalized dressing preference factors, and recommends clothing to the user based on the score.
3. The personalized compatibility modeling system according to claim 1, characterized in that: The user multimodal adaptive feature fusion module includes a first representation submodule, a second representation submodule and a third representation submodule, wherein the first representation submodule and the second representation submodule are both connected to the third representation submodule; The first representation submodule is used to obtain the multimodal feature representation of users from the heterogeneous space by using the graph neural network, attention mechanism and adaptive feature fusion method from the sampled user-item heterogeneous relationship graph; The second representation submodule is used to obtain the multimodal feature representation of the user from the isomorphic space based on the sampled user-user isomorphic relationship graph, using the graph neural network, and based on the attention mechanism and adaptive feature fusion method; The third representation submodule: takes the user multimodal feature representation output by the first representation submodule and the second representation submodule as input, and is used to fuse the user multimodal feature representation obtained from the heterogeneous space and the user multimodal feature representation obtained from the homogeneous space to obtain the final multimodal feature representation of the target user.
4. The personalized compatibility modeling system according to claim 1, characterized in that: The single product multi-modal adaptive feature fusion module includes a first representation submodule, a second representation submodule and a third representation submodule, wherein the first representation submodule and the second representation submodule are both connected to the third representation submodule: The first representation submodule is used to obtain the multimodal feature representation of the product from the isomorphic space from the sampled product-product isomorphic relationship graph, using the graph neural network model, and based on the attention mechanism and adaptive feature fusion method; The second representation submodule is used to obtain the multimodal feature representation of a single product from the heterogeneous space by using the graph neural network model, the attention mechanism and the adaptive feature fusion method from the sampled single product-user heterogeneous relationship graph; The third representation submodule: takes the single product feature representation output by the first representation submodule and the second representation submodule as input, and is used to fuse the single product multimodal feature representation obtained from the heterogeneous space and the single product multimodal feature representation obtained from the homogeneous space to obtain the final multimodal feature representation of the target fashion item.
5. A personalized compatibility modeling method based on dynamic sampling and adaptive feature fusion, characterized in that: The following steps are involved: S1: First, a graph neural network model with a total of L layers is constructed as the basic model, which is a personalized compatibility model. When aggregating the feature information of neighbor nodes, the graph neural network model adopts a dynamic neighbor sampling strategy that can perceive the heterogeneous and homogeneous relationships between nodes within the global neighborhood of the node. The user-single-product heterogeneous prototype relationship graph G ui For example, the node sampling steps are as follows: A1: When a target user node u is given m and its neighbor single product node t i , the user's personalized relationship perception score for the shirt Calculate using the following formula: in, and Represent the target user node u respectively m and adjacent top node t i Visual feature representation at layer l of the graph neural network; W s1 and W s2 represents the learnable weight matrix; A2: In order to adapt to the dynamic changes of node features in each layer of the graph neural network and to m Related single product nodes t i (b j ) is dynamically selected. First, all single product nodes are calculated for the target user node u m The average correlation A3: Target user u m The set of adjacent single product nodes obtained after dynamic sampling It is expressed as follows: Among them, I(·) is the indicator function. In the process of correlation sampling, if the node t i Relative to node u m Personalized relationship perception score Not less than the threshold Then the node t i will be sampled so as to participate in the target user u m Feature aggregation; S2: Construct user-product heterogeneous prototype relationship diagram, user-user homogeneous prototype relationship diagram, product-user heterogeneous prototype relationship diagram, and product-product homogeneous prototype relationship diagram based on the interactive relationship between fashion entities; S3: Based on the heterogeneous and homogeneous prototype relationship graph with the user as the target node created in S2, a multimodal feature representation matrix of the user is created, the multimodal feature representation matrix of the user is input into the graph neural network model, and an updated multimodal feature representation matrix of the user is obtained through dynamic neighbor sampling and adaptive feature fusion operations, i.e., user feature representation; S4: Based on the heterogeneous and homogeneous prototype relationship graph with the single product as the target node created in S2, a multimodal feature representation matrix of the single product is created, and the feature representation matrix of the fashion single product is fed into the graph neural network model by using the graph neural network model, and an updated multimodal feature representation matrix of the fashion single product is obtained through dynamic neighbor sampling and adaptive feature fusion operations, including the multimodal feature representation of the top and the multimodal feature representation of the bottom; S5: after S4, the multimodal feature representations of the top and bottom are obtained, and the two feature representations are sent to the top-bottom complementary compatibility module to calculate the complementary compatibility score between the top and bottom; S6: After S3 and S4, the multimodal feature representations of the bottoms and the user are obtained respectively, and these two feature representations are sent to the user personalized preference module to obtain the personalized preference score of the target user for the given bottoms; S7: The complementary compatibility scores of the tops and bottoms obtained from S5 and the personalized preference scores of the target user for the given bottoms obtained from S6 are sent to the recommendation module to obtain the compatibility score of the tops and bottoms that incorporates the user's personalized dressing preference factors.
6. The personalized compatibility modeling method according to claim 5, characterized in that: In step S1, the basic model is based on the GraphSAGE basic model, and a dynamic neighbor sampling strategy that can dynamically perceive the isomorphic and heterogeneous relationships between nodes in the global neighborhood and an adaptive feature fusion mechanism that flexibly captures the dependencies between entity features are designed.
7. The personalized compatibility modeling method according to claim 5, characterized in that: In S2, the specific method of creating the heterogeneous and homogeneous interaction relationship diagram between users, items, and the two is as follows: S21: First, four symbols are defined to represent the user set. Tops Collection Bottoms Collection And fashion items collection Among them, N u 、N t 、N b and N f Represent the total number of users, tops, bottoms, and fashion items respectively; it should be noted that each top and each bottom is a specific fashion item; S22: Create a dictionary-style single-product isomorphic prototype relationship diagram {f o1 :{f1,f2...f i }, f o2 :{f1,f2...f n }...}, where f o1 With f o2 Indicates different target product nodes, {f1, f2...f i } and {f1, f2...f n } are nodes f o1 , f o2 The set of single-product neighbor nodes; S23: Create a dictionary-style heterogeneous prototype relationship diagram between products and users {f o1 :{u1,u2...u i }, f o2 :{u1,u2...u n }...}, where f o1 With f o2 Indicates different target product nodes, {u1, u2...u i } with {u1, u2...u n } are nodes f o1 , f o2 The user's neighbor node set; S24: Create a user-user isomorphic prototype relationship graph in dictionary form {u o1 :{u1,u2...u i },u o2 :{u1,u2...u n }...}, where u o1 with u o2 Represents different target user nodes, {u1, u2...u i } with {u1, u2...u n } are node u o1 ,u o2 The user's neighbor node set; S25: Create a dictionary-style user-item heterogeneous prototype relationship diagram {u o1 :{f1,f2...f i },u o2 :{f1,f2...f n }...}, where u o1 with u o2 Represents different target user nodes, {f1, f2...f i } and {f1, f2...f n } are node u o1 ,u o2 The set of single-product neighbor nodes.
8. The personalized compatibility modeling method according to claim 5, characterized in that: The S3 is specifically: S31: Constructing the visual modal feature matrix V of fashion items f and the text modality feature matrix C f ; Among them, the fashion item visual modality feature matrix V f Each row represents a fashion item. i Visual feature vector of fashion item text modality feature matrix C f Each row represents a fashion item. i The text feature vector of S32: Based on the graph neural network model, the feature representation of neighbor nodes is aggregated in the single product homogeneous space, and the single product f i The feature vector of the single product f is updated to obtain i Visual feature representation at the kth layer and text feature representation S33: Based on the graph neural network model, the feature representation of neighbor nodes is aggregated in the user heterogeneous space, and the single product f i The feature vector of the single product f is updated to obtain i Visual feature representation at the kth layer and text feature representation S34: The single product f obtained from the single product isomorphic space i Multimodal feature representation and And the single product f obtained from the user heterogeneous space i Multimodal feature representation and Perform feature fusion to obtain the final single product f i Multimodal feature representation and 9. The personalized compatibility modeling method according to claim 5, characterized in that: The step S4 is specifically as follows: S41: Construct user visual modality feature matrix V u and the text modality feature matrix C u ; Among them, the user visual modality feature matrix V u Each row represents each user u m Visual feature vector, user text modality feature matrix C u Each row represents each user u m The text feature vector of S42: Feature representation of aggregated neighbor nodes in single-product heterogeneous space based on graph neural network, for user u m Update the feature vector of user u m Visual feature representation at the kth layer and text feature representation S43: Based on the graph neural network model, the feature representation of neighbor nodes is aggregated in the user homogeneous space, and the user u m Update the feature vector of user u m Visual feature representation at the kth layer and text feature representation S44: User u will be obtained from the single product heterogeneous space m Multimodal feature representation and and user u obtained from the user isomorphic space m Multimodal feature representation and Perform feature fusion to obtain the final user u m Multimodal feature representation and 10. The personalized compatibility modeling method according to claim 5, characterized in that: The step S5 is specifically as follows: S51: The top obtained through S3 will be i Multimodal feature representation (i.e. and ) and bottoms b j Multimodal feature representation (i.e. and ) is sent to the upper garment-lower garment compatibility modeling module; S52: Calculate the compatibility score of tops and bottoms Where α represents a non-negative trade-off parameter between (0, 1).
11. The personalized compatibility modeling method according to claim 5, characterized in that: The S6 is specifically: S61: The lower garment b obtained in step S3 is j Multimodal feature representation (i.e. and ) and the user u obtained in step S4 m Multimodal feature representation (i.e. and ) is sent to the user personalized preference module; S62: Calculate the user's like score for a given bottom Where β represents a non-negative trade-off parameter between (0, 1).
12. The personalized compatibility modeling method according to claim 5, characterized in that: The S7 is specifically: S71: Top-bottom compatibility score s obtained from S52 ij and the user's preference score s for the given bottoms obtained according to step S62 mj , calculating clothing compatibility that incorporates user personalized preferences Where π is a non-negative trade-off parameter between (0, 1); S72: Use BPR Loss to calculate the loss: In the formula, They represent tops that incorporate personalized elements. i With bottoms b j , Bottoms k compatibility score.
