Graphically enhanced question-driven abstract multi-text answer summarization method and device

By introducing a graph-enhanced question-driven abstraction method in multi-document summarization and combining text and graph encoding, the problems of information redundancy and insufficient relevance in multi-document summarization are solved, achieving more accurate and smooth summary generation.

CN116521857BActive Publication Date: 2025-09-16SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310346860.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2025-09-16
Estimated Expiration
2043-04-03

AI Technical Summary

Technical Problem

Existing multi-document summarization methods have difficulty in effectively identifying information closely related to the question when generating summaries of multiple correct answers, and there is information redundancy, resulting in a lack of relevance and fluency in the summaries.

Method used

A question-driven abstract multi-text answer summary method based on graph enhancement is adopted. By designing a dual encoding mechanism in the encoding stage, combining text encoding and graph encoding, explicitly constraining the answer feature information, and introducing graph encoding to guide summary generation in the decoding stage, ensuring the amount of information and fluency.

Benefits of technology

It improves the accuracy and fluency of multi-document summaries, effectively eliminates information redundancy, and generates summaries that are informative and closely related to the question.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521857B_ABST
    Figure CN116521857B_ABST
Patent Text Reader

Abstract

The present invention discloses a graph-enhanced question-driven abstract multi-text answer summary method, which includes the following steps: Step 1: community-based question-answering data collection and cleaning; Step 2: data normalization; Step 3: model construction; Step 4: model testing and answer summary generation. The present invention can improve the problems of traditional multi-text answer summary generation methods, such as the lack of question constraints and difficulty in capturing modeling relationships between answers, while utilizing graph encoding information to improve the readability, fluency and conciseness of the generated summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a question-driven abstract multi-text answer summarization method based on graphics enhancement, and belongs to the technical fields of Internet and artificial intelligence. Background Art

[0002] Text summarization has always been a core issue in natural language processing and an effective technology for alleviating the information overload facing humanity today. This is particularly true in the field of non-factual community question-and-answering, where questions with multiple correct answers can be difficult for readers to quickly grasp the complete answer. Therefore, by analyzing, refining, correlating, and integrating multiple correct answers to the same question, and aggregating the answers' content, readers can quickly and clearly understand the summary content. This is a more challenging task than query-based multi-document summarization because it requires comprehensive consideration of the diversity and redundancy of the answer information driven by the question.

[0003] While single-text summarization has demonstrated superior performance in sequence-to-sequence models, neural network-based models have been widely used for news summarization and headline generation. However, unlike single-text summarization, multi-document summarization involves identifying important information and filtering redundant information from multiple input sources, integrating and processing them to produce a comprehensive, focused, and overall relevant summary. Therefore, simply applying high-performance single-text summarization models to multi-document summarization through transfer learning has not been effective.

[0004] Multi-document summarization is primarily categorized into two approaches: extractive and abstractive. Extractive approaches directly rank important sentences from the original text. While promising, these methods lack the ability to consider document clustering hierarchies and effectively build deep connections between hierarchical features. This raw patchwork results in summaries that lack relevance and fluency. Extractive approaches simply rely on models to identify information spans and independently select paragraphs to identify effective summaries. Abstractive models, on the other hand, must combine multiple pieces of evidence from long and noisy multi-document inputs, using arbitrary words and expressions, to generate accurate, concise, and compelling summaries based on their understanding of the documents. With the increasing effectiveness of neural network methods, neural abstractive summarization using an encoder-decoder architecture has demonstrated excellent performance. Some researchers have applied it to long document summarization, achieving significant results. With the availability of large-scale multi-document summarization datasets, researchers have begun exploring multi-document summarization models. Compared to extractive summarization, abstractive summarization remains a hot topic in the field of multi-document summarization. Our proposed model also falls into the category of abstractive summarization, but unlike traditional abstractive methods, we introduce graph information in both the encoder and decoder stages to ensure that the model can better learn the relationships between documents under the guidance of document-to-document graph relationships, thereby improving the performance of the model.

