Aspect-oriented sentiment analysis method based on knowledge perception syntactic graph network

By constructing a knowledge-perceptual syntactic graph network, combining Bi-LSTM and relational graph attention network, and using YAGO knowledge graph to obtain domain knowledge of named entities, the problem of insufficient utilization of syntactic information in the existing methods is solved, and the accuracy of aspect-level sentiment analysis is improved, especially in the fields of e-commerce and opinion mining.

CN120579547APending Publication Date: 2025-09-02李晨
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510420449.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-04
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing aspect-level sentiment analysis methods fail to make full use of syntactic information, especially phrase information, and ignore the impact of domain knowledge on user emotions, resulting in limited accuracy of sentiment analysis.

Method used

Build a knowledge-aware syntax graph network, combine Bi-LSTM and relational graph attention network, acquire domain knowledge of named entities through YAGO knowledge graph, and integrate phrase information in the syntax tree, and use multi-headed attention mechanism to capture context and domain knowledge in sentences.

Benefits of technology

It improves the accuracy of aspect-level sentiment analysis, especially in e-commerce, opinion mining and recommendation systems, and can more accurately analyze the emotional polarity of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention provides an aspect-oriented sentiment analysis method based on a knowledge perception syntactic graph network, and belongs to the technical field of natural language processing. Comprising the following steps: constructing a knowledge graph related to named entities in sentences; fusing the constructed knowledge graph into a syntactic tree of sentences to form a knowledge syntactic tree, and converting the knowledge syntactic tree into a knowledge perception syntactic graph; a knowledge perception syntactic graph and a relational graph attention network model are used to construct a knowledge perception syntactic graph network model, in the model, Bi-LSTM is used to capture context information of word nodes, and the relational graph attention network model is used to aggregate node information and side information; a full connection layer and a Softmax function are used to give emotion polarity prediction. The method solves the problems that a traditional method cannot fully utilize syntactic information, is limited in capacity of capturing long-distance dependence and complex syntactic relations, and cannot effectively utilize domain knowledge of named entities in sentences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a method for constructing an ABSA relationship graph attention network by incorporating domain knowledge into a knowledge-aware syntactic graph of a syntactic tree. Background Art

[0002] Aspect-based sentiment analysis (ABSA) aims to capture the sentiment polarity (i.e., positive, negative, neutral) of each aspect in a sentence. Take the sentence "The coat is beautiful, but the quality is poor" as an example. Given two aspect words, "coat" and "quality," our goal is to infer the sentiment polarity of the aspect words: "coat" is positive, and "quality" is negative. In recent years, ABSA has been increasingly used in a wide range of applications, such as e-commerce customer service, opinion mining, question answering, and recommender systems, and has attracted increasing attention.

[0003] Traditional ABSA methods mostly rely on recurrent neural networks (RNNs) combined with syntactic information and attention mechanisms to model the semantic relationships between aspect words and their sentiment polarity. However, the limited ability of RNNs to capture long-range dependencies hinders the performance of these methods. In addition, structured models based on sentiment knowledge have shown promising results in ABSA tasks. However, these methods fail to fully utilize syntactic information and have limited ability to capture long-range dependencies and complex syntactic relationships.

[0004] Current methods construct phrase trees or dependency trees and syntactic graphs for ABSA tasks, respectively, to fully leverage syntactic information. Compared to sequential structures, structured models (tree and graph structures) can capture more semantic information, improving accuracy on ABSA tasks. Graph-based neural networks have powerful modeling capabilities and can capture more flexible global contextual information about words. In contrast, tree-based modeling structures are more rigid and lack the flexibility to capture the implicit semantics of sentences. Some current methods combine language models, syntactic information (particularly dependency relationships), and graph neural networks (GCNs), achieving state-of-the-art results on ABSA tasks. Furthermore, some methods incorporate other information (such as linguistic knowledge and sentiment knowledge) into ABSA-specific graph neural networks. While these syntactic tree-based methods fully aggregate node information from the graph structure, they ignore the domain knowledge of named entities within sentences. In fact, domain knowledge (such as brand reputation, brand awareness, and influence) significantly influences user sentiment when commenting. For example, some users like Apple phones, so when they comment on Apple phones, their emotions tend to be positive. On the contrary, some users who do not like Apple phones tend to be negative or neutral. This shows that the domain knowledge of review information has a great influence on emotional polarity, and this knowledge is very important for more accurate sentiment analysis. Summary of the Invention

