Implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization

Through the method of emotional chain reasoning and dynamic loss optimization, emotional elements are identified in stages and emotional chain paths are constructed. Combined with GPT-4O to construct a data set, the accuracy and multi-task learning imbalance problems in implicit sentiment analysis are solved, and efficient emotional tendency identification and analysis are achieved. It is suitable for fields such as corporate decision-making and social public opinion monitoring.

CN120706404APending Publication Date: 2025-09-26HEBEI UNIV OF ENG

Patent Information

Application Number
CN202510774853.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing technologies have difficulty in accurately identifying emotional tendencies in implicit emotional texts. Multi-task learning training is unbalanced, and limitations in dataset construction lead to insufficient training effects and generalization capabilities of models in implicit sentiment analysis tasks.

Method used

A method based on emotion chain reasoning and dynamic loss optimization is adopted. By identifying emotional elements in stages, an emotion chain reasoning path is constructed, and task weights are adjusted using homoscedastic uncertainty. Combined with GPT-4O, a high-quality dataset is constructed for model fine-tuning.

Benefits of technology

It significantly improves the accuracy and stability of implicit sentiment analysis, enhances the performance of the model in complex multi-task scenarios, and improves the generalized recognition ability of implicit sentiment in different types of texts. It is suitable for areas such as corporate decision-making, brand reputation management, and social public opinion monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706404A_ABST
    Figure CN120706404A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, and discloses an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization, which comprises the following steps: designing a continuous reasoning prompt, identifying sentiment elements in stages and constructing a sentiment chain reasoning path; the model is trained and optimized through multi-stage mixed loss, the task weight is dynamically adjusted by using the uncertainty of the same variance, and the accuracy of emotion element recognition is enhanced; gPT-4O is combined with a self-refining correction mechanism to construct a data set, sentiment elements are supplemented for model fine tuning, and in an implicit sentiment analysis task, the model is adopted to carry out sentiment tendency recognition and analysis on a text. A staged prompt strategy is innovatively adopted, aspect item recognition and opinion expression item recognition prompts are constructed firstly, then emotion polarity recognition prompts are constructed, implicit aspect items and opinion expression items are deduced step by step through a model, and finally the emotion polarity is accurately judged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization. Background Art

[0002] Implicit Sentiment Analysis (ISA), an important branch of sentiment analysis in the field of Natural Language Processing (NLP), has always been a technically challenging and research hotspot. ISA aims to identify hidden sentiment in text. Compared with Explicit Sentiment Analysis (ESA), ISA faces unique and complex challenges.

[0003] In existing technologies, ESA tasks have made significant progress, with related models able to accurately analyze text sentiment based on explicit sentiment signatures. For example, models based on deep learning architectures (such as convolutional neural networks, recurrent neural networks, and Transformer architectures) can extract effective text features and perform sentiment classification when processing text with explicit sentiment vocabulary. However, due to the lack of explicit sentiment signatures in ISA, sentiment is often hidden within objective factual descriptions or expressed through metaphors, rhetoric, and other techniques, making it difficult to directly identify and extract underlying sentiment information.

[0004] The existing technologies have the following major problems when processing ISA tasks:

[0005] Difficulty in directly identifying implicit emotional elements: Traditional sentiment analysis models are mostly based on keyword matching, word vector representation, or shallow neural network structures. When processing text with implicit emotions, the lack of clear emotional signatures makes it difficult for the models to accurately identify the sentiment within the text. For example, in a sentence like "This new phone fits right into my pocket," it's difficult for the model to directly identify the underlying sentiment regarding the phone's size and convenience.

[0006] Unbalanced training in multi-task learning: In multi-task learning scenarios, existing methods typically use fixed weights to weightedly sum the losses of different tasks. This simple weighting method does not consider the learning difficulty of different task stages and the differences in model processing capabilities. As a result, some tasks may dominate the training process, while other tasks are not learned enough, affecting the overall performance of the model.

