Dialogue summarization method and system based on fact consistency comparison

By constructing a deep learning network model based on fact consistency comparison and using dialogue fact enhancement and perturbation strategies for contrastive learning, the problem of insufficient accuracy in generated summaries in dialogue summarization is solved, and more efficient semantic consistency generation is achieved.

CN119166906BActive Publication Date: 2026-05-15FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUZHOU UNIV
Filing Date
2024-08-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing dialogue summarization methods lack fluency and diversity in generating summaries, making it difficult to effectively preserve the semantic information of the dialogue, resulting in insufficient accuracy of the generated summaries.

Method used

We employ a deep learning network model based on fact consistency comparison. By constructing a fact consistency comparison task, we utilize dialogue fact enhancement and perturbation strategies to construct positive and negative examples for comparative learning, thereby improving the accuracy of the generated summary.

Benefits of technology

It significantly improves the accuracy of dialogue summaries and the semantic consistency of generated summaries, thereby enhancing the model's generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166906B_ABST
    Figure CN119166906B_ABST
Patent Text Reader

Abstract

The application relates to a dialogue summary method and system based on fact consistency comparison, which comprises the following steps: extracting user dialogue, user dialogue summary and labeling tags, and constructing a training set DS; constructing a deep learning network model M based on fact consistency comparison; the model M is used to obtain an initial dialogue summary representation, a dialogue fact enhanced summary representation and a dialogue fact disturbed summary representation, form a comparison triple and perform comparison learning; in the training process, the distance between the initial dialogue summary representation and the dialogue fact enhanced summary representation is minimized, and the distance between the initial dialogue summary representation and the dialogue fact disturbed summary representation is maximized; the model M is trained by using the training set DS, the semantic relationship between the user dialogue and the user dialogue summary is learned by using the model M; and the user dialogue is input into the trained model M, and the summary of the user dialogue is output. The method and system are beneficial to improving the accuracy of dialogue summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, specifically to a dialogue summarization method and system based on factual consistency comparison. Background Technology

[0002] Dialogue is one of the most common forms of communication on social networks, and summarizing or abstracting dialogue content has become an important task. The purpose of dialogue summarization is to extract key information from the discourse of two or more participants, as perceived by a third party. This task not only helps provide new participants with a quick context but also helps people grasp the central idea or search for key content, thereby improving efficiency and productivity. In recent years, social networks have become increasingly intertwined with people's lives, enabling them to communicate, make friends, work, learn, and entertain themselves. With the ever-increasing number of users, the amount of communication data generated by social networks is also growing rapidly. Dialogue summarization techniques can be used to extract the main information from dialogues, allowing for quick and efficient understanding of relevant information. However, unlike news or articles in traditional document summaries, dialogue data has unique characteristics, including different language styles, fragmented information, flexible discourse structures, and unclear topic boundaries, presenting numerous challenges for dialogue summarization.

[0003] Early work on dialogue summarization addressed this problem by converting dialogues into word graphs and selecting appropriate paths within the graph as summary sentences based on complex rules. Template-based methods were also used, collecting templates from human-written summaries and generating abstract summaries by filling in blanks with appropriate words selected from the dialogue. However, the summaries they generated lacked fluency and diversity, thus proving far from practical use. With the advent of neural encoder-decoder models, input can be projected into dense semantic representations, and summaries with new words can be generated by progressively sampling from the vocabulary until a special marker indicating the end of a representation is output. Based on these models, generative text summarization has made significant progress, from untrained PGN, Fast-Abs, and HRED to pretrained models like BART and Pegasus, driving the development of abstract text summarization.

[0004] Kim et al. designed a novel commonsense-supervised auxiliary task, using commonsense knowledge generated from gold summaries as additional supervision. The task aims to generate target commonsense. In a multi-task learning environment, dialogue summarization and commonsense generation tasks are jointly learned, effectively injecting commonsense knowledge into a shared encoder. Zou et al. used the original dialogue as output to train a denoising autoencoder capable of content compression of unsupervised dialogue summaries. Denoising operations were performed on each sample, including fragment insertion, utterance substitution, and content preservation. Lin et al. designed three topic-related auxiliary tasks to enhance the summarization model, including predicting the topics present in the dialogue, constraining the attention distribution of the decoder, and distinguishing summaries of different topics within the same dialogue.

[0005] To collect or construct more dialogue summarization data without requiring manual annotation, data augmentation methods are commonly used in the field of dialogue summarization. Chen and Yang augmented dialogue data by swapping, deleting, inserting, and replacing at the utterance level, using corresponding summaries as output to diversify the dialogue input for training dialogue summarization models. Liu, Chen, and Khalifa et al. augmented data by simultaneously replacing names in both the dialogue and the reference summary. Asi et al. collected pseudo-summaries using large language models such as GPT-3 by inputting dialogues with predefined question prompts. Fang et al. augmented and improved the original training pairs with a utterance rewriting model and a coreference parsing model, resulting in highly understandable dialogue data. Furthermore, the work of Zhu et al. also considered using relatively large-scale extracted dialogue summarization data as pre-training datasets, such as MediaSum, for other low-resource dialogue summarization scenarios. Summary of the Invention

