A Quality Evaluation Method for Text Summarization
By designing a language quality and semantic similarity evaluation network based on a large-scale pre-training model, the problem of difficulty in evaluating the language quality and semantic similarity of text summaries in the existing technology is solved, and rapid training and high-accuracy summary quality evaluation are achieved. , which can quickly converge with a small amount of data and provide multi-dimensional evaluation results.
Patent Information
- Application Number
- CN202010178615.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-14
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for existing automatic text summary evaluation methods to effectively evaluate the language quality and semantic similarity of summaries from multiple dimensions, especially at the fine granularity of the sentence level, and existing methods cannot accurately distinguish between grammatical correctness and semantic completeness.
We designed a language quality evaluation network and a semantic similarity evaluation network based on a large-scale pre-training model. By constructing positive and negative sample data sets and fine-tuning them, we combined the language quality score and semantic similarity score to comprehensively evaluate the summary quality and use the pre-training model. knowledge to quickly train and optimize models.
It achieves fast training and accurately evaluates the language smoothness and semantic integrity of the summary. It can quickly converge with a small amount of data, provide multi-dimensional evaluation results, and improve the accuracy of the evaluation of summary quality and the optimization ability of the model.
Smart Images

Figure CN111400487B
Abstract
Description
Technical field:
[0001] The present invention belongs to the field of natural language generation, and in particular relates to a method for evaluating sequence-to-sequence text summaries. Background technology:
[0002] With the rapid development of information technology, information explosion is impacting people's lives. On the one hand, there are a large number of web pages and texts on the Internet, but there is a lot of redundant content between the content-related texts, and people spend a lot of time and energy reading and obtaining these duplicate contents. On the other hand, social development has accelerated people's pace of life, and increasingly fragmented time has driven people to obtain content through the Internet instead of traditional paper materials such as books. Therefore, how to accurately extract the main content from a large amount of text information and automatically ensure the quality of the summary has become a hot topic in today's academic research.
[0003] Text summarization technology is to extract content that meets user or application needs from one or more articles, organize it and generate a complete summary. The evaluation method of text summarization is a key part of the research and development of text summarization technology. Standardized and reasonable evaluation standards can promote the development of text summarization technology. But at the same time, the evaluation method of automatic text summarization is also very controversial and faces many challenges. In 1998, KS Jones proposed that the evaluation methods of automatic text summarization can be roughly divided into two categories from a broad perspective: one is called the internal evaluation method, which evaluates the text summary system by directly analyzing the quality of the summary. The internal evaluation mainly evaluates the coherence and content integrity of the text summary. The other is called the external evaluation method, which is an indirect evaluation method. It applies automatic text summarization to a specific task and evaluates the performance of the automatic summarization system based on the effect of the summary in completing this task. Domestic scholars have done a lot of research on the first type of evaluation method. In 1997, Yu Shiwen and others from Peking University proposed a mechanical automatic evaluation method for the quality of abstracts, using Edmundson's sentence overlap rate method. In 2005, Zhang Shu et al. from Harbin Institute of Technology proposed a text similarity evaluation method based on the vector space model. Foreign scholars have also done a lot of research. In 2002, Saggio et al. from the University of Sheffield in the UK proposed three automatic evaluation methods based on abstract content similarity, namely cosine similarity, unit coverage and the longest common substring method. In 2004, Chin-Yew Lin et al. proposed ROUGE (Recall2
[0004] The main research method currently used in academia is Rouge, but the above methods all have some shortcomings. The method proposed by domestic scholars is based on sentence-level evaluation, which has large granularity and is somewhat rough. Although the method proposed by foreign scholars is the mainstream method currently used, the Rouge method cannot reflect the grammatical accuracy of the sentence. In summary systems with similar scores, the Rouge evaluation index cannot distinguish related systems well. It is well known that reasonable evaluation indicators can have a good promoting effect on optimizing automatic summary models. Therefore, it is very important to choose a method that can automatically evaluate the sentence fluency and semantic similarity of automatic summarization. Summary of the invention:
[0005] The main technical problem solved by the present invention is to design a summary language quality evaluation network and a language similarity evaluation network, which can automatically evaluate the rationality of the summary generated by the model from the two dimensions of language quality and semantic similarity. The language quality evaluation network and the language similarity evaluation network are fine-tuned based on a large-scale pre-trained model, requiring fewer training sets and a short training time, and the model training can be completed quickly. In addition, the large-scale pre-trained model can ensure the reliability of the language quality evaluation network and the semantic similarity network, and finally the scores of the two networks are combined to obtain the quality score of the summary.
[0006] The present invention is oriented to the text data of a single chapter corresponding to a single abstract, and proposes a summary language quality evaluation network and a semantic quality evaluation network. First, spaces and special characters are removed from the text data, and low-frequency words or characters are removed according to the frequency, and then the dictionary we need is constructed, where the key of the dictionary is the word and the value is the corresponding id of each word. Then the article to be processed is converted into the corresponding id according to the dictionary, and the position id and fragment id of the text are constructed according to the word embedding rules of the pre-trained model Bert. Finally, the vector of the token and the position vector and the fragment vector are obtained respectively, and finally the three vectors are added to obtain the Embedding layer. The usable abstract not only needs to ensure that the generated abstract is fluent in language, but also needs to ensure that the meaning expressed by the abstract is the main content of the article, and the abstract expresses a complete semantics. In order to achieve this goal, we designed a language quality evaluation network and a semantic similarity network to ensure the availability of high-scoring abstracts, and the summary model can be adjusted and optimized in a targeted manner according to the individual scores.
[0007] In order to achieve the above purpose, the present invention adopts the following technical solutions: First, a training data set is constructed according to the needs, and for the language quality network, we use some model inference to obtain
[0008] An automatic text summarization quality evaluation method comprises the following steps:
[0009] Step 1: Construct positive and negative samples of the language quality network and process the text data.
[0010] Step 2: Construct positive and negative samples of the language similarity network and process the text data.
[0011] Step 3: Fine-tune the language quality network until the model converges.
[0012] Step 4: Fine-tune the language similarity network until the model converges.
[0013] Step 5: Combine the language quality score and the semantic similarity score to obtain the summary quality score
[0014] Preferably, step 1 specifically comprises the following steps:
[0015] Step 1.1: Select a portion of data from the training set as the fine-tuning dataset A for the summary quality model
[0016] Step 1.2: Divide dataset A into two parts, dataset AB and dataset AC. Use a model to infer dataset AB, and use the obtained summary as a negative sample, and dataset AC as a positive sample.
[0017] Preferably, step 2 specifically comprises the following steps:
[0018] Step 2.1, select a part of the data from the training set as the fine-tuning dataset D of the summary semantic similarity model;
[0019] Step 2.2, divide the data set D into four parts, namely DE, DF, DG, and DH;
[0020] Step 2.3, randomly pair the dataset DF with DG to construct negative samples of similar sentence pairs;
[0021] Step 2.4, cut the summary sentence in DH into two parts, select 50% of the first half and 50% of the second half as negative samples;
[0022] Step 2.5, finally DE is taken as the positive sample.
[0023] Preferably, step 5 specifically comprises the following steps:
[0024] Step 5.1: Multiply the quality score obtained by the summary quality model by the score of the summary semantic similarity model to obtain the summary quality score.
[0025] Abstract samples are used as negative samples, and manually annotated abstracts are used as positive samples. For the semantic similarity network, two strategies are used to construct negative samples. The first strategy is to randomly pair manually annotated abstracts, and the second strategy is to cut manually annotated abstracts. For example, if the original abstract has 100 words, we only take the first 50 words or the last 50 words, resulting in incomplete semantics. The dataset of the semantic similarity network constructed according to these two strategies can not only evaluate the language fluency of the abstracts generated by the model, but also ensure that the semantically relevant and semantically complete abstracts have high z scores. The language quality network is shown in the Model 1 formula.
[0026]
[0027] Where r represents a binary vector of 0 or 1, which is generated by the Bernoulli model with probability p. σ is used as an activation function to introduce nonlinear factors. W is the weight vector connecting the output of the pre-trained model with the input of the quality network. The initialization method of W uses the Xavier method. n i Indicates the number of inputs to the unit, n i+1 Indicates the number of outputs of the unit. X is the input vector, b is the initial value of the bias is 0.1, and the Sigmoid function is used as the activation function to calculate the final quality score. The semantic similarity network is shown in the Model2 formula.
[0028] Model2=sigmoid(σ(W2σ(W1X+b1)+b2))
[0029] W1 is the parameter vector for converting the general semantic space to the similar semantic space, b1 is the bias value, W2 is the parameter vector for further conversion of the similar semantic space, b2 is the bias value. The initialization method of W1 and W2 parameters is the same as that of Model 1. Finally, the scores of the two models are combined to obtain the quality score of the summary.
[0030] Compared with the prior art, the present invention has the following obvious advantages:
[0031] The method of the present invention adopts a quality evaluation network and a semantic similarity network to comprehensively evaluate the quality of the summary. Compared with other evaluation methods, the method of the present invention has three advantages. First, the summary quality evaluation network and the summary similarity network are based on a large-scale pre-trained model. Based on the advantages of the pre-trained model, they can converge quickly in the case of a small amount of data, and can use the linguistic knowledge learned by the pre-trained model on large-scale data. Second: Other summary evaluation methods are based on the co-occurrence degree of the generated summary and the manually written summary words, and cannot judge the grammatical correctness of the generated summary. The language quality evaluation network can score based on whether a sentence conforms to our habit of writing sentences. In this way, a high-scoring summary is obtained, and the language is fluent and there are no grammatical errors. Third: Because the semantic similarity network adds a summary with only half the number of words as a negative sample when constructing the data set, the evaluation model can not only judge whether the generated summary is related to the original text, but also judge whether the generated summary is semantically complete. In summary, the summary quality network and summary similarity network proposed in this paper can evaluate the summary from multiple dimensions, with the advantages of fast training, high quality and high accuracy. Description of the drawings:
[0032] Figure 1 Flow chart of the method involved in the present invention
[0033] Figure 2 Abstract quality network structure schematic diagram
[0034] Figure 3 Abstract similar network structure principle diagram
[0035] Figure 4 Average summary quality scores of different models
[0036] Figure 5 Rouge score of traditional evaluation indicators of different models Specific implementation method:
[0037] The present invention is further described in detail below in conjunction with a specific network model example and with reference to the accompanying drawings.
[0038] The hardware equipment used in the present invention includes a PC and a 1080 graphics card;
[0039] In this section, we conduct extensive experiments to explore the impact of our proposed method. The network architecture operation flow chart designed by the present invention is as follows Figure 1 As shown, the specific steps include:
[0040] Step 1: Build a summary quality network training set
[0041] Step 1.1: Construct the summary quality network training set. First, select 20,000 chapter and summary data pairs.
[0042] Step 1.2: Divide the 20,000 data pairs into two equal parts. Send the data pairs into the trained RNN model to generate summaries.
[0043] Step 1.3: Use 10,000 summaries generated by the RNN model as negative samples and another 10,000 summaries as positive samples to construct a quality network training set of 20,000 summaries.
[0044] Step 2: Construct summary similarity network training set
[0045] Step 2.1, select 30,000 chapter and abstract data pairs and divide them into 3 parts
[0046] Step 2.2: The first batch of 10,000 data is used as positive samples; the second batch of 10,000 data is divided into two, and 5,000 chapter abstracts are obtained as negative samples after shuffling; the third batch of 10,000 data is cut in half, 5,000 of which are retained in the first half and 5,000 in the second half, and finally a training set of 25,000 data is obtained.
[0047] Step 3, select the loss function as the cross entropy loss function (Cross Entropy Loss):
[0048]
[0049] Step 4: Load the pre-trained model and train the summary quality network
[0050] Step 4.1: Set the number of fully connected network nodes after the pre-trained model to 1024
[0051] Step 4.2, Dropout value is set to 0.9
[0052] Step 4.3, print out the change graph of Loss and Accuracy, and stop iteration when Loss and Accuracy converge
[0053] Step 5: Load the pre-trained model and train the summary similarity network.
[0054] Step 5.1: Set the fully connected network after the pre-trained model to 1024 and 512
[0055] Step 5.2, print out the change graph of Loss and Accuracy, and stop iterating when Loss and Accuracy converge.
[0056] Step 6: Finally, multiply the summary quality score by the summary similarity score to get the final summary quality score.
[0057] Table 1 shows the scores of the summaries generated by the model on different evaluation indicators. It can be seen from Table 1 that for summaries with poor quality generated by the model, the summary quality score is more similar to the manual evaluation score, such as the 5th and 6th data. The summary generated by the model based on the article, such as the 3rd and 4th data, is close to the manual score, but the score of Rouge_l is obviously biased and cannot take into account the diversity of the summary. Figure 4 As shown, the distribution of summary quality scores of different models is shown. Figure 5 The score distribution of the traditional evaluation index Rouge is shown. From the figure, it can be seen that the summary quality score distribution is more reasonable, and the discrimination of the model is clearer. The advantages and disadvantages of the model with poor ability are given, providing direction for subsequent optimization of the model. The traditional evaluation index Rouge has little discrimination between the Lstm model and the Transformer model. However, the two models have great differences in structure. Figure 4 It can be concluded that the Lstm model still has a gap with the Transformer model in terms of language quality and semantic quality.
[0058] The above embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention. The protection scope of the present invention is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present invention, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
[0059] Table 1 Quality scores of different abstracts
[0060]
Claims
1. A method for evaluating the quality of automatic text summarization, characterized in that: The following steps are involved: Step 1: Construct positive and negative samples of the language quality network and process the text data; Step 2: Construct positive and negative samples of the language similarity network and process the text data; Step 3: Fine-tune the language quality network until the model converges; Step 4: Fine-tune the language similarity network until the model converges; Step 5: Integrate the language quality score and the semantic similarity score, multiply the quality score obtained by the summary quality model by the score of the summary semantic similarity model to obtain the summary quality score; Features: The language quality network is shown in the Model 1 formula. Where r represents a binary vector of 0 or 1, which is generated by the Bernoulli model with probability p; σ is the activation function, W is the weight vector connecting the output of the pre-trained model with the input of the quality network, X is the input vector, b is the initial value of the bias, which is 0.1, and the sigmoid function is used as the activation function to calculate the final quality score; The language similarity network is shown in the Model2 formula. Model2=sigmoid(σ(W2σ(W1X+b1)+b2)) W1 is the parameter vector for converting the general semantic space into the similar semantic space, b1 is the bias value, W2 is the parameter vector for further conversion of the similar semantic space, b2 is the bias value; finally, the two model scores are combined to obtain the quality score of the summary.
2. The method according to claim 1, characterized in that: The text data is processed, including deleting special characters and spaces in the text, then using the open source tool jieba to segment words, and removing stop words according to the stop table, and finally obtaining the processed data sample.
