Fine-grained sentiment analysis method for scientific data set social comments

Through the method of generating reasoning based on element order guidance, the generative model is constructed and optimized, the attribute-level sentiment analysis problem under the scarcity of scientific data set comment samples is solved, which significantly improves the accuracy and fine-grainedness of sentiment analysis, and provides a scientific data set society A fine-grained evaluation plan for influence.

CN119293209APending Publication Date: 2025-01-10COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411360898.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

It is difficult for the prior art to conduct accurate attribute-level sentiment analysis when scientific data set comment samples are scarce, and it is difficult for the generative model to determine the optimal solution, affecting the accuracy of sentiment analysis.

Method used

Using an attribute-level sentiment analysis method based on element order guidance to generate inferences, by constructing triples (attribute words, attribute views, attribute emotions polarity) and performing arrangements and combinations in different orders, a generative model is used to generate multiple alternative sequences, combined with Sentence-BERT calculates similarity and optimizes the generative model to improve the accuracy of sentiment analysis.

Benefits of technology

It effectively improves the semantic emotional tendency recognition effect of social comments in scientific data sets, provides a fine-grained evaluation solution, and solves the problem that attribute-level sentiment analysis and generative models cannot screen the optimal results under a small sample.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293209A_ABST
    Figure CN119293209A_ABST
Patent Text Reader

Abstract

The invention discloses a scientific data set social comment-oriented fine-grained sentiment analysis method, which comprises the following steps of: 1) acquiring comment information of a scientific data set, and constructing a plurality of triples (attribute words, attribute viewpoints and attribute sentiment polarity) for each sentence; splicing the triples based on the same sentence as a target answer sequence of the sentence; performing permutation and combination on the elements in each triple to generate a plurality of different target element generation sequences; 2) generating a new sentence d'by aiming at each target element generation sequence generated according to the triple of the sentence d; the method comprises the steps of (1) generating a sentence d'and a target answer sequence corresponding to the sentence d ', (2) inputting the sentence d' and the target answer sequence corresponding to the sentence d 'into a generative model to obtain a plurality of alternative triple sequences, (4) generating a new sentence d' 'according to the alternative triple sequences, obtaining a prediction result of the sentence d according to the similarity of d and d '', and optimizing the generative model, and (5) inputting a sentence to be analyzed into the optimized generative model to obtain an emotion recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing (NLP), and in particular to a fine-grained sentiment analysis method for social comments on scientific datasets. Background Art

[0002] With the rapid development of science and technology, scientific datasets in various fields are showing an explosive growth trend. These datasets carry key information in the field of scientific research, covering all aspects from basic research to applied practice. The quality and value assessment of scientific datasets are crucial to the field of scientific research. Accurately evaluating the value of datasets not only helps researchers choose the most appropriate data source, but also promotes the in-depth development of scientific research. However, the current challenge is that although my country has released more than 100,000 scientific datasets, there is still a lack of a complete evaluation framework to measure the quality and practicality of these datasets. The impact evaluation of scientific datasets is imminent, and the social impact evaluation of datasets is an important part of scientific datasets. This paper introduces an attribute-level sentiment analysis method for social comments on datasets, aiming to provide a fine-grained evaluation perspective for the social impact evaluation of scientific datasets, so as to better evaluate their social influence.

[0003] Currently, the number of comments in scientific datasets is relatively small, making it very difficult and challenging to perform sentiment analysis at the attribute level. Few samples mean that the number of comments for each attribute or specific aspect in the dataset is very limited. In this case, the diversity of the data is often not fully covered, resulting in poor generalization of the model for different categories or different situations, and it may become more difficult to extract meaningful features. This may make it difficult for the model to accurately capture the essential characteristics of the data, which in turn affects the accuracy of sentiment analysis.

[0004] Inspired by formulating various natural language processing tasks as text generation problems, a sequence-to-sequence approach is used to handle attribute-level sentiment analysis. However, when using sequence-to-sequence generative models to handle attribute-level sentiment analysis, a problem is faced. The decoding stage of the generative model is usually trained through maximum likelihood estimation (MLE), which may cause the model to predict each token in the output sequence with high confidence, resulting in multiple reasonable solutions in the generation task, so it is difficult for the model to determine the optimal solution.

[0005] In summary, existing methods are difficult to solve the problem of attribute-level sentiment analysis in scientific datasets with scarce review samples and the problem that generative models are difficult to determine the optimal solution. Summary of the invention

[0006] In order to overcome the above problems, the present invention proposes a fine-grained sentiment analysis method for social comments in scientific datasets, which is an attribute-level sentiment analysis based on element-ordered guided generation reasoning (EOG-ALSA).

[0007] The technical solution of the present invention is:

[0008] A fine-grained sentiment analysis method for social comments on scientific datasets, the steps include:

[0009] 1) Obtaining comment information of scientific data sets, each comment information includes several sentences; constructing several triples (attribute words, attribute viewpoints, attribute sentiment polarity) for each sentence; wherein the attribute words are attribute words describing the scientific data set, the attribute viewpoints are specific evaluations or views on the attribute, and the attribute sentiment polarity is the sentiment tendency towards the attribute; splicing the triples constructed based on the same sentence as the target answer sequence of the corresponding sentence; performing different order permutations and combinations on the elements in each triple to generate multiple different target element generation sequences;

[0010] 2) Generate a sequence d for each target element generated from the triples of sentence d i , add a front-end prompt statement at the front end of the sentence d, and generate a sequence d according to the target element at the end of the sentence d i Add the corresponding prompt words in the order of the elements in , and generate a sequence d according to the target element i Combine the added prompt words in the order of the elements in to generate the tail prompt of the sentence d; then connect the front prompt sentence of the sentence d, the sentence d and the tail prompt of the sentence d to form a new sentence d';

[0011] 3) Input the sentence d' and its corresponding target answer sequence into the generative model to obtain multiple candidate triple sequences;

[0012] 4) extracting attribute words, attribute viewpoints and attribute sentiment polarity from each of the candidate triple sequences by regularization technology, and recombining them into a new sentence d'' according to the set template, and calculating the similarity Sim_score between sentence d and sentence d'';

[0013] Select the candidate triple sequence corresponding to the highest similarity Sim_score value as the prediction result of the sentence d;

[0014] 5) optimizing the generation model according to the prediction result of sentence d and the corresponding target answer sequence;

[0015] 6) Input a sentence to be analyzed in the comment information of the scientific data set into the optimized generation model to obtain the sentiment recognition result of the sentence to be analyzed.

[0016] Furthermore, the generation model is a pre-trained language model T5.

[0017] Furthermore, the Sentence-BERT model is used to calculate the similarity Sim_score between sentence d and sentence d'.

[0018] Furthermore, the setting template is "it is [S], because its [A][O]" which is recombined into a new sentence "d"; wherein [S] is a sentiment tendency word, [A] is an attribute word, and [O] is a sentiment word.

[0019] Furthermore, the front-end prompt sentence is "This is a sentence about data set evaluation."

[0020] A server, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the above method.

[0021] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.

[0022] The fine-grained sentiment analysis method for social comments on scientific datasets of the present invention comprises the following steps:

[0023] 1. Learning the order of elements

[0024] Scientific datasets usually contain a large amount of review information, each review consists of multiple sentences, and each sentence contains multiple elements. In order to perform attribute-level sentiment analysis, these elements need to be further structured into triplets, which contain the following: attribute words describe a specific aspect or feature in the review; attribute viewpoints describe the specific evaluation or viewpoint of the attribute; attribute sentiment polarity describes the sentiment tendency of the attribute. In order to better control the element order of the predicted output triples, a prompt learning method based on element order is introduced. Before generating the model input, the target triplet element order is designed and different prompt templates are set for input using this order.

[0025] 1.1 Set the target element order

[0026] The element tags are structured and the attribute words, attribute opinions and attribute sentiment polarities are marked as [A], [O] and [S] respectively. These three different tags can be arranged and combined to generate 6 different target element generation sequences. At the same time, if an input sentence contains multiple sentiment tuple information, different sentiment tuples are connected with [SEEP] to form the target answer sequence.

[0027] 1.2 Set up the input module