[0006] The purpose of this invention is to provide a dialogue summarization method and system based on factual consistency comparison, which is beneficial to improving the accuracy of dialogue summarization.

[0007] To achieve the above objectives, the technical solution adopted by this invention is: a dialogue summarization method based on factual consistency comparison, characterized by comprising the following steps:

[0008] Step A: Extract user dialogues and user dialogue summaries, and label the user dialogues and user dialogue summaries. Each complete user dialogue corresponds to a user dialogue summary, and a training set DS is constructed.

[0009] Step B: Construct a deep learning network model M based on fact consistency comparison. The deep learning network model M constructs a fact consistency comparison task as an auxiliary task to the main task of dialogue summarization. It obtains the summary representation of the initial dialogue, the summary representation of the dialogue fact enhancement, and the summary representation of the dialogue fact perturbation, forming a comparison triple for comparison learning. During training, the distance between the summary representation of the initial dialogue and the summary representation of the dialogue fact enhancement is minimized, while the distance between the summary representation of the initial dialogue and the summary representation of the dialogue fact perturbation is maximized, thereby improving the fact consistency of the summary generated by the model. The deep learning network model M is trained using the training set DS, and the semantic relationship between the user dialogue and the user dialogue summary is learned through the deep learning network model M.

[0010] Step C: Input the user dialogue into the trained deep learning network model M and output a summary of the user dialogue.

[0011] Furthermore, step B specifically includes the following steps:

[0012] Step B1: Perform initial processing on all training samples in the training dataset DS to obtain the initial dialogue sequence D. init ;

[0013] Step B2: Calculate the initial dialogue sequence D obtained in Step B1. init The initial dialogue summary representation S is obtained through the encoder and decoder of the BART model. init The loss is calculated by normalizing the data using the softmax function and then using cross-entropy as the loss function to obtain the main task loss for dialogue summarization. main ;

[0014] Step B3: Use the initial dialogue sequence D obtained in step B1. init Segmentation is performed to divide the speaker-discourse pairs into t. su Define a dynamically sized window based on the number of speaker-discourse pairs. A window contains a sequence of k consecutive speaker-utterance pairs from a dialogue. Coreference relations are parsed from the sequences within the window, and the resulting entity coreference list L is used as the basis for the analysis. coref Perform fact-enhancing dialogue to obtain fact-enhanced dialogue sequence D. fe The summary representation S with enhanced dialogue facts is obtained through the BART model. fe ;

[0015] Step B4: Use the dynamically sized window obtained in step B3 The NlpAug data augmentation tool was used to augment the text data of the dialogue within the window. Random semantic inversion and replacement were performed on each word in each sentence within the window, and the resulting sequence, D, was concatenated to obtain a fact-perturbed dialogue sequence.fp The summary representation S of dialogue fact perturbation is obtained through the BART model. fp ;

[0016] Step B5: Convert the initial dialogue summary representation S obtained in steps B2, B3, and B4 into a single expression. init Dialogue-based fact-enhanced summary representation S fe Summary representation of dialogue fact disturbance S fp Construct contrastive triples and use contrastive learning to calculate the loss for the fact-consistency comparison auxiliary task. fc ;

[0017] Step B6: Calculate the dialogue summary loss obtained in Step B2. main The loss of the auxiliary task is compared with the consistency of the facts obtained in step B5. fc The final loss of the model is obtained by weighting, the gradient of each parameter in the deep learning network model is calculated by backpropagation, and the parameters are updated by stochastic gradient descent.

[0018] Step B7: When the change in loss value generated by the deep learning network model in each iteration is less than the given threshold, or when the maximum number of iterations is reached, terminate the training process of the deep learning network model.

[0019] Furthermore, step B1 specifically includes the following steps:

[0020] Step B11: Traverse the training set DS, perform word segmentation and stop word removal on the dialogue text. Each training sample in DS is represented as ds = (D, S), where D is the text content of the dialogue and S is the summary text content of the dialogue.

[0021] Dialogue D is represented as:

[0022] D = {t1, t2, ..., t} n}

[0023] Among them, t i Let i be the i-th speaker-talk pair in dialogue D, i = 1, 2, ..., n, where n is the number of speaker-talk pairs in dialogue D.

[0024] Speaker-Discourse Pair i Represented as:

[0025] t i =(s i ,u i )

[0026]

[0027] Among them, si For the i-th speaker, u i The words spoken by the i-th speaker. Let m be the j-th word in the i-th sentence, where i = 1, 2, ..., n, j = 1, 2, ..., m, and m is the utterance u. i The length of the text;

[0028] Step B12: The dialogue D = {t1,t2,…,t...} obtained in step B11 is... n Each sentence in the sequence is concatenated, with a [CLS] marker inserted before each sentence and a [SEP] marker inserted between each sentence to construct the initial dialogue sequence D. init ; Dialogue initial sequence D init Represented as:

[0029] D init =[CLS]+t1+[SEP]+t2+[SEP]+…+t n

[0030] Where n represents the number of speaker-talk pairs in the dialogue.

[0031] Furthermore, step B2 specifically includes the following steps:

[0032] Step B21: Place D init The token sequence N of the dialogue is obtained by padding and length truncation through the tokenizer of the BART model and used as the input of the BART model encoder.