[0007] Limitations of dataset construction: Existing sentiment analysis datasets often lack sufficient annotation of implicit sentiment text. In addition, during the data augmentation process, the data generated by traditional methods may be inaccurate and have low relevance, which limits the training effect and generalization ability of the model in implicit sentiment analysis tasks.

[0008] To this end, those skilled in the art have proposed an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization to solve the above problems. Summary of the Invention

[0009] In response to the shortcomings of the existing technology, the present invention provides an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization, which solves the problems raised in the above background technology.

[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions: an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization, comprising the following steps:

[0011] Design continuous reasoning prompts, identify emotional elements in stages and construct emotional chain reasoning paths;

[0012] The model is optimized through multi-stage mixed loss training, and task weights are dynamically adjusted using homoscedastic uncertainty to enhance the accuracy of emotional element recognition.

[0013] Use GPT-4O combined with a self-refining correction mechanism to construct a dataset and add emotional elements for model fine-tuning;

[0014] In the implicit sentiment analysis task, the model is used to identify and analyze the sentiment tendency of the text.

[0015] Preferably, the design of continuous reasoning prompts to identify emotional elements in stages includes:

[0016] Constructing aspect item identification prompts to determine potential aspect items of emotional expression based on given sentences and target items;

[0017] Constructing opinion expression item identification hints to determine potential opinion expression items based on a given sentence and identified target-aspect pairs;

[0018] Construct sentiment polarity recognition prompts, generate text with obvious sentiment feature words according to the target-aspect-opinion expression triples, and then identify sentiment polarity.

[0019] Preferably, the multi-stage mixed loss training includes:

[0020] Calculate the cross entropy loss between the predicted labels and the true labeled labels at each stage;

[0021] Homoscedastic uncertainty is introduced to reflect the inherent uncertainty of tasks in the multi-task stage, and a mixed loss function is designed for the multi-task stage. The loss weights of each task stage are automatically adjusted through trainable uncertainty parameters to ensure the balance of multi-task learning.

[0022] Preferably, the method of constructing a data set using GPT-4O combined with a self-refining correction mechanism includes:

[0023] Translate the generated content into a natural language statement through paraphrase;

[0024] Let the large language model self-check the implication or contradiction relationship between the statement and the given sentence. If there is an implication relationship, the verification is successful. If there is a contradiction, the result is regenerated according to the correction suggestions until a reasonable result is produced, thereby supplementing the aspect items and opinion expression items in the dataset.

[0025] Preferably, in the implicit sentiment analysis task, identifying and analyzing the sentiment tendency of the text includes classifying the sentiment polarity of the text on the SemEval 14Laptop and Restaurant datasets to determine whether the sentiment is positive, negative or neutral.

[0026] Preferably, the application scenarios of the method include corporate decision-making, brand reputation management, social public opinion monitoring and other fields. By accurately identifying implicit emotional tendencies in texts, valuable emotional information analysis and decision-making support are provided for related fields.

[0027] An implicit sentiment analysis system based on sentiment chain reasoning and dynamic loss optimization, including:

[0028] A prompt design module for designing sequential reasoning prompts to identify emotional elements in stages;

[0029] Model training module, used to optimize the model through multi-stage mixed loss training;

[0030] The dataset construction module is used to construct a dataset using GPT-4O combined with a self-refining correction mechanism; the sentiment analysis module is used to perform implicit sentiment analysis on the text and output sentiment tendency results.

[0031] Preferably, the prompt design module includes an aspect item recognition prompt unit, an opinion expression item recognition prompt unit and an emotion polarity recognition prompt unit, which are respectively used to construct corresponding prompt texts to identify emotion elements at different levels.

[0032] Preferably, the model training module includes a loss calculation unit and a weight adjustment unit. The loss calculation unit is used to calculate the cross entropy loss of each stage, and the weight adjustment unit automatically adjusts the loss weight of each task stage based on homoscedastic uncertainty to optimize the model training process and improve the accuracy of sentiment analysis.

[0033] The present invention provides an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization.

[0034] It has the following beneficial effects:

[0035] 1. This invention innovatively employs a phased prompting strategy, first constructing prompts for aspect item and opinion item identification, and then constructing prompts for sentiment polarity identification. This allows the model to gradually infer implicit aspect items and opinion items, ultimately accurately determining sentiment polarity. Compared to traditional methods that directly identify sentiment polarity, this step-by-step reasoning approach not only significantly improves the accuracy of implicit sentiment analysis but also enhances the interpretability of the sentiment analysis process, providing strong support for understanding the basis for model decisions.

[0036] 2. This invention creatively introduces homoscedastic uncertainty to dynamically adjust weights across multiple tasks, effectively addressing the training imbalance caused by varying learning difficulty across tasks. Compared to fixed-weight training, this method automatically adapts to the model's performance across different tasks, enabling full and effective training across all tasks. This comprehensively improves the model's ability to identify emotional elements and ensures the stability and high performance of the implicit sentiment analysis model in complex multi-task training scenarios.

[0037] 3. This paper uses GPT-4O combined with a self-refining correction mechanism to construct a dataset. By supplementing sentiment elements through paraphrase conversion, self-verification, and logical relationship correction between statements and given sentences, this method provides a high-quality and rich data resource for model fine-tuning. This method effectively overcomes the problems of inaccurate data and low relevance that may arise with traditional data augmentation methods, significantly improving the reliability and effectiveness of the dataset. This in turn enhances the model's ability to generalize implicit sentiment recognition across different types of text, enabling the model to function more stably and accurately in practical application scenarios such as corporate decision-making, brand reputation management, and social public opinion monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is the overall flow chart of the present invention;

[0039] Figure 2 This is a module architecture diagram of the implicit sentiment analysis system of the present invention;

[0040] Figure 3 This is the aspect-based emotion chain reasoning framework diagram of the present invention;

[0041] Figure 4 Constructing a flow chart for identifying prompt text for aspects of the present invention;

[0042] Figure 5 Constructing a flow chart for identifying prompt text for opinion expression items of the present invention;

[0043] Figure 6 Constructing a flow chart for the present invention's sentiment polarity recognition explicit text;

[0044] Figure 7 This is a flowchart of the multi-stage training and loss calculation of each stage of the present invention;

[0045] Figure 8 Supplementing the self-refining correction flow chart for aspects of the present invention;

[0046] Figure 9 This is the F1 value of the model with different parameter scales in the ISA task in the embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the present specification. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0048] Please see the attached Figure 1 -Attached Figure 9 The embodiment of the present invention provides an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization, comprising the following steps:

[0049] Design continuous reasoning prompts, identify emotional elements in stages and construct emotional chain reasoning paths;

[0050] Specifically, in implicit sentiment analysis tasks, designing continuous reasoning prompts is an innovative approach. It guides the model through a phased approach to gradually identify emotional elements in the text, thereby constructing a complete emotional chain reasoning path. This approach breaks away from the traditional model of directly judging the sentiment polarity of text. Instead, it decomposes the complex sentiment analysis task into multiple simple, sequential subtasks, similar to human thinking. This allows the model to understand the emotional information in the text more deeply and meticulously, thereby improving the accuracy and rationality of sentiment analysis and providing a more comprehensive basis and clearer thinking for subsequent sentiment polarity judgments.

[0051] Designing sequential reasoning prompts to identify emotional elements in stages includes:

[0052] Constructing aspect item identification prompts to determine potential aspect items of emotional expression based on given sentences and target items;

[0053] Specifically, constructing aspect item recognition prompts is the key first step in the emotional chain reasoning path. In actual texts, emotions are often developed for specific aspects or dimensions. For example, for a mobile phone product, it may involve multiple aspects such as appearance, performance, and battery life. By designing special aspect item recognition prompts, the model can be guided to accurately mine the potential aspect items pointed to by emotions in the text based on given sentences and target items. This helps to clarify the specific objects and scope of sentiment analysis, making the model's understanding of the text more focused and accurate, and laying the foundation for further identifying the specific content and tendencies of emotions.

