Dynamic attribute network level label reasoning method based on label semantics
Through the dynamic attribute network hierarchical tag reasoning method based on tag semantics, using the tag semantic hierarchical graph and the triple attention mechanism, a hierarchical tag reasoning model is generated, which solves the problem that the existing technology cannot be applied to multi-level tag reasoning, and realizes the attribute network Multi-level label reasoning of mid-nodes adapts to dynamic scenarios and improves user experience.
Patent Information
- Application Number
- CN202410972587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-07-19
AI Technical Summary
The existing technology cannot be applied to the inference work of nodes with hierarchical labels in the attribute network, and cannot effectively infer the multi-level labels of new users in the dynamic attribute network.
The dynamic attribute network hierarchical label reasoning method based on label semantics is used to generate a hierarchical label reasoning model by constructing a label semantic hierarchical graph and a triple attention mechanism. It combines the user node embedding matrix and the label node embedding matrix for multiple rounds of training, and uses online fine-tuning and The auxiliary parameter strategy dynamically updates the model to achieve reasoning on multi-level labels.
It realizes multi-level label reasoning for nodes in the attribute network, can better provide users with personalized services, adapt to dynamic attribute network scenarios, and improves user experience.
Smart Images

Figure CN118839773A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of attribute network label reasoning methods, and in particular to a dynamic attribute network hierarchical label reasoning method based on label semantics. Background Art
[0002] In the real world, nodes in various attribute networks, such as social networks, always have attribute labels. For example, users in social networks always use attribute labels to indicate their hobbies, occupations, or other attributes. However, due to the limitation of information collection, only a small number of nodes have attribute labels. According to data, only 20% to 30% of users of Sina Weibo, China's largest microblogging platform, show their occupations. In addition, attribute networks in real life are always dynamic. On the one hand, most social media, such as Douyin and Weibo, have a large number of new users registering every day, and a large number of links are also generated. In many scenarios, it is necessary to infer the attribute labels of these new users in a timely manner. On the other hand, the relationship between users in social networks, such as users and their followers, is always constantly established or disappearing. For example, when someone changes his / her career trajectory or research interests, he / she will establish relationships with some new peers in the social network. Studying this dynamic of the social circle can timely discover changes in users' occupations and interests. Therefore, in general, attribute label reasoning for users can provide users with more personalized services such as product and content recommendations, thereby effectively improving user experience.
[0003] Prior art work on label reasoning always assumes that all labels are at one level, for example, inferring the interests of users in social networks. In these works, there is no hierarchical relationship between labels, such as "military" and "classical music", both of which are at the same level. However, in some cases, labels can be organized into a hierarchy through their semantics. For example, in an academic network in the computer industry, the research interest labels of different users can be organized into a hierarchical structure such as "computer science" - "artificial intelligence" - "natural language processing". Therefore, existing label reasoning cannot be applied to reasoning work with multi-level labels. The present invention focuses on solving the label reasoning problem when nodes in attribute networks have hierarchical labels. Summary of the invention
[0004] The present invention provides a dynamic attribute network hierarchical label reasoning method based on label semantics to solve the limitation problem that the existing label reasoning method cannot be applied to multi-level label reasoning due to the assumption that labels are at the same level.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The dynamic attribute network hierarchical label reasoning method based on label semantics includes the following steps:
[0007] Step 1: Use the data set to construct an attribute network G, and use the labels of user nodes in the attribute network G to construct a label semantic hierarchy graph H; the data in the data set includes known user node data in the attribute network, known relationship data between user nodes, known feature data of user nodes, and known multi-level label path data of user nodes;
[0008] Step 2: Calculate the embedding matrix Z of the user node in the attribute network G and the embedding matrix F of the label node in the label semantic hierarchy graph H respectively;
[0009] Step 3: Generate a hierarchical label inference model, and train the label inference model using the user node embedding matrix Z and the label node embedding matrix F obtained in step 2;
[0010] During each training, the hierarchical label inference model uses the label semantics in the label node embedding matrix F as the classification weight of the user node in the attribute network, and combines it with the user node embedding matrix Z to obtain the label inference results of each layer of the user node in the label semantic hierarchical graph H in the attribute network through semantic fully connected layer inference.
[0011] In addition, the hierarchical label reasoning model is based on the label semantics of each layer of the user node, and obtains the label reasoning results of each layer of all user nodes in the label semantic hierarchy graph H through semantic label propagation.
[0012] Finally, the hierarchical label reasoning model combines the label reasoning results and Get the final label inference result of each user node in the training set at each layer in the label semantic hierarchy graph H;
[0013] Performing multiple rounds of training on the hierarchical label inference model, and optimizing the parameters of the hierarchical label inference model based on the loss function calculation results, thereby obtaining a trained hierarchical label inference model;
[0014] Step 3: Input the unknown user node data in the attribute network into the trained hierarchical label inference model, and obtain the final label inference result of the unknown user node from the trained hierarchical label inference model.
[0015] In a further step 2, GraphSAGE is used to extract the user node embedding matrix Z from the attribute network G.
[0016] In a further step 2, a triple attention mechanism is used to extract a label node embedding matrix F from the label semantic hierarchy graph H.
[0017] In the further step 3, the loss function adopts the supervised classification cross entropy loss function.
[0018] Furthermore, in step 4, when the unknown user node is a new node, the parameters of the trained hierarchical label inference model are fine-tuned online based on the subgraph where the new node and its links are located, and then the final label inference result of the new node in each layer of the label semantic hierarchy graph H is obtained through the online fine-tuned hierarchical label inference model.
[0019] Furthermore, in step 4, when the unknown user node is a new node, the features of the new node are first transformed to the same dimension as the features of the existing user nodes in the attribute network, and then based on the association between the new node and the existing user nodes in the attribute network, the features of the neighbors of the new node are aggregated to obtain a refined embedding, and finally the inference result is obtained based on the embedding and the prediction module in the original parameters of the model; during specific training, a small number of nodes are deleted from the original data set each time as a new node set, and an association is established between the new node and the old node in the network. Then, based on the auxiliary parameters, the refined embedding of the new and old nodes in the subgraph is obtained and the label is inferred. Finally, the loss function is calculated based on the label of the old node in the subgraph, and the auxiliary parameters are optimized by minimizing the distance between the embedding obtained based on the auxiliary parameters and the embedding obtained based on the original model parameters. When actually used, the label of the new node can be inferred using only the auxiliary parameters.
[0020] Compared with the prior art, the present invention has the following advantages:
[0021] 1. The present invention proposes to use a label semantic hierarchy graph to characterize the association between node labels in an attribute network, which can realize multi-level label reasoning and solve the limitations of existing methods.
[0022] 2. This paper proposes a triple attention mechanism to extract semantic associations in the label semantic hierarchy graph. This mechanism can effectively mine the multi-faceted complex semantics between various labels, and thus provide strong support for the multi-level label reasoning of nodes in the subsequent attribute network;
[0023] 3. The present invention proposes two multi-level label reasoning methods to directly and indirectly use label semantics to perform multi-level label reasoning on nodes in the attribute network. According to the reasoning results, services such as recommendation can be better provided for nodes in the attribute network;
[0024] 4. The present invention proposes two dynamic adaptive strategies, online fine-tuning and auxiliary parameters, to dynamically update the model trained under the static attribute network to adapt to dynamic scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1It is an overall framework diagram of the dynamic attribute network hierarchical label reasoning method based on label semantics in an embodiment of the present invention.
[0026] Figure 2 It is a flow chart of a dynamic attribute network hierarchical label reasoning method based on label semantics in an embodiment of the present invention.
[0027] Figure 3 This is an example of a label semantic hierarchy diagram proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0029] like Figure 1 , Figure 2 As shown, this embodiment discloses a dynamic attribute network hierarchical label reasoning method based on label semantics, comprising the following steps:
[0030] Step 1. Use the data set to construct the attribute network G. The data in the data set described in this embodiment includes known user node data in the attribute network, known relationship data between user nodes, known feature data of user nodes, and known multi-level label path data of user nodes. The attribute network G constructed in this way = (V, E, X, Σ), where V and E respectively represent the set of user nodes and the relationship between user nodes in the attribute network G, X represents the characteristics of the user nodes, and Σ represents the multi-level label path set of user nodes with known attributes.
[0031] In this embodiment, the attribute network is a common network such as a social network and an academic network. The initial features of all user nodes in the attribute network are generated based on the descriptive information corpus of the user node itself. For example, in a social network, different users have personal IDs and personal homepages with relevant introductions. For these corpora, the pre-trained model BERT can be used to process the corpus and generate an initial embedding of length 768. The relationship between user nodes is generally known, such as the attention information between user nodes.
[0032] Then, the labels of the user nodes in the attribute network G are used to construct a label semantic hierarchy graph H = (Σ, T), where Σ represents the label set of the user nodes, that is, the label node set in the label semantic hierarchy H constructed by the label, and T represents the initial feature of the label.
[0033] The label semantic hierarchy graph H is constructed based on existing information or expert knowledge. Specifically, Figure 3As shown in the figure, if we need to infer the research direction of the authors in the computer science academic interaction network, the root node of the label semantic hierarchy graph can be defined as "computer science". Then, the "computer science" root node can extend downward to nodes such as "artificial intelligence"; then the "artificial intelligence" node can further extend downward to "computer vision" and "natural language processing". Since there is not enough information to generate the initial embedding of the label, node2vec can be used to extract the initial embedding of all nodes in the label semantic hierarchy graph H.
[0034] Step 2: Calculate the embedding matrix Z of the user nodes in the attribute network G and the embedding matrix F of the label nodes in the label semantic hierarchy graph H respectively.
[0035] In this embodiment, the GraphSAGE model is used to directly embed all nodes in the attribute network G, and the embeddings of all nodes constitute the user node embedding matrix Z.
[0036] In this implementation, the triple attention mechanism is used to extract the label node embedding matrix F from the label semantic hierarchy graph H. The specific process is as follows:
[0037] (A1) First, extract the importance between the label node and its hierarchical neighbors from the label semantic hierarchy graph H, as shown in the following formula:
[0038]
[0039] Where: α i,j Represents the label node h calculated based on the graph attention mechanism i and label node h j The attention coefficient between Indicates h i hierarchical neighbors, i.e., parent nodes and child nodes; σ represents the ReLU activation function; W represents the learnable parameter matrix; f j For label node h j Features, Represents the node h obtained by extracting the importance of hierarchical neighbors using the graph attention mechanism i The weighted features of α i,j The calculation formula is as follows:
[0040]
[0041] Among them: a Φ Represents the vector for executing the attention mechanism; LeakyReLU represents the activation function; Indicates a Φ The transpose of k Represents the label node h i Neighbor kcharacteristics.
[0042] (A2) Next, extract the importance between the label node and its sibling neighbors, as shown in the following formula:
[0043]
[0044] Where: β i,j Represents the label node h calculated based on the graph attention mechanism i and label node h j The attention coefficient between Represents node h i 's brother neighbor; Represents the node h obtained by extracting the importance of sibling neighbors using the graph attention mechanism i The weighted features of β i,j The calculation formula is:
[0045]
[0046] Among them: a Ψ A vector representing the attention mechanism to be performed.
[0047] (A3) Finally, the two embeddings of the label node are combined using the global attention mechanism to obtain the final embedding z i , as shown in the following formula:
[0048]
[0049] Where: Φ and ρ Ψ They are the attention coefficients of the two embeddings, calculated based on the following formulas:
[0050]
[0051] Where: g, W g and U g They are all weights for calculating the attention mechanism.
[0052] Finally, the embedding z of all labels is obtained i Construct the label node embedding matrix F.
[0053] Step 3: Generate a hierarchical label inference model, and use the user node embedding matrix Z and label node embedding matrix F obtained in step 2 to train the label inference model.
[0054] During each training, since the label node embedding matrix F contains rich label semantics, the hierarchical label reasoning model uses the label semantics in the label node embedding matrix F as the classification weight for classifying user nodes in the attribute network, and combines the user node embedding matrix Z to obtain the label reasoning result of the user node in the attribute network at the i-th layer in the label semantic hierarchy graph H through semantic fully connected layer reasoning. As shown in the following formula:
[0055]
[0056] in: represents the label embedding of any i-th layer in the label node embedding matrix F; k represents the number of layers in the label semantic hierarchy graph H.
[0057] In addition, the hierarchical label reasoning model is based on the label semantics of each layer of the user node, that is, label embedding, and obtains the label reasoning results of all user nodes in the i-th layer in the label semantic hierarchy graph H through semantic label propagation. Different from the traditional label propagation algorithm, when performing semantic label propagation, this embodiment initializes the embedding of nodes with unknown labels in the attribute network to 0, otherwise it is initialized to the corresponding label embedding in the label node embedding matrix F, and performs k label propagations in sequence to obtain the labels of all k layers of the user node in the label semantic hierarchy graph H, as shown in the following formula:
[0058]
[0059] in: It represents the final embedding of all user nodes obtained by semantic label propagation of any i-th layer label semantics of user nodes with known labels; MLP represents a two-layer artificial neural network; softmax represents an activation function.
[0060] Finally, the hierarchical label reasoning model combines the label reasoning results and Get the final label inference result O of each user node at the i-th layer in the label semantic hierarchy graph H i , as shown in the following formula:
[0061]
[0062] Among them: α is the weight coefficient, which is between 0 and 1.
[0063] By performing multiple rounds of training on the hierarchical label inference model and optimizing the parameters of the hierarchical label inference model based on the loss function calculation results, a trained hierarchical label inference model is obtained. In this embodiment, the loss function used in the training is a supervised classification cross entropy loss, and the loss function L is shown in the following formula:
[0064]
[0065] Among them: S represents the number of samples; k represents the total number of layers; y i,j and O i,j They represent the true label and predicted inference label of the j-th user layer in the sample respectively.
[0066] Step 4: Input the unknown user node data in the attribute network into the trained hierarchical label inference model, and obtain the final label inference result of the unknown user node from the trained hierarchical label inference model.
[0067] Since most attribute networks are not static networks, but dynamic networks with new nodes constantly added during actual operation, this embodiment provides two strategies, online fine-tuning and auxiliary parameters, to update the trained hierarchical label inference model to adapt to dynamic scenarios. The two measurements are described in detail as follows:
[0068] (1) Online fine-tuning.
[0069] When the unknown user node is a new node, the parameters of the trained hierarchical label inference model are fine-tuned online based on the subgraph where the new node and its links are located, and then the final label inference result of the new node at each layer in the label semantic hierarchy graph H is obtained through the online fine-tuned hierarchical label inference model.
[0070] The purpose of online fine-tuning is to fine-tune the parameters of the hierarchical label inference model trained on the static attribute network to adapt it to the new data. Suppose the parameters of the trained hierarchical label inference model before and after the change are Θ o and θ n , then the idea of online fine-tuning is as follows:
[0071]
[0072] Where: G n is a subgraph containing new nodes and new links; l(G n ,Θ) is the loss function of the fine-tuned parameters on the subgraph, which is divided into unsupervised reconstruction loss and supervised loss; η||Θ-Θ o || is used to measure the difference between parameters before and after fine-tuning to prevent over-adjustment; γ||Θ||1 regularization is used to prevent overfitting; Θ is the model parameter after fine-tuning.
[0073] (2) Auxiliary parameters.
[0074] In this embodiment, an auxiliary parameter strategy is designed to enable the trained hierarchical label inference model to better generalize unknown small samples. The process is as follows:
[0075] Let the auxiliary parameter set be First, use the auxiliary parameters Transform the features of the new node to the same dimension as the features of the existing user nodes in the attribute network:
[0076] Next, based on the association between the new node and the existing user nodes in the attribute network, the auxiliary parameters Aggregate the features of the new node neighbors to obtain a refined embedding. During specific training, a small number of nodes are deleted from the original data set each time as the new node set V n , and let the new node and the old node V in the network o Then, based on the auxiliary parameters, the refined embedding of the new and old nodes in the subgraph is obtained and the labels are inferred. Finally, the supervised classification cross entropy loss L is calculated based on the labels of the old nodes in the subgraph. s :
[0077]
[0078] Where |V o | represents the number of old nodes, k represents the number of layers, y i,j and O i,j Respectively represent the true label and predicted inference label of the jth user in the i-th layer in the old node sample set. At the same time, the distance between the embedding obtained based on the auxiliary parameters and the embedding obtained based on the original model parameters is minimized to optimize the auxiliary parameters:
[0079]
[0080] Where |V n ∪V o | indicates the total number of nodes, and Represents user node v i A refined embedding is obtained based on the auxiliary parameters and an embedding is obtained based on the original model parameters. When actually used, the labels of new nodes can be inferred using only the auxiliary parameters.
[0081] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. The embodiments described in the present invention are merely descriptions of the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention. The various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction, and such combinations should also be regarded as the contents disclosed in the present disclosure as long as they do not violate the concept of the present invention. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0082] The present invention is not limited to the specific details of the above-mentioned embodiments. Within the technical concept of the present invention and without departing from the design concept of the present invention, various modifications and improvements made to the technical solution of the present invention by technical personnel in this field should fall within the protection scope of the present invention. The technical contents for which protection is sought in the present invention have been fully recorded in the claims.
Claims
1. A dynamic attribute network hierarchical label reasoning method based on label semantics, characterized by: The following steps are involved: Step 1: Use the data set to construct an attribute network G, and use the labels of user nodes in the attribute network G to construct a label semantic hierarchy graph H; the data in the data set includes known user node data in the attribute network, known relationship data between user nodes, known feature data of user nodes, and known multi-level label path data of user nodes; Step 2: Calculate the embedding matrix Z of the user node in the attribute network G and the embedding matrix F of the label node in the label semantic hierarchy graph H respectively; Step 3: Generate a hierarchical label inference model, and train the label inference model using the user node embedding matrix Z and the label node embedding matrix F obtained in step 2; During each training, the hierarchical label inference model uses the label semantics in the label node embedding matrix F as the classification weight of the user node in the attribute network, and combines it with the user node embedding matrix Z to obtain the label inference results of each layer of the user node in the label semantic hierarchical graph H in the attribute network through semantic fully connected layer inference. In addition, the hierarchical label reasoning model is based on the label semantics of each layer of the user node, and obtains the label reasoning results of each layer of all user nodes in the label semantic hierarchy graph H through semantic label propagation. Finally, the hierarchical label reasoning model combines the label reasoning results and Get the label inference results of each layer of the user node in the label semantic hierarchy graph H in the training set; Performing multiple rounds of training on the hierarchical label inference model, and optimizing the parameters of the hierarchical label inference model based on the loss function calculation results, thereby obtaining a trained hierarchical label inference model; Step 4: Input the unknown user node data in the attribute network into the trained hierarchical label inference model, and obtain the final label inference result of the unknown user node from the trained hierarchical label inference model.
2. The dynamic attribute network hierarchical label reasoning method based on label semantics according to claim 1 is characterized in that: In step 2, GraphSAGE is used to extract the user node embedding matrix Z from the attribute network G.
3. The dynamic attribute network hierarchical label reasoning method based on label semantics according to claim 1 is characterized in that: In step 2, a triple attention mechanism is used to extract a label node embedding matrix F from the label semantic hierarchy graph H.
4. The dynamic attribute network hierarchical label reasoning method based on label semantics according to claim 1 is characterized in that: In step 3, the loss function adopts the supervised classification cross entropy loss function.
5. The dynamic attribute network hierarchical label reasoning method based on label semantics according to claim 1 is characterized in that: In step 4, when the unknown user node is a new node, the parameters of the trained hierarchical label inference model are fine-tuned online based on the subgraph where the new node and its links are located, and then the label inference results of each layer of the new node in the label semantic hierarchy graph H are obtained through the online fine-tuned hierarchical label inference model.
6. The dynamic attribute network hierarchical label reasoning method based on label semantics according to claim 1 is characterized in that: In step 4, when the unknown user node is a new node, the features of the new node are first transformed to the same dimension as the features of the existing user nodes in the attribute network based on the auxiliary parameters. Then, based on the association between the new node and the existing user nodes in the attribute network, the features of the neighbors of the new node are aggregated to obtain a refined embedding. Finally, the inference result is obtained based on the embedding and the prediction module in the original parameters of the model. During the specific training, a small number of nodes are deleted from the original network each time as a new node set, and the new nodes are associated with the old nodes in the network. Then, based on the auxiliary parameters, the refined embeddings of the new and old nodes in the subgraph are obtained and the labels are inferred. Finally, the loss function is calculated according to the labels of the old nodes in the subgraph, and the distance between the embeddings obtained based on the auxiliary parameters and the embeddings obtained based on the original model parameters is minimized to optimize the auxiliary parameters. When actually used, only the auxiliary parameters can be used to infer the labels of the new nodes.
Citation Information
Patent Citations
Training method and filling method of social media user attribute value missing filling model
CN116304361A
Contrast learning prediction method and system for heterogeneous knowledge graph
CN116401380A
Multi-label long text classification method based on BIGBIRD and graph attention network
CN117851591A
Weak supervision semantic segmentation method based on cross-modal double reasoning
CN118314340A
