Social media short text conceptualization method and device based on heterogeneous graph neural network

Through a heterogeneous graph neural network method, the word and concept vectors in short text in social media are jointly updated, and the problem of insufficient determinism of graph structure in short text conceptualization tasks is solved, and the accuracy of the task is improved.

CN119398044AInactive Publication Date: 2025-02-07CHINA ACADEMY OF ELECTRONICS AND INFORMATION TECHNOLOGY OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411373181.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately determine the graph structure of short texts on social media, which affects the accuracy of short text conceptualization tasks.

Method used

采用基于异构图神经网络的方法,通过多层图注意力网络协同更新词语向量和概念向量,直至向量差异达到预设终止条件,输出最优概念向量。

Benefits of technology

Effectively modeling the multi-type interrelationship between words and concepts improves the accuracy of social media short text conceptualization tasks and generates the optimal word vector and concept vector.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398044A_ABST
    Figure CN119398044A_ABST
Patent Text Reader

Abstract

The invention provides a social media short text conceptualization method and device based on a heterogeneous graph neural network, and the method comprises the steps: obtaining a heterogeneous graph which represents a social media short text and comprises a word set and a concept set; performing initialization processing, and constructing a corresponding word vector matrix and a concept set vector matrix; cooperatively updating the word vectors in the word vector matrix and the concept vectors in the concept vector matrix by using the multilayer graph attention network until the vector difference between the concept vectors reaches a preset iteration termination condition; and selecting an optimal solution from the concept vector as an optimal concept set of the current social media short text. According to the method, for a social media short text conceptualization task, a mutual enhancement strategy is utilized to model isomerism and bidirectional correlation between words and concepts, so that heterogeneous signals can fully interact, a word vector updating process and a concept vector updating process can promote each other, and finally, an optimal word vector and an optimal concept vector are generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text conceptualization, and in particular to a social media short text conceptualization method and device based on a heterogeneous graph neural network. Background Art

[0002] The conceptualization of short texts in social media aims to assign one or more concept labels to short texts in social media, which can help quickly identify the categories, concepts and connotations of short texts in social media. This task plays an increasingly important role in social media analysis, brand marketing, public opinion monitoring and early warning, and related applications. In simple terms, given a short text (for example, "Microsoft unveils Office for Apple's iPad"), the goal of this task is to map this short text to one or several candidate concepts, which have been pre-defined in additional vocabulary knowledge bases (for example, the widely used knowledge base Probase).

[0003] In recent years, many probability analysis-based methods and collaborative ranking-based algorithms have been proposed for the task of conceptualizing short texts in social media and have gradually become baseline models; however, there is little exploration of using deep graph neural networks in this task. In fact, there is a natural and intuitive connection between this task and heterogeneous graph neural networks (HGNN), as detailed below:

[0004] Complete the mapping of the entire short text to the concept, usually based on the mapping of words and concepts in the short text (such as Figure 1 This mapping relationship between words and concepts (in short texts) naturally forms a heterogeneous graph (heterogeneous graph: a graph with various node types or various relationship types), as shown in Figure 1 As shown. Obviously, in such a graph, the relationship is complex and goes beyond the traditional pairwise association: for example, many words may refer to the same concept together (for example, the words "apple" and "microsoft" are both subordinate to the concept "COMPANY"); in this semantic network, a word can be a common hyponym of more than two concepts (for example, the word "apple" belongs to the concept "FRUIT" and the concept "COMPANY"). Therefore, a more intuitive way to handle and understand this complex form of relationship is to use a graph structure to model the interaction between words and concepts.

[0005] Therefore, finding an effective graph structure for the short text conceptualization task is both challenging and the key to solving this task. However, there are obvious deficiencies in current technology in this regard. Summary of the invention

[0006] The technical problem to be solved by the present invention is how to determine the accurate graph structure of the short text conceptualization task; in view of this, the present invention provides a social media short text conceptualization method and device based on a heterogeneous graph neural network.

[0007] The technical solution adopted by the present invention is a social media short text conceptualization method based on heterogeneous graph neural network, comprising:

[0008] Step S1, obtaining a heterogeneous graph representing short texts on social media, including a word set and a concept set;

[0009] Step S2, respectively initializing the node vectors and edge weights in the word set and the concept set to construct corresponding word vector matrices and concept set vector matrices;

[0010] Step S3, using a multi-layer graph attention network to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector;

[0011] Step S4, selecting the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

[0012] In one embodiment, the multi-layer graph attention network, each layer includes a preset number of iterations, each iteration includes:

[0013] Using the current word vector, update the concept vector;

[0014] Using the current concept vector, update the concept vector;

[0015] Use the current concept vector to update the word vector;

[0016] Using the current word vector, update the word vector.

[0017] In one embodiment, the preset iteration termination condition includes:

[0018] The current calculation reaches the preset number of iterations in the multi-layer graph attention network; or

[0019] The cosine similarity between the concept vectors is lower than a preset threshold.

[0020] In one embodiment, selecting the optimal solution from the output concept vector as the optimal concept set of the current social media short text specifically includes:

[0021] Based on the concept vector, a cross entropy loss function is used as a training target to obtain a score for each candidate concept in the candidate concept set, and the concept vector corresponding to the highest score is determined as the optimal concept set for the current social media short text.

[0022] Another aspect of the present invention further provides a social media short text conceptualization device based on a heterogeneous graph neural network, comprising:

[0023] A heterogeneous graph structure modeling module, configured to obtain a heterogeneous graph representing short texts in social media, including a word set and a concept set;

[0024] An initialization module is configured to respectively initialize each node vector and edge weight in the word set and the concept set, and construct a corresponding word vector matrix and a concept set vector matrix;

[0025] A graph attention module is configured to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix using a multi-layer graph attention network until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector;

[0026] The optimal concept selection module is configured to select the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

[0027] In one embodiment, in the graph attention module, each layer of the multi-layer graph attention network includes a preset number of iterations, and each iteration includes:

[0028] Using the current word vector, update the concept vector;

[0029] Using the current concept vector, update the concept vector;

[0030] Use the current concept vector to update the word vector;

[0031] Using the current word vector, update the word vector.

[0032] In one embodiment, in the graph attention module, the preset iteration termination condition includes:

[0033] The current calculation reaches the preset number of iterations in the multi-layer graph attention network; or

[0034] The cosine similarity between the concept vectors is lower than a preset threshold.

[0035] In one embodiment, the optimal concept selection module is specifically configured as follows:

[0036] Based on the concept vector, a cross entropy loss function is used as a training target to obtain a score for each candidate concept in the candidate concept set, and the concept vector corresponding to the highest score is determined as the optimal concept set for the current social media short text.

[0037] Another aspect of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the social media short text conceptualization method based on a heterogeneous graph neural network as described in any one of the above items.

[0038] Another aspect of the present invention further provides a computer storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the social media short text conceptualization method based on a heterogeneous graph neural network as described in any of the above items are implemented.

[0039] Compared with the prior art, the present invention has at least the following advantages:

[0040] The present invention aims at the short text conceptualization task of social media, and constructs a heterogeneous graph neural network method for generating the optimal concept of short text by deeply modeling the multi-type mutual relationship between words and concepts (mainly including the "word to concept" interaction relationship, the "concept to concept" interaction relationship, the "concept to word" interaction relationship, and the "word to word" interaction relationship). The method uses a mutually reinforcing strategy to model the heterogeneity and bidirectional correlation between words and concepts, so that heterogeneous signals (i.e., word signals and concept signals) can fully interact with each other, so that the word vector update process and the concept vector update process can promote each other, and finally generate the optimal word vector and concept vector. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The heterogeneous graph structure formed for the task of conceptualizing short texts in social media in the state of the art;

[0042] Figure 2 A schematic diagram of a process of conceptualizing a short text on social media based on a heterogeneous graph neural network according to an embodiment of the present invention;

[0043] Figure 3 It is a schematic diagram of the composition of a social media short text conceptualization device based on a heterogeneous graph neural network according to an embodiment of the present invention;

[0044] Figure 4A schematic diagram of a conceptual logic of short texts on social media based on a heterogeneous graph neural network according to an embodiment of the present invention;

[0045] Figure 5 This is the updating process of "word to concept" according to an embodiment of the present invention (taking updating concept 1 as an example);

[0046] Figure 6 This is a "concept to concept" update process according to an embodiment of the present invention (taking updating concept 1 as an example);

[0047] Figure 7 This is the updating process of "concept to word" according to an embodiment of the present invention (taking updating word 1 as an example);

[0048] Figure 8 This is the "word to word" update process according to an embodiment of the present invention (taking updating word 1 as an example);

[0049] Fig. 9 The figure is a schematic diagram of the composition of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose, the present invention is described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0051] Unless otherwise defined, all terms (including technical terms and scientific terms) used in this article have the same meaning as commonly understood by ordinary technicians in the field to which this application belongs. It should also be understood that terms (such as terms defined in commonly used dictionaries) should be interpreted as having the same meaning as their meaning in the context of the relevant technology, and will not be interpreted in an idealized or overly formal sense unless explicitly defined in this article.