[0033] The dialogue token sequence N is calculated as follows:

[0034] N = BART tokenizer (D init )

[0035] Among them, BART tokenizer () represents the tokenizer of the BART model;

[0036] The encoder output is calculated as follows:

[0037]

[0038]

[0039] Among them, BART enc () represents the BART model encoder. For the i-th word in the u-th sentence The corresponding word vectors, l is the text length of the nth sentence, and d is the dimension of the feature vector;

[0040] Step B22: Convert the encoder output H obtained in step B21 to... init As input to the BART model decoder, the initial dialogue summary representation S is obtained through self-attention mechanism, layer normalization, cross-attention, and feedforward neural network decoding. init ;

[0041] H' = SelfAttention(LayNorm(H) init ))

[0042] H"=CrossAttention(LayNorm(H'+H init ))

[0043] S init =FFN(LayNorm(H'+H”))

[0044] Where LayNorm(·) represents layer normalization, SelfAttention(·) represents self-attention mechanism, CrossAttention(·) represents cross-attention, and FFN(·) represents feedforward neural network;

[0045] Step B23: Convert the initial dialogue summary representation S obtained in step B22 into a single expression. init The score distribution P of the next word is obtained by normalization using the softmax function. The loss value is calculated using cross-entropy as the loss function, and the loss of the main task of dialogue summarization is obtained. main ;

[0046] The formula for calculating the score distribution P is as follows:

[0047] P = softmax(WS) init +b)

[0048] Where P∈[0,1], W is a trainable parameter matrix, and b is a bias vector;

[0049] Dialogue Summary Main Task Loss main The calculation formula is as follows:

[0050]

[0051] Wherein, P(y t |y <t D; θ) represents the corresponding word y taken from P. t The probability value, | represents the conditional part of the conditional probability, that is, given y <t Given the dialogue text D and model parameters θ, generate the target word y. t The probability of y <t=(y1,y2,…,y t-1 ) represents the first t-1 words of the output sequence, S y This represents a summary of the target.

[0052] Furthermore, step B3 specifically includes the following steps:

[0053] Step B31: Use the initial dialogue sequence D obtained in step B12. init Segmentation is performed based on the [SEP] marker to divide speaker-discourse pairs into t. su Define a dynamically sized window based on the number of speaker-utterance pairs n. The window size is k, k = 1, 2, ..., n. The window contains a sequence of k consecutive speaker-utterance pairs in the dialogue. The speaker-utterance pairs outside the window are denoted as t. other ;

[0054] Speaker-Discourse Pair su It is expressed as follows:

[0055] t su ={t1,t2,…,t n}

[0056] Dynamic window size It is expressed as follows:

[0057]

[0058] After the window is divided, dialog D is represented as follows:

[0059]

[0060] in, for A window is randomly selected from the array, i = 1, 2, ..., k, and concat(·) represents the concatenation operation;

[0061] Step B32: For each D init Calculation window Random selection The FastCoref coreference resolution tool is used to resolve coreference relationships within the dialog box, resulting in a coreference list L of entities. coref If the length of the coreference group in the coreference list is 2, then the entity replacement coreference pronoun operation is performed directly. If the length of the coreference group in the coreference list is greater than 2, then an entity replacement coreference pronoun operation is performed on a random non-first element, and the result is concatenated to obtain the fact-enhanced dialogue sequence D. fe ;

[0062] Core reference list in the dialog window The calculation is as follows:

[0063]

[0064]

[0065] Where FCoref(·) represents the coreference resolution operation, e i and p i For window The entity and pronoun information contained in the speaker-discourse pair;

[0066] Fact-enhanced dialogue sequence D fe The calculation is as follows:

[0067]

[0068]

[0069] in, For a list of common references In the j-th core pointer group, func1(·) represents a direct replacement operation, and func2(·) represents a random replacement operation that selects a non-first element.

[0070] Step B33: Enhance the dialogue sequence D with the facts obtained in step B32. fe The inputs to the encoder and decoder of the BART model yield a summary representation S of dialogue facts. fe ;

[0071] Dialogue fact-enhanced summary representation S fe The calculation is as follows:

[0072] S fe =BART enc-dec (D fe )

[0073] Among them, BART enc-dec This represents the encoder and decoder of the BART model.

[0074] Furthermore, step B4 specifically includes the following steps:

[0075] Step B41: Use the dynamically sized window obtained in step B31 The window contains a sequence of k consecutive speaker-utterance pairs in the dialogue, and the speaker-utterance pair outside the window is denoted as t. other ;

[0076] Speaker-Discourse Pair su It is expressed as follows:

[0077] t su ={t1,t2,…,t n}

[0078] Dynamic window size It is expressed as follows:

[0079]

[0080] After the window is divided, dialog D is represented as follows:

[0081]

[0082] Step B42: Based on the initial dialogue sequence D init Random selection The NlpAug data augmentation tool was used to augment the text data of the dialogue within the window. Random semantic inversion and replacement were performed on each word in each sentence within the window, and the resulting sequence, D, was concatenated to obtain a fact-perturbed dialogue sequence. fp ;

[0083]

[0084]

[0085]

[0086] Where aug(·) represents the antonym substitution operation;

[0087] Step B43: Disrupt the dialogue sequence D obtained in step B42. fp The inputs to the encoder and decoder of the BART model yield a summary representation S of the dialogue fact perturbation. fp ;

[0088] Summary representation of dialogue fact disturbance S fp The calculation is as follows:

[0089] S fp =BART enc-dec (D fp )

[0090] Among them, BART enc-dec This represents the encoder and decoder of the BART model.

[0091] Furthermore, step B5 specifically includes the following steps:

[0092] Step B51: Convert the initial dialogue summary representation S obtained in steps B2, B3, and B4 into a single expression. init Dialogue-based fact-enhanced summary representation S fe Summary representation of dialogue fact disturbance S fp Form contrasting triples;

[0093] Comparison of triple S cl It is expressed as follows:

[0094] S cl ={S init ,S fe ,S fp}

[0095] Step B52: Compare the triplet S obtained in step B51 cl Using contrastive learning, calculate the contrastive loss for fact consistency. fc ;

[0096] Contrast loss for consistency of facts fc The calculation is as follows:

[0097]

[0098]

[0099] Where N represents the number of data in the training set DS, max(a,b) means to return the larger of a and b, marigin is the boundary value constant, and cos_similarity(x1,x2) means to calculate the cosine similarity between x1 and x2.

[0100] Furthermore, step B6 specifically includes the following steps:

[0101] Step B61: Apply the dialogue summary loss obtained in step B23 to the main task. main The loss of the auxiliary task is compared with the consistency of the facts obtained in step B52. fc The final loss function of the model is obtained by weighting the values.

[0102] The final loss function of the model is calculated as follows:

[0103] loss = loss main +αloss fc

[0104] Here, α is a hyperparameter used to balance the impact of auxiliary tasks on the model;

[0105] Step B62: Calculate the gradients of each parameter in the deep learning network model using the backpropagation method, and update each parameter using the stochastic gradient descent method.

[0106] The present invention also provides a dialogue summarization system based on fact consistency comparison, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-described method steps.

[0107] Compared with existing technologies, this invention has the following advantages: To effectively improve the factual consistency between the generated summary and the dialogue, this invention designs a novel factual consistency contrastive task. This task proposes a dialogue fact enhancement strategy and a dialogue fact perturbation strategy to construct positive and negative dialogue examples respectively. The model outputs the summary representation of the initial dialogue, the summary representation of the dialogue fact enhancement, and the summary representation of the dialogue fact perturbation, forming contrastive triples for contrastive learning. The factual consistency task, as an auxiliary task to the main dialogue summarization task, considers factual consistency issues such as person differences and entity coreference relationships between the input dialogue and the output summary. During training, it minimizes the distance between the summary representation of the initial dialogue and the summary representation of the dialogue fact enhancement, while maximizing the distance between the summary representation of the initial dialogue and the summary representation of the dialogue fact perturbation, thereby improving the factual consistency of the model's generated summary. This task introduces contrastive learning to encourage the model to retain the semantic information of the original dialogue when generating summaries, thus improving the model's generalization ability. Experimental results on two public benchmark datasets show that the model of this invention achieves significant performance improvements compared to other state-of-the-art baseline models. Attached Figure Description

[0108] Figure 1 This is a flowchart illustrating the method implementation of an embodiment of the present invention;

[0109] Figure 2 This is an architecture diagram of a deep learning network model M based on fact consistency comparison in an embodiment of the present invention. Detailed Implementation

[0110] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0111] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0112] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0113] like Figure 1 As shown, this embodiment provides a dialogue summarization method based on factual consistency comparison, including the following steps:

[0114] Step A: Extract user dialogues and user dialogue summaries, and label the user dialogues and user dialogue summaries. Each complete user dialogue corresponds to a user dialogue summary, and the training set DS is constructed.

[0115] Step B: Construct a deep learning network model M based on fact consistency comparison. This deep learning network model M constructs a novel fact consistency comparison task, which serves as an auxiliary task to the main dialogue summarization task. It proposes dialogue fact enhancement and dialogue fact perturbation strategies to construct positive and negative examples for comparative learning. The BART model is used to obtain the initial dialogue summary representation (Step B2), the dialogue fact-enhanced summary representation (Step B3), and the dialogue fact-perturbation summary representation (Step B4), forming a comparison triple for comparative learning. During training, the distance between the initial dialogue summary representation and the dialogue fact-enhanced summary representation is minimized, while the distance between the initial dialogue summary representation and the dialogue fact-perturbation summary representation is maximized (Step B5), thereby improving the fact consistency of the model-generated summaries. The deep learning network model M is trained using the training set DS (Steps B6 and B7), and the semantic relationship between the user dialogue and the user dialogue summary is learned through the deep learning network model M.

[0116] Step C: Input the user dialogue into the trained deep learning network model M and output a summary of the user dialogue.

[0117] In this embodiment, the model structure of the deep learning network model M based on fact consistency comparison is as follows: Figure 2 As shown. In this embodiment, the specific implementation steps of step B are as follows.

[0118] Step B1: Perform initial processing on all training samples in the training dataset DS to obtain the initial dialogue sequence D. init .

[0119] In this embodiment, step B1 specifically includes the following steps:

[0120] Step B11: Traverse the training set DS, perform word segmentation and stop word removal on the dialogue text. Each training sample in DS is represented as ds = (D, D), where D is the text content of the dialogue and D is the summary text content corresponding to the dialogue.

[0121] Dialogue D is represented as:

[0122] D = {t1, t2, ..., t} n}

[0123] Among them, t i Let i be the i-th speaker-talk pair in dialogue D, where i = 1, 2, ..., n, and n is the number of speaker-talk pairs in dialogue D.

[0124] Speaker-Discourse Pair i Represented as:

[0125] t i =(s i ,u i )

[0126]

[0127] Among them, s i For the i-th speaker, u i The words spoken by the i-th speaker. Let m be the j-th word in the i-th sentence, where i = 1, 2, ..., n, j = 1, 2, ..., m, and m is the utterance u. i The length of the text.

[0128] Step B12: The dialogue D = {t1,t2,…,t...} obtained in step B11 is... n Each sentence in the sequence is concatenated, with a [CLS] marker inserted before each sentence and a [SEP] marker inserted between each sentence to construct the initial dialogue sequence D. init ; Dialogue initial sequence D init Represented as:

[0129] D init =[CLS]+t1+[SEP]+t2+[SEP]+…+t n

[0130] Where n represents the number of speaker-talk pairs in the dialogue.

[0131] Step B2: Calculate the initial dialogue sequence D obtained in Step B1. init The initial dialogue summary representation S is obtained through the encoder and decoder of the BART model. init The loss is calculated by normalizing the data using the softmax function and then using cross-entropy as the loss function to obtain the main task loss for dialogue summarization. main .

[0132] In this embodiment, step B2 specifically includes the following steps:

[0133] Step B21: Place D init The token sequence N of the dialogue is obtained by padding and length truncation through the tokenizer of the BART model, and then used as the input of the BART model encoder.

[0134] The dialogue token sequence N is calculated as follows:

[0135] N = BARTtokenizer (D init )

[0136] Among them, BART tokenizer () represents the tokenizer of the BART model.

[0137] The encoder output is calculated as follows:

[0138]

[0139]

[0140] Among them, BART enc () represents the BART model encoder. For the i-th word in the u-th sentence The corresponding word vectors, l is the text length of the nth sentence, and d is the dimension of the feature vector.

[0141] Step B22: Convert the encoder output H obtained in step B21 to... init As input to the BART model decoder, the initial dialogue summary representation S is obtained through self-attention mechanism, layer normalization, cross-attention, and feedforward neural network decoding. init ;

[0142] H' = SelfAttention(LayNorm(H) init ))

[0143] H"=CrossAttention(LayNorm(H'+H init ))