[0005] To overcome the shortcomings of the aforementioned prior art, the present invention provides an aspect-oriented sentiment analysis method based on a knowledge-aware syntactic graph network. This method further addresses the long-range dependency problem and introduces syntactic information, particularly phrase information, to the ABSA task. This method also effectively mines textual information and domain knowledge in other fields. In linguistics, phrase trees and dependency trees carry unequal information. This is because dependency structures lack syntactic symbols, which are essential in phrase structures, making the reverse conversion much more difficult. While these two syntactic structures are completely different—phrase trees explore collocation relationships vertically, while dependency trees capture dependency-modifier relationships horizontally—they share some underlying similarities. Each subtree of the dependency structure corresponds to a subtree of the phrase structure, which governs all words appearing in the dependency subtree. Compared to dependency trees, phrase trees are more flexible and carry more information, sometimes even encompassing the entire information of a dependency tree. Therefore, using phrase information as a syntactic tree for modeling is more advantageous for aspect-level sentiment analysis than using dependency information as a syntactic tree for modeling. In a syntactic tree, because each branch plays a different role, this invention incorporates an attention mechanism into the syntactic tree information aggregation process, enabling the neural network to focus on a subset of its inputs (or features). Furthermore, domain knowledge, particularly named entities within review sentences, can help us better analyze user behavioral preferences. Some research, particularly on social media, has applied sentiment analysis to understand public opinion, implement marketing and brand reputation analysis to identify customer experiences, and study the impact of social media. Experiments have shown that brand reputation and brand awareness significantly influence user sentiment toward specific products or services. Generally speaking, the importance of review information given by different actors varies. Similarly, brand reputation has a more stable emotional polarity in users' minds, which is a factor influencing their evaluations. Furthermore, unlike other Bi-LSTM-based models that merge word representations to form sentence embeddings, this invention retains all word representations and applies them to the subsequent syntactic tree, obtaining more accurate word representations through a subsequent graph attention mechanism. The invention then constructs a graph structure for each sentence based on its short syntactic tree and domain knowledge. To better model the child nodes in the phrase syntax tree, this paper constructs a graph attention mechanism with multiple attention heads and multiple relation heads, giving different attention to child nodes and dependency edges. Compared with traditional aspect-level sentiment analysis methods, this paper has demonstrated significant advantages. The specific steps of the technical solution adopted in this application are as follows:

[0006] S1. Construct a knowledge graph related to named entities in sentences;

[0007] S2. Integrate the constructed knowledge graph into the sentence syntax tree to form a knowledge syntax tree, and transform the knowledge syntax tree into a knowledge-aware syntax graph;

[0008] S3. Utilizing the knowledge-aware syntactic graph and the relational graph attention network model, a knowledge-aware syntactic graph network model is constructed. In the model, the present invention uses Bi-LSTM to capture the contextual information of word nodes and utilizes the relational graph attention network model to aggregate node information and edge information.

[0009] S4. Use a fully connected layer and a Softmax function to give sentiment polarity prediction.

[0010] Furthermore, the knowledge graph used in S1 is built using YAGO, and YAGO is applied to capture the domain knowledge of named entities in comment sentences as additional information in the syntactic tree to mine the potential sentiment polarity of users towards aspect items.