[0052] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0053] The embodiment of the present invention is a social media short text conceptualization method based on heterogeneous graph neural network, such as Figure 2 As shown, including:

[0054] Step S1, obtaining a heterogeneous graph representing short texts on social media, including a word set and a concept set;

[0055] Step S2, respectively initializing the node vectors and edge weights in the word set and the concept set to construct corresponding word vector matrices and concept set vector matrices;

[0056] Step S3, using a multi-layer graph attention network to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector;

[0057] Step S4, selecting the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

[0058] In this embodiment, the multi-layer graph attention network, each layer includes a preset number of iterations, each iteration includes:

[0059] Using the current word vector, update the concept vector;

[0060] Using the current concept vector, update the concept vector;

[0061] Use the current concept vector to update the word vector;

[0062] Using the current word vector, update the word vector.

[0063] In this embodiment, the preset iteration termination conditions include:

[0064] The current calculation reaches the preset number of iterations in the multi-layer graph attention network; or

[0065] The cosine similarity between the concept vectors is lower than a preset threshold.

[0066] In this embodiment, the optimal solution is selected from the output concept vector as the optimal concept set of the current social media short text, specifically including:

[0067] Based on the concept vector, a cross entropy loss function is used as a training target to obtain a score for each candidate concept in the candidate concept set, and the concept vector corresponding to the highest score is determined as the optimal concept set for the current social media short text.

[0068] Compared with the prior art, this embodiment has at least the following effects:

[0069] 1) In order to make full use of the semantic relationship between words and concepts, the present invention models the social media short text conceptualization task into a heterogeneous graph composed of word nodes and concept nodes. In this heterogeneous graph, emphasis is placed on the modeling of the four information flows of "word to concept", "concept to concept", "concept to word" and "word to word". Based on this, the concept vector update process and the word vector update process promote, enhance and optimize each other, and ultimately produce the optimal concept vector representation, and then obtain the optimal concept, which effectively improves the accuracy of the social media short text conceptualization task.

[0070] 2) The present invention has good flexibility and versatility. In addition to being applied to concept signals, it can be adapted to many types of current semantic signals (such as entity categories, entity descriptions, and other semantic signals).

[0071] The second embodiment of the present invention corresponds to the first embodiment, and can be referred to Figure 3 This embodiment introduces a social media short text conceptualization device based on a heterogeneous graph neural network, including the following components:

[0072] A heterogeneous graph structure modeling module, configured to obtain a heterogeneous graph representing short texts in social media, including a word set and a concept set;

[0073] An initialization module is configured to respectively initialize each node vector and edge weight in the word set and the concept set, and construct a corresponding word vector matrix and a concept set vector matrix;

[0074] A graph attention module is configured to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix using a multi-layer graph attention network until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector;

[0075] The optimal concept selection module is configured to select the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

[0076] In this embodiment, in the graph attention module, each layer of the multi-layer graph attention network includes a preset number of iterations, and each iteration includes:

[0077] Using the current word vector, update the concept vector;

[0078] Using the current concept vector, update the concept vector;

[0079] Use the current concept vector to update the word vector;

[0080] Using the current word vector, update the word vector.

[0081] In this embodiment, in the graph attention module, the preset iteration termination condition includes:

[0082] The current calculation reaches the preset number of iterations in the multi-layer graph attention network; or

[0083] The cosine similarity between the concept vectors is lower than a preset threshold.

[0084] In this embodiment, the optimal concept selection module is specifically configured as follows:

[0085] Based on the concept vector, a cross entropy loss function is used as a training target to obtain a score for each candidate concept in the candidate concept set, and the concept vector corresponding to the highest score is determined as the optimal concept set for the current social media short text.

[0086] The following will be based on Figure 4 The logical process of calculation in the present application is described in detail.

[0087] (I) Related explanations

[0088] In order to better understand the contents of this section, some concepts are necessary to be explained below:

[0089] (1) Conceptualization of short texts