[0144] S init =FFN(LayNorm(H'+H”))

[0145] Where LayNorm(·) represents layer normalization, SelfAttention(·) represents self-attention mechanism, CrossAttention(·) represents cross-attention, and FFN(·) represents feedforward neural network.

[0146] Step B23: Convert the initial dialogue summary representation S obtained in step B22 into a single expression. init The score distribution P of the next word is obtained by normalization using the softmax function. The loss value is calculated using cross-entropy as the loss function, and the loss of the main task of dialogue summarization is obtained. main .

[0147] The formula for calculating the score distribution P is as follows:

[0148] P = softmax(WS) init +b)

[0149] Where P∈[0,1], W is the trainable parameter matrix, and b is the bias vector.

[0150] Dialogue Summary Main Task Loss main The calculation formula is as follows:

[0151]

[0152] Wherein, P(y t |y <t D; θ) represents the corresponding word y taken from P. t The probability value, | represents the conditional part of the conditional probability, that is, given y <t Given the dialogue text D and model parameters θ, generate the target word y. t The probability of y <t =(y1,y2,…,y t-1 ) represents the first t-1 words of the output sequence, S y This represents a summary of the target.

[0153] Step B3: Use the initial dialogue sequence D obtained in step B1. init Segmentation is performed to divide the speaker-discourse pairs into t. su Define a dynamically sized window based on the number of speaker-discourse pairs. A window contains a sequence of k consecutive speaker-utterance pairs from a dialogue. Coreference relations are parsed from the sequences within the window, and the resulting entity coreference list L is used as the basis for the analysis. coref Perform fact-enhancing dialogue to obtain fact-enhanced dialogue sequence D. fe The summary representation S with enhanced dialogue facts is obtained through the BART model. fe .

[0154] In this embodiment, step B3 specifically includes the following steps:

[0155] Step B31: Use the initial dialogue sequence D obtained in step B12. init Segmentation is performed based on the [SEP] marker to divide speaker-discourse pairs into t. su Define a dynamically sized window based on the number of speaker-utterance pairs n. The window size is k, k = 1, 2, ..., n. The window contains a sequence of k consecutive speaker-utterance pairs in the dialogue. The speaker-utterance pairs outside the window are denoted as t. other .

[0156] Speaker-Discourse Pair su It is expressed as follows:

[0157] t su ={t1,t2,…,t n}

[0158] Dynamic window size It is expressed as follows:

[0159]

[0160] After the window is divided, dialog D is represented as follows:

[0161]

[0162] in, for The window is randomly selected from the array, i = 1, 2, ..., k, and concat(·) represents the concatenation operation.

[0163] Step B32: For each D init Calculation window Random selection The FastCoref coreference resolution tool is used to resolve coreference relationships within the dialog box, resulting in a coreference list L of entities. coref If the length of the coreference group in the coreference list is 2, then the entity replacement coreference pronoun operation is performed directly. If the length of the coreference group in the coreference list is greater than 2, then an entity replacement coreference pronoun operation is performed on a random non-first element, and the result is concatenated to obtain the fact-enhanced dialogue sequence D. fe .

[0164] Core reference list in the dialog window The calculation is as follows:

[0165]

[0166]

[0167] Where FCoref(·) represents the coreference resolution operation, e i and p i For window The internal speaker-discourse pair contains entity and pronoun information.

[0168] Fact-enhanced dialogue sequence D fe The calculation is as follows:

[0169]

[0170]

[0171] in, For a list of common references In the j-th core pointer group, func1(·) represents a direct replacement operation, and func2(·) represents a random replacement operation that selects a non-first element.

[0172] Step B33: Enhance the dialogue sequence D with the facts obtained in step B32. fe The inputs to the encoder and decoder of the BART model yield a summary representation S of dialogue facts. fe .

[0173] Dialogue fact-enhanced summary representation S fe The calculation is as follows:

[0174] S fe =BART enc-dec (D fe )

[0175] Among them, BART enc-dec This represents the encoder and decoder of the BART model.

[0176] Step B4: Use the dynamically sized window obtained in step B3 The NlpAug data augmentation tool was used to augment the text data of the dialogue within the window. Random semantic inversion and replacement were performed on each word in each sentence within the window, and the resulting sequence, D, was concatenated to obtain a fact-perturbed dialogue sequence. fp The summary representation S of dialogue fact perturbation is obtained through the BART model. fp .

[0177] In this embodiment, step B4 specifically includes the following steps:

[0178] Step B41: Use the dynamically sized window obtained in step B31 The window contains a sequence of k consecutive speaker-utterance pairs in the dialogue, and the speaker-utterance pair outside the window is denoted as t. other .

[0179] Speaker-Discourse Pair su It is expressed as follows:

[0180] t su ={t1,t2,…,t n}

[0181] Dynamic window size It is expressed as follows:

[0182]

[0183] After the window is divided, dialog D is represented as follows:

[0184]

[0185] Step B42: Based on the initial dialogue sequence D init Random selection The NlpAug data augmentation tool was used to augment the text data of the dialogue within the window. Random semantic inversion and replacement were performed on each word in each sentence within the window, and the resulting sequence, D, was concatenated to obtain a fact-perturbed dialogue sequence. fp ;

[0186]

[0187]

[0188]

[0189] Here, aug(·) represents the antonym substitution operation.

[0190] Step B43: Disrupt the dialogue sequence D obtained in step B42. fp The inputs to the encoder and decoder of the BART model yield a summary representation S of the dialogue fact perturbation. fp .

[0191] Summary representation of dialogue fact disturbance S fp The calculation is as follows:

[0192] S fp =BART enc-dec (D fp )

[0193] Among them, BART enc-dec This represents the encoder and decoder of the BART model.

[0194] Step B5: Convert the initial dialogue summary representation S obtained in steps B2, B3, and B4 into a single expression. init Dialogue-based fact-enhanced summary representation S fe Summary representation of dialogue fact disturbance S fp Construct contrastive triples and use contrastive learning to calculate the loss for the fact-consistency comparison auxiliary task. fc .

[0195] In this embodiment, step B5 specifically includes the following steps:

[0196] Step B51: Convert the initial dialogue summary representation S obtained in steps B2, B3, and B4 into a single expression. init Dialogue-based fact-enhanced summary representation S fe Summary representation of dialogue fact disturbance S fp Form a contrasting triplet.

[0197] Comparison of triple S cl It is expressed as follows:

[0198] S cl ={S init ,S fe ,S fp}

[0199] Step B52: Compare the triplet S obtained in step B51 cl Using contrastive learning, calculate the contrastive loss for fact consistency. fc .

[0200] Contrast loss for consistency of facts fc The calculation is as follows:

[0201]

[0202]

[0203] Where N represents the number of data in the training set DS, max(a,b) means to return the larger of a and b, marigin is the boundary value constant, and cos_similarity(x1,x2) means to calculate the cosine similarity between x1 and x2.

[0204] Step B6: Calculate the dialogue summary loss obtained in Step B2. main The loss of the auxiliary task is compared with the consistency of the facts obtained in step B5. fc The final loss of the model is obtained by weighting, the gradient of each parameter in the deep learning network model is calculated by backpropagation, and the parameters are updated by stochastic gradient descent.

[0205] In this embodiment, step B6 specifically includes the following steps:

[0206] Step B61: Apply the dialogue summary obtained in step B23 to the main task loss. main The loss of the auxiliary task is compared with the consistency of the facts obtained in step B52. fc The weighted average yields the final loss function of the model.

[0207] The final loss function of the model is calculated as follows:

[0208] loss = loss main +αloss fc

[0209] Here, α is a hyperparameter used to balance the impact of auxiliary tasks on the model.

[0210] Step B62: Calculate the gradients of each parameter in the deep learning network model using the backpropagation method, and update each parameter using the stochastic gradient descent method.

[0211] Step B7: When the change in loss value generated by the deep learning network model in each iteration is less than the given threshold, or when the maximum number of iterations is reached, terminate the training process of the deep learning network model.

[0212] This embodiment also provides a dialogue summarization system based on fact consistency comparison, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-described method steps.

[0213] The proposed model was compared with other dialogue summarization baseline models, and the evaluation results are shown in Table 1. On the SAMSum benchmark dataset, the proposed model improved the ROUGE-1, ROUGE-2, and ROUGE-L indices by 0.11%, 0.72%, and 0.19%, respectively, compared to the SDDS model. On the DialogSum benchmark dataset, the proposed model improved the ROUGE-1, ROUGE-2, and ROUGE-L indices by 0.43%, 0.7%, and 0.17%, respectively, compared to the SDDS model. On both benchmark datasets, the proposed model significantly outperformed other baseline models, including the state-of-the-art SDDS model.

[0214] Table 1 shows the evaluation results on the SAMsum and DialogSum datasets.

[0215]

[0216] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0217] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0218] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0219] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0220] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A dialogue summarization method based on factual consistency comparison, characterized in that, Includes the following steps: Step A: Extract user dialogues and user dialogue summaries, and label the user dialogues and user dialogue summaries. Each complete user dialogue corresponds to a user dialogue summary, and construct the training set DS. Step B: Specifically includes the following steps: Step B1: Perform initial processing on all training samples in the training dataset DS to obtain the initial dialogue sequence. ; Step B2: Develop the initial sequence of dialogues obtained in Step B1. The initial dialogue summary representation is obtained through the encoder and decoder of the BART model. ,pass The function is normalized, and cross-entropy is used as the loss function to calculate the loss value, thus obtaining the loss for the main task of dialogue summarization. ; Step B3: Use the initial dialogue sequence obtained in step B1. Segmentation is performed to divide the speaker-discourse pairs. Define a dynamically sized window based on the number of speaker-discourse pairs. The window contains the continuous dialogue Given a sequence of speaker-utterance pairs, perform coreference parsing on the sequence within the window, and generate a list of entity coreferences based on the parsed results. Perform fact-enhancing dialogue to obtain a fact-enhanced dialogue sequence. The BART model is used to obtain a summary representation of dialogue facts. ; Step B4: Use the dynamically sized window obtained in step B3 The NlpAug data augmentation tool was used to augment the text data of the dialogue within the window. For each sentence within the window, words were randomly semantically negated and replaced, and the resulting sequence was concatenated to obtain a dialogue sequence with factual perturbations. The summary representation of dialogue fact perturbation is obtained through the BART model. ; Step B5: Represent the initial dialogue summary obtained in steps B2, B3, and B4. Summary representation of dialogue facts Summary of the disruption of facts in the dialogue Construct contrastive triples and use contrastive learning to calculate the loss for the fact-consistency contrast auxiliary task. ; Step B6: Calculate the main task loss from the dialogue summary obtained in Step B2. The loss of the auxiliary task is compared with the consistency of the facts obtained in step B5. The weighted average yields the final loss of the model. The gradients of each parameter in the deep learning network model are calculated using the backpropagation method, and the parameters are updated using the stochastic gradient descent method. Step B7: During training, minimize the distance between the initial dialogue summary representation and the dialogue fact-enhanced summary representation, while maximizing the distance between the initial dialogue summary representation and the dialogue fact-perturbed summary representation, thereby improving the factual consistency of the model-generated summaries; when the change in loss value generated by the deep learning network model in each iteration is less than a given threshold, or when the maximum number of iterations is reached, terminate the training process of the deep learning network model. Step C: Input the user dialogue into the trained deep learning network model M and output a summary of the user dialogue.