[0011] The beneficial effects of this further approach are as follows: YAGO, a linked database developed by the Max Planck Institute in Germany, integrates data from three primary sources: Wikipedia, WordNet, and GeoNames. YAGO integrates WordNet's vocabulary definitions with Wikipedia's classification system, providing a richer entity classification system. YAGO also considers temporal and spatial knowledge, incorporating attributes describing these dimensions into many knowledge items.

[0012] Furthermore, the specific steps of S2 are:

[0013] S21. Build a syntax tree: Use the Stanford CoreNLP toolkit to build a syntax tree and mark named entities at the same time.

[0014] S22. Query knowledge information: Query the named entity of the syntactic tree leaf node and check whether the named entity is in the YAGO knowledge base. If it is in the YAGO knowledge base, extract the named entity in the YAGO knowledge information. Otherwise, perform named entity knowledge information mining.

[0015] S23. Knowledge fusion: Fuse the knowledge information of the extracted named entities into the corresponding syntactic tree leaf nodes to construct a knowledge-aware syntactic graph.

[0016] The beneficial effect of this further solution is that, compared to dependency trees, phrase trees are more flexible and carry more information, sometimes even including all the information in dependency trees. Therefore, using phrase information as a syntactic tree for modeling is more conducive to aspect-level sentiment analysis than using dependency information as a syntactic tree for modeling.

[0017] Furthermore, the specific steps of S23 are:

[0018] S231. Knowledge query: In the knowledge query, all named entities involved in the comment sentence will be selected, and the triples corresponding to the named entity will be queried from the knowledge graph to obtain a set of corresponding triples for each named entity in the comment sentence.

[0019] S232. Knowledge injection: In knowledge injection, the triple set of the comment sentence is spliced ​​to the corresponding position and then injected into the sentence to obtain a sentence tree injected with domain knowledge.

[0020] S233. Finally, the sentence tree injected with domain knowledge is integrated into the syntactic tree obtained in S21 to obtain a knowledge-aware syntactic graph carrying entity relationship edge information.

[0021] The beneficial effect of this further approach is that integrating domain knowledge into the syntactic graph equips the model with domain knowledge, thereby improving the model's performance on domain-specific tasks. In this paper, we only consider direct named entity matching methods. When a named entity in the dataset matches a named entity in the YAGO knowledge base, we apply the YAGO knowledge base to expand the named entity in the dataset. We do not address other cases (e.g., entity linking / disambiguation, entity alignment).

[0022] Furthermore, the specific steps of S3 are:

[0023] S31. A global Bi-LSTM is used on the input sentence to obtain contextual information about the words. If the word is a named entity, its domain knowledge information is incorporated. In the knowledge-aware syntactic graph, nodes represent words and named entities in the sentence, respectively, with two types of edges: lexical collocations and named entity relationships. Initially, the nodes in the graph are independent and unaware of other nodes. To ensure that each word in the sentence incorporates its contextual information, the sentence is used as input to a Bi-LSTM to generate context-enhanced word vectors and a global context vector. By training the Bi-LSTM, each word in the sentence incorporates its contextual information. We then apply another Bi-LSTM to encode the aspect words and use their average hidden state as the initial root representation. Furthermore, if the tth word is a named entity, the tth word is represented as the sum of the tth word vector and a one-hot encoding of the domain knowledge information label.