[0054] Constructing opinion expression item identification hints to determine potential opinion expression items based on a given sentence and identified target-aspect pairs;

[0055] Specifically, this prompt method allows the model to further mine opinion expressions associated with the aspect in the text based on a given sentence and the identified target-aspect pair. Opinion expressions reflect the user's subjective views, feelings, or evaluations of that specific aspect and can be explicit adjectives, verb phrases, or more subtle descriptions. Identifying these opinion expressions enables the model to more accurately grasp the core emotional content of the text, providing a more direct and specific basis for the final sentiment polarity judgment.

[0056] Construct sentiment polarity recognition prompts, generate text with obvious sentiment feature words according to the target-aspect-opinion expression triples, and then identify sentiment polarity.

[0057] Specifically, this triple structure more clearly presents the complete logical relationship of sentiment within a text. Then, using sentiment polarity recognition cues, the model is guided to generate text descriptions with explicit sentiment signatures, making previously implicit sentiment explicit. Ultimately, the model is able to accurately determine the sentiment polarity of the text—positive, negative, or neutral—based on these explicit sentiment signatures, thereby completing a comprehensive, in-depth, and precise analysis of text containing implicit sentiment.

[0058] The model is optimized through multi-stage mixed loss training, and task weights are dynamically adjusted using homoscedastic uncertainty to enhance the accuracy of emotional element recognition.

[0059] Specifically, by introducing homoscedastic uncertainty to dynamically adjust task weights, we can automatically and appropriately allocate training weights for each task based on the model's learning progress and difficulty differences at different task stages. This approach avoids the problem of overemphasizing or neglecting certain tasks that can occur with traditional fixed-weight training methods, ensuring that the model is fully and effectively trained at all stages. This significantly improves the model's accuracy and robustness in identifying emotional elements, enabling it to perform even better in complex implicit sentiment analysis tasks.

[0060] Multi-stage hybrid loss training includes:

[0061] Calculate the cross entropy loss between the predicted labels and the true labeled labels at each stage;

[0062] Homoscedastic uncertainty is introduced to reflect the inherent uncertainty of tasks in the multi-task stage, and a mixed loss function is designed for the multi-task stage. The loss weights of each task stage are automatically adjusted through trainable uncertainty parameters to ensure the balance of multi-task learning.

[0063] Use GPT-4O combined with a self-refining correction mechanism to construct a dataset and add emotional elements for model fine-tuning;

[0064] The datasets constructed using GPT-4O combined with the self-refining correction mechanism include:

[0065] Translate the generated content into a natural language statement through paraphrase;

[0066] Let the large language model self-check the implication or contradiction relationship between the statement and the given sentence. If there is an implication relationship, the verification is successful. If there is a contradiction, the result is regenerated according to the correction suggestions until a reasonable result is produced, thereby supplementing the aspect items and opinion expression items in the dataset.

[0067] In the implicit sentiment analysis task, the model is used to identify and analyze the sentiment tendency of the text.

[0068] In the implicit sentiment analysis task, the sentiment tendency identification and analysis of text includes sentiment polarity classification of text on the SemEval14Laptop and Restaurant datasets to determine whether it is positive, negative or neutral.

[0069] The application scenarios of this method include corporate decision-making, brand reputation management, social public opinion monitoring and other fields. By accurately identifying implicit emotional tendencies in texts, it provides valuable emotional information analysis and decision-making support for related fields.

[0070] An implicit sentiment analysis system based on sentiment chain reasoning and dynamic loss optimization, including:

[0071] A prompt design module for designing sequential reasoning prompts to identify emotional elements in stages;

[0072] The prompt design module includes an aspect item recognition prompt unit, an opinion expression item recognition prompt unit, and an emotion polarity recognition prompt unit, which are respectively used to construct corresponding prompt texts to identify emotion elements at different levels.

[0073] Model training module, used to optimize the model through multi-stage mixed loss training;

[0074] The model training module includes a loss calculation unit and a weight adjustment unit. The loss calculation unit is used to calculate the cross-entropy loss at each stage. The weight adjustment unit automatically adjusts the loss weight of each task stage based on homoscedastic uncertainty to optimize the model training process and improve the accuracy of sentiment analysis.

