Customized theme selection method based on theme dialogue

By calculating the correlation between global co-occurring topics and user personality and optimizing the user personality selector, the problem of insufficient personality differences and insufficient interaction modeling in the existing technology is solved, achieving more accurate topic selection and dialogue coherence, and generating Diverse responses.

CN118733755APending Publication Date: 2024-10-01HUAZHONG UNIV OF SCI & TECH +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410864371.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing topic-based dialogue systems suffer from insufficient personality differences when utilizing auxiliary information, resulting in inaccurate topic selection, and the interaction between personality and topics is not fully modeled, resulting in uneven topic jumps and misleading replies.

Method used

By calculating the correlation between global co-occurring topics and user personality, a multi-layer Transformer encoder and a contrastive learning objective function are used to optimize the user personality selector, suppress the influence of irrelevant personality information, and combine with the copy mechanism to generate replies.

Benefits of technology

It improves topic prediction accuracy and conversation coherence, effectively filters irrelevant personality information, and generates diverse and relevant responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733755A_ABST
    Figure CN118733755A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized theme selection method based on theme dialogues. The method comprises the following steps: 1) acquiring a history multi-turn dialogue context and a theme path of the dialogue context; 2) acquiring a set of predefined user personalities of the user u; 3) decoupling global topics under different personalities according to the correlation between the global co-occurrence topics and the user personalities; 4) selecting related user personality for each round of the historical dialogue; 5) for each round of dialogue, aggregating the global theme of the user personality to obtain a globally enhanced theme representation; 6) encoding a theme path after the global theme aggregation; 7) selecting personality related to the next target theme; 8) predicting a next target theme according to the selected user personality; and 9) generating a reply according to the predicted topic and the dialogue context. According to the method, the correlation between the global topic and the personality is measured, and the global topic with high correlation is utilized to extend the user personality representation, so that the topic prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to artificial intelligence technology, and in particular to a personalized topic selection method based on topic dialogue. Background Art

[0002] Dialogue systems have been widely used for task-specific interactions, such as customer service or emotional interactions. Early works tend to passively respond to user queries and may produce generic or irrelevant responses. However, real-world conversational scenarios often exhibit higher complexity, which requires dialogue agents to skillfully manage topics and actively guide the conversation. Although large language models, such as ChatGPT, exhibit very similar capabilities to humans, they fall short in topic management and exhibit suboptimal proactiveness. Therefore, topic-based dialogue systems (TGD) have recently attracted considerable attention, which can proactively predict the appropriate next topic and generate diverse and informative responses around new topics.

[0003] In fact, the core of topic-based dialogue systems lies in effectively utilizing various auxiliary information (i.e., global topics or user personalities) to accurately predict subsequent topics. The former fully models topic relevance based on the global topic transition sequence and infers subsequent topics through the adjacency relationship of adjacent topics in the global topic, while the latter considers all user personalities to model the user's topic selection preference.

[0004] Although existing research has made some progress, previous studies still face challenges in fully modeling auxiliary information. Due to the insufficient consideration of the connections between different auxiliary information, relevant and irrelevant information are integrated simultaneously when selecting personalities. This problem can be described from two perspectives: First, users with different personalities may choose different topics based on the same historical topics. Second, each selected topic may only be related to a specific part of the user's personality, rather than the entire personality. Existing methods indiscriminately encode multiple personalities in user personality files, resulting in models that may be misled by context-independent personalities and leading to non-smooth topic jumps. In addition, the lack of corresponding relationship labels between personality and topic brings additional challenges to modeling the interaction between auxiliary information and filtering irrelevant information. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a personalized topic selection method based on topic dialogue in view of the defects in the prior art.

[0006] The technical solution adopted by the present invention to solve the technical problem is: a personalized topic selection method based on topic dialogue, comprising the following steps:

[0007] 1) Obtain the historical multi-round dialogue context C and the topic path tp of the dialogue context C;

[0008] Where C = {c1, c2, …, c |C|} represents the multi-round dialogue context, tp={t1,t2,…,t |tp|}, where t j Refers to the topic discussed in round j;

[0009] 2) Get a set of predefined user personalities for user u

[0010] Among them, each user personality p i Described as a sentence

[0011] 3) For each topic t in the topic path j , calculate the correlation between global co-occurrence topics and user personalities to decouple global topics under different personalities;

[0012] User personality i and theme t j The corresponding score between ij The calculation is as follows:

[0013]

[0014] Where W∈R d×d is a learnable matrix, and Is the user's personality i and theme t j Embedding

[0015] According to the score calculation results, for each personality p i Sample the k most relevant topics as specific to personality p i Global Theme

[0016] 4) Select relevant user personalities for each turn of historical conversations;

[0017] According to the context User Embed u and topic representation The corresponding scores of user personality in each round are s i ' j Calculation:

[0018]

[0019] Among them, [;] represents the concat operation on multiple elements, and T represents matrix transposition;

[0020] 5) For each round of dialogue, aggregate the user-specific global topics corresponding to the relevant user personalities selected in step 4) to obtain a globally enhanced topic representation

[0021]

[0022] 6) Use a multi-layer Transformer encoder to encode the topic path after global topic aggregation to obtain the topic path representation after global topic aggregation;

[0023]

[0024] 7) Design a user personality selector, and use the user personality selector to select the personality related to the next target topic according to the topic path representation after global topic aggregation;

[0025] Use user personality to predict the next topic as follows:

[0026]

[0027] Where W∈R d×d is a learnable matrix, Is the user's personality i and theme t j Embedding

[0028] The objective function of contrastive learning is defined as follows:

[0029]

[0030] in, is the embedding vector of the target topic;

[0031] Among them, it means and

[0032]

[0033] Among them, each weight in the negative personality set is converted to a negative value, thereby increasing the weight of irrelevant user personalities in the negative set representation;

[0034]

[0035] H C is the dialogue context representation, e u is user embedded, is the topic path representation after global topic aggregation, is represented by the positive user personality set;

[0036] The contrastive learning objective function aims to increase the difference in prediction scores of subsequent correct topics between the positive and negative user personality sets. Consistent with intuition, relevant user personalities tend to predict correct topics, while irrelevant user personalities tend to predict wrong topics. Through this auxiliary task, the present invention cleverly transforms topic annotations into supervisory signals of relevant user personalities to optimize the user personality selector.

[0037] 8) Predict the next target topic based on the selected user personality;

[0038] The probability of each topic being selected is defined as p(t i ):

[0039]

[0040] in,

[0041] 9) Generate responses based on the predicted topic and conversation context;

[0042] Reply Generation: We use a Transformer decoder with a replication mechanism to generate replies. For each word in reply generation, at step z, the historically generated word embedding Together with other auxiliary information, it is input into the decoder to generate the current character.

[0043]

[0044] Generate word w ζ The probability is the generation probability p g (w ζ ) and the replication probability p c (w ζ ) is the sum of:

[0045] p(w ζ )=p g (w ζ )+p c (w ζ ),

[0046] p g (w ζ )=fh t ,e wζ / ,

[0047] p c (w ζ )=f(h t ,h wζ ),w ζ ∈C,t i ,

[0048] The present invention uses the conversation context and the encoder output h of the selected topic wζ As the source vocabulary set of the replication mechanism. Like topic selection, the present invention also uses the cross entropy function to optimize the model parameters of the reply generation part.

[0049]

[0050] The beneficial effects produced by the present invention are:

[0051] 1. The present invention measures the correlation between global topics and personality, uses highly correlated global topics to expand user personality representation, and improves topic prediction accuracy, thereby effectively improving user participation and conversation coherence.

[0052] 2. The present invention proposes a personality selector based on contrastive learning to suppress the influence of irrelevant personality on topic selection, that is, it is used to filter the influence of irrelevant personality information under the constraint of lack of relevant personality annotations. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0054] Figure 1 It is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0056] like Figure 1 As shown, a personalized topic selection method based on topic dialogue includes the following steps:

[0057] 1) Obtain the historical multi-round dialogue context C and the topic path tp of the dialogue context C;

[0058] Where C = {c1, c2, …, c |C|} represents the multi-round dialogue context, tp={t1,t2,…,t |tp|}, where t j Refers to the topic discussed in round j;

[0059] 2) Get a set of predefined user personalities for user u

[0060] Among them, each user personality p i Described as a sentence

[0061] 3) For each topic t in the topic path j , calculate the correlation between global co-occurrence topics and user personalities to decouple global topics under different personalities;

[0062] User personality i and theme t j The corresponding score between ij The calculation is as follows:

[0063]

[0064] Where W∈R d×d is a learnable matrix, and Is the user's personality i and theme t j Embedding

[0065] According to the score calculation results, for each personality p i Sample the k most relevant topics as specific to personality p i Global Theme

[0066] 4) Select relevant user personalities for each turn of historical conversations;

[0067] According to the context User Embed u and topic representation The corresponding scores of user personality in each round are s i ' j Calculation:

[0068]

[0069] Among them, [;] represents the concat operation on multiple elements, and T represents matrix transposition;

[0070] 5) For each round of dialogue, aggregate the user-specific global topics corresponding to the relevant user personalities selected in step 4) to obtain a globally enhanced topic representation

[0071]

[0072] 6) Use a multi-layer Transformer encoder to encode the topic path after global topic aggregation.

[0073]

[0074] 7) Design a user personality selector and use the user personality selector to select a personality related to the next target topic;

[0075] Use user personality to predict the next topic as follows:

[0076]

[0077] Where W∈R d×d is a learnable matrix, Is the user's personality i and theme t j Embedding

[0078] The objective function of contrastive learning is defined as follows:

[0079]

[0080] in, is the embedding vector of the target topic;

[0081] in, and It is expressed as follows:

[0082]

[0083] Among them, each weight in the negative personality set is converted to a negative value, thereby increasing the weight of irrelevant user personalities in the negative set representation;

[0084]

[0085] H C is the dialogue context representation, e u is user embedded, is the topic path representation after global topic aggregation, is represented by the positive user personality set;

[0086] The contrastive learning objective function aims to increase the difference in prediction scores of subsequent correct topics between the positive and negative user personality sets. Consistent with intuition, relevant user personalities tend to predict correct topics, while irrelevant user personalities tend to predict wrong topics. Through this auxiliary task, the present invention cleverly transforms topic annotations into supervisory signals of relevant user personalities to optimize the user personality selector.

[0087] 8) Predict the next target topic based on the selected user personality;

[0088] The probability of each topic being selected is defined as p(t i ):

[0089]

[0090] in,

[0091] 9) Generate responses based on the predicted topic and conversation context;

[0092] Reply Generation: We use a Transformer decoder with a replication mechanism to generate replies. For each word in reply generation, at step z, the historically generated word embedding Together with other auxiliary information, it is input into the decoder to generate the current character.

[0093]

[0094] Generate word w ζ The probability is the generation probability p g (w ζ ) and the replication probability p c (w ζ ) is the sum of:

[0095] p(w ζ )=p g (w ζ )+p c (w ζ ),

[0096] p g (w ζ )=fh t ,e wζ / ,

[0097] p c (w ζ )=f(h t ,h wζ ),w ζ ∈C,t i ,

[0098] The present invention uses the conversation context and the encoder output h of the selected topic wζ As the source vocabulary set of the replication mechanism. Like topic selection, the present invention also uses the cross entropy function to optimize the model parameters of the reply generation part.

[0099]

[0100] Experimental evaluation:

[0101] Experiments show that the proposed method outperforms the SOTA baseline method in different evaluation indicators and can generate diverse and relevant responses. The experiments are evaluated on two benchmark dialogue datasets, namely the TG-ReDial dataset and the Persona-Chat dataset. The detailed information of the datasets is shown in Table 1.

[0102] Table 1 Dataset information

[0103]

[0104] In order to demonstrate the effectiveness of the method of the present invention, it is compared with three types of baselines.

[0105] 1) Knowledge-based methods: DKRN proposes a topic selection method for explicit knowledge routing. CKC models topic transitions on common sense graphs and uses graph neural networks to model the correlation between topics. ECCF extends high-frequency topic transitions to common sense graphs and aggregates neighborhood information using relation-aware attention.

[0106] 2) Global Topic Based Methods: CG-nAR constructs a topic global transition graph for topic selection and designs a non-autoregressive Transformer decoder for reply generation. SGTA introduces a latent space for flexibly combining global topic transition probabilities with sequence topic prediction probabilities.

[0107] 3) User-based methods: Profile-Bert, TG-CRS first introduced profile information for conversation topic selection. Profile-Bert uses a pre-trained language model to encode semantic information in all user personalities for topic selection. TG-CRS uses user profiles, conversation context, and topic sequences for topic selection. UPCR uses user embeddings and conversation history to model long-term and short-term user interests respectively for topic selection.

[0108] The experimental part aims to evaluate the effectiveness of the proposed method on different datasets. Specifically, the effectiveness of the proposed method is evaluated in two modules: topic selection and reply generation. For topic selection, the present invention selects Hit@k (k = 1, 3, 5) as the model evaluation index; for reply generation, the present invention selects Perplexity (PPL), BLEU-1 and Distinct-1 as the evaluation index. The experimental comparison results are given in Tables 2 and 3.

[0109] Table 2 Comparison experimental results of dialogue systems on the TG-ReDial dataset

[0110]

[0111]

[0112] Table 3 Comparative experimental results of dialogue systems on the Persona-Chat dataset

[0113]

[0114] Topic Selection Performance: Our method consistently outperforms all baselines, achieving an average performance increase of 4.90%, 3.64%, and 3.17% on Hit@1 / 3 / 5. This improvement is attributed to our method filtering out irrelevant information from the global topic and user personality sets, which enables us to more accurately utilize auxiliary information to select conversation topics. Overall, global topic-based methods tend to outperform knowledge-based methods because they are able to incorporate other topic paths and capture the correlations between different conversations. However, global topic-based methods ignore the impact of user personality on topic transitions and treat global information under different user personalities equally. In contrast, our method considers global topics under different user personalities differently compared to global topic-based methods, resulting in improved performance. Due to the incorporation of user personality information, user-based methods almost achieve the best results on the overall baselines. It is worth noting that the poor performance of Profile-BERT stems from its failure to dynamically model the user personality exhibited by users during the conversation and using the full user personality, resulting in noise that seriously interferes with topic selection. UPCR achieves the best experimental performance among all baselines because it uses user embeddings and topic paths to model both long-term and short-term user preferences. However, these user-based methods either consider the complete user personality or rely only on user embeddings, which do not adequately address the problem of irrelevant information in the user personality set. We design a personality selector and optimize it using a contrastive learning-based topic selection auxiliary task to reduce the irrelevant information in the user personality set. In summary, compared with the state-of-the-art baselines, we demonstrate the ability to provide more personalized and coherent topic selection by considering fine-grained user personality.

[0115] Reply Generation Performance: Overall, SGTA and UPCR achieve better experimental results among all baselines. SGTA’s performance comes from considering multiple latent topics simultaneously during dialogue generation. UPCR’s performance enhancement comes from using user embeddings as user features during generation. Our method achieves the best performance, with an average improvement of 9.4% and 25.9% in Bleu and Distinct metrics, respectively, compared to the current state-of-the-art baselines. The significant improvement in our performance comes from a more accurate selection of topics and user personalities.

[0116] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.

Claims

1. A personalized topic selection method based on topic dialogue, characterized in that: The following steps are involved: 1) Obtain the historical multi-round dialogue context C and the topic path tp of the dialogue context C; Where C = {c1, c2, …, c |C| } represents the multi-round dialogue context, tp={t1,t2,…,t |tp| }, where t j Refers to the topic discussed in round j; 2) Get a set of predefined user personalities for user u 3) For each topic t in the topic path j , based on the correlation between global co-occurring topics and user personalities, we decouple global topics under different personalities; For each personality i Sample the k most relevant topics as specific to personality p i Global Theme 4) Select relevant user personalities for each turn of historical conversations; 5) For each round of dialogue, aggregate the user-specific global topics corresponding to the relevant user personalities selected in step 4) to obtain a globally enhanced topic representation 6) Encode the topic path after global topic aggregation; 7) According to the topic path representation after global topic aggregation, a user personality selector is used to select the personality related to the next target topic; 8) Predict the next target topic based on the selected user personality; 9) Generate responses based on the predicted topic and conversation context.

2. The personalized topic selection method based on topic dialogue according to claim 1 is characterized in that: In step 3), for each personality p i Sample the k most relevant topics as specific to personality p i Global Theme T pi ; The details are as follows: Calculate user personality p i and theme t j The corresponding score s between ij : Where W∈R d×d is a learnable matrix, and Is the user's personality i and theme t j Embedding According to the score calculation results, for each personality p i Sample the k most relevant topics as specific to personality p i Global Theme 3. The personalized topic selection method based on topic dialogue according to claim 1 is characterized in that: In step 4), select the relevant user personality, as follows: According to the context User Embed u and topic representation The corresponding scores of user personality in each round are s i ' j Calculate, and select relevant user personalities based on the score calculation results; Among them, [;] represents the concat operation on multiple elements, and T represents matrix transpose.

4. The personalized topic selection method based on topic dialogue according to claim 1, characterized in that: In the step 6), a multi-layer Transformer encoder is used to encode the topic path after global topic aggregation to obtain a topic path representation after global topic aggregation; 5. The personalized topic selection method based on topic dialogue according to claim 1 is characterized in that: In step 7), the user personality selector is designed as follows: Use user personality to predict the next topic as follows: Where W∈R d×d is a learnable matrix, and Is the user's personality i and theme t j Embedding The objective function of contrastive learning is defined as follows: in, is the embedding vector of the target topic; Among them, the user's positive personality set represents and negative personality set It is expressed as follows: Among them, each weight in the negative personality set is converted to a negative value, thereby increasing the weight of irrelevant user personalities in the negative set representation; H C is the dialogue context representation, e u is user embedded, is the topic path representation after global topic aggregation, Represents a positive user personality set.

6. The personalized topic selection method based on topic dialogue according to claim 1, characterized in that: In the step 8), The probability p(t i ) is calculated as follows: in, 7. The personalized topic selection method based on topic dialogue according to claim 1, characterized in that: In step 9), the response generation uses a Transformer decoder with a replication mechanism to generate the response.

8. The personalized topic selection method based on topic dialogue according to claim 1, characterized in that: In step 9), for each word in the response generation, the historically generated word embedding Together with other auxiliary information, it is input into the decoder to generate the current character; Generate word w ζ The probability of generating is pg(w ζ ) and the replication probability pc(w ζ ) is the sum of: p(Wζ)=Pg(Wζ)+pe(Wg) Encoder output using conversation context and selected topic The source vocabulary set that serves as the replication mechanism.

9. An electronic device, characterized in that: include: one or more processors; as well as a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to any one of claims 1 to 8.

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

Citation Information

Cited By

  • Multi-user mixed interactive data processing method and system based on large model

    CN121118904A