2. The dialogue summarization method based on factual consistency comparison according to claim 1, characterized in that, Step B1 specifically includes the following steps: Step B11: Traverse the training set DS, perform word segmentation and stop word removal on the dialogue text, and represent each training sample in DS as follows: , The text content of the dialogue. This is a summary text of the dialogue. dialogue Represented as: in, For dialogue The first in Speaker-talk pair , For dialogue The number of speaker-discourse pairs included; Speaker-Discourse Pair Represented as: in, For the first One speaker, For the first The words spoken by the speaker For the first The first in the sentence One word, , , For words The length of the text; Step B12: Obtain the dialogue from step B11 Each sentence in the text is concatenated, and an insertion is made at the beginning. Mark and insert between sentences Marking, constructing the initial sequence of dialogue ; Dialogue initial sequence Represented as: in, This indicates the number of speaker-utterance pairs in the dialogue.

3. The dialogue summarization method based on factual consistency comparison according to claim 2, characterized in that, Step B2 specifically includes the following steps: Step B21: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The token sequence for the dialogue is obtained by padding and truncation using the tokenizer of the BART model. As input to the BART model encoder; Dialogue token sequence The calculation is as follows: in, This refers to the tokenizer in the BART model. The encoder output is calculated as follows: in, This represents the BART model encoder. For the first The i-th word in the sentence The corresponding word vectors, , For the first The text length of a sentence The dimension of the feature vector; Step B22: Obtain the encoder output obtained in step B21 As input to the BART model decoder, the initial dialogue summary representation is obtained through self-attention mechanism, layer normalization, cross-attention, and feedforward neural network. ; in, Representation layer normalization, This indicates the self-attention mechanism. Indicates cross attention. This represents a feedforward neural network; Step B23: Represent the initial dialogue summary obtained in step B22. ,pass The function is normalized to obtain the score distribution of the generated next word. Cross-entropy is used as the loss function to calculate the loss value, and the loss of the main task of dialogue summarization is obtained. ; Score distribution The calculation formula is as follows: in, For a trainable parameter matrix, It is the bias vector; Dialogue Summary Main Task Loss The calculation formula is as follows: in, Indicates from The corresponding words extracted from The probability value, The conditional part represents the conditional probability, that is, given... Dialogue text and model parameters Under the condition of generating target words The probability of; This represents the first t-1 words of the output sequence. This represents a summary of the target.