[0005] Therefore, the present invention introduces a new graph-enhanced question-driven abstract multi-text answer summarization method, which learns the pre-trained model of language features through encoding and focuses on the role of questions in guiding answer generation in the encoding stage. In the encoding stage, a dual encoding mechanism is designed to explicitly constrain the feature information of each answer by using the questions in the text encoding, ensuring that the model more accurately identifies the information in the answer that is closely related to the question. In graph encoding, a multi-answer similarity graph is constructed and the graph information is encoded to capture the modeling relationship between answers and eliminate information redundancy. Finally, in the decoding stage, the text encoding information is combined with the graph encoding information and applied to guide summary generation to ensure the performance of the answer summary. Summary of the Invention

[0006] To address the problems and shortcomings of the existing technology, this paper proposes a graph-enhanced question-driven abstract multi-text answer summarization method. Questions are used to explicitly constrain individual answers, ensuring that the model more accurately identifies information in the answers that is closely related to the question. Furthermore, during the encoding phase, a similarity graph is constructed for multiple answers, fusing the information encoded in the graph with features encoded in the text to model relationships between answers and eliminate information redundancy. Finally, the graph encoding information is incorporated into the decoding phase, using both the question and the graph encoding to guide the summary generation process, ensuring the information content and fluency of the generated summary.

[0007] To achieve the above objectives, the technical solution of the present invention is as follows: a question-driven abstract multi-text answer summarization method based on graph enhancement, characterized in that the method comprises the following steps:

[0008] Step 1: Community Q&A data collection and cleaning;

[0009] Step 2: Data normalization;

[0010] Step 3: Model construction;

[0011] Step 4: Model testing and answer summary generation.

[0012] As an improvement of the present invention, step 1: community question-and-answer data collection and cleaning, first crawl the web page HTML text from the real community question-and-answer platform based on crawler technology, and perform data cleaning on it to remove web page tags and non-text data, including emoticons, symbols, formulas, etc.

[0013] As an improvement to the present invention, step 2: data normalization, the cleaned text is normalized by question and answer. Specifically, a rule-based approach is used to organize the questions in the text one by one and normalize the multiple answers corresponding to each question. Finally, a manual summary of the multiple answers corresponding to each question is created using manual techniques. This summary serves as a reference answer for correcting model loss during model training and testing.

[0014] As an improvement to the present invention, step 3: model construction utilizes the normalized data processed in step 2 to construct a model for a graph-enhanced question-driven abstractive multi-text answer summarization method. First, the question and its corresponding answers undergo data cleansing and are encoded using RoBERTa to generate embedding vectors. Then, during the encoding phase, a question-driven dual encoding mechanism is designed, consisting of a text encoding representation and a graph encoding representation. In the text encoding representation, a Transformer encoder is used to encode the question and each corresponding answer text to obtain contextual semantic information. During the graph encoding phase, similar knowledge graphs are constructed for multiple answer segments, eliminating redundant information. Building on the Transformer architecture, the graph encoding layer incorporates explicit graph representations into the encoding process through a graph attention mechanism, generating graph encoding features. This ensures that question-driven answer information features are fully exploited during the encoding phase, laying the foundation for the decoding phase. During the decoding phase, the text encoding and graph encoding representations are integrated into the end-to-end decoding process, and a multi-head hierarchy attention mechanism is used to guide the summary generation process. The components of the decoding module are similar to those of the Transformer architecture, differing in that a hierarchical operation is incorporated into the multi-head attention mechanism. Finally, the model is trained using the training loss function; the implementation of this step can be divided into the following sub-steps:

[0015] Sub-step 3-1: Construct the model input layer and use the pre-trained RoBERTa to convert each word sequence in the normalized question and the corresponding multiple correct answers into a word vector representation, and obtain the mapped question word vector sequence respectively. Each correct answer is A i ∈{A1,A2,…,A N} word vector sequence

[0016] Sub-step 3-2, construct the text encoding representation layer. This implementation uses a multi-layer Transformer encoder to encode the question word vector sequence E Q And each answer word vector sequence Perform semantic coding extraction, where and As the input of the encoding layer, the contextual semantic representation can be obtained through learning:

[0017]

[0018] For each TransformerBlock, it consists of a multi-head attention mechanism and two sub-layers, each of which uses a residual connection and layer normalization.