[0090] Typical concept mapping methods for conceptualizing short texts include: Conceptualization of probability method, Explicit semantic analysis For example, based on the Bayesian inference mechanism, the probabilistic conceptualization method uses probability Sort concepts from a probabilistic knowledge base (such as Probase) and select the concept with the highest probability to represent the short text (where w i Represents the words in the short text, c j Indicates the concept that the word may correspond to). The basic assumption behind this type of model is that given each concept, all observed words are conditionally independent. In order to mine more signals from short texts, subsequent studies have used the verbs, adjectives and other parts of speech or other attributes of words (especially named entities) in short texts to provide valuable information for understanding words. However, these works did not solve problems such as entity disambiguation, which is a key issue affecting the accuracy of conceptualization of short texts. Although subsequent studies have attempted to introduce relationships between words to enhance semantic representation, it relies on dependency parsing, which is difficult for short texts (difficult to ensure accuracy) because the language of short texts in social media environments is often not very standardized.

[0091] In summary, the main shortcomings of current approaches to conceptualizing short texts in social media are outlined as follows:

[0092] (1) Existing methods focus on capturing concepts that co-occur with words observed in short texts, but ignore the interactions between concepts and words and the influence of concepts on words.

[0093] (2) In the traditional probabilistic conceptualization algorithm, there is a one-way transmission restriction and independence assumption. Unfortunately, in the real world, this assumption does not always hold.

[0094] (3) In addition, some studies only rank each word in a given short text and select the top-ranked concepts as the final concepts representing the entire short text, while the concept lists of different words may be mutually exclusive. Therefore, it is impossible to generate a global concept distribution for the entire short text.

[0095] In summary, most previous methods are limited to the independence assumption and ignore the interaction between concepts and words (especially the influence of concepts on words), thus limiting the performance. Therefore, this paper proposes a method based on heterogeneous graph neural network, which uses the prior knowledge of semantic relevance to comprehensively solve these problems.

[0096] (2) Application of Heterogeneous Graph Neural Networks in Natural Language Processing

[0097] Graph neural networks and their related learning methods (i.e. message passing, self-attention, etc.) were originally developed for Isomorphic Graph (Isomorphic graph: the node types in the graph are unique), however, graphs in real-world natural language processing applications usually have multiple types of nodes, that is, heterogeneous graphs. In order to model these heterogeneous graph structures, recent studies have conducted some preliminary explorations and have been effectively applied in many natural language processing tasks. For example, one study introduced a heterogeneous graph neural network to jointly encode documents, entities, and candidates for multi-hop reading comprehension; one study focused on semi-supervised short text classification and constructed a topic-entity heterogeneous graph neural network. Inspired by the success of heterogeneous graph neural networks in other natural language processing tasks, the present invention introduces heterogeneous graph neural networks into the social media short text conceptualization task to learn better vector representations of different types of nodes (including word node vectors and concept node vectors).

[0098] 2. Relevant definitions

[0099] (1) Concept

[0100] The present invention defines "concept" as a collection of "entities" or "things" within a field or a category (i.e., "entities" or "things" belonging to a certain category), so that entities belonging to the same (or similar) category can obtain similar semantic representations. For example, the words "Microsoft" and "amazon" can be represented by the concept "COMPANY".

[0101] In the present invention, considering that the external vocabulary knowledge base Probase defines rich, discrete, and structured conceptual information, the present invention selects the external vocabulary knowledge base Probase to provide the concepts required by the present invention; in addition, Probase has been widely used in related research and applications of the conceptualization of short texts in social media, and is extensive and authoritative. In recent years, in many research fields such as text understanding, text representation, and information retrieval, the external vocabulary knowledge base Probase has been widely used as a valuable external resource because the concept of an entity is simpler, more structured, and more differentiated than other types of semantic information (such as entity descriptions, etc.). The present invention uses the uppercase symbol C to represent a concept set, and uses the lowercase symbol c∈C to represent a specific concept.

[0102] (2) Short-Text Conceptualization