[0075] Specifically, the model training module plays a vital role in the implicit sentiment analysis system. Its main responsibility is to optimize the model through a multi-stage mixed loss training strategy to improve the performance of the model in sentiment analysis tasks, so that it can more accurately identify emotional elements in the text.

[0076] This module consists of the following two core units:

[0077] Loss Calculation Unit: This unit focuses on calculating the cross-entropy loss at each stage. During model training, the loss function is an important metric for measuring the difference between the model's predictions and the true annotations. The cross-entropy loss function is widely used in classification tasks and effectively evaluates the accuracy of a model's predictions for different sentiment categories. For each training stage, the loss calculation unit calculates the corresponding cross-entropy loss value based on the model's predicted output and the true annotation labels. These loss values ​​not only reflect the model's prediction error at each stage but also provide critical feedback for subsequent model optimization, helping the model understand its task performance at different stages and making targeted adjustments and improvements.

[0078] Weight adjustment unit: Based on the principle of homoscedasticity uncertainty, this unit is responsible for automatically adjusting the loss weights of each task stage. In a multi-task learning scenario, different tasks have different learning difficulties and model processing capabilities, which may cause some tasks to dominate the training process, while the learning progress of other tasks lags behind. By introducing homoscedasticity uncertainty, the weight adjustment unit can dynamically assign weights to each task based on the performance of the model at different task stages. Specifically, it will automatically reduce the weights of tasks with lower learning difficulty and better model performance, while increasing the weights of tasks with higher learning difficulty and model performance that needs to be improved. This dynamic weight adjustment mechanism ensures that the model can be fully and evenly trained at each task stage, avoiding the waste of training resources and the imbalance of the training process, thereby comprehensively improving the model's ability to recognize emotional elements, and making the model more accurate and stable when processing complex implicit sentiment analysis tasks.

[0079] The dataset construction module is used to construct a dataset using GPT-4O combined with a self-refining correction mechanism; the sentiment analysis module is used to perform implicit sentiment analysis on the text and output sentiment tendency results.

[0080] This paper proposes an ABCoS reasoning framework. Figure 3 As shown in Figure 1, the framework primarily consists of first- and second-level cues integrated with a large language model for identifying sentiment elements, as well as third- and fourth-level cues for analyzing sentiment polarity. The sentiment analysis task in this paper is defined as follows: given a sentence X and its target item t, the goal is to predict the sentiment polarity Y expressed by sentence X with respect to the target item t, i.e., positive, negative, or neutral.

[0081] The ABCoS reasoning framework proposed in this paper does not directly ask the large language model for the sentiment polarity Y when predicting sentiment. Instead, it hopes that the model will gradually infer the implicit aspect term a and the opinion expression term o before outputting the final sentiment polarity. The sentiment chain constructed in this paper prompts as follows:

[0082] 1. Aspect item recognition. The goal of this step is to identify which potential aspect of the target item is emotionally expressed by the given sentence, and to construct the prompt text based on the given sentence X and the target t. The specific construction process is as follows Figure 3 shown.

[0083] C1 is the aspect item recognition prompt context, and op1 is the first step output prompt context. After the first step, we can obtain the target-aspect binary D, which is expressed by the following formula.

[0084] D = argmaxp(op1|X,t);

[0085] 2. Opinion expression item recognition. The goal of this step is to continue to construct the prompt text based on the given sentence X and the target-aspect pair obtained in the first step, and to recognize the potential opinion expression o about the target t in the sentence X. The specific construction process is as follows: Figure 4 shown.

[0086] C2 is the context for identifying the opinion expression item, and op2 is the context for outputting the second step. The second step yields the target-aspect-opinion expression triple T, which is expressed as follows:

[0087] T = argmaxp(op2|X,D);

[0088] Sentiment polarity identification. The goal of this step is to construct a text with obvious sentiment feature words based on the target-aspect-opinion expression triple obtained in the second step, and finally identify the sentiment polarity of the text. The specific construction process is as follows: Figure 6 shown.

