Aspect sentiment triple extraction method and system based on common intrinsic features
Patent Information
- Application Number
- CN202610987430.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]然而,现有方法普遍存在两方面缺陷:其一,大多数方法仅依赖图卷积网络对句子进行独立建模,忽视了全局视角下不同词性的词作为方面词或意见词所呈现出的共性情感线索,未能充分利用大量训练数据中扮演方面术语、意见术语隐含的词性规律;其二,先前方法不加区分地对所有依存关系进行建模,存在冗余问题,未能充分利用词语本身固有且对情感极性指示有意义的局部语义信息
本发明通过获取句子的词级表示矩阵作为基础特征,并行提取由词性频率-回响机制生成的全局词性权重矩阵所表征的共同特征、以及由词波追踪器生成的局部情感极性指数矩阵所表征的固有特征,从而同时从全局词性统计规律和词语自身语义两个维度充分挖掘情感线索;在此基础上,将上述三类特征进行融合并经图卷积网络和自注意力层增强处理,既有效过滤了冗余依存关系带来的噪声,又强化了词语间的句法结构和全局依赖关系;最终通过区域抽取器输出方面情感三元组,显著提升了方面词与意见词的定位精度和情感极性的判断准确性,尤其在处理多词方面项、多意见词对应同一方面项等复杂句式时表现优异,有效解决了现有技术因情感线索缺失和依存建模冗余导致抽取精度不足的问题。
Smart Images