[0019]

[0020]

[0021] Among them, LayerNorm is layer normalization, MHAtt represents the multi-head attention mechanism, FFN is the position feedforward neural network, and ReLU is the hidden activation function.

[0022] After L-layer transformer encoding, the question and answer are encoded and output separately and The encoded output of the entire answer is represented as:

[0023]

[0024] Since the proportion of question-related feature information contained in each answer paragraph is inconsistent, it is necessary to dig deeper into the core answer information, and the attention mechanism effectively represents the importance between vectors. Therefore, we use multi-head attention and multiple "scaled dot product attention" layers run in parallel.

[0025]

[0026] MultiHead(Q,K,V)=[head1,head2,…,head h ]W O

[0027]

[0028] The weight matrix Attention(Q,K,V) is obtained by calculation. The final context representation MultiHead(Q,K,V) is constructed by connecting the vector information of different matrices of each attention layer. The vector information of different matrices of the attention layer is connected. W i Q , W i K , W i Vis a learnable parameter. The number of attention layers h = 8, and the context answering channel is represented as Represents the key information of each answer paragraph at the question-driven markup level.

[0029] Sub-step 3-3 constructs the graph encoding representation layer. In this graph encoding representation, similar knowledge graphs are constructed for multiple answer paragraphs, removing redundant information. Building on the Transformer architecture, the graph encoding layer utilizes a graph attention mechanism to incorporate explicit graph representations into the encoding process to form graph encoding features. This ensures that question-driven answer information features are fully explored during the encoding phase, laying the foundation for the decoding phase.

[0030] Let G denote the graphical representation matrix of the input document, where G[i][j] represents paragraph A i and A j The relationship weight between A It is based on the output of text encoding representation. Graphic encoding representation consists of a multi-head pooling attention mechanism and a graphics encoding module. For the multi-head pooling attention mechanism, see the specific model. Figure 3 .

[0031]

[0032] For each head First calculate the input Attention score and worth points And for each head, calculate the attention probability distribution of all characters in the paragraph,

[0033]

[0034]

[0035]

[0036] A paragraph representation that can obtain all the final answers

[0037] The graph encoding module consists of multiple graph encoding layers, each of which consists of a graph multi-head attention mechanism and a two-layer feedforward network, allowing the answer paragraph to be represented The similarity graph representation matrix G between the paragraphs is used as the input of the graph encoding layer. is the graphics coding layer G l-1 ∈(1,G L ) output; then, calculate G as follows l Output

[0038]

[0039]

[0040]

[0041]

[0042]

[0043] in is the final representation obtained through the graph encoding mechanism, and d G =d model / G h , θ is the standard deviation of the relationships representing the graph structure. The pairwise graph similarity matrix coefficients G are added to calculate the weighted relationships between paragraphs to establish potential dependencies between answers and identify redundant information, enabling the model to improve the learning of information representation between paragraphs.

[0044] In substeps 3-4, we construct the decoding layer, explicitly integrating the text encoding representation and the image encoding representation into the end-to-end decoding process and using a multi-head hierarchical attention mechanism to guide the summary generation process. The components of the decoding module are similar to the Transformer architecture, except that we add hierarchical operations to the multi-head attention mechanism. The specific implementation is as follows:

[0045] Assume that the initial input of the decoding layer is where Y l Is the length of the digest generated by decoding. Decoding layer D l The output is The previous layer The output is D l The input of the layer,

[0046]

[0047] Then, it is necessary to obtain the key information at the paragraph level and word level through a multi-head hierarchical attention mechanism, and use the key weight at the paragraph level to normalize the information weight at the word level, so as to obtain the core information representation in words at different paragraph levels.

[0048] The multi-head hierarchical attention mechanism consists of two main components: paragraph-level multi-head attention mechanism and word-level multi-head attention mechanism.

[0049] The paragraph-level multi-head attention mechanism focuses on the paragraph-level representation obtained from the graph encoding. By using explicit graph structure to regularize the attention distribution to guide the word generation process in the current stage,

[0050]

[0051]

[0052]