[0089] C3 converts the given sentence X into a template with distinct characteristic words based on the triples T. op3 outputs the context hints in the third step. The final sentiment polarity Y is obtained after the third step, which can be expressed using the following formula.

[0090] Y = argmaxp(op3|T);

[0091] The emotional chain designed in this paper uses a step-by-step reasoning method to identify emotional polarity, and the reasoning of the next step requires the knowledge of the previous step, which may lead to error accumulation and directly affect the results of all subsequent steps. Therefore, in order to ensure that the model produces correct results as much as possible at each step, this paper designs a multi-stage mixed loss training method to train the model to reduce the probability of errors. The specific process is as follows Figure 7 shown.

[0092] Specifically, the training of this paper is divided into three stages. Each stage will produce an emotional element. The main task is to use the labeled data set to train each stage to enhance the model's prediction ability for each emotional element. In order to optimize this task, this study calculates the predicted labels of each stage. and the true annotation label y i The cross entropy loss between them is expressed by the following formula:

[0093]

[0094] L a =L o =L y =L CE ;

[0095] Among them La , L o and L y denote the losses of aspect item recognition, opinion item recognition, and sentiment polarity recognition stages, respectively. T is the length of the target sequence, and y t is the tth token of the target sequence, is the tth token predicted by the model, It is the probability distribution of the token predicted at time t.

[0096] Furthermore, this paper considers the varying learning difficulties of different task stages. Fixed task weights (e.g., simple weighted loss) can lead to certain tasks dominating training, resulting in training imbalance. On the other hand, models with large parameter sizes may be better at directly inferring emotion, without requiring much auxiliary emotional knowledge. Models with small parameter sizes struggle to directly understand complex relationships and require more data guidance. To address these issues, this paper introduces homoscedastic uncertainty to reflect the inherent uncertainty of tasks in the multi-task stage. The hybrid loss function designed for this multi-task stage is shown in the following formula.

[0097]

[0098] where σ i It is a trainable uncertainty parameter that is automatically adjusted during the training process. The loss L at each task stage i pass Scaling is done so that tasks with high uncertainty have smaller weights and tasks with low uncertainty have larger weights. It is a regularization term that prevents task weights from becoming extreme and ensures the balance of multi-task learning.

[0099] In order to fully verify the effectiveness of the ABCoS reasoning framework proposed in this paper, this paper conducts experiments on two benchmark datasets, SemEval14Laptop and Restaurant. The SemEval14Laptop dataset is about reviews of laptops. The reviews are subdivided into different aspects, and the sentiment tendencies of each aspect are annotated. The Restaurant dataset is about consumers' evaluations of restaurants. The reviews contain multiple aspects of the restaurant, and the sentiment tendencies of each aspect are also annotated. In order to verify the superiority of this method in implicit sentiment analysis, this paper follows the previous work of Li et al. and divides all instances in the two datasets into explicit sentiment and implicit sentiment. The details of the dataset division are as follows.

[0100] As shown in Table 1.

[0101]

[0102]

[0103] Table 1

[0104] In order to meet the requirements of supervised training in the multi-task stage proposed in this paper, this paper uses GPT-4O

[10] as an auxiliary tool to supplement the aspect items and opinion expression items on the basis of the original data set. In order to ensure the reliability of the generated content, this paper designs a self-refining correction mechanism. First, the generated content is converted back into a natural language statement that conveys the same meaning through paraphrase. Then, let the large language model self-check whether there is an implication or contradiction relationship between the statement and the given sentence

[11] . If there is an implication relationship, the verification is successful, which means that the result is reasonable. If there is a contradictory relationship, correction suggestions are given and the results are regenerated in combination with the correction suggestions until a reasonable result is produced. This process can effectively alleviate the negative impact of the inherent hallucinations of the large language model. Figure 8 The workflow of GPT-4O combining with the self-refining correction mechanism to supplement emotional elements is demonstrated through an example of aspect item supplementation.

[0105] This paper conducts detailed comparative experiments on the newly constructed SemEval14Laptop and Restaurant datasets, using the macro-average F1, Accuracy (Acc), and Implicit Sentiment Accuracy (ISA) as evaluation metrics. Table 2 shows the specific experimental results.

[0106] Analysis of the experimental data in Table 2 shows that the BERTAsp+SCAPT model achieves the best performance among all baseline models. Even THOR, which uses the 250M parameter Flan-T5 large language model, cannot surpass it. This is because BERTAsp+SCAPT is pre-trained on large-scale sentiment-labeled data, resulting in strong performance in sentiment analysis. However, when a large language model with a larger parameter size (11B) is used and the proposed ABCoS framework is used to supplement the sentiment elements, the sentiment analysis capability surpasses the state-of-the-art models, particularly in terms of ISA. On the implicit sentiment analysis tasks of the SemEval14Laptop and Restaurant datasets, the proposed method achieves accuracies of 76.25% and 81.86%, respectively, representing improvements of 2.82% and 2.99%, respectively. This demonstrates that having rich sentiment knowledge is crucial for implicit sentiment analysis and confirms the correct choice of using Flan-T5 as the backbone large language model and conducting supervised fine-tuning.

[0107]

[0108] Table 2

[0109] To demonstrate the effectiveness of the proposed ABCoS reasoning framework, we conducted ablation experiments using a Flan-T5 with a parameter scale of 11 bytes. Table 3 shows the specific experimental data and results. Zero-shot refers to untrained fine-tuning of Flan-T5, while Fine-tuning refers to supervised fine-tuning of Flan-T5. Prompt refers to direct questioning, ABCoS represents the proposed emotion chain reasoning framework, CoS refers to the use of emotion chains to supplement emotional elements, and Msml refers to supervised fine-tuning using multi-stage mixed loss training. Since GPT-4O was used to supplement the dataset with emotional elements, its performance was used as a reference for this experiment.

[0110]

[0111]

[0112] Table 3

[0113] Analysis of the experimental data in Table 3 shows that, regardless of whether the model is fine-tuned, using emotion chains to supplement emotional elements significantly improves the model's sentiment analysis performance, with fine-tuning being more effective, achieving accuracies of 75.63% and 79.43% for implicit emotion recognition, respectively. This demonstrates the effectiveness of our supervised fine-tuning of emotional element reasoning using emotion chains. Furthermore, using the proposed multi-stage hybrid loss function further improves model performance, outperforming GPT-4O, demonstrating the effectiveness of our proposed loss function in improving the model's sentiment analysis performance. Ablation experiments using different methods demonstrate that our proposed ABCoS reasoning framework effectively improves the model's performance in implicit sentiment analysis tasks.

[0114] In order to verify the effect of models with different parameter sizes in implicit emotion recognition, experiments were conducted using Flan-T5 models with four parameter sizes under the Prompt method and the ABCoS method. Figure 7 The F1 scores of two methods on the ISA task are shown using models of different parameter sizes. As can be seen from the figure, the performance of both methods on the ISA task increases with the increase in model parameters. This is because when large language models have sufficiently large parameters, their reasoning capabilities are also enhanced. Furthermore, at the same parameter size, the advantages of the proposed ABCoS reasoning framework are even more pronounced, effectively verifying the scalability of our method on the ISA task.

[0115] This study addresses the limitations of existing methods for implicit sentiment analysis (ISA) tasks and proposes an Aspect-Based Chain of Sentiment (ABCoS) reasoning framework. This framework combines the commonsense understanding capabilities of a large language model (LLM) with a Chain of Thought (CoT) reasoning mechanism to gradually identify sentiment elements using a multi-stage prompting approach, thereby improving the accuracy of implicit sentiment polarity prediction. Experimental results demonstrate that ABCoS outperforms existing state-of-the-art models on the ISA task on the SemEval 14Laptop and Restaurant datasets, with accuracy improvements of 2.82% and 2.99%, respectively, validating the effectiveness of this approach in implicit sentiment analysis.

[0116] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. An implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization, characterized in that: The following steps are involved: Design continuous reasoning prompts, identify emotional elements in stages and construct emotional chain reasoning paths; The model is optimized through multi-stage mixed loss training, and task weights are dynamically adjusted using homoscedastic uncertainty to enhance the accuracy of emotional element recognition. Use GPT-4O combined with a self-refining correction mechanism to construct a dataset and add emotional elements for model fine-tuning; In the implicit sentiment analysis task, the model is used to identify and analyze the sentiment tendency of the text.

2. The implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization according to claim 1 is characterized in that: The design of continuous reasoning prompts to identify emotional elements in stages includes: Constructing aspect item identification prompts to determine potential aspect items of emotional expression based on given sentences and target items; Constructing opinion expression item identification hints to determine potential opinion expression items based on a given sentence and identified target-aspect pairs; Construct sentiment polarity recognition prompts, generate text with obvious sentiment feature words according to the target-aspect-opinion expression triples, and then identify sentiment polarity.

3. The implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization according to claim 1 is characterized in that: The multi-stage hybrid loss training includes: Calculate the cross entropy loss between the predicted labels and the true labeled labels at each stage; Homoscedastic uncertainty is introduced to reflect the inherent uncertainty of tasks in the multi-task stage, and a mixed loss function is designed for the multi-task stage. The loss weights of each task stage are automatically adjusted through trainable uncertainty parameters to ensure the balance of multi-task learning.

4. The implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization according to claim 1 is characterized in that: The use of GPT-4O combined with a self-refining correction mechanism to construct a dataset includes: Translate the generated content into a natural language statement through paraphrase; Let the large language model self-check the implication or contradiction relationship between the statement and the given sentence. If there is an implication relationship, the verification is successful. If there is a contradiction, the result is regenerated according to the correction suggestions until a reasonable result is produced, thereby supplementing the aspect items and opinion expression items in the dataset.

5. The implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization according to claim 1 is characterized in that: In the implicit sentiment analysis task, the sentiment tendency identification and analysis of the text includes sentiment polarity classification of the text on the SemEval14Laptop and Restaurant datasets to determine whether it is positive, negative or neutral.

6. The implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization according to claim 1 is characterized in that: The application scenarios of the method include corporate decision-making, brand reputation management, social public opinion monitoring and other fields. By accurately identifying implicit emotional tendencies in texts, it provides valuable emotional information analysis and decision-making support for related fields.

7. An implicit sentiment analysis system based on sentiment chain reasoning and dynamic loss optimization, according to an implicit sentiment analysis method based on sentiment chain reasoning and dynamic loss optimization according to any one of claims 1 to 6, characterized in that: include: A prompt design module for designing sequential reasoning prompts to identify emotional elements in stages; Model training module, used to optimize the model through multi-stage mixed loss training; The dataset construction module is used to construct a dataset using GPT-4O combined with a self-refining correction mechanism; the sentiment analysis module is used to perform implicit sentiment analysis on the text and output sentiment tendency results.

8. The implicit sentiment analysis system based on sentiment chain reasoning and dynamic loss optimization according to claim 7 is characterized in that: The prompt design module includes an aspect item recognition prompt unit, an opinion expression item recognition prompt unit and an emotion polarity recognition prompt unit, which are respectively used to construct corresponding prompt texts to identify emotion elements at different levels.

9. The implicit sentiment analysis system based on sentiment chain reasoning and dynamic loss optimization according to claim 7 is characterized in that: The model training module includes a loss calculation unit and a weight adjustment unit. The loss calculation unit is used to calculate the cross entropy loss of each stage. The weight adjustment unit automatically adjusts the loss weight of each task stage based on homoscedastic uncertainty to optimize the model training process and improve the accuracy of sentiment analysis.

Citation Information

Patent Citations

  • Construction method of unified generation framework for aspect-level sentiment analysis

    CN115455976A

Cited By

  • Cross-organization emergency response process model extraction method based on large language model

    CN121707438A