4. The dialogue summarization method based on factual consistency comparison according to claim 3, characterized in that, Step B3 specifically includes the following steps: Step B31: Use the initial dialogue sequence obtained in step B12. according to The markers are used to segment and divide the speaker-discourse pairs. According to the number of speaker-discourse pairs Define a dynamically sized window Window size is The window contains the continuous dialogue A sequence of speaker-utterance pairs, the speaker-utterance pair outside the window is denoted as... ; Speaker-Discourse Pair It is expressed as follows: Dynamic window size It is expressed as follows: Dialogue after window division It is expressed as follows: in, for A window randomly selected from the middle. Indicates a splicing operation; Step B32: For each Calculation window Random selection The FastCoref coreference parsing tool is used to parse the coreference relationships in the dialog box within the window, resulting in a list of entity coreferences. If the length of the coreference group in the coreference list is 2, then the entity replacement coreference pronoun operation is performed directly. If the length of the coreference group in the coreference list is greater than 2, then an entity replacement coreference pronoun operation is performed on a random non-first element, and the result is a fact-enhanced dialogue sequence. ; Core reference list in the dialog window The calculation is as follows: in, This indicates the coreference resolution operation. and For window The entity and pronoun information contained in the speaker-discourse pair; Fact-enhanced dialogue sequences The calculation is as follows: in, For a list of common references The Middle One common reference group, This indicates a direct replacement operation. This indicates a random replacement operation that selects a non-first element. Step B33: Enhance the dialogue sequence with the facts obtained in step B32. The inputs to the encoder and decoder of the BART model yield a summary representation of dialogue facts. ; Dialogue fact-enhanced summary representation The calculation is as follows: in, This represents the encoder and decoder of the BART model.

5. The dialogue summarization method based on factual consistency comparison according to claim 4, characterized in that, Step B4 specifically includes the following steps: Step B41: Use the dynamically sized window obtained in step B31 The window contains the continuous dialogue A sequence of speaker-utterance pairs, the speaker-utterance pair outside the window is denoted as... ; Speaker-Discourse Pair It is expressed as follows: Dynamic window size It is expressed as follows: Dialogue after window division It is expressed as follows: Step B42: Based on the initial dialogue sequence Random selection The NlpAug data augmentation tool was used to augment the text data of the dialogue within the window. For each sentence within the window, words were randomly semantically negated and replaced, and the resulting sequence was concatenated to obtain a dialogue sequence with factual perturbations. ; in, This indicates antonym substitution. Step B43: Disrupt the dialogue sequence of facts obtained in step B42. The inputs are fed into the encoder and decoder of the BART model to obtain a summary representation of the dialogue fact perturbation. ; Summary of Dialogue Fact Disruption The calculation is as follows: in, This represents the encoder and decoder of the BART model.

6. The dialogue summarization method based on factual consistency comparison according to claim 5, characterized in that, Step B5 specifically includes the following steps: Step B51: Represent the initial dialogue summary obtained in steps B2, B3, and B4. Summary representation of dialogue facts Summary of the disruption of facts in the dialogue Form contrasting triples; Comparison of triples It is expressed as follows: Step B52: Compare the triplet obtained in step B51 Using contrastive learning, we calculate the contrastive loss for fact consistency. ; Consistent loss of facts The calculation is as follows: in, This indicates the number of data points in the training set DS. Indicates return and The larger value, These are boundary value constants. Indicates calculation and Cosine similarity between them.

7. The dialogue summarization method based on factual consistency comparison according to claim 6, characterized in that, Step B6 specifically includes the following steps: Step B61: Calculate the main task loss from the dialogue summary obtained in step B23. The loss of the auxiliary task is compared with the consistency of the facts obtained in step B52. The weighted sum is used to obtain the final loss function of the model. ; The model's final loss function The calculation is as follows: in, These are hyperparameters used to balance the impact of auxiliary tasks on the model; Step B62: Calculate the gradients of each parameter in the deep learning network model using the backpropagation method, and update each parameter using the stochastic gradient descent method.

8. A dialogue summarization system based on factual consistency comparison, characterized in that, It includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor, which, when executed by the processor, enable the implementation of the steps of the method as described in any one of claims 1-7.