Figure CN122797540A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for extracting aspect sentiment triples based on common inherent features. Background Technology
[0002] The statements in this section are merely to provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Aspect-based sentiment analysis aims to identify specific aspects mentioned in comments and determine their sentiment polarity. Aspect-based sentiment triple extraction, as an advanced task, requires the simultaneous extraction of aspect words, opinion words, and the sentiment polarity relationship between them. It has significant application value in scenarios such as e-commerce comment mining and product reputation analysis.
[0004] However, existing methods generally suffer from two major drawbacks: First, most methods rely solely on graph convolutional networks to independently model sentences, neglecting the common sentiment cues presented by words of different parts of speech as aspect or opinion terms from a global perspective, failing to fully utilize the implicit part-of-speech patterns of aspect and opinion terms in a large amount of training data; second, previous methods indiscriminately model all dependency relations, resulting in redundancy and failing to fully utilize the inherent local semantic information of words that is meaningful in indicating sentiment polarity. These shortcomings make it difficult for models to accurately identify aspect-opinion pairs and their sentiment polarities in complex sentences, limiting extraction accuracy. Therefore, existing technologies cannot simultaneously mine common sentiment cues of parts of speech globally and utilize the inherent sentiment information of words locally, making it difficult to accurately locate aspect and opinion terms and correctly determine their sentiment polarities in complex comment sentences. The accuracy of extracted sentiment triples is insufficient, making it difficult to meet the practical application needs of fine-grained sentiment analysis. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for extracting aspect-based sentiment triples based on common inherent features. It extracts global part-of-speech common sentiment cues of playing terms through FEM, and extracts local word-specific sentiment information through W²T. The two are enhanced in parallel and then fused to achieve more accurate sentiment triple extraction.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: In a first aspect, the present invention provides a method for extracting aspect-based sentiment triples based on common inherent features, comprising: Obtain the word-level representation matrix of the sentence; The common features and inherent features of words in the word-level representation matrix are extracted in parallel: the common features are represented by a global part-of-speech weight matrix generated by statistically analyzing the part-of-speech frequency distribution using a part-of-speech frequency-echo mechanism; the inherent features are represented by a local sentiment polarity index matrix generated by aggregating the sentiment dictionary sense scores using a word wave tracker. The word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix are fused and then enhanced by a graph convolutional network and a self-attention layer to generate enhanced features. The enhanced features are input into the region extractor to obtain aspect sentiment triples.
[0007] Furthermore, obtaining the word-level representation matrix of the sentence includes: The sentence is input into the BERT encoder to obtain the word-level hidden state. The word representations corresponding to each original word are restored to word-level representations through average pooling, resulting in a word-level representation matrix with the same length as the sentence.
[0008] Furthermore, the steps for generating the global part-of-speech weight matrix are as follows: Obtain the part-of-speech tags of each word in the sentence, count the frequency of each part-of-speech tag as aspect words or opinion words in the training data, and calculate the part-of-speech frequency distribution of aspect words and opinion words respectively; Based on the part-of-speech frequency distribution, a part-of-speech frequency weight vector matrix with the same length as the sentence is generated as the global part-of-speech weight matrix.
[0009] Furthermore, the steps for generating the local emotional polarity index matrix are as follows: Obtain the positive and negative sentiment scores for each word and each meaning in SentiWordNet, calculate the average difference between the positive and negative sentiment scores for all meanings of each word as the sentiment polarity index, and combine them to obtain a local sentiment polarity index matrix.
[0010] Furthermore, the global part-of-speech weight matrix and the local sentiment polarity index matrix are extended to match the dimensions of BERT features, and element-wise multiplication is performed to obtain the joint sentiment enhancement matrix; Dynamically generate gated weight matrix based on BERT original features; The joint sentiment enhancement matrix and the word-level representation matrix are adaptively fused to obtain the fused features.
[0011] Furthermore, an adjacency matrix and its corresponding degree matrix are constructed based on the syntactic dependency tree; The fused features are used as the initial node representations and input into the graph convolutional network. After being updated by multiple layers of graph convolution, the graph-enhanced representation is obtained. A self-attention mechanism is applied to the graph augmentation representation to obtain augmented features.
[0012] Furthermore, the enhanced features are input into a table-fill-based region extractor, the start and end boundaries of aspect-viewpoint pairs are determined by boundary detection, and the inter-word relation representation is obtained by max pooling; A ResNet-style convolutional neural network is used to encode the relation matrix, and a boundary classifier is used to predict the effective relation regions, generating aspect sentiment triples composed of aspect words, opinion words, and sentiment polarity.
[0013] A second aspect of the present invention provides a system for extracting aspect-based sentiment triples based on common inherent features, comprising: Embedded representation module: used to obtain the word-level representation matrix of the sentence; Parallel enhancement module: used to extract common features and inherent features of words in the word-level representation matrix in parallel: wherein, the common features are represented by a global part-of-speech weight matrix generated by statistically analyzing the part-of-speech frequency distribution using a part-of-speech frequency-reverb mechanism; the inherent features are represented by a local sentiment polarity index matrix generated by aggregating sentiment dictionary sense scores using a word wave tracker; Fusion Enhancement Module: This module fuses the word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix, and then generates enhanced features after processing through a graph convolutional network and a self-attention layer. Output module: used to input the enhanced features into the region extractor to obtain aspect sentiment triples.
[0014] In a third aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method as described in the first aspect.
[0015] In a fourth aspect, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method as described in the first aspect.
[0016] Compared with the prior art, the beneficial effects of the present invention are: This invention uses the word-level representation matrix of a sentence as its basic feature, and extracts in parallel the common features represented by the global part-of-speech weight matrix generated by the part-of-speech frequency-echo mechanism, as well as the inherent features represented by the local sentiment polarity index matrix generated by the word wave tracker. This allows for the simultaneous mining of sentiment cues from both the global part-of-speech statistical regularity and the semantics of the words themselves. Based on this, the three types of features are fused and enhanced through a graph convolutional network and a self-attention layer. This effectively filters out noise from redundant dependency relationships and strengthens the syntactic structure and global dependencies between words. Finally, the region extractor outputs aspect sentiment triples, significantly improving the localization accuracy of aspect words and opinion words and the accuracy of sentiment polarity judgment. It performs particularly well in handling complex sentence structures such as multi-word aspect items and multiple opinion words corresponding to the same aspect item, effectively solving the problem of insufficient extraction accuracy caused by the lack of sentiment cues and redundancy in dependency modeling in existing technologies. Attached Figure Description
[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0018] Figure 1 This is a flowchart of the method according to Embodiment 1 of the present invention; Figure 2 This is a diagram of the ASTE task of the present invention; Figure 3 This is a schematic diagram of the CIFA model of the present invention; Figure 4 This is a part-of-speech frequency distribution diagram of aspect terms and opinion terms in LAP14 of the present invention; Figure 5 This is a schematic diagram of the region extraction method of the present invention; Figure 6 This is a bar chart comparing the sub-tasks of the present invention, specifically the ATE experiments. Figure 7 This is a bar chart comparing the OTE experiments of the subtasks of this invention. Detailed Implementation
[0019] The following detailed description is exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0020] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0021] In this embodiment of the invention, the data collection and processing strictly adhere to the requirements of relevant laws and regulations, obtaining informed consent or separate consent from the data subject, and conducting subsequent data use and processing within the scope of laws, regulations, and the data subject's authorization. All data acquisition in this embodiment is based on compliance with laws and regulations and user consent, representing the lawful application of the data.
[0022] Example 1 In massive amounts of text data such as e-commerce reviews, product feedback, and social media, users often express differentiated or even contradictory emotional tendencies regarding different aspects of the same product (such as "taste," "packaging," and "price"). For example, a consumer might give both positive and negative reviews for saying, "The food at this restaurant is exquisite, but the service is too slow." Aspect-Based Sentiment Analysis (ABSA) is a natural language processing task designed to address this need for refined analysis. Its advanced task, Aspect Sentiment Triplet Extraction (ASTE), further requires the model to accurately extract the "aspect word-opinion word-sentiment polarity" triplet, such as "{food, exquisite, positive}" and "{service, slow, negative}", thereby providing businesses with structured, fine-grained user feedback.
[0023] "Aspect sentiment" refers to the emotional inclination expressed by users regarding a specific attribute dimension of a thing or service. For example, in the comment "The food at this restaurant is exquisite, but the service is too slow," "food" and "service" are two different "aspects," and "exquisite" and "slow" correspond to the emotional expressions of these two aspects, the former being positive and the latter negative. Traditional sentiment analysis can only determine whether the entire comment is positive or negative, making it difficult to meet the needs of refined analysis.
[0024] This invention is applied to this practical scenario: taking the user review analysis scenario of e-commerce platforms as an example, massive amounts of user reviews are generated every day. Merchants not only want to know "whether this review is positive or negative," but also want to accurately understand "which aspects consumers are satisfied with and which are dissatisfied with." For example, a mobile phone might have a positive review for its "screen" but a negative review for its "battery life," or a hotel might have a positive review for its "location" but a negative review for its "cleanliness." This invention automatically extracts the "{aspect words, opinion words, sentiment polarity}" triples from the reviews, such as "{screen, clarity, positive}" and "{battery life, short, negative}," transforming unstructured review text into structured, fine-grained analysis results. This helps merchants accurately identify product strengths and weaknesses and guide improvement directions, and also helps consumers quickly understand product reputation, possessing significant commercial application value.
[0025] Therefore, in a typical embodiment of the present invention, such as Figure 1 As shown, a method for extracting aspect-based sentiment triples based on common inherent features is disclosed. The specific steps include: S1: Obtain the word-level representation matrix of the sentence; S2: Extract common features and inherent features of words in the word-level representation matrix in parallel: wherein, the common features are represented by a global part-of-speech weight matrix generated by statistically analyzing the part-of-speech frequency distribution using a part-of-speech frequency-echo mechanism; and the inherent features are represented by a local sentiment polarity index matrix generated by aggregating sentiment dictionary sense scores using a word wave tracker. S3: The word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix are fused together, and then enhanced by a graph convolutional network and a self-attention layer to generate enhanced features; S4: Input the enhanced features into the region extractor to obtain aspect sentiment triples.
[0026] To address the issue of existing methods neglecting common sentiment cues related to parts of speech, this invention proposes a Part-of-Speech Freq-Echo Mechanism (FEM) to uncover universal sentiment cues implicit in aspect words and opinion words from a global perspective. To address the redundancy in dependency modeling in existing methods, this invention proposes a Wordwave Tracer (W²T) to integrate the inherent local semantic information of individual words, thereby obtaining precise, fine-grained sentiment information and achieving efficient dependency relation parsing.
[0027] The following section provides a detailed explanation of the above-mentioned aspect sentiment triplet extraction method based on common inherent features, using the user review analysis scenario of an e-commerce platform as an example.
[0028] like Figure 2 As shown, in the first sentence, the opinion words "smooth" and "seamless" are adjectives connected by the conjunction "and," typically expressing positive emotions in various contexts. Therefore, utilizing the emotional cues provided by parts of speech globally and strengthening the dependency relationship between "smooth-and-seamless" locally can effectively reduce noise caused by redundant dependencies, obtain useful emotional information, and thus achieve more accurate and specific emotional triplet extraction.
[0029] In this embodiment, as Figure 3The diagram illustrates the structure of the Common and Inherent Feature Augmented (CIFA) model of this invention. The framework consists of three main modules: an embedding representation module, a global-local augmentation module, and a region extraction module. For a given sentence, the first step is to use Bidirectional Encoder Representations from Transformers (BERT) to obtain a word-level representation matrix through word alignment and average pooling strategies. This word-level representation matrix is then input in parallel to two augmentation channels: the FEM channel generates a global part-of-speech weight matrix to extract common features by statistically analyzing the frequency distribution of each part-of-speech tag as aspect words or opinion words in the training data; the W²T channel generates a local sentiment polarity index matrix to extract inherent features by aggregating the positive and negative sentiment scores of all senses of each word in the SentiWordNet sentiment dictionary. After feature augmentation from both global and local perspectives, the two channels are adaptively fused with the original BERT word-level representation matrix through a gating mechanism to obtain joint augmented features. The enhanced feature is processed sequentially through a graph convolutional network (constructing an adjacency matrix based on a syntactic dependency tree) and a self-attention layer to capture syntactic structural dependencies and filter noise, ultimately yielding the enhanced feature. This enhanced feature is then input into a table-filling-based region extractor, which, through boundary detection and relation classification, outputs sentiment triples composed of aspect words, opinion words, and their sentiment polarity (positive / neutral / negative).
[0030] S1, obtaining the word-level representation matrix of the sentence, includes: inputting the given sentence into the BERT encoder to obtain the hidden state at the sub-word level; using a token restoration alignment strategy to restore the sub-word-level representation to the original word-level granularity; and obtaining a word-level representation matrix with the same length as the original sentence by performing average pooling on the sub-word representation corresponding to each original word.
[0031] Embedding Representation Module: Uses BERT as an encoder to obtain the original contextual hidden representation of the sentence. First, given the sentence... The inputs to the BERT encoder are [CLS] and [SEP], which are the start and end position markers of the sentence. Considering that BERT uses sub-word segmentation, a single word may be segmented into multiple sub-word markers, resulting in a longer sequence length. In order to restore the aligned sub-word level representation to the original word level granularity, this invention adopts a token restoration alignment strategy. This operation aggregates sub-word features to produce a word-level representation that matches the original sentence length. Specifically, the BERT encoder generates sub-word level hidden states, as shown in Equation (1).
[0032] (1) in, It is the length of the sub-word sequence. This represents the hidden state dimension of BERT. For each original word... Let its corresponding sub-word index range be from arrive Word level representation The average pooling calculation is performed on its sub-word representations, as shown in formula (2).
[0033] (2) After aligning all words, we obtain the word-level representation matrix. , It is the number of words in a sentence with the same length as the original sentence, as shown in formula (3).
[0034] (3) In S2, the FEM enhancement module is as follows: Based on linguistic phenomena, it is known that words of different parts of speech contribute differently to aspect terms and opinion terms: nouns are far more likely to be aspect terms than other parts of speech attributes (such as adjectives or verbs), while adjectives or verbs are relatively more frequent as opinion terms. These patterns constitute implicit universal sentiment cues. To fully utilize this information from a global perspective, FEM focuses on the part-of-speech attributes of words to maximize the use of this effective information.
[0035] The steps for generating the global part-of-speech weight matrix are as follows: The system iterates through each word in the sentence and obtains part-of-speech tags from the SpaCy library. It then counts the frequency of each part-of-speech tag as an aspect word or opinion word in the training data and calculates the part-of-speech frequency distribution for aspect words and opinion words respectively. Based on the part-of-speech frequency distribution, it generates a part-of-speech frequency weight vector matrix with the same length as the sentence as the global part-of-speech weight matrix.
[0036] Specifically, the model first iterates through each word and uses the SpaCy library to retrieve the meaning of the word in the sentence. The part-of-speech tags are generated. A two-dimensional matrix is created to store the part-of-speech information, with the number of rows and columns corresponding to the number of words. In preprocessing, this invention simplifies the part-of-speech tags: These represent adjectives, verbs, adverbs, nouns, and others, respectively. This represents part-of-speech tags in the training data. N represents the total number of words of a given type (aspect a or viewpoint o). The part-of-speech frequency distribution is calculated as shown in formulas (4) and (5).
[0037] (4) (5) in, The part-of-speech frequency distribution of terms indicating aspects The part-of-speech frequency distribution of opinion words.
[0038] The inherent part-of-speech attributes have a biased influence on the impact of words, which affects the sentiment analysis of sentences. Part-of-speech frequency response results are obtained for each dataset based on part-of-speech frequency, such as... Figure 4 As shown, taking the Lap14 dataset as an example, over 87% of aspect terms are “NN”, while “JJ, VB, RB, IN” are all less than 1%, indicating a strong correlation between the attribute “NN” and aspect terms.
[0039] Based on this information, the sentence is processed to obtain the part-of-speech frequency weight vector matrix. ,in The sentence length is indicated by formula (6).
[0040] (6) The W²T enhancement module is as follows: A word can carry multiple meanings in different contexts, indicating richer clues about its inherent emotional polarity. For example, the word "good" can be used as a noun, adjective, etc., but in most contexts it usually conveys a positive emotion. To capture such local emotional cues from the words in comment sentences, this section designs a semantic tracker based on an emotion lexicon to aggregate the emotional expression of the word under different meanings in order to derive a fine-grained emotion polarity index.
[0041] The steps for generating the local sentiment polarity index matrix are as follows: Based on the SentiWordNet sentiment dictionary, the positive sentiment score, negative sentiment score, and neutral sentiment score of each word for each meaning are obtained; the average difference between the positive and negative scores of all meanings of each word is calculated as the sentiment polarity index of that word; the sentiment polarity indices of all words in the sentence are combined to construct a local sentiment polarity index matrix.
[0042] Specifically, this invention uses Sentiwordnet, a vocabulary resource built on WordNet, which assigns three sentiment scores to each word meaning: a positive sentiment score (…). ), negative affect score ( ) and neutral sentiment score ( For a given word with m distinct meanings... Each word meaning k is associated with a sentiment vector. Then words The sentiment polarity index is calculated as the average of the differences between the positive and negative sentiment scores for all word meanings. The specific calculation process is shown in formulas (7) and (8).
[0043] (7) (8) After processing, the sentiment score of a word is no longer limited to a number of 0 or 1, but a precise value between -1 and 1, which represents the different intensities of the word in the three sentiment polarities. For a sentence consisting of n words, a local sentiment polarity index matrix is constructed, as shown in formula (9).
[0044] (9) In step S3, S301: the word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix are fused, including: expanding the global part-of-speech weight matrix and the local sentiment polarity index matrix to match the dimensions of BERT features, and performing element-wise multiplication to obtain a joint sentiment enhancement matrix; dynamically generating a gated weight matrix based on the original BERT features, and adaptively fusing the joint sentiment enhancement matrix and the word-level representation matrix to obtain fused features.
[0045] In this embodiment, to better integrate external sentiment cues, the present invention uses the part-of-speech frequency weight vector matrix of FEM. The local sentiment polarity index matrix of W²T It is integrated into the BERT representation.
[0046] First, the global part-of-speech weight matrix and the local sentiment polarity index matrix are expanded to match the BERT feature dimensions, and then element-wise multiplication is performed to fuse them into a joint sentiment enhancement matrix. The calculation process is shown in formulas (10) and (11).
[0047] (10) (11) in, It is a row vector consisting entirely of 1s, and we get And multiply them to enhance the consistency of the two knowledge sources.
[0048] Then, in order to adaptively adjust the injection intensity of external sentiment knowledge, this invention introduces a gated weight matrix G. This gated weight matrix is dynamically generated based on the original BERT features and can flexibly control the fusion ratio based on the current context, thereby enhancing features while reducing noise introduction. Specifically, the gated weight matrix is calculated as shown in formula (12).
[0049] (12) in, , These are learnable parameters. It is the Sigmoid function.
[0050] Finally, the joint sentiment enhancement matrix and the word-level representation matrix are adaptively fused to obtain the fused features. As shown in formula (13).
[0051] (13) S302: After the fused features are enhanced by a graph convolutional network and a self-attention layer, enhanced features are generated, including: constructing an adjacency matrix and the corresponding degree matrix based on a syntactic dependency tree; inputting the fused features as the initial node representation into a graph convolutional network; obtaining a graph enhanced representation after being updated by multiple layers of graph convolution; and applying a self-attention mechanism to the graph enhanced representation to obtain the enhanced features.
[0052] In this embodiment, to capture syntactic dependencies, the model uses a graph convolutional network (GCN) for further processing. Constructing an adjacency matrix based on syntactic dependency trees and the corresponding degree matrix The expression is shown in formulas (14) and (15).
[0053] (14) (15) The fused features are used as initial node representations input into a graph convolutional network, and after being updated through multiple layers of graph convolutions, a graph-enhanced representation is obtained. Let... As the initial node representation, the first The update rules for the layer GCN are shown in formula (16).
[0054] (16) in, , It is a learnable weight matrix, and GELU represents the activation function. After L layers, the graph augmentation representation can be obtained as shown in Equation (17).
[0055] (17) To further filter noise and capture global dependencies, graph augmentation representations are performed. Applying a self-attention mechanism, the output enhanced features are: Enhanced features The final contextual features are passed to the region extraction module.
[0056] In S4, to fully utilize inter-word interactions and inter-relational interactions, the final enhanced features... The data is input into a table-filled triplet extractor. Aspect-view pairs are presented as regions, with the boundary regions starting from the top left corner. and the bottom right corner end boundary Localization. Then, the contextual representation under higher-order semantic interaction is obtained through max pooling operation, and words are constructed. The relationship between the levels is represented. In this embodiment, the model uses the GeLU activation function, as shown in Equation (18).
[0057] (18) Subsequently, some potential dependencies between elements in the table representation are modeled, and this relation matrix is encoded using a ResNet-style Convolutional Neural Network (CNN) to enhance the relation-level representation. For a sentence of length n, the relation matrix is... Input to High-dimensional relationships are extracted in a multi-layered CNN, and the output of the last layer is selected. As the extraction result. For representation For each element within the boundary, boundary detection uses a different classifier to compute its corresponding label as... and The probability of this is and Pruning is performed using the top-k strategy, as shown in formulas (19) and (20).
[0058] (19) (20) Based on this, a region candidate pool of valid objects is obtained. .
[0059] Ultimately, the model detection comes from All relationships and obtain the corresponding regional context information The boundary classifier removes invalid relation regions and generates aspect-sentiment triplets consisting of aspect words, opinion words, and sentiment polarity from the remaining valid relation regions. , and the corresponding emotional polarity S, where S {Positive, Neutral, Negative} and The position labels starting from 1, and the marking of a triplet region can be represented as: ,like Figure 5 As shown, the horizontal and vertical axes represent the words in the sentence and their part-of-speech tags, respectively. The purple area represents the effective relationship region between the detected aspect words and opinion words, where S represents the starting boundary of the relationship region and E represents the ending boundary of the relationship region. Taking the sentence "The food is always fresh and hot ready to eat" as an example, the model identifies the aspect word "food" and its corresponding opinion expressions "fresh" and "hot ready to eat", and generates corresponding aspect sentiment triples accordingly.
[0060] In the model training and validation phases of this invention, standard cross-entropy loss is used as the optimization objective function for model training. Let the true triplet be... The predicted triple is The training objective is to minimize the total loss. It consists of boundary loss functions for the aspect region and the view region. , and sentiment classification loss Composition. The final loss function is defined as shown in formula (21).
[0061] (twenty one) The definitions of each loss component are shown in Equations (22) to (24).
[0062] (twenty two) (twenty three) (twenty four) In this invention, the ASTE-Data-V2 (V2) dataset, as an improvement over ASTE-Data-V1 (V1), features more complete triple annotations. To demonstrate the effectiveness of the Common and Inherent Feature Augmented (CIFA) model proposed in this invention, the V2 dataset is used for primary evaluation, and the accuracy of the model is further verified on the V1 dataset. The four public benchmark datasets included are Lap14, Rest14, Rest15, and Rest16, which originate from SemEval 2014 Task 4, SemEval 2015 Task 12, and SemEval 2016 Task 5, respectively. These datasets contain online reviews from the laptop and restaurant sectors, fully demonstrating triple diversity. #S represents the number of sentences, and #A, #O, and #T represent the number of all aspect words, opinion words, and triples, respectively. Specific statistics are shown in Table 1.
[0063] Table 1. Detailed information on ASTE-Data-V2 datasets Rest14 and Lap14
[0064] The proposed model uses BERT-base-uncased as the encoder during experiments. It contains 110 million parameters, 12 attention heads, and 12 Transformer blocks, with a hidden size of 768. The graph convolutional network in the model has 3 layers. The dependency tree for the input sentence uses CoreNLP.
[32] Analysis. During model training, GeLU was used as the default activation function, and the Adam optimizer was employed for optimization, with a learning rate set to 3e-5. Furthermore, training was conducted for a total of 10 epochs, with each experiment repeated five times using a different random seed to ensure statistical reliability. The best average result was then selected.
[0065] To verify the effectiveness of the CIFA model proposed in this invention on the ASTE task, this invention selected existing mainstream methods for comparison.
[0066] Mainstream models: Two-Stage: A two-stage model is proposed, which performs extraction and matching tasks separately.
[0067] JET: Developed a sequence labeling scheme for end-to-end triple extraction.
[0068] SSJE: Utilizes a span-level approach to better leverage complete semantics and enhances span representation through graph convolutional networks.
[0069] SBN: Proposes a span-level bidirectional network that uses all possible spans as input and bidirectionally extracts sentiment triples from the spans.
[0070] S³E²: By integrating semantic and syntactic relations, it achieves a more comprehensive understanding of sentence structure and meaning, thereby more accurately capturing the complex relationships between triple elements.
[0071] Dual-MRC: The ASTE task is decomposed into two parallel MRC tasks, and triple extraction is achieved through joint modeling.
[0072] BMRC: By associating, extracting, matching, classifying, and adding different queries, the ASTE task is transformed into a multi-turn machine reading comprehension (MRC) task, and solved through the bidirectional MRC (BMRC) framework.
[0073] Dual-Span: This proposes a dual-channel approach that halves the search range of span enumeration and constructs intra-span and inter-span relations to capture higher-order language interactions.
[0074] D2E2S: Proposes a dual encoder to leverage the great potential of syntactic and semantic information, utilizing different modules to enhance the overall relation representation.
[0075] SAAG proposes an Abstract Meaning Representation (AMR) to reduce redundant pairs generated by syntactic dependencies and introduces semantic sentiment knowledge to highlight the emotional meaning of words.
[0076] GTS: Proposes a grid annotation scheme that captures pairing relationships and extracts target words based on tables.
[0077] EMC-GCN: Utilizes graph convolutional networks to fully learn and enhance relation-aware node representations of different language features.
[0078] BDTF: Developed an effective relation representation learning method to fully utilize relational interactions and better interpret boundaries through table filling.
[0079] SimSTAR introduces a segmented labeling scheme to represent all possible spans and uses a dual extractor in the decoding stage to separate sentiment classification from word extraction.
[0080] STAGE: Redefines the ASTE task as a multi-class span classification problem and achieves more accurate sentiment triple extraction by leveraging span-based information.
[0081] HIM proposes a novel annotation scheme that transforms ASTE into a unified boundary-word relation classification problem.
[0082] S&T: It combines the advantages of span and table filling by constructing spans in a tabular form and calculating labels based on spans.
[0083] PT-GCN: Proposes a table-to-graph transformation method that does not rely on external knowledge and takes into account the deep interaction between adjacent cells.
[0084] MiniConGTS: This paper evaluates the redundancy in annotation schemes and proposes a minimalist annotation scheme that combines contrastive learning strategies to improve and utilize pre-trained representations.
[0085] Experimental results and analysis: This invention evaluates the proposed CIFA model on two benchmark datasets and compares it with baseline models. The best results are indicated in bold, and the second-best results are indicated by underline. Experimental results show that the model of this invention outperforms other models in almost all metrics, especially in F1, the most comprehensive performance metric, which scores higher than the mainstream methods on both the V1 and V2 datasets. The results are shown in Tables 2 and 3.
[0086] As shown in Table 2, the experimental results on the V2 dataset are analyzed as follows: (1) The F1 scores on Lap14, Rest14, Rest15, and Rest16 improved by 2.61%, 1.53%, 1.6%, and 2.16%, respectively. (2) CIFA achieved better performance compared to models using graph-based neural networks (such as EMC-GCN), which strongly demonstrates that fully utilizing sentiment cues from both global and local perspectives has a positive impact on the sentiment triple extraction task. (3) By integrating the extracted features into a structured table representation, the advantages of table filling methods are combined, resulting in more accurate triple extraction results than other methods. CIFA still shows leading performance on all four datasets compared to the best-performing model.
[0087] Table 2 Experimental results of CIFA on the V2 dataset
[0088] As shown in Table 3, on the same V1 dataset, the F1 scores on Lap14, Rest14, Rest15, and Rest16 are on average about 2.46% higher than other methods. This result strongly suggests that CIFA's enhancement of global and local features can better maximize the use of available knowledge, thereby improving the accuracy of sentiment triple extraction when labeling relative defects.
[0089] Table 3 Experimental results of CIFA on the V1 dataset
[0090] To further examine the contributions of different enhancement modules and attention modules from the global-local perspective, ablation experiments were also conducted on the V2 Lap14 and Rest14 datasets, and the results are shown in Table 4.
[0091] Table 4 Ablation experiments on the Rest14 and Lap14 datasets
[0092] Specifically, while ensuring consistency between the target validation module and other framework structures, the target modules were individually removed to evaluate their contribution to model performance. For the enhancement modules, firstly, the effectiveness of FEM in capturing general sentiment cues was verified by removing local parts. Removing FEM significantly reduced overall performance. Compared to the original model's F1 score, removing FEM reduced it by 3.04% on Rest14 and 2.07% on Lap14. This indicates that FEM can further filter the contextual information encoded by BERT to maximize the utilization of available knowledge, which has a corresponding impact on sentence sentiment analysis, thereby improving the overall performance of the model. Subsequently, W²T was removed to evaluate its impact. The results show that removing W²T reduced the F1 scores on Rest14 and Lap14 by 3.16% and 2.42%, respectively. Therefore, the performance decline demonstrates the ability of W²T to capture inherent sentiment cues of words, providing stronger evidence for module enhancement representation and promoting more accurate extraction.
[0093] Secondly, to explore the effectiveness of the self-attention mechanism, this invention removed its introduction while keeping other parameters unchanged. Experimental results show that the absence of this module significantly reduced performance by 2.49% and 3.34%, respectively. This indicates that using the self-attention mechanism can better reduce noise, more accurately capture the interdependencies between words in a sentence, and enhance task adaptability.
[0094] Finally, to investigate the effect of enhanced interaction dependencies, the dependency tree-based graph convolutional module was removed, denoted as w / oGCN. The model's F1 score decreased by 3.34% on Rest14 and by 2.49% on Lap14, representing the largest decrease among all ablation methods. Therefore, the absence of the enhanced interaction module hinders the model from capturing syntactic structural information, thereby impairing its predictive accuracy.
[0095] In addition, this invention also conducted sub-task experiments, evaluating the CIFA model on the Aspect Term Extraction (ATE) and Opinion Term Extraction (OTE) sub-tasks to further demonstrate that general and inherent feature enhancements can more accurately locate aspect terms and opinion terms, such as... Figure 6 The experimental results of the CIFA model on the aspect term extraction subtask are presented. Compared with GTS-BERT and Span-ASTE, CIFA achieved higher F1 scores on the four datasets Lap14, Rest14, Rest15 and Rest16, indicating that the model can more accurately identify aspect terms in reviews.
[0096] Figure 7This demonstrates the experimental results of the CIFA model on the opinion term extraction subtask. CIFA outperforms the comparison model on four datasets, indicating that common features and inherent sentiment information of words can effectively improve the recognition ability of opinion words.
[0097] Furthermore, it was confirmed that compared to the more complex ASTE task, the proposed method has a smaller impact on improving the aspect term extraction and opinion term extraction subtasks, which may be due to the different granularity of the required interactions. This further illustrates that as task complexity increases, the CIFA method can more fully utilize aggregated multi-granularity information to achieve better interactions.
[0098] Furthermore, this invention provides example analysis, as follows: Several examples from four datasets are used to illustrate the differences between the model of this invention and previous models, and to further demonstrate the superior performance of the model of this invention under different conditions. Considering the complexity of the relationship between aspect terms and opinion terms, the examples are divided into three groups for comparison, as shown in Table 5. Sentences 1-3 are sentences with only one pair of aspect-opinion terms. It can be found that for the first simple sentence, the opinion term or aspect term contains only one word, and the previous method can correctly extract the sentiment triple. However, when the aspect terms and opinion terms become more complex, such as the aspect term "fish and chips" in sentence 3, the method of this invention has higher accuracy, which shows the necessity of region detection when dealing with more complex test cases.
[0099] Table 5 Sample Label Data Table
[0100] Continued from Table 5: Sample Label Data Table
[0101] For sentences 4-8, when one aspect word corresponds to multiple opinion words or multiple aspect words correspond to one opinion word, previous methods suffer from errors such as missing extraction or sentiment classification errors due to distance or span issues. In sentence 7, the opinion word is a multi-span word, and its misidentification led to incorrect sentiment triple extraction. In contrast, CIFA mines deeper features based on general sentiment cues, ensuring more specific and accurate sentiment triple extraction. Particularly for sentence 6, the model accurately predicted sentiment triples that did not explicitly indicate a relevance to words like "restaurant" or "laptop," demonstrating the high robustness of the model in this invention.
[0102] Sentences 9-11 are examples of multiple aspect words corresponding to different opinion words. Previous models achieved incompletely accurate sentiment judgments, while the model of this invention shows higher accuracy, highlighting the advantages of CIFA in handling aspect or opinion items composed of multiple words. Specifically, for sentences like sentence 11, the part of speech of the aspect word in the triple is a verb or a verb phrase. The verb phrase "start up" is captured efficiently, demonstrating the effectiveness of combining general and inherently enhanced feature methods derived from global and local perspectives.
[0103] The specific embodiments of the present invention take user review analysis on e-commerce platforms as an application scenario, including restaurant catering services (involving fine-grained sentiment analysis of dimensions such as food quality, service attitude, and environment, such as the aspect word "food" corresponding to the two opinion words "fresh" and "hot ready to eat" in "food is always fresh and hot ready to eat"), reviews of electronic products such as laptops (involving dimensions such as user experience and operational smoothness, such as the scenario where verb phrases such as "start up" are used as aspect words), and general reviews of all categories of e-commerce products (covering multiple attributes of sentiment expression such as screen, battery life, packaging, price, and portion size). Based on this, specific embodiments verify the effectiveness and superiority of the present invention in handling complex sentence structures such as multi-word aspect items, multiple opinion words corresponding to the same aspect item, many-to-many mapping, and positive-negative contrasts connected by adversative conjunctions. This provides reliable technical support for merchants to accurately identify product strengths and weaknesses, guide improvement directions, and help consumers quickly understand product reputation.
[0104] Example 2 In a typical embodiment of the present invention, an aspect-based sentiment triple extraction system based on common inherent features is provided, comprising: Embedded representation module: used to obtain the word-level representation matrix of the sentence; Parallel enhancement module: used to extract common features and inherent features of words in the word-level representation matrix in parallel: wherein, the common features are represented by a global part-of-speech weight matrix generated by statistically analyzing the part-of-speech frequency distribution using a part-of-speech frequency-reverb mechanism; the inherent features are represented by a local sentiment polarity index matrix generated by aggregating sentiment dictionary sense scores using a word wave tracker; Fusion Enhancement Module: This module fuses the word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix, and then generates enhanced features after processing through a graph convolutional network and a self-attention layer. Output module: used to input the enhanced features into the region extractor to obtain aspect sentiment triples.
[0105] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method of Embodiment 1.
[0106] Example 4 The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method of Embodiment 1.
[0107] The steps and methods involved in Embodiments 3 and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0108] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0109] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0110] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for extracting aspect-based sentiment triples based on common inherent features, characterized in that, include: Obtain the word-level representation matrix of the sentence; The common features and inherent features of words in the word-level representation matrix are extracted in parallel: the common features are represented by a global part-of-speech weight matrix generated by statistically analyzing the part-of-speech frequency distribution using a part-of-speech frequency-echo mechanism; the inherent features are represented by a local sentiment polarity index matrix generated by aggregating the sentiment dictionary sense scores using a word wave tracker. The word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix are fused and then enhanced by a graph convolutional network and a self-attention layer to generate enhanced features. The enhanced features are input into the region extractor to obtain aspect sentiment triples.
2. The aspect-based emotion triple extraction method based on common inherent features as described in claim 1, characterized in that, The process of obtaining the word-level representation matrix of the sentence includes: The sentence is input into the BERT encoder to obtain the word-level hidden state. The word representations corresponding to each original word are restored to word-level representations through average pooling, resulting in a word-level representation matrix with the same length as the sentence.
3. The aspect-based emotion triple extraction method based on common inherent features as described in claim 1, characterized in that, The steps for generating the global part-of-speech weight matrix are as follows: Obtain the part-of-speech tags of each word in the sentence, count the frequency of each part-of-speech tag as aspect words or opinion words in the training data, and calculate the part-of-speech frequency distribution of aspect words and opinion words respectively; Based on the part-of-speech frequency distribution, a part-of-speech frequency weight vector matrix with the same length as the sentence is generated as the global part-of-speech weight matrix.
4. The aspect-based sentiment triple extraction method based on common inherent features as described in claim 1, characterized in that, The steps for generating the local sentiment polarity index matrix are as follows: Obtain the positive and negative sentiment scores for each word and each meaning in SentiWordNet, calculate the average difference between the positive and negative sentiment scores for all meanings of each word as the sentiment polarity index, and combine them to obtain a local sentiment polarity index matrix.
5. The aspect-based emotion triple extraction method based on common inherent features as described in claim 1, characterized in that, The global part-of-speech weight matrix and the local sentiment polarity index matrix are expanded to match the dimensions of BERT features, and element-wise multiplication is performed to obtain the joint sentiment enhancement matrix; Dynamically generate gated weight matrix based on BERT original features; The joint sentiment enhancement matrix and the word-level representation matrix are adaptively fused to obtain the fused features.
6. The aspect-based emotion triple extraction method based on common inherent features as described in claim 5, characterized in that, Construct the adjacency matrix and the corresponding degree matrix based on the syntactic dependency tree; The fused features are used as the initial node representations and input into the graph convolutional network. After being updated by multiple layers of graph convolution, the graph-enhanced representation is obtained. A self-attention mechanism is applied to the graph augmentation representation to obtain augmented features.
7. The aspect-based emotion triple extraction method based on common inherent features as described in claim 1, characterized in that, The enhanced features are input into a table-filled region extractor, and the start and end boundaries of aspect-viewpoint pairs are determined by boundary detection. The inter-word relation representation is obtained by max pooling. A ResNet-style convolutional neural network is used to encode the relation matrix, and a boundary classifier is used to predict the effective relation regions, generating aspect sentiment triples composed of aspect words, opinion words, and sentiment polarity.
8. A system for extracting aspect-based emotion triples based on common inherent features, characterized in that, include: Embedded representation module: used to obtain the word-level representation matrix of the sentence; Parallel enhancement module: used to extract common features and inherent features of words in the word-level representation matrix in parallel: wherein, the common features are represented by a global part-of-speech weight matrix generated by statistically analyzing the part-of-speech frequency distribution using a part-of-speech frequency-reverb mechanism; the inherent features are represented by a local sentiment polarity index matrix generated by aggregating sentiment dictionary sense scores using a word wave tracker; Fusion Enhancement Module: This module fuses the word-level representation matrix, the global part-of-speech weight matrix, and the local sentiment polarity index matrix, and then generates enhanced features after processing through a graph convolutional network and a self-attention layer. Output module: used to input the enhanced features into the region extractor to obtain aspect sentiment triples.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.