[0024] S32. Nodes in a knowledge-aware syntactic graph represent words. Some nodes come from words in the sentence, while others come from named entities in the domain knowledge. Edge information in the knowledge-aware syntactic graph also comes from two sources: syntactic relations in the syntax tree and entity relations in the domain knowledge graph. The Graph Attention Network (GAT) is a variant of graph neural networks with very powerful representation capabilities. It utilizes masked self-attention layers to address the shortcomings of existing methods based on graph convolution or its approximations. The Relational Graph Attention Network (R-GAT) is based on the Graph Attention Network but aggregates information about inter-node relations. Given a knowledge-aware syntactic graph, where each node represents a word in a sentence and each node's edges represent entity relations between entities in the knowledge graph, multi-head attention is used to aggregate the hidden states of the current node and its neighbors. This allows features from more distant nodes to be propagated to nodes representing aspect words to compute node representations. In the knowledge-aware syntactic graph, each subgraph corresponds to a phrase structure, such as an uncommon phrase or a verb-object phrase. In linguistics, each phrase structure has a central word. It is necessary to model the relationships between sibling nodes, as information from syntactic node sister relationships may reveal insights useful for sentiment analysis. To better exploit this feature of subgraphs, we apply a relational attention mechanism to weigh the relationships between different sibling nodes under the same parent node.

[0025] The beneficial effect of the above further scheme is that compared with traditional methods, the graph attention network mainly solves how to determine the weight of each node to its different neighboring nodes, thereby aggregating the representation of adjacent nodes along the edge path. Most previous studies did not consider the side information between nodes, which may lose some key side information. In other words, adjacent nodes with different dependencies should have different effects. To address this shortcoming, the present invention captures the directional side information between nodes into the relational graph attention network to represent the side information between nodes, and then uses these relation heads as relation gates to control the information from adjacent nodes. Specifically, the side information is mapped to a vector representation, and then the relation head update information is calculated. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0027] Figure 1 Flowchart of the method of the present invention.

[0028] Figure 2A schematic diagram of the process of constructing a knowledge-aware syntactic graph according to the method of the present invention.

[0029] Figure 3 Schematic diagram of the process of using the knowledge-aware syntactic graph network to perform aspect-level sentiment analysis in the method of the present invention. DETAILED DESCRIPTION

[0030] The specific embodiments of the present invention are described in further detail below with reference to the accompanying drawings.

[0031] Reference Figures 1 to 3 ,The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network ,steps are as follows:

[0032] 1) Build a knowledge graph related to named entities in sentences. This knowledge graph is built using YAGO. YAGO is used to capture domain knowledge of named entities in review sentences, adding it to the syntactic tree to mine users' potential sentiment towards aspect items. This knowledge graph is built using YAGO. YAGO is used to capture domain knowledge of named entities in review sentences, adding it to the syntactic tree to mine users' potential sentiment towards aspect items.

[0033] 2) Integrate the constructed knowledge graph into the sentence syntax tree to form a knowledge syntax tree, and then transform the knowledge syntax tree into a knowledge-aware syntax graph. The specific algorithm steps are as follows:

[0034] 2.1) Constructing a syntax tree: Use the Stanford CoreNLP toolkit to construct a syntax tree and tag named entities at the same time.

[0035] 2.2) Query knowledge information: Query the named entity of the syntactic tree leaf node and check whether the named entity is in the YAGO knowledge base. If it is in the YAGO knowledge base, extract the named entity in the YAGO knowledge information.

[0036] 2.3) Knowledge fusion: The knowledge information of the extracted named entities is integrated into the corresponding syntactic tree leaf nodes to construct a knowledge-aware syntactic graph.

[0037] Specifically, suppose an input sentence and a knowledge graph , in the query knowledge information (Query) sentence All named entities involved in are picked out, from The formula for querying knowledge information (Query) is:

[0038]

[0039] in is the set of corresponding triples for each named entity in the sentence. Next, knowledge fusion is achieved by The triples in the query are concatenated to the corresponding positions in the sentence. Inject into sentence and generate a sentence tree .like Figure 1 middle sentence “Tim

[0040] Cook likes Beijing" as an example, using Stanford CoreNLP to construct sentences The syntax tree , and find sentences by querying knowledge information The knowledge triples of named entities “Tim Cook” and “Beijing” in Figure 1 Finally, through knowledge fusion, we integrate knowledge into the syntax tree In , we get a knowledge-aware syntactic graph that carries entity relationship edge information, such as Figure 1 The relationship between entities "Beijing" and "City" is "is_a".

[0041] 3) Utilize the knowledge-aware syntactic graph and the relational graph attention network model to build a knowledge-aware syntactic graph network model. In this model, Bi-LSTM is used to capture the contextual information of word nodes, and the relational graph attention network model is used to aggregate node information and edge information. The specific algorithm steps are as follows:

[0042] 3.1) Use a global Bi-LSTM on the input sentence to obtain contextual information about the word, and if the word is a named entity, we fuse its domain knowledge information. In the knowledge-aware syntactic graph, the nodes represent the words and named entities of the sentence, respectively, and there are two types of edges: lexical collocation and named entity relations. Initially, the nodes in the graph are independent of each other and they do not know the information of other nodes. In order to make each word in the sentence contain its contextual information, we use the sentence as the input of Bi-LSTM to generate context-enhanced word vectors and global context vectors, and by training Bi-LSTM, each word in the sentence contains its contextual information. Assume that the input sentence A series of words Composition, of which Is the first words, is the sentence length. We use bold font to represent the vectors of words and other objects. It is the BERT pre-trained vector, is the dimension of the word vector. In order to enrich the word vector with the context information in the sentence, Bi-LSTM is applied to the word sequence Location The LSTM unit at is updated as follows:

[0043]

[0044] in is the sigmoid function, is the element-wise product. Indicates hidden state The weight matrix in different gate units, and is input The weight matrix of . is the bias. The initial hidden state It can be zero-initialized or other suitable vectors. Then, we apply another Bi-LSTM to encode the aspect words and use their average hidden state as the initial representation of the root. In addition, if If the word is a named entity, then The word is represented as The sum of the word vectors and the One-Hot encoding of the knowledge information label.

[0045] 3.2) The nodes in the knowledge-aware syntactic graph represent words. Some of the nodes come from words in the sentence, and the other part comes from named entities in the domain knowledge. The edge information in the knowledge-aware syntactic graph also comes from two parts: one part comes from the syntactic relations in the syntactic tree, and the other part represents the entity relations in the domain knowledge graph. The graph neural network propagation module aggregates nodes Neighbor nodes Modify the node by and use the attention mechanism to focus on the neighbor nodes Layer representation. The features under the node relationship Add together to form a node The output embedding By stacking Layer graph network, the representation of nodes can be The relational graph attention network (R-GAT) is based on the graph attention network, but aggregates the relationship information between nodes. It is a variant of the graph neural network with very powerful representation capabilities. Given a knowledge-aware syntactic graph 𝐺 with 𝑁 nodes, where each node can represent a word in a sentence, the edges of 𝐺 represent the entity relationships between entities from the knowledge graph. For Layer GAT network, from The contextual features of the hop can be propagated to the target node, and the formula for calculating the node representation is calculated by aggregating the hidden states of the neighborhood using multi-head attention:

[0046]

[0047]

[0048]

[0049] in represents vector concatenation, is a node exist layer’s attention head, It is Layer Attention Head midpoint To its neighbors The attention coefficient. is the input transformation matrix of the input state, where is the dimension of the hidden state, is the activation function. Represents the LeakyReLU nonlinear activation function.

[0050] In the knowledge-aware syntactic graph, each subgraph corresponds to a phrase structure, such as a verb-object phrase. In linguistics, each phrase structure has a central word. It is necessary to model the relationship between sibling nodes because the syntactic relationship information from the nodes is useful for sentiment analysis. In order to better utilize this feature of the subgraph, we use the edge attention mechanism to measure the relationship between different sibling nodes under the same parent node. Because adjacent nodes with different dependencies have different influences, we use a relational graph attention network to capture the directed edge information between nodes into the original graph attention network model to represent the edge information between nodes, and then use these relation heads as relational gating units to control information from adjacent nodes. Specifically, the edge information is mapped to a vector representation, and then the formula for calculating the relation head is:

[0051]

[0052]

[0053]

[0054] in yes Layer Node The relationship head, It refers to the node and The relational graph attention network contains Multi-head node attention and Finally, with Each node in the knowledge-aware syntax graph In the The formula for layer representation is:

[0055]

[0056]

[0057] Among them, || also represents vector splicing, is each node associated with node i and the local word embedding vector x at layer l+1.

[0058] Based on the same inventive concept, the present invention describes an aspect-oriented sentiment analysis method and device based on a knowledge-aware syntactic graph network, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method and device implement the above-mentioned aspect-oriented sentiment analysis method based on a knowledge-aware syntactic graph network. Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention. It should be understood that the embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. After reading the present invention, modifications to various equivalent forms of the present invention made by those skilled in the art fall within the scope defined by the claims of this application.

Claims

1. A method for aspect-oriented sentiment analysis based on knowledge-aware syntactic graph networks, characterized by: The following steps are involved: S1. Construct a knowledge graph related to named entities in sentences; S2. Integrate the constructed knowledge graph into the sentence syntax tree to form a knowledge syntax tree, and transform the knowledge syntax tree into a knowledge-aware syntax graph; S3. Utilizing the knowledge-aware syntactic graph and the relational graph attention network model, a knowledge-aware syntactic graph network model is constructed. In the model, the present invention uses Bi-LSTM to capture the contextual information of word nodes and utilizes the relational graph attention network model to aggregate node information and edge information. S4. Use a fully connected layer and a Softmax function to give sentiment polarity prediction.

2. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 1 is characterized in that: The knowledge graph used in S1 is built using YAGO, which is used to capture the domain knowledge of named entities in review sentences as additional information in the syntactic tree to mine the potential sentiment polarity of users towards aspect items.

3. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 1 is characterized in that: The specific steps of S2 are: S21. Build a syntax tree: Use the Stanford CoreNLP toolkit to build a syntax tree and mark named entities at the same time. S22. Query knowledge information: Query the named entity of the syntactic tree leaf node and check whether the named entity is in the YAGO knowledge base. If it is in the YAGO knowledge base, extract the named entity in the YAGO knowledge information. Otherwise, perform named entity knowledge information mining. S23. Knowledge fusion: Fuse the knowledge information of the extracted named entities into the corresponding syntactic tree leaf nodes to construct a knowledge-aware syntactic graph.

4. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 3 is characterized in that: The specific steps of S23 are: S231. Knowledge query: In the knowledge query, all named entities involved in the comment sentence will be selected, and the triples corresponding to the named entity will be queried from the knowledge graph to obtain a set of corresponding triples for each named entity in the comment sentence. S232. Knowledge injection: In knowledge injection, the triple set of the comment sentence is spliced ​​to the corresponding position and then injected into the sentence to obtain a sentence tree injected with domain knowledge. S233. Finally, the sentence tree injected with domain knowledge is integrated into the syntactic tree obtained in S21 to obtain a knowledge-aware syntactic graph carrying entity relationship edge information.

5. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 1 is characterized in that: The specific steps of S3 are: S31. Use a global Bi-LSTM on the input sentence to obtain contextual information about the word. If the word is a named entity, we fuse its domain knowledge information. In the knowledge-aware syntactic graph, the nodes represent the words and named entities of the sentence, respectively, and there are two types of edges: lexical collocation and named entity relations. Initially, the nodes in the graph are independent of each other and they do not know the information of other nodes. In order to make each word in the sentence contain its contextual information, we use the sentence as the input of Bi-LSTM to generate context-enhanced word vectors and global context vectors, and by training Bi-LSTM, each word in the sentence contains its contextual information. Suppose the input sentence A series of words Composition, of which Is the first words, is the sentence length. We use bold font to represent the vectors of words and other objects. It is the BERT pre-trained vector, is the dimension of the word vector. In order to enrich the word vector with the context information in the sentence, Bi-LSTM is applied to the word sequence Get the context information of the word. S32. The nodes in the knowledge-aware syntactic graph represent words. Some of the nodes come from words in the sentence, and the other part comes from named entities in the domain knowledge. The edge information in the knowledge-aware syntactic graph also comes from two parts. One part comes from the syntactic relationship in the syntactic tree, and the other part represents the entity relationship in the domain knowledge graph. The graph neural network propagation module aggregates nodes. Neighbor nodes Modify the node by and use the attention mechanism to focus on the neighbor nodes Layer representation. The features under the node relationship Add together to form a node The output embedding By stacking Layer graph network, the representation of nodes can be The relational graph attention network (R-GAT) is based on the graph attention network, but aggregates the relationship information between nodes. It is a variant of the graph neural network with very powerful representation capabilities. Given a knowledge-aware syntactic graph 𝐺 with 𝑁 nodes, where each node can represent a word in a sentence, the edges of 𝐺 represent the entity relationships between entities from the knowledge graph. For Layer GAT network, from The contextual features of the hop can be propagated to the target node to compute the node representation by aggregating the hidden states of the neighborhood using multi-head attention. In a knowledge-aware syntactic graph, each subgraph corresponds to a phrase structure, such as a verb-object phrase. In linguistics, each phrase structure has a central word. Modeling the relationships between sibling nodes is necessary because the syntactic relationship information between nodes is useful for sentiment analysis. To better utilize this characteristic of subgraphs, we employ an edge attention mechanism to measure the relationships between sibling nodes under the same parent node. Because adjacent nodes with different dependencies have different influences, we employ a relational graph attention network to capture the directed edge information between nodes into the original graph attention network model to represent the edge information between nodes. These relation heads are then used as relational gating units to control the information from adjacent nodes.

6. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 5 is characterized in that: The word sequence in S31 Location The LSTM unit update calculation formula at is as follows: in is the sigmoid function, is the element-wise product. Indicates hidden state The weight matrix in different gate units, and is input The weight matrix of . is the bias. The initial hidden state It can be zero-initialized or other suitable vectors. Then, we apply another Bi-LSTM to encode the aspect words and use their average hidden state as the initial representation of the root. In addition, if If the word is a named entity, then The word is represented as The sum of the word vectors and the One-Hot encoding of the knowledge information label.

7. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 5 is characterized in that: The formula for calculating the node representation in S32 by using multi-head attention to aggregate the hidden states of the neighborhood is: in represents vector concatenation, is a node exist layer’s attention head, It is Layer Attention Head midpoint To its neighbors The attention coefficient. is the input transformation matrix of the input state, where is the dimension of the hidden state, is the activation function. Represents the LeakyReLU nonlinear activation function. In S32, a relational graph attention network is used to capture the directed edge information between nodes into the original graph attention network model to represent the edge information between nodes. These relation heads are then used as relational gating units to control the information from adjacent nodes. The formula is: in yes Layer Node The relationship head, It refers to the node and The relational graph attention network contains Multi-head node attention and Finally, with Each node in the knowledge-aware syntax graph In the The formula for layer representation is: in It also represents vector concatenation, is a node and Local word embedding vector at the layer Each associated node.

8. The aspect-oriented sentiment analysis method based on knowledge-aware syntactic graph network according to claim 1 is characterized in that: The S4 uses a fully connected layer and a Softmax function to give the sentiment polarity prediction formula: in are the parameters of the fully connected layer, is the number of sentiment polarities (i.e., "pos", "neu", and "neg" as shown in Figure 3), It's a sentence Medium aspect words belong to sentiment polarity The predicted probability of Regularized cross entropy is the loss function for training the model: in It is emotional polarity The true label, is the set of all model parameters, yes Regularization weights.

Citation Information

Cited By

  • Knowledge graph construction method based on word necklace combination

    CN120806105A