[0053] The main purpose of the word-level multi-head attention mechanism is to guide the word generation process in the decoding based on information representation. The weight distribution of the words in each paragraph is normalized by the weight distribution obtained at the paragraph level used in the current decoding stage. The words are locally normalized in this process. The decoding stage captures the token context information in each paragraph.

[0054]

[0055]

[0056]

[0057] in d W =d model / W h , W h Indicates the number of heads in the word-level multi-head attention mechanism, Indicates the sum of the weights of all words in all paragraphs. When the context vector representation is used, the paragraph-level weight coefficient is normalized with the word-level weight coefficient to provide dual guidance for the summary generation process using the graph encoding representation and the text encoding representation.

[0058] Finally, the word-level context vector and paragraph-level context vector representation are concatenated and linearly operated, and then the output of the final decoding layer is obtained through a feedforward network and layer normalization.

[0059]

[0060]

[0061] in is the vector representation after splicing,

[0062] Sub-steps 3-5, training model loss. This example uses random initialization to initialize all parameters, and uses the Adam optimizer for gradient backpropagation to update model parameters. The initial learning rate is set to 0.002, and the warm-up step is set to 10000. The learning rate of the decoding part is 0.2, and the warm-up step is set to 8000. The model is trained for 100 epochs, and the Dropout of all linear layers is 0.1. The maximum norm of the gradient is set to 2, the number of hidden dimensions in the model is set to 768, and the number of layers of the encoding and decoding modules is 8. The number of text encoding layers in the encoding stage is set to 6, and the number of graphic encoding layers is set to 2. The five best checkpoints are selected based on the performance of the validation set, and the average results of the test set are reported. In the generation phase, a beam search with a beam size of 5 is used. The model training is completed and the model with the best performance on the validation set is saved.

[0063] As an improvement to the present invention, in step 4, model testing and answer summary generation, the model with the minimum loss value trained by the model in step 3 is used as the optimal verification model to generate a summary for the data to be summarized. The performance of the generated answer summary is objectively verified against the reference answer summary. ROUGE is used to calculate the degree of word overlap between the reference answer summary and the generated answer summary, and the accuracy of the model-generated answer summary is verified based on their longest common subsequence.

[0064] A device for a graph-enhanced question-driven abstract multi-text answer summary method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the device implements the above-mentioned graph-enhanced question-driven abstract multi-text answer summary method.

[0065] Compared with the prior art, the advantages of the present invention are as follows:

[0066] (1) This paper introduces a graph-enhanced question-driven abstract multi-text answer summarization technology. This technology fully integrates a pre-trained model that learns language features through encoding, and focuses on the role of questions in guiding answer generation during the encoding stage. During the encoding stage, a dual encoding mechanism is designed to explicitly constrain the feature information of each answer by using the questions in the text encoding, ensuring that the model more accurately identifies information in the answer that is closely related to the question. In the graph encoding, a multi-answer similarity graph is constructed and the graph information is encoded to capture the modeling relationship between the answers and eliminate information redundancy.

[0067] (2) The present invention incorporates graphic coding information into the decoding stage and uses questions and graphic coding to guide the summary generation process, ensuring the information content and fluency of the generated summary. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0069] Figure 2 This is an overall model diagram of an embodiment of the present invention;

[0070] Figure 3 This is a diagram of the multi-head pooling attention mechanism involved in an embodiment of the present invention;

[0071] Figure 4 This is an example diagram of key information in a multi-text answer summary involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to deepen the knowledge and understanding of the present invention, the present invention is further illustrated below with reference to specific embodiments.

[0073] Example 1: A graph-enhanced question-driven abstract multi-text answer summarization method. This method first collects and cleans community question-answering data on the Internet. Then, a pre-trained model with encoding learning language features is used to perform embedded representation of the input. In the encoding stage, the role of questions in guiding answer generation in the encoding stage is studied, and a dual encoding mechanism is designed: in the text encoding mechanism, the question in the text encoding is used to explicitly constrain the feature information of each answer to ensure that the model more accurately identifies information in the answer that is closely related to the question. In the graph encoding mechanism, a multi-answer similarity graph is constructed, and the graph information is encoded to capture the modeling relationship between answers and eliminate information redundancy. Finally, in the decoding stage, the text encoding information is combined with the graph encoding information and used to guide summary generation to ensure the performance of the answer summary. For specific models, see Figure 2 , the detailed implementation steps are as follows:

[0074] Step 1: Community Q&A data collection and cleaning. First, crawl the HTML text of the web page from the real community Q&A platform using crawler technology, and perform data cleaning on it to remove web page tags and non-text data, including emoticons, symbols, formulas, etc.

[0075] Step 2: Data Normalization: The cleaned text is normalized by question and answer. Specifically, a rule-based approach is used to organize the questions in the text one by one and normalize the multiple answers corresponding to each question. Finally, a manual summary of the multiple answers corresponding to each question is created using manual techniques. This summary serves as a reference for correcting model loss during model training and testing.

[0076] Step 3: Model construction. Use the normalized data processed in Step 2 to build a model for the graph-enhanced question-driven abstractive multi-text answer summarization method. The implementation of this step is divided into the following sub-steps:

[0077] Sub-step 3-1: Construct the model input layer and use the pre-trained RoBERTa to convert each word sequence in the normalized question and the corresponding multiple correct answers into a word vector representation, and obtain the mapped question word vector sequence respectively. Each correct answer is A i ∈{A1,A2,…,A N} word vector sequence

[0078] Sub-step 3-2, construct the text encoding representation layer. This implementation uses a multi-layer Transformer encoder to encode the question word vector sequence E Q And each answer word vector sequence Perform semantic coding extraction, where and As the input of the encoding layer, the contextual semantic representation can be obtained through learning:

[0079]

[0080] For each TransformerBlock, it consists of a multi-head attention mechanism and two sub-layers, each of which uses a residual connection and layer normalization.

[0081]

[0082]

[0083] Among them, LayerNorm is layer normalization, MHAtt represents the multi-head attention mechanism, FFN is the position feedforward neural network, and ReLU is the hidden activation function.

[0084] After L-layer transformer encoding, the question and answer are encoded and output separately and The encoded output of the entire answer is represented as:

[0085]

[0086] Since the proportion of question-related feature information contained in each answer paragraph is inconsistent, it is necessary to mine the core answer information at a deeper level, and the attention mechanism effectively represents the importance between vectors. Therefore, we adopt multi-head attention, and multiple "scaled dot product attention" layers run in parallel.

[0087]

[0088] MultiHead(Q,K,V)=[head1,head2,…,headh ]W O

[0089]

[0090] The weight matrix Attention(Q,K,V) is obtained by calculation. The final context representation MultiHead(Q,K,V) is constructed by connecting the vector information of different matrices of each attention layer. The vector information of different matrices of the attention layer is connected. W i Q , W i K , W i V is a learnable parameter. The number of attention layers h = 8, and the context answering channel is represented as Represents the key information of each answer paragraph at the question-driven markup level.

[0091] Sub-step 3-3: Construct the graph encoding representation layer. In this graph encoding representation, similar knowledge graphs are constructed for multiple answer paragraphs, removing redundant information. Building on the Transformer architecture, the graph encoding layer utilizes a graph attention mechanism to incorporate explicit graph representations into the encoding process to form graph encoding features. This ensures that question-driven answer information is fully explored during the encoding phase, laying the foundation for the decoding phase.

[0092] Let G denote the graphical representation matrix of the input document, where G[i][j] represents paragraph A i and A j The relationship weight between M A The output of the text encoding representation is based on the graph encoding representation. The graph encoding representation consists of a multi-head pooling attention mechanism and a graph encoding module. For the multi-head pooling attention mechanism, see the specific model. Figure 3 .

[0093]

[0094] For each head First calculate the input Attention score and worth points And for each head, the attention probability distribution of all characters in the paragraph is calculated.

[0095]

[0096]

[0097]

[0098] You can get the final paragraph representation of all the answers

[0099] The graph encoding module consists of multiple graph encoding layers, where each graph encoding layer consists of a graph multi-head attention mechanism and a two-layer feedforward network. Let the answer paragraph be represented by The similarity graph representation matrix G between the paragraphs is used as the input of the graph encoding layer. is the graphics coding layer G l-1 ∈(1,G L ) output; then, calculate G as follows l Output

[0100]

[0101]

[0102]

[0103]

[0104]

[0105] in is the final representation obtained through the graph encoding mechanism, and d G =dmodel / G h , θ is the standard deviation of the relationships representing the graph structure. The pairwise graph similarity matrix coefficients G are added to calculate the weighted relationships between paragraphs to establish potential dependencies between answers and identify redundant information, enabling the model to improve the learning of information representation between paragraphs.

[0106] In substeps 3-4, we construct the decoding layer. We explicitly integrate the text encoding representation and the image encoding representation into the end-to-end decoding process and utilize a multi-head hierarchical attention mechanism to guide the summary generation process. The components of the decoding module are similar to the Transformer architecture, except that we incorporate hierarchical operations into the multi-head attention mechanism. The specific implementation is as follows:

[0107] Assume that the initial input of the decoding layer is where Y l Is the length of the digest generated by decoding. Decoding layer D l The output is The previous layer The output is D l The input of the layer.

[0108]

[0109] Then, it is necessary to obtain the key information at the paragraph level and word level through a multi-head hierarchical attention mechanism, and use the key weight at the paragraph level to normalize the information weight at the word level, so as to obtain the core information representation in words at different paragraph levels.

[0110] The multi-head hierarchical attention mechanism consists of two main components: paragraph-level multi-head attention mechanism and word-level multi-head attention mechanism.

[0111] The paragraph-level multi-head attention mechanism focuses on the paragraph-level representation obtained from the graph encoding. The word generation process in the current stage is guided by regularizing the attention distribution with an explicit graph structure.

[0112]

[0113]

[0114]

[0115] The main purpose of the word-level multi-head attention mechanism is to guide the word generation process in information representation-based decoding. The weight distribution of words in each paragraph is normalized by the weight distribution obtained at the paragraph level used in the current decoding stage, in which the words are locally normalized. This decoding stage captures the contextual information of tokens in each paragraph.

[0116]

[0117]

[0118]

[0119] in d W =d model / W h , W h Indicates the number of heads in the word-level multi-head attention mechanism. Indicates the sum of the weights of all words in all paragraphs. When the context vector representation is constructed, the paragraph-level weight coefficient is normalized with the word-level weight coefficient to provide dual guidance for the summary generation process using graph encoding representation and text encoding representation.

[0120] Finally, the word-level context vector and paragraph-level context vector representation are concatenated and linearly operated, and then the output of the final decoding layer is obtained through a feedforward network and layer normalization.

[0121]

[0122]

[0123] in is the concatenated vector representation.

[0124] Substeps 3-5: Training model loss. This example uses random initialization to initialize all parameters. The Adam optimizer is used for gradient backpropagation to update model parameters. The initial learning rate is set to 0.002, and the warm-up step size is set to 10,000. The learning rate of the decoding part is 0.2, and the warm-up step size is set to 8,000. The model is trained for 100 epochs. The dropout value for all linear layers is 0.1. The maximum norm of the gradient is set to 2, and the hidden dimension of the model is set to 768. The encoding and decoding modules both have 8 layers, with the encoding stage having 6 text encoding layers and 2 graphic encoding layers. The five best checkpoints are selected based on the performance on the validation set, and the average result on the test set is reported. During the generation phase, a beam search with a beam size of 5 is used. Model training is completed, and the best performing model on the validation set is saved.

[0125] In step 4, model testing and answer summary generation, the model trained in step 3 with the minimum loss is used as the optimal validation model. Summary generation is performed on the data to be summarized. The generated answer summary is compared with the reference answer summary for objective performance verification. ROUGE is used to calculate the degree of word overlap between the reference answer summary and the generated answer summary. The accuracy of the model-generated answer summary is verified based on their longest common subsequence.

[0126] Based on the same inventive concept, the method and device for question-driven abstract multi-text answer summary based on graphic enhancement described in the present invention include a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, it implements the above-mentioned method for question-driven abstract multi-text answer summary based on graphic enhancement.

[0127] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention. It should be understood that the embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. After reading the present invention, modifications to various equivalent forms of the present invention made by those skilled in the art fall within the scope defined by the claims of this application.

Claims

1. A graph-enhanced question-driven abstractive multi-text answer summarization method, characterized by: The method comprises the following steps: Step 1: Community Q&A data collection and cleaning; Step 2: Data normalization; Step 3: Model construction; Step 4: Model testing and answer summary generation; Among them, step 3: model construction, is as follows: Sub-step 3-1: Construct the model input layer and use the pre-trained RoBERTa to convert each word sequence in the normalized question and the corresponding multiple correct answers into a word vector representation. Sub-step 3-2, construct the text encoding representation layer, using a multi-layer Transformer encoder to encode the question word vector sequence E Q And each answer word vector sequence Perform semantic coding extraction, Sub-step 3-3, construct the graph encoding representation layer, let G represent the graph representation matrix of the input document, where G[i][j] represents paragraph A i and A j The relationship weight between A It is the output based on the text encoding representation. The graphic encoding representation consists of a multi-head pooling attention mechanism and a graphic encoding module. For the multi-head pooling attention mechanism, For each head First calculate the input Attention score and worth points And for each head, calculate the attention probability distribution of all characters in the paragraph, A paragraph representation that can obtain all the final answers The graph encoding module consists of multiple graph encoding layers, each of which consists of a graph multi-head attention mechanism and a two-layer feedforward network, allowing the answer paragraph to be represented The similarity graph representation matrix G between the paragraphs is used as the input of the graph encoding layer. is the graphics coding layer G l-1 ∈(1,G L ) output; then, calculate G as follows l Output in is the final representation obtained through the graph encoding mechanism, and d G =d model / G h , θ is the standard deviation of the relationship representing the graph structure, and the pairwise graph similarity matrix coefficient G is added to calculate the weight relationship between paragraphs to establish the potential dependency between answers and identify redundant information, so that the model can improve the learning of information representation between paragraphs. Sub-steps 3-4, construct the decoding layer, explicitly integrate the text encoding representation and the graphic encoding representation into the end-to-end decoding process, and use the multi-head hierarchical attention mechanism to guide the summary generation process. In sub-steps 3-5, the model loss is trained. All parameters are initialized using random initialization, and the Adam optimizer is used for gradient backpropagation to update the model parameters.

2. The method for question-driven abstract multi-text answer summarization based on graph enhancement according to claim 1, characterized in that: Step 1: Community Q&A data collection and cleaning. First, crawl the HTML text of the web page from the real community Q&A platform using crawler technology, and perform data cleaning on it to remove web page tags and non-text data, including emoticons, symbols, and formulas.

3. The method for question-driven abstract multi-text answer summarization based on graph enhancement according to claim 1, characterized in that: Step 2: Data normalization: Normalize the cleaned text according to questions and answers. The specific operation is to use a rule-based method to organize the questions in the text one by one, and normalize the multiple answers corresponding to each question. Finally, use manual technology to manually summarize the multiple answers corresponding to each question, so that they can be used as reference answer summaries to correct model loss values ​​during model training and testing.

4. The method for question-driven abstract multi-text answer summarization based on graph enhancement according to claim 1, characterized in that: Step 3: Model construction. Use the normalized data processed in Step 2 to build a model for the graph-enhanced question-driven abstractive multi-text answer summarization method. The implementation of this step is divided into the following sub-steps: Sub-step 3-1: Construct the model input layer and use the pre-trained RoBERTa to convert each word sequence in the normalized question and the corresponding multiple correct answers into a word vector representation, and obtain the mapped question word vector sequence respectively. Each correct answer is A i ∈{A1,A2,…,A N } word vector sequence Sub-step 3-2, construct the text encoding representation layer, using a multi-layer Transformer encoder to encode the question word vector sequence E Q And each answer word vector sequence Perform semantic coding extraction, where and As the input of the encoding layer, the contextual semantic representation is obtained through learning: For each TransformerBlock, it consists of a multi-head attention mechanism and two sub-layers, each of which uses a residual connection and layer normalization. Among them, LayerNorm is layer normalization, MHAtt represents the multi-head attention mechanism, FFN is the position feedforward neural network, and ReLU is the hidden activation function. After L-layer transformer encoding, the question and answer are encoded and output separately and The encoded output of the entire answer is represented as: Since the proportion of question-related feature information contained in each answer paragraph is inconsistent, it is necessary to dig deeper into the core answer information. The attention mechanism effectively represents the importance between vectors. Multi-head attention is used, and multiple "scaled dot product attention" layers run in parallel. MultiHead(Q,K,V)=[head1,head2,…,hea h ]W O The weight matrix Attention(Q,K,V) is obtained by calculation, and the final context representation MultiHead(Q,K,V) is constructed by connecting the vector information of different matrices of each attention layer. The vector information of different matrices of the attention layer is connected, W i Q , W i K , W i V is a learnable parameter, the number of attention layers is h=8, and the context answering channel is represented as Represents the key information of each answer paragraph at the question-driven markup level.

5. The method for question-driven abstract multi-text answer summarization based on graph enhancement according to claim 4, characterized in that: Sub-steps 3-4 are specifically implemented as follows: Assume that the initial input of the decoding layer is where Y l is the length of the digest generated by decoding, the decoding layer D l The output is The previous layer The output is D l The input of the layer, Then, it is necessary to obtain the key information at the paragraph level and word level through a multi-head hierarchical attention mechanism, and use the key weight at the paragraph level to normalize the information weight at the word level, so as to obtain the core information representation in words at different paragraph levels. The multi-head hierarchical attention mechanism consists of two main components: paragraph-level multi-head attention mechanism and word-level multi-head attention mechanism. The paragraph-level multi-head attention mechanism focuses on the paragraph-level representation obtained from the graph encoding. By using explicit graph structure to regularize the attention distribution to guide the word generation process in the current stage, The main purpose of the word-level multi-head attention mechanism is to guide the word generation process in the decoding based on information representation. The weight distribution of the words in each paragraph is normalized by the weight distribution obtained at the paragraph level used in the current decoding stage. The words are locally normalized in this process. The decoding stage captures the token context information in each paragraph. in d W =d nodel / W h , W h Indicates the number of heads in the word-level multi-head attention mechanism, Indicates the sum of the weights of all words in all paragraphs. When the context vector representation is used, the paragraph-level weight coefficient is normalized with the word-level weight coefficient to provide dual guidance for the summary generation process using the graph encoding representation and the text encoding representation. Finally, the word-level context vector and paragraph-level context vector representation are concatenated and linearly operated, and then the output of the final decoding layer is obtained through a feedforward network and layer normalization. in is the vector representation after splicing, In substeps 3-5, the model loss is trained, the initial learning rate is set to 0.002, and the warm-up step is set to 10000. The learning rate of the decoding part is 0.2, and the warm-up step is set to 8000. The model is trained for 100 epochs, the Dropout of all linear layers is 0.1, the maximum norm of the gradient is set to 2, the number of hidden dimensions in the model is set to 768, the number of layers of the encoding and decoding modules is 8, of which the number of text encoding layers in the encoding stage is set to 6, and the number of graphic encoding layers is set to 2. The five best checkpoints are selected based on the performance of the validation set, and the average results of the test set are reported. In the generation phase, a beam search with a beam size of 5 is used. The model training is completed, and the model with the best performance on the validation set is saved.

6. The method for question-driven abstract multi-text answer summarization based on graph enhancement according to claim 1, characterized in that: Step 4: Model testing and answer summary generation. The model with the minimum loss value trained by the model in step 3 is used as the best verification model. Summary generation is performed on the data to be summarized. The performance of the generated answer summary is objectively verified against the reference answer summary. ROUGE is used to calculate the degree of word overlap between the reference answer summary and the generated answer summary. The accuracy of the answer summary generated by the model is verified based on its longest common subsequence.

7. A device using the method for question-driven abstract multi-text answer summarization based on graphics enhancement according to any one of claims 1 to 6, characterized in that: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the computer program implements the above-mentioned question-driven graph-enhanced abstract multi-text answer summarization method.

Citation Information

Patent Citations

  • Data processing method and related device

    CN110222168A

  • Information search method and device, computer equipment, storage medium and program product

    CN115129928A