[0103] Given a social media short text s = {w1,…,w m}, by utilizing the Conceptualization of words API to each word w i Get a concept set And eliminate concepts with scores lower than 0.001 (the score is also provided by Probase's word conceptualization APT) to improve computational efficiency. For example, given the social media short text "microsoft unveils office for apple's ipad (Microsoft launches Office for Apple's iPad)", given the word "microsoft (Microsoft)", the word conceptualization API will return the corresponding concept distribution as shown below:

[0104] C microsoft ={COMPANY,VENDOR,CLIENT,FIRM,ORGANIZATION,CORPORATION,BRAND,…

[0105] Then, the current short text s is obtained as follows Candidate concept set V c :

[0106]

[0107] For simplicity, V c It can be recorded as V c ={c1,c2,…,c n}, the size of the candidate concept set of short text s is n (i.e., it contains n candidate concepts), where c jrepresents the candidate concept from Probase used to represent the entire short text s. Through the above process, the conceptualization of social media short text can be transformed into a Sequence tagging The task is as follows: Our goal is to infer a label sequence If exceeds the preset threshold, it means that V c The j-th candidate concept c in j Should be kept in the final Optimal concept set In order to represent a given short text s, we can condense the candidate concept set into the optimal concept set: {PRODUCT,COMPANY,BRAND,…} through the tag sequence.

[0108] (3) Specific content

[0109] This paper proposes a social media short text conceptualization method based on heterogeneous graph neural network. The method mainly includes four modules, namely heterogeneous graph structure modeling module, initialization module, graph attention module, and optimal concept selection module. The relationship between each module is as follows Figure 3 As shown in the logical architecture diagram of this embodiment, Figure 4 shown.

[0110] (1) Heterogeneous graph structure modeling module

[0111] like Figure 4 As shown in Figure 2, from a mathematical point of view, the social media short text conceptualization task naturally forms a heterogeneous graph structure G, which contains two types of nodes: 1) word nodes, such as Figure 4 As shown in the leftmost rectangular box; 2) Concept nodes, such as Figure 4 Shown in the oval box on the far left.

[0112] Formally, this heterogeneous graph is represented as G = {V, E}, where:

[0113] ■The symbol V represents the set of all nodes of the heterogeneous graph G, V = V w ∪V c , where V w ={w1,w2,…,w m} represents the set of m words appearing in a given social media short text s (where w i represents the i-th word in a given short text s); V c ={c1,c2,…,c n} represents a set of n candidate concepts (corresponding to the n candidate concepts derived from Probase, using lowercase letter c to represent concepts).

[0114] ■ The symbol E represents the set of all edges of the heterogeneous graph G. The matrix E is used to represent the weights of all edges connecting nodes of different types in the heterogeneous graph G. E = {E[i,j]|i∈{1,2,…,m},j∈{1,2,…,n}}, where E[i,j] is an element of the matrix E, representing the word w i and concept c j The value of E[i,j] can be directly obtained by calling the Probase API. It should be noted that E[i,j]≠0 means that the i-th word w i Belongs to the jth candidate concept c j (That is, the word w i Mapped to concept c in Probase j ).

[0115] (2) Initialization module

[0116] The initialization module completes the initialization process of node vectors and edge weights in the heterogeneous graph G.

[0117] 1) Node vector initialization

[0118] Let the matrix and matrix Represents the vector matrix of word nodes and concept nodes respectively, where d w Represents the dimension of the word vector, d c represents the dimension of the concept vector. Specifically, the symbol w i Word w i The vector representation of is initialized by the traditional Word2Vec model. Then, using Score to generate each concept c j Concept vector c j .in, Indicates that given a concept c j In the case of word w i The probability of can be directly obtained from Probase. Therefore, for the current concept c j , whose initialization vector can be generated in the following simple way:

[0119]

[0120] Through the above operations, the input vector of the first layer of node i in the heterogeneous graph neural network is It can be formed as follows:

[0121] If node i∈V w (i.e. the node is a word), then The word vector w i Endow

[0122] If node i∈V c (i.e. the node is a concept), then Coming soon concept vector i Endow

[0123] 2) Edge weight initialization

[0124] When initializing the edge weights E[i][j]∈E in the graph G (where E represents the edge weight matrix), in order to make the edge weights have the importance information of the relationship between the word nodes and the concept nodes, the present invention selects The score is assigned to E[i][j] as the edge weight. The score describes the i In the case of candidate concept c j The probability can be obtained directly from Probase.

[0125] (3) Graph Attention Module

[0126] After completing the graph initialization step, the present invention uses multiple layers Graph Attention (GraphATtention, GAT) network structure, collaboratively updates the word vectors in the matrix W and the concept vectors in the matrix C. The specific process is described as follows.

[0127] Each node in the graph G may have two types, namely words and concepts. Hidden State vector Recorded as (where: i∈{1,…,m+n}), and then the input vector of the i-th node in the l-th layer is recorded as The output vector is recorded as The input vector comes from the previous layer (layer l-1) of the multi-layer graph attention network, and the output vector is sent to the next layer (layer l+1) for further calculation. Messaging and information polymerization The mechanism design is as follows:

[0128]

[0129]

