CN112487169A - Meta-learning-based personalized dialogue rewriting method - Google Patents

Meta-learning-based personalized dialogue rewriting method Download PDF

Info

Publication number
CN112487169A
CN112487169A CN202011457909.1A CN202011457909A CN112487169A CN 112487169 A CN112487169 A CN 112487169A CN 202011457909 A CN202011457909 A CN 202011457909A CN 112487169 A CN112487169 A CN 112487169A
Authority
CN
China
Prior art keywords
model
rewriting
parameters
dialogue
learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011457909.1A
Other languages
Chinese (zh)
Other versions
CN112487169B (en
Inventor
孙忆南
李思
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202011457909.1A priority Critical patent/CN112487169B/en
Publication of CN112487169A publication Critical patent/CN112487169A/en
Application granted granted Critical
Publication of CN112487169B publication Critical patent/CN112487169B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Abstract

The invention discloses a meta-learning-based personalized dialogue rewriting method, and belongs to the field of natural language processing. The basic idea of this approach is to mitigate the over-fitting problem in personalized dialog rewriting through meta-learning. The method comprises the following steps: a plurality of related personalized dialogue rewriting tasks are constructed based on different user portrait data, and combined training is performed on the related tasks through meta-learning to obtain model parameters sensitive to new tasks. When facing a new task, the model initialized by the parameters is used for training so as to obtain a personalized dialogue rewriting model facing the new task. By utilizing the embodiment of the invention, the model can have the capability of rapidly learning the related tasks. When the model is used on new task data, the model does not need to be learned from the beginning, but is quickly fitted on the new task based on the existing ability of quickly learning the tasks, so that the over-fitting problem is weakened, the effect of personalized dialogue rewriting is improved, and the practical value is high.

Description

Meta-learning-based personalized dialogue rewriting method
Technical Field
The invention relates to the field of natural language processing, in particular to a personalized dialogue rewriting method based on meta-learning.
Background
With the development of dialog generation technology, people do not want to let machines simply generate dialogs according to user input, but want machines to have personalized features such as gender, hobbies, emotion, and the like. Existing methods provide for machine-generated dialog with personalized features by combining machine-generated replies with user portrait information. This requires the manual construction of the rewriting data of the original dialog data for the user portrait information, thereby enabling the personalized rewriting of machine generated dialogs. However, due to the labor cost, the amount of rewriting data per user profile is not sufficient to adequately train the depth model, and thus, using the depth model may cause some degree of overfitting.
In contrast to depth models, humans can make judicious use of past experiences and take actions to adapt to a variety of new situations. For a new task, humans can use past experience to solve, rather than through mass data from the beginning. For example, a cyclist may learn to ride a motorcycle using his experience while riding a bicycle. Meta-learning is a key step towards this direction, and they can continuously learn various related tasks in their life cycle, and when facing new tasks, can be quickly fitted by a small number of supervised samples.
Therefore, the patent proposes a personalized dialogue rewriting method based on meta-learning. Firstly, a plurality of personalized dialogue rewriting tasks with user portrait information are regarded as a plurality of related tasks, a model is trained by using a meta-learning algorithm, model initialization parameters sensitive to a new task are obtained, and when the model is oriented to the new task, the model can be quickly fitted under the condition of a small amount of training data, so that the over-fitting problem is relieved to a certain extent.
Disclosure of Invention
The patent provides a personalized dialogue rewriting method based on meta-learning. The model learns a plurality of related tasks in a training phase, so that an initialization parameter sensitive to new task data is obtained, and when facing a new task, the model parameter can be quickly fitted under the condition of a small amount of supervision information, so that the model is used for a conversation rewriting task based on a new user portrait.
A personalized dialogue rewriting method based on meta-learning comprises the following steps:
step S1: constructing dialogue rewriting data for each user portrait, and dividing the dialogue rewriting data into a support set and a query set for model training;
step S2: initializing a coder-decoder model parameter, inputting a model into user image information and an original dialogue, and outputting a rewritten dialogue;
step S3: for the rewriting data constructed by each user portrait, using a support set training model to update model parameters, and then using a query set to obtain gradient information of parameter update;
step S4: updating the parameters of the initialized encoder-decoder model in step 2 using the gradient information obtained on the query set of each task, obtaining model parameters for the downstream tasks;
step S5: for the new session rewrite task, the initialization parameter initialization model obtained in step S4 is used to train on new rewrite data, and then the new rewrite data can be used for session rewrite based on new user image information.
The invention has the beneficial effects that: by constructing multiple related tasks, multitask training using a meta-learning algorithm may enable a model to learn how to quickly learn such tasks, when the model is used on new task data, without learning from scratch, but rather quickly fitting on the new task's training data based on the existing ability to quickly learn such tasks.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a personalized dialog rewriting method based on meta-learning according to the present invention.
Fig. 2 is a structural diagram of an encoder-decoder model for a meta-learning based personalized dialog rewriting method according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the present invention discloses a personalized dialogue rewriting method based on meta-learning, which comprises the following steps:
step S1: constructing dialogue rewriting data for each user portrait, and dividing the dialogue rewriting data into a support set and a query set for model training;
(1.1) constructing n pieces of relevant task data D ═ D for n pieces of user portrait information1,D2,…,DnIn which D isi={Pi,Xi,Yi1,2, …, n. P is user portrait text information, X is original dialogue data, Y is rewritten dialogue data;
(1.2) data D of each taskiIs divided into supporting sets SiAnd query set QiData partitioning can be done empirically as 8:2 or 7: 3.
Step S2: the encoder-decoder model parameters Φ are initialized, the model inputs being user portrait information P and original dialog X, and the output being rewritten dialog Y. The structure of the encoder-decoder model is shown in fig. 2, and the model forward propagation steps are as follows:
(2.1) semantic coding the user portrait information P and the original dialog X respectively by using an encoder to obtain a user portrait representation vector VPAnd the original dialog representation vector VX
VP=Encoder(P)
VX=Encoder(X)
The Encoder may use BERT (Bidirectional Encoder retrieval from transforms), models or other BERT-derived models, or may use long-short term memory network (LSTM) or gated round robin unit (GRU, etc. sequence models.
(2.2) user representation vector VPAnd the original dialog representation vector VXPerforming vector splicing as semantic coding vector V output by the coderE=[VP;VX]Wherein; representing a concatenation operation of the vectors.
(2.3) encoding the semantic code vector VEAs input to the decoder module, the decoder outputs one word y in the vocabulary each cycleiI 1,2, …, l until the output end symbol or the defined length is reached. Finally obtaining the rewrite dialogue Y ═ Y of decoder output1,y2,…,yl}. During decoding, a user-portrait-based representation vector V may also be introducedPThe attention mechanism of (1).
Through the steps, the encoder-decoder model can realize the functions of inputting user image information and original dialogue and outputting rewritten dialogue through training
Step S3: overwrite dataset D constructed for each user ProfileiUsing a supporting set SiTraining the model and updating the model parameter thetaiReuse query set QiObtaining gradient information g of parameter updatei
(3.1) rewrite data D constructed for each user profileiUsing a supporting set SiThe training parameter is the encoder-decoder model with the initialization parameter phi in the step 2, and the model parameter after training is changed into the related parameter theta of the current taski
(3.2) Using query set QiThe training parameter is a current task related parameter thetaiThe encoder-decoder model of (1), preserving gradient information giThe gradient information giFor updating the parameter Φ in step S4.
Step S4: using gradient information g obtained on a per-task query setiUpdating the parameters phi of the initialized coder-decoder model in the step 2 to obtain model parameters phi for the downstream task:
Figure BDA0002830061100000031
where α is the learning rate, i denotes the ith task, i is 1,2, …, n.
Step S5: for a new session rewrite task, the initialization parameter φ initialization model obtained in step S4 is used to train new rewrite data and then to be used for session rewrite based on new user image information.
The detailed implementation of the proposed personalized dialog rewriting method based on meta-learning and each module is described above with reference to the accompanying drawings. The method has the advantages that the multiple related tasks are constructed, the model can learn the ability of how to quickly learn the tasks by using the meta-learning algorithm for multi-task training, when the model is used on new task data, the model does not need to learn from the beginning, but is quickly fitted on the training data of the new task based on the existing ability of quickly learning the tasks. For the task of rewriting the personalized dialog with few samples, the method can effectively relieve the overfitting problem generated by training the complex model by using a small amount of data, thereby improving the effect of rewriting the personalized dialog.
The technical scheme discloses the improvement point of the invention, and technical contents which are not disclosed in detail can be realized by the prior art by a person skilled in the art.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (2)

1. A personalized dialogue rewriting method based on meta-learning is characterized by comprising the following steps:
step 1: constructing dialogue rewriting data for each user portrait, and dividing the dialogue rewriting data into a support set and a query set for model training;
step 2: initializing a coder-decoder model parameter, inputting a model into user image information and an original dialogue, and outputting a rewritten dialogue;
and step 3: for the rewriting data constructed by each user portrait, using a support set training model to update model parameters, and then using a query set to obtain gradient information of parameter update;
and 4, step 4: updating the parameters of the initialized encoder-decoder model in step 2 using the gradient information obtained on the query set of each task, obtaining model parameters for the downstream tasks;
and 5: for a new session rewrite task, the parameter initialization model obtained in step 4 is used to train on the training data of the new task, and then the new session rewrite task can be used for the session rewrite based on the new user portrait information.
2. The method for rewriting a personalized dialog based on meta-learning according to claim 1, wherein the step 3 specifically comprises:
(3.1) aiming at the rewriting data constructed by each user portrait, using a coder-decoder model with support set training parameters as initialization parameters in the step 2, and changing the model parameters after training into the related parameters of the current task;
(3.2) training the encoder-decoder model with the parameters as current task-related parameters using the query set, preserving gradient information, which is used to update the initialization parameters in step 4.
CN202011457909.1A 2020-12-11 2020-12-11 Meta-learning-based personalized dialogue rewriting method Active CN112487169B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011457909.1A CN112487169B (en) 2020-12-11 2020-12-11 Meta-learning-based personalized dialogue rewriting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011457909.1A CN112487169B (en) 2020-12-11 2020-12-11 Meta-learning-based personalized dialogue rewriting method

Publications (2)

Publication Number Publication Date
CN112487169A true CN112487169A (en) 2021-03-12
CN112487169B CN112487169B (en) 2023-02-07

Family

ID=74916657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011457909.1A Active CN112487169B (en) 2020-12-11 2020-12-11 Meta-learning-based personalized dialogue rewriting method

Country Status (1)

Country Link
CN (1) CN112487169B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113435213A (en) * 2021-07-09 2021-09-24 支付宝(杭州)信息技术有限公司 Method and device for returning answers aiming at user questions and knowledge base

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978836A (en) * 2019-03-06 2019-07-05 华南理工大学 User individual image esthetic evaluation method, system, medium and equipment based on meta learning
US20200257970A1 (en) * 2019-02-08 2020-08-13 Korea Advanced Institute Of Science And Technology Data processing apparatus by learning of neural network, data processing method by learning of neural network, and recording medium recording the data processing method
CN111724083A (en) * 2020-07-21 2020-09-29 腾讯科技(深圳)有限公司 Training method and device for financial risk recognition model, computer equipment and medium
CN111858991A (en) * 2020-08-06 2020-10-30 南京大学 Small sample learning algorithm based on covariance measurement

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200257970A1 (en) * 2019-02-08 2020-08-13 Korea Advanced Institute Of Science And Technology Data processing apparatus by learning of neural network, data processing method by learning of neural network, and recording medium recording the data processing method
CN109978836A (en) * 2019-03-06 2019-07-05 华南理工大学 User individual image esthetic evaluation method, system, medium and equipment based on meta learning
CN111724083A (en) * 2020-07-21 2020-09-29 腾讯科技(深圳)有限公司 Training method and device for financial risk recognition model, computer equipment and medium
CN111858991A (en) * 2020-08-06 2020-10-30 南京大学 Small sample learning algorithm based on covariance measurement

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KUN QIAN 等: "Domain Adaptive Dialog Generation via Meta Learning", 《ARXIV:1906.03520V2》 *
XIWEN CHEN 等: "ST2: Small-data Text Style Transfer via Multi-task Meta-Learning", 《ARXIV:2004.11742V1》 *
刘芷宁: "模型无关的元学习:learn to learn", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/54201997》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113435213A (en) * 2021-07-09 2021-09-24 支付宝(杭州)信息技术有限公司 Method and device for returning answers aiming at user questions and knowledge base
CN113435213B (en) * 2021-07-09 2024-04-30 支付宝(杭州)信息技术有限公司 Method and device for returning answers to user questions and knowledge base

Also Published As

Publication number Publication date
CN112487169B (en) 2023-02-07

Similar Documents

Publication Publication Date Title
CN110418210B (en) Video description generation method based on bidirectional cyclic neural network and depth output
CN106502985B (en) neural network modeling method and device for generating titles
CN109522403B (en) Abstract text generation method based on fusion coding
WO2020088330A1 (en) Latent space and text-based generative adversarial networks (latext-gans) for text generation
CN111859978A (en) Emotion text generation method based on deep learning
CN111666756B (en) Sequence model text abstract generation method based on theme fusion
CN108256066B (en) End-to-end hierarchical decoding task type dialogue system
CN110427605A (en) The Ellipsis recovering method understood towards short text
CN112183058B (en) Poetry generation method and device based on BERT sentence vector input
CN112417092A (en) Intelligent text automatic generation system based on deep learning and implementation method thereof
CN112560456A (en) Generation type abstract generation method and system based on improved neural network
CN112256857B (en) Dialogue history modeling method based on graph attention machine mechanism
CN112183109B (en) MASS-based poetry sentence generation information steganography method
CN108363685B (en) Self-media data text representation method based on recursive variation self-coding model
CN112487169B (en) Meta-learning-based personalized dialogue rewriting method
CN113033182A (en) Text creation auxiliary method and device and server
CN115759042A (en) Sentence-level problem generation method based on syntax perception prompt learning
CN115906815A (en) Error correction method and device for modifying one or more types of wrong sentences
CN111831783A (en) Chapter-level relation extraction method
Mathur et al. A scaled‐down neural conversational model for chatbots
CN111428518A (en) Low-frequency word translation method and device
CN114925658B (en) Open text generation method and storage medium
CN114519353B (en) Model training method, emotion message generation method and device, equipment and medium
CN112434143B (en) Dialog method, storage medium and system based on hidden state constraint of GRU (generalized regression Unit)
CN112287641B (en) Synonym sentence generating method, system, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant