Hierarchical label reasoning method for dynamic attribute networks based on label semantics

By constructing a label semantic hierarchical graph and a dynamic attribute network hierarchical label reasoning method with a triple attention mechanism, the limitations of multi-level label reasoning in social networks are solved, multi-level reasoning and dynamic adaptation of user labels are realized, and the user experience is improved.

CN118839773BActive Publication Date: 2025-09-19THE ACAD OF TIANJIN UNIV HEFEI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410972587.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-09-19
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

Existing technologies are not applicable to multi-level label reasoning, and the dynamic changes of user attribute labels in social networks lead to untimely label reasoning.

Method used

A dynamic attribute network hierarchical label inference method based on label semantics is adopted. By constructing a label semantic hierarchical graph and extracting the embedding matrix through a triple attention mechanism, multi-level label inference is achieved by combining the semantic fully connected layer and the loss function optimization model. Online fine-tuning and auxiliary parameter strategies are used to adapt to dynamic scenarios.

Benefits of technology

It realizes multi-level label reasoning of nodes in social networks, improves the accuracy and timeliness of user label reasoning, and supports personalized service recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118839773B_ABST
    Figure CN118839773B_ABST
Patent Text Reader

Abstract

The present invention discloses a dynamic attribute network hierarchical label inference method based on label semantics, comprising the following steps: Step 1: constructing an attribute network G using a data set and a label semantic hierarchical graph H using labels; Step 2: calculating the embedding matrix Z of user nodes in the attribute network G and the embedding matrix F of label nodes in the label semantic hierarchical graph H; Step 3: generating a hierarchical label inference model and training the label inference model using the user node embedding matrix Z and label node embedding matrix F obtained in Step 2; Step 4: inputting unknown user node data in the attribute network into the trained hierarchical label inference model to obtain the final label inference results for the unknown user nodes. The present invention can implement multi-level label inference, overcoming the limitations of existing methods.
Need to check novelty before this filing date? Find Prior Art

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, are always labeled with attributes. For example, users on social networks often use attribute labels to represent their hobbies, occupations, or other attributes. However, due to limitations in information collection, only a small fraction of nodes have attribute labels. According to data, only 20% to 30% of users on Sina Weibo, China's largest microblogging platform, list their occupations. Furthermore, real-life attribute networks are constantly dynamic. On the one hand, most social media platforms, such as TikTok and Weibo, see a large number of new users registering daily, generating a large number of links. In many scenarios, it is necessary to infer the attribute labels of these new users in a timely manner. On the other hand, relationships between users in social networks, such as those between users and their followers, are constantly being established and destroyed. For example, when someone changes their career trajectory or research interests, they will establish relationships with new peers in the social network. Studying this dynamic social circle can promptly identify changes in users' occupations and interests. Therefore, inferring attribute labels for users can provide more personalized product and content recommendations, effectively improving the user experience.

[0003] Prior art work on label reasoning always assumes that all labels are at the same 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 hierarchical structure based on 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 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 full connection layer inference.

[0011] Furthermore, 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 Obtain the final label inference results 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. Then, based on the association between the new node and the existing user nodes in the attribute network, the features of the new node's neighbors are aggregated to obtain a refined embedding. Finally, the inference result is obtained based on the embedding and the prediction module in the original model parameters. 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 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 based on the labels of the old nodes 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. In actual use, the labels of the new nodes can be inferred using only the auxiliary parameters.

[0020] Compared with the prior art, the present invention has the following advantages:

[0021] 1. This paper 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 multifaceted and complex semantics between various labels, thereby providing strong support for multi-level label reasoning of nodes in the subsequent attribute network.

[0023] 3. This paper proposes two multi-level label inference methods to directly and indirectly utilize label semantics to perform multi-level label inference on nodes in the attribute network. Based on the inference results, it can better provide services such as recommendation for nodes in the attribute network;

[0024] 4. This paper 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 This 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 will be further described below with reference to the accompanying drawings and examples.

[0029] like Figure 1 、 Figure 2 As shown, this embodiment discloses a dynamic attribute network hierarchical label reasoning method based on label semantics, including the following steps:

[0030] Step 1: Use the dataset to construct an attribute network G. The data in the dataset described in this embodiment includes known user node data, known relationship data between user nodes, known feature data of user nodes, and known multi-level label path data of user nodes in the attribute network. The attribute network G constructed in this way = (V, E, X, Σ), where V and E respectively represent the set of user nodes and the relationships between user nodes in the attribute network G, X represents the features 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 or academic network. The initial features of all user nodes in the attribute network are generated based on the descriptive information corpus of the user nodes themselves. For example, in a social network, different users have personal IDs and personal homepages with relevant descriptions. For this corpus, the pre-trained BERT model can be used to process the corpus and generate an initial embedding of length 768. The relationships between user nodes are 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, and T represents the initial features 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 interests of authors in a computer science academic interaction network, the root node of the label semantic hierarchy graph can be defined as "Computer Science." This root node can then extend downward to nodes such as "Artificial Intelligence," which can then be further extended to include "Computer Vision" and "Natural Language Processing." Because there is insufficient information to generate initial embeddings for the labels, node2vec can be used to extract initial embeddings for all nodes in the label semantic hierarchy graph H.

[0034] 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.

[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, a 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 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 f k Represents the label node h i Neighbor h kcharacteristics.

[0042] (A2) Next, the importance between the labeled node and its sibling neighbors is extracted 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 Brothers and neighbors; 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 ρ Ψ are the attention coefficients of the two embeddings, which are calculated based on the following formulas:

[0050]

[0051] Where: g, W g and U g 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 train the label inference model using the user node embedding matrix Z and label node embedding matrix F obtained in step 2.

[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 it with the user node embedding matrix Z to obtain the label reasoning result of the user node in the attribute network in the i-th layer in the label semantic hierarchy graph H through semantic full connection 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] Furthermore, the hierarchical label reasoning model is based on the label semantics of each layer of the user node, i.e., 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. Unlike traditional label propagation algorithms, this embodiment initializes the embedding of nodes with unknown labels in the attribute network to 0 when performing semantic label propagation. Otherwise, it is initialized to the corresponding label embedding in the label node embedding matrix F. Label propagation is then performed k times in sequence to obtain the labels of the user node at all k levels 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 the 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 in the i-th layer in the label semantic hierarchy graph H i , as shown in the following formula:

[0061]

[0062] Where: α is the weight coefficient, which ranges from 0 to 1.

[0063] By training the hierarchical label inference model for multiple rounds 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] Where: 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 joining 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. 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] Among them: 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-tuning; γ||Θ||1 regularization is used to prevent overfitting; Θ is the model parameter after fine-tuning.

[0073] (2) Auxiliary parameters.

[0074] In this example, an auxiliary parameter strategy is designed to enable the trained hierarchical label inference model to better generalize to 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] Then, 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’s neighbors to obtain a refined embedding. During specific training, a small number of nodes are deleted from the original dataset each time as a 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, we get the refined embedding of the old and new nodes in the subgraph and infer the labels. Finally, we calculate the supervised classification cross entropy loss L according to 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 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. In actual use, only the auxiliary parameters can be used to infer the labels of new nodes.

[0081] The preferred embodiments of the present invention are described in detail above with reference to 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 unless there is any contradiction. Such combinations should also be regarded as the contents disclosed in this 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 scope of 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 those skilled in the art should fall within the scope of protection 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 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 full connection layer inference. Furthermore, 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 Obtain 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; 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 new node's neighbors are aggregated to obtain a refined embedding. Finally, the inference result is obtained based on the embedding and the prediction module in the original model parameters. 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, we obtain refined embeddings of the new and old nodes in the subgraph and infer their labels. Finally, we calculate the loss function based on the labels of the old nodes in the subgraph, and optimize the auxiliary parameters by minimizing the distance between the embeddings obtained based on the auxiliary parameters and the embeddings obtained based on the original model parameters. When actually used, we can infer the labels of the new nodes using only the auxiliary parameters.

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 the 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 uses 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. Then, the label inference results of the new node at each layer in the label semantic hierarchy graph H are obtained through the online fine-tuned hierarchical label inference model.

Citation Information

Patent Citations

  • Training method and filling method of social media user attribute value missing filling model

    CN116304361A

  • Multi-label long text classification method based on BIGBIRD and graph attention network

    CN117851591A