[0130] Among them, function σ1(·) and function σ2(·) are both nonlinear activation functions; the operator || in the first formula above represents the concatenation of the two vectors before and after; Represents the set of neighbor nodes of the current node (the i-th node in graph G). Represents the attention weight between the i-th node and the j-th node in the l-th layer, reflecting the correlation between the two nodes, and can adaptively be the neighbor node set of the current node (i-th node) Different weights are assigned to different neighbor nodes in .

[0131] Based on the above formula, the interactive updating process of word vectors and concept vectors is described in detail below (in this interactive updating process, word vectors and concept vectors enhance and optimize each other's vectors).

[0132] In each layer of the graph attention network, a total of T iterations are performed. Each iteration includes four update processes, namely the update process of "word to concept", the update process of "concept to concept", the update process of "concept to word", and the update process of "word to word". Specifically, for the tth iteration (t∈[1,T]), the interactive update process can be defined as follows:

[0133] 1) The update process from “word to concept”

[0134] In the t-th iteration of the l-th layer, the updating process of “word to concept” (the updating process is as follows Figure 5 As shown), following the message passing and message aggregation process of the above graph attention network, it can be expressed as:

[0135]

[0136] This process only uses word vectors to update concept vectors (without updating word vectors). c Indicates that node i belongs to concept set V c , that is, node i is a concept; j'∈V w Indicates that node j' belongs to the word set V w , that is, node j' is a word, so Indicates that node j' is a word in the neighboring node of node i; k∈V w Indicates that node k belongs to the word set V w , that is, node k is a word, so Indicates that node k is a word in the neighboring nodes of node i; Represents the hidden state vector of concept i.

[0137] 2) The “concept to concept” update process

[0138] In the t-th iteration of layer l, the concept-to-concept update process (the update process is as follows Figure 6 As shown), following the message passing and message aggregation process of the above graph attention network, it can be expressed as:

[0139]

[0140] This process only uses concept vectors to update concept vectors (without updating word vectors). c Indicates that node i belongs to concept set V c , that is, node i is a concept; j'∈V c Indicates that node j' belongs to the concept set V c , that is, node j' is a concept, so Indicates that node j' is a concept in the neighboring nodes of node i; k∈V c Indicates that node k belongs to the concept set V c , that is, node k is a concept, so Indicates that node k is a concept in the neighboring nodes of node i; Represents the hidden state vector of concept i.

[0141] 3) The updating process from “concept to word”

[0142] In the t-th iteration of the l-th layer, the updating process of “concept to word” (the updating process is as follows Figure 7 As shown), following the message passing and message aggregation process of the above graph attention network, it can be expressed as:

[0143]

[0144]

[0145] This process only uses the concept vector to update the word vector (without involving the updating of the concept vector). w Indicates that node i belongs to the word set V w , that is, node i is a word; j'∈V c Indicates that node j' belongs to the concept set V c , that is, node j' is a concept, so Indicates that node j' is a concept in the neighboring nodes of node i; k∈V c Indicates that node k belongs to the concept set V c , that is, node k is a concept, so Indicates that node k is a concept in the neighboring nodes of node i; Represents the hidden state vector of word i.

[0146] 4) The “word-to-word” update process

[0147] In the t-th iteration of layer l, the word-to-word update process (the update process is as follows Figure 8 As shown), following the message passing and message aggregation process of the above graph attention network, it can be expressed as:

[0148]

[0149] This process only uses word vectors to update word vectors (without updating concept vectors). w Indicates that node i belongs to the word set V w , that is, node i is a word; j'∈W means that node j' belongs to the word set V w , that is, node j' is a word, so Indicates that node j' is a word in the neighboring node of node i; k∈V w Indicates that node k belongs to the word set V w , that is, node k is a word, so Indicates that node k is a word in the neighboring nodes of node i; Represents the hidden state vector of word i.

[0150] 5) Iteration termination condition

[0151] The above mutual updating process usually calculates the vector difference between the concept vectors in four consecutive iterations (for example, using cosine similarity to measure the vector difference), and converges when the vector difference is lower than a certain threshold. Therefore, the number of iterations T in each layer of the graph attention network is not a fixed value.

[0152] The calculation process of the vector difference between concept vectors (taking the (t-1)th iteration and the tth iteration in the lth layer as an example) is as follows:

[0153]

[0154] Overall, the main ideas behind the above interactive update strategy are: There is a mutual enhancement between concepts and words. Strong relationship, this phenomenon has been significantly reflected in heterogeneous graphs For example, for a candidate concept node (c j ∈V c), concept nodes with stronger correlations with more important words are more likely to be selected into the final concept combination. In other words, optimizing word ranking and optimizing concept ranking are mutually dependent on each other in a mutually reinforcing manner, thereby utilizing the contextual semantic information implicit in the heterogeneous graph G composed of words and concepts. In addition, while generating the optimal concept set for the social media short text s, the present invention can also generate the optimal keyword set for the current social media short text s at the same time.

[0155] (4) Optimal concept selection module

[0156] Based on the concept vector output by the last layer (layer L) of the graph attention network, the cross entropy loss function is used as the training target and the execution Node Classification Task, obtain the candidate concept set V c Each candidate concept c j Score (i.e., sequence labeling for candidate concept sets, using scores To label each candidate concept c j ).

[0157] Finally, the top n' concepts are selected as the final result according to the descending ranking scores: these n' concepts selected constitute the optimal concept set to represent the given social media short text s.

[0158] (5) Experimental verification

[0159] 1) Comparison Model

[0160] The proposed heterogeneous graph neural network-based short text conceptualization method for social media is compared with the following short text conceptualization methods: 1) the most advanced probabilistic conceptualization algorithm; 2) the collaborative ranking-based method; 3) the currently proposed algorithm based on graph neural network learning.

[0161] IJCAI11: It is a probabilistic conceptualization method that performs simple co-clustering of concepts and words by identifying disjoint cluster structures, and then uses Bayesian reasoning to derive the most likely optimal concept based on the clustering.

[0162] IJCAI15: It belongs to the probabilistic conceptualization method, taking into account verbs and adjectives, and using an iterative algorithm based on random walks to conceptualize short texts.

[0163] Co-RankAD: It is a collaborative sorting method that couples two random walk processes through a collaborative sorting framework, and uses the PageRank method to sort different types of nodes separately in each random walk process.

[0164] Co-RankIP: It is a collaborative ranking method that ranks concepts and words simultaneously during the iteration process and is considered to be a strong baseline in the field of collaborative ranking methods.

[0165] Hyper: It is a graph neural network-based method that uses a hypergraph neural network structure and cluster structure expansion to approximate a hypergraph composed of words and concepts.

[0166] 2) Dataset and short text conceptualization experimental results analysis

[0167] In order to directly evaluate the quality of conceptualization, the present invention constructs a manually annotated social media dataset covering six fields, including military, health, entertainment, sports, economy, and politics. We use the Twitter search engine to collect English tweets and create a keyword-based sub-field tweet dataset based on keywords and tags. The dataset contains 241,485 tweets containing commonly used ambiguous words (ambiguous words such as "apple", "fox", "gift", "key", "match", etc.). 35 volunteers were organized to annotate the tweets: first, the above-mentioned comparison method and the method of the present invention were run, and then the volunteers were asked to annotate the top n' optimal concepts for each tweet (these concepts were selected from Probase). Among them, n' represents the number of optimal concepts for a given tweet as defined above. For a given tweet, if the concept is correct / relevant / uncertain / irrelevant, it is assigned a relevance score score. k =1 / 0.6 / 0.3 / 0. Finally, the accuracy of Top-n' concepts (denoted as P@n') is used to evaluate the conceptualization quality of social media short texts of each method:

[0168] The table shows the overall results of P@5, P@10, P@15 and P@20 (the results are all: the higher the value, the better the performance of the method). The method based on heterogeneous graph neural network proposed in the present invention (marked as "the present invention") achieved the highest accuracy in all indicators, proving the necessity of interactive updating and optimization of concept vectors and word vectors advocated by the present invention. Specifically, the present invention improved the P@5 and P@10 of IJCAI15 by 12.05% and 15.32% respectively; the present invention improved the P@5 and P@10 of Co-RankIP by 6.81% and 7.99% respectively; the present invention improved the P@5 and P@10 of Hyper by 8.89% and 14.57% respectively.

[0169] Table 1 Analysis of the results of the short text conceptualization experiment

[0170]

[0171] A third embodiment of the present invention is an electronic device, such as Fig. 9 As shown, it can be understood as a physical device, including a processor and a memory storing instructions executable by the processor. When the instructions are executed by the processor, the following operations are performed:

[0172] Step S1, obtaining a heterogeneous graph representing short texts on social media, including a word set and a concept set;

[0173] Step S2, respectively initializing the node vectors and edge weights in the word set and the concept set to construct corresponding word vector matrices and concept set vector matrices;

[0174] Step S3, using a multi-layer graph attention network to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector;

[0175] Step S4, selecting the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

[0176] The fourth embodiment of the present invention, the process of the social media short text conceptualization method based on heterogeneous graph neural network in this embodiment is the same as that of the first, second or third embodiment, the difference is that, in engineering implementation, this embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the method of the present invention can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions for a device to execute the method described in the embodiment of the present invention.

[0177] Through the description of the specific implementation methods, a deeper and more specific understanding of the technical means and effects adopted by the present invention to achieve the predetermined purpose should be obtained. However, the accompanying drawings are only for reference and illustration purposes and are not intended to limit the present invention.

Claims

1. A social media short text conceptualization method based on heterogeneous graph neural network, characterized in that: include: Step S1, obtaining a heterogeneous graph representing short texts on social media, including a word set and a concept set; Step S2, respectively initializing the node vectors and edge weights in the word set and the concept set to construct corresponding word vector matrices and concept set vector matrices; Step S3, using a multi-layer graph attention network to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector; Step S4, selecting the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

2. The social media short text conceptualization method based on heterogeneous graph neural network according to claim 1 is characterized in that: The multi-layer graph attention network, each layer includes a preset number of iterations, each iteration includes: Using the current word vector, update the concept vector; Using the current concept vector, update the concept vector; Use the current concept vector to update the word vector; Using the current word vector, update the word vector.

3. The social media short text conceptualization method based on heterogeneous graph neural network according to claim 2 is characterized in that: The preset iteration termination condition includes: The current calculation reaches the preset number of iterations in the multi-layer graph attention network; or The cosine similarity between the concept vectors is lower than a preset threshold.

4. The social media short text conceptualization method based on heterogeneous graph neural network according to claim 3 is characterized in that: The step of selecting the optimal solution from the output concept vector as the optimal concept set of the current social media short text specifically includes: Based on the concept vector, a cross entropy loss function is used as a training target to obtain a score for each candidate concept in the candidate concept set, and the concept vector corresponding to the highest score is determined as the optimal concept set for the current social media short text.

5. A device for conceptualizing short texts in social media based on heterogeneous graph neural networks, characterized in that: include: A heterogeneous graph structure modeling module configured to obtain a heterogeneous graph representing short texts in social media, including a word set and a concept set; An initialization module is configured to respectively initialize each node vector and edge weight in the word set and the concept set, and construct a corresponding word vector matrix and a concept set vector matrix; A graph attention module is configured to collaboratively update the word vectors in the word vector matrix and the concept vectors in the concept vector matrix using a multi-layer graph attention network until the vector difference between the concept vectors reaches a preset iteration termination condition, and output the concept vector; The optimal concept selection module is configured to select the optimal solution from the output concept vector as the optimal concept set of the current social media short text.

6. The social media short text conceptualization device based on heterogeneous graph neural network according to claim 5 is characterized in that: In the graph attention module, each layer of the multi-layer graph attention network includes a preset number of iterations, and each iteration includes: Using the current word vector, update the concept vector; Using the current concept vector, update the concept vector; Use the current concept vector to update the word vector; Using the current word vector, update the word vector.

7. The social media short text conceptualization device based on heterogeneous graph neural network according to claim 6 is characterized in that: In the graph attention module, the preset iteration termination condition includes: The current calculation reaches the preset number of iterations in the multi-layer graph attention network; or The cosine similarity between the concept vectors is lower than a preset threshold.

8. The device for conceptualizing short texts in social media based on heterogeneous graph neural networks according to claim 7, characterized in that: The optimal concept selection module is specifically configured as follows: Based on the concept vector, a cross entropy loss function is used as a training target to obtain a score for each candidate concept in the candidate concept set, and the concept vector corresponding to the highest score is determined as the optimal concept set for the current social media short text.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the social media short text conceptualization method based on a heterogeneous graph neural network as described in any one of claims 1 to 4.

10. A computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the social media short text conceptualization method based on a heterogeneous graph neural network as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Examination reading understanding automatic question answering method based on graph neural network

    CN113553402A

  • Text abstract generation method and system based on heterogeneous graph neural network

    CN114091429A

  • Heterogeneous graph neural network-based discipline and inspection clue multi-label classification method

    CN114722192A

  • Knowledge tracking method based on knowledge space

    CN117371528A

  • Dialogue classification method and system based on heterogeneous graph neural network

    CN117828072A