[0028] According to the set target element generation sequence, add a prompt sentence "This is a sentence about the evaluation of the data set" at the front end of the input sentence, add corresponding prompt words "This is an attribute word [A], this is an emotional word [O], this is an emotional tendency word [S]" at the end of the sentence according to the order of the target element generation sequence, and combine the prompt words in the order of the target elements to generate the tail prompt. Finally, connect the front end prompt, the original input sentence and the tail prompt to form a new input sentence. For example:

[0029] Original input sentence: The dataset is very timely.

[0030] Processed sentence: This is a sentence about the evaluation of the dataset. The dataset is very timely. The dataset is very accurate. This is an attribute word [A], this is a sentiment word [O], and this is a sentiment tendency word [S].

[0031] Target answer sequence: [A] Timeliness [O] Very good [S] Active [SEEP] [A] Accuracy [O] Very high [S] Active

[0032] By constructing templates with different element order prompts, the model can be effectively guided to generate element content, significantly improving the model's effect on triple information extraction.

[0033] 2. Generative Model

[0034] According to the target element sequence, different prompt templates are designed to reassemble each sentence. The reassembled sentences are input into the fine-tuned generative model. The generative model first generates a set of candidate triple sequences with higher probability through beam search technology, and then samples the candidate triple sequences using random sampling method to obtain multiple candidate triple sequences; random sampling method is combined to introduce diversity to select the most reasonable triples for the next stage. In this study, the pre-trained language model T5 was selected as the generative model, and its generative ability was used to better handle complex contexts and ambiguity. The generative ability of the pre-trained language model T5 can be expressed by formula (1):

[0035]

[0036] Among them, y represents the generated text sequence, x represents the input sequence, and T represents the length of the generated sequence.

[0037] 3. Voting screening

[0038] By using regularization technology to process multiple candidate triple sequences, the attribute words, attribute opinions, and attribute sentiment polarity in the predicted element information are extracted from the triple sequence, and recombined into a new sentence according to the newly set template. For example, the attribute words, attribute opinions, and attribute sentiment polarity in the triple sequence are extracted and filled into the newly set template "It is [S], because its [A][O]" to form a new sentence. The original input sentence and the newly combined sentence are input into the Sentence-BERT model, and the semantic representation similarity of each sentence is compared. The similarity calculation is shown in formula (2):

[0039] Sim_score=Cosine_sim(D,T) (2)

[0040] Among them, D represents the semantic information of the original input sentence, and T represents the semantic information of the newly combined sentence. From multiple candidate triple sequences, the sentences are reassembled, and the triple sequence corresponding to the highest similarity result is selected as the final output result.

[0041] The beneficial effects of the present invention are:

[0042] This method effectively solves the problem that attribute-level sentiment analysis under few samples and the generative model cannot directly screen out the optimal results, improves the semantic sentiment tendency recognition effect of social comments in scientific data sets, and provides a fine-grained evaluation scheme for the identification of social influence of scientific data sets. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a workflow diagram of a fine-grained sentiment analysis approach for social reviews on scientific datasets. DETAILED DESCRIPTION

[0044] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.

[0045] By using the method of the present invention, the problem that attribute-level sentiment analysis and generative models are difficult to determine the optimal solution is solved when the scientific data set review samples are scarce. The specific steps include processing input sentences, prompting learning strategies, using generative models, and screening and outputting the final results.

[0046] Embodiment 1:

[0047] 1. Input sentences: The availability of data sets is relatively poor, which makes it complicated to obtain and process data. In addition, insufficient work is done on data visualization, making it difficult for us to obtain key information from it.

[0048] 2. Processing of input sentences: The input sentences are reassembled according to the input template and the target element sequence. The reassembled sentences are as follows: This is a sentence about the evaluation of the dataset. The availability of the dataset is relatively poor, which makes it complicated to obtain and process the data. In addition, the work on data visualization is insufficient, and it is difficult for us to obtain key information from it. This is an attribute word [A], this is an emotion word [O], and this is an emotion tendency word [S].

[0049] 3. Use of the generative model: The processed sentences are input into the fine-tuned generative model, and multiple candidate triple sequences are generated by combining random sampling and beam search techniques.

[0050] 4. Screening and output of final results: Recombine the triple sequence according to the model. For example: it is negative because the usability is relatively poor. It is negative because the data visualization work is insufficient. Input the reorganized sentence and the original input sentence into the Sentence-BERT model, and obtain the semantic representation of each sentence by average pooling. The semantic representation of the two sentences is used for cosine similarity comparison. Perform the above operations on all generated triple sequences, and finally select the triple sequence with the highest similarity result as the final output result.

[0051] Experimental results:

[0052] The experiment was conducted on a scientific dataset review dataset and tested on the dataset. The results of the experiment showed that the technical effects of the present invention are as follows:

[0053] Models Precision Recall F1 T5 62.67 61.04 61.84 BARTABSA 48.48 46.38 47.41 GEN-ABSA 70.7 71.93 71.31 MVP 72.06 70 71.01 EOG-ALSA 92.75 91.43 92.09

[0054] Among them: The T5 model converts all natural language processing tasks into text input and output problems, and adopts the Transformer architecture to achieve multi-task learning and versatility. BARTABSA converts all attribute-level sentiment analysis subtasks into a unified generation task. Based on a unified task formula, BART is implemented to generate target sequences in an end-to-end process. GEN-ABSA proposes a new paradigm of text annotation style and extraction style to construct target sentences, and uses a unified generation model to solve multiple sentiment pair extraction tasks. MVP reduces the incompleteness and instability of fixed order by receiving information from multiple views, and reduces the potential error accumulation of the generation method through the arrangement of elements, significantly improving the accuracy and reliability of the prediction results. The results show that the method based on element order-guided generation reasoning is superior in attribute-level sentiment analysis tasks.

[0055] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A fine-grained sentiment analysis method for social comments on scientific datasets, the steps of which include: 1) Obtain comment information of scientific data sets, each comment information includes several sentences; Construct several triples (attribute words, attribute viewpoints, attribute sentiment polarity) for each sentence; wherein the attribute words are attribute words describing scientific data sets, the attribute viewpoints are specific evaluations or viewpoints on the attribute, and the attribute sentiment polarity is the sentiment tendency towards the attribute; concatenate the triples constructed based on the same sentence as the target answer sequence for the corresponding sentence; and perform different permutations and combinations of the elements in each triple to generate multiple different target element generation sequences; 2) Generate a sequence d for each target element generated from the triples of sentence d i , add a front-end prompt statement at the front end of the sentence d, and generate a sequence d according to the target element at the end of the sentence d i Add the corresponding prompt words in the order of the elements in , and generate a sequence d according to the target element i Combine the added prompt words in the order of the elements in to generate the tail prompt of the sentence d; then connect the front prompt sentence of the sentence d, the sentence d and the tail prompt of the sentence d to form a new sentence d'; 3) Input the sentence d' and its corresponding target answer sequence into the generative model to obtain multiple candidate triple sequences; 4) extracting attribute words, attribute opinions and attribute sentiment polarity from each of the candidate triple sequences by regularization technology, And reassemble into a new sentence d' according to the set template, and calculate the similarity Sim_score between sentence d and sentence d'; Select the candidate triple sequence corresponding to the highest similarity Sim_score value as the prediction result of the sentence d; 5) optimizing the generation model according to the prediction result of sentence d and the corresponding target answer sequence; 6) Input a sentence to be analyzed in the comment information of the scientific data set into the optimized generation model to obtain the sentiment recognition result of the sentence to be analyzed.

2. The method according to claim 1, characterized in that The generation model is the pre-trained language model T5.

3. The method according to claim 1, characterized in that Use the Sentence-BERT model to calculate the similarity Sim_score between sentence d and sentence d'.

4. The method according to claim 1, 2 or 3, characterized in that: The setting template is "it is [S], because its [A] [O]" is recombined into a new sentence d"; wherein [S] is a sentiment tendency word, [A] is an attribute word, and [O] is a sentiment word.

5. The method according to claim 1, 2 or 3, characterized in that: The front-end prompt sentence is "This is a sentence about data set evaluation".

6. A server, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the method according to any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.