Interactive device and learning method

The dialogue device with a topic steering layer enhances LLMs by adapting them to target domains efficiently, addressing resource costs and knowledge loss issues.

JP2025136787AActive Publication Date: 2025-09-19NTT COMWARE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024035636
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-08
Publication Date
2025-09-19
Estimated Expiration
2044-03-08

AI Technical Summary

Technical Problem

Large language models (LLMs) require expensive computational resources for additional training and can suffer from catastrophic forgetting, losing knowledge from the source domain during adaptation to a target domain.

Method used

A dialogue device equipped with a deep learning model featuring a topic steering layer that classifies and adapts the output of a language model to the target domain, using an objective function to improve word prediction accuracy and reflect target domain knowledge.

Benefits of technology

Enables additional learning of LLMs to effectively incorporate target domain knowledge, reducing computational costs and preventing knowledge loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025136787000001_ABST
    Figure 2025136787000001_ABST
Patent Text Reader

Abstract

To additionally train an LLM so as to reflect knowledge of a target domain.SOLUTION: A deep learning model includes a TSL on an LLM, for classifying output from the LLM into topics specific to a target domain to reflect the topic to the output from the LLM. A learning unit 10 receives input of a text group relating to the target domain as learning data to learn the deep learning model by using an objective function LTLM for enhancing prediction accuracy of a word based on a context and the topic and an objective function LTDM for making a feature TIDd of a text d and a classification zd of the text d, which are based on the output of the LLM, close to each other.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an interactive device and a learning method. [Background technology]

[0002] In recent years, text generation using large language models (LLMs) has attracted attention in the field of AI, and its range of applications is expanding. LLMs are trained from large amounts of data, or source domain data, and the resulting models can be used as is. Depending on the target domain in which the LLM is used, additional training is being considered to accommodate target data and tasks specific to the target domain. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Li, XL and Liang, P. “Prefix-tuning: Optimizing continuous prompts for generation,” In ACL / IJCNLP, pp. 4582-4597, 2021. [Non-patent document 2] Gururangan, S. and et al. “Don't stop pretraining: adapt language models to domains and tasks,”pp. 8342-8360, 2020. Summary of the Invention [Problem to be solved by the invention]

[0004] Generally, LLMs are large-scale models, which means that the computational resources required for additional training are expensive. Furthermore, additional training can lead to catastrophic forgetting, which causes the model to forget knowledge from the source domain.

[0005] The present disclosure has been made in consideration of the above, and aims to additionally learn LLMs that reflect knowledge of the target domain. [Means for solving the problem]

[0006] A dialogue device according to one aspect of the present disclosure includes a deep learning model on top of a language model, the deep learning model having a topic steering layer that classifies the output of the language model into semantic categories specific to a target domain and changes the output of the language model according to the semantic categories, and an input / output unit that inputs seed words into the deep learning model and outputs answers.

[0007] A learning method according to one aspect of the present disclosure is a method for learning a deep learning model, the deep learning model comprising a language model and a topic steering layer on top of the language model that classifies the output of the language model into semantic categories specific to a target domain and changes the output of the language model in accordance with the semantic categories, and the deep learning model is trained by inputting a group of texts related to the target domain as training data, using an objective function for improving word prediction accuracy based on context and semantic categories, and an objective function for approximating the features of text based on the output of the language model to the classification of the semantic category of the text. [Effects of the Invention]

[0008] According to the present disclosure, LLM can be additionally learned to reflect knowledge of the target domain. [Brief explanation of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram illustrating an example of the configuration of a dialogue system. [Figure 2] FIG. 2 is a diagram for explaining a source domain and a target domain. [Figure 3] FIG. 3 shows an example of topic distribution and word distribution in the source domain and the target domain. [Figure 4] FIG. 4 is a diagram illustrating an example of the proposed model. [Figure 5] FIG. 5 is a diagram illustrating an example of a Topic Steering Layer. [Figure 6] FIG. 6 is a flowchart showing an example of the flow of the learning process. DETAILED DESCRIPTION OF THE INVENTION

[0010] [System Configuration] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.

[0011] 1 is a diagram showing an example of the configuration of a dialogue system including an LLM according to this embodiment. The dialogue system 1 has an LLM that has undergone additional learning on a target domain, accepts questions from a user terminal 5, inputs them into the LLM, and returns the obtained answers to the user terminal 5.

[0012] The dialogue system 1 shown in Fig. 1 includes a learning unit 10, an input / output unit 20, a data storage unit 30, and a calculation result storage unit 40. Each unit included in the dialogue system 1 may be configured by at least one computer equipped with an arithmetic processing unit, a storage device, etc., and the processing of each unit may be executed by a program. This program is stored in a storage device included in the dialogue system 1, and can also be recorded on a computer-readable non-transitory recording medium such as a magnetic disk, optical disk, or semiconductor memory, or provided via a network.

[0013] The learning unit 10 incrementally learns the LLM using a domain adaptation framework, which will be described later.

[0014] The learning unit 10 includes a pre-processing unit 11 and a calculation processing unit 12 .

[0015] The pre-processing unit 11 sets various parameters of the deep learning model, acquires a group of texts for learning the target domain from the data storage unit 30, and divides each of the texts into tokens.

[0016] The calculation processing unit 12 inputs tokens into a deep learning model and learns the parameters of the deep learning model so as to minimize an objective function. In this embodiment, a Topic Steering Layer (TSL) is provided at the top layer of the LLM, and Topic Distribution Modeling (TDM) is introduced as a learning task. TDM evaluates the proximity of input units (text) in the representation format (topic) in TSL.

[0017] The input / output unit 20 inputs a seed word (for example, a question) from the user terminal 5, inputs it into the trained deep learning model, and returns an answer.

[0018] The data storage unit 30 stores learning data for the target domain, such as a text group related to the target domain.

[0019] The calculation result storage unit 40 stores the parameters of the deep learning model learned by the learning unit 10.

[0020] [Proposed model] 2 and 3, an overview of the domain adaptation framework for LLM proposed in this disclosure will be described.

[0021] The source domain in Figure 2 is the domain that LLM has learned from a large amount of data. The target domain is the domain that is included in the text of the matching domain. Since the data that LLM learns from is not all there is in the world, there are parts that do not include the target domain, as shown on the right side of Figure 2. The part that differs between the source domain and the target domain is called the domain gap. The overlapping part is the part that is included in both the source domain and the target domain.

[0022] Consider the difference between the source domain and the target domain in terms of topics. A topic is a classification based on meaning. Figure 3 shows an example of the topic distribution in the source domain and the target domain. It is thought that the topic distribution in the source domain will be different from the topic distribution in the target domain. The source domain has a high proportion of linguistic knowledge topics, while the target domain has a high proportion of topics specific to the target domain. Because the topic distribution in the source domain and the target domain is different, it is thought that the distribution of words that appear will also be different.

[0023] Therefore, in this disclosure, we have equipped a TSL that uses words (tokens) from topics with a high proportion in the source domain as they are, and reflects the distribution of words in the target domain for topics with a high proportion in the target domain, and trained the TSL to achieve domain adaptation of the LLM.

[0024] FIG. 4 shows an example of the configuration of the model of this embodiment. In this embodiment, a TSL is introduced above the L layer of the Transformer decoder. The output of the top layer of the Transformer is input to the TSL. The TSL replaces the output of the top layer. When a word (token) is input to the Transformer decoder, the word following the input word is output.

[0025] An example of the configuration of TSL is shown in Figure 5. The output of the top (Lth) layer of the Transformer that is input to TSL is expressed by the following equation.

[0026]

number

[0027] TSL is expressed by the following formula:

[0028]

number

[0029] where z t is a variable representing the topic of the t-th word, and x d,1:t-1 are the 1st to t-1th words of text d, and x d,t is the tth word, T e is the temperature coefficient. V,Z,d h is the dimensionality of the Transformer, V is the number of tokens, Z is the number of topics, and d h is the number of shared dimensions. V ,g z ,W az ,b z ,W Z is a parameter that is updated during model training.

[0030] LayerNorm(h L,t )W Z Topic z t Infer F(h L,t ,z t ) to infer the next word that fits the target domain. t If z = 0, the output of the top layer of the Transformer, which is the linguistic knowledge and source domain knowledge, is output as is. t If it is >0, one of the above transformation formulas is arbitrarily selected, and knowledge of the target domain is reflected in the output of the top layer of the Transformer.

[0031] The above is a TSL that applies to the Decoder, but it can also be applied to the Encoder using the following formula: x d,¬t is x d From x d,t represents the result excluding

[0032]

number

[0033] Next, the objective function used in model learning will be described.

[0034] The learning task TDM for learning topic distributions is expressed as follows:

[0035]

number

[0036] where B is the batch and z i is the LayerNorm(h L,t ) to W Z The sum of all tokens multiplied by TID i is the final output of [CLS] in Figure 4. Using the above formula, topics are learned so that the similarity between text i and text j on TSL is close to the similarity obtained from [CLS].

[0037] The objective function including language learning and TDM is expressed as follows:

[0038]

number

[0039] where D is the number of texts in the batch, x d is the number of words (tokens) in text d.

[0040] L TLM is the context (x d,1:t-1 ) and topic z t This is an objective function for improving the word prediction accuracy based on

[0041] The learning unit 10 calculates the above objective function L TigerUpdate the parameters to minimize

[0042] [Operation] Next, an example of the flow of the learning process will be described with reference to the flowchart of FIG.

[0043] In step S11, the learning unit 10 acquires a group of learning texts for the target domain from the data storage unit 30, and divides each of the texts into tokens.

[0044] In step S12, the learning unit 10 calculates the above objective function L Tiger The model parameters are updated so as to minimize the value of , and the updated parameters are stored in the calculation result storage unit 40.

[0045] As explained above, the proposed deep learning model is equipped with a TSL on top of the LLM, which classifies the output of the LLM into topics specific to the target domain and reflects the topics in the output of the LLM. This enables us to provide a language model adapted to the target domain.

[0046] The learning unit 10 inputs a group of texts related to the target domain as learning data, and calculates an objective function L for improving the accuracy of word prediction based on context and topic. TLM and feature TID of text d based on the output of LLM. d and classification of topics in text d d The objective function L to approximate TDM This allows for additional learning of the LLM, reflecting knowledge of the target domain. [Explanation of symbols]

[0047] 1. Dialogue System 10 Learning Department 11 Pre-processing section 12. Computational Processing Unit 20 Input / output section 30 Data storage section 40 Calculation result storage section 5. User terminal

Claims

1. a deep learning model including a topic steering layer on a language model that classifies an output of the language model into semantic categories specific to a target domain and reflects the semantic categories in the output of the language model; An input / output unit that inputs a seed word into the deep learning model and outputs an answer. Interactive device.

2. 2. The interactive device according to claim 1, a learning unit that inputs a group of texts related to a target domain as training data and trains the deep learning model using an objective function for improving prediction accuracy of words based on context and semantic category, and an objective function for approximating the features of the text based on the output of the language model to the classification of the semantic category of the text; Interactive device.

3. 2. The interactive device according to claim 1, The topic steering layer can be applied to the encoder or decoder. Interactive device.

4. A method for training a deep learning model, comprising: The deep learning model includes a language model and a topic steering layer on the language model that classifies an output of the language model into semantic categories specific to a target domain and reflects the semantic categories in the output of the language model; A group of texts related to the target domain is input as training data, and the deep learning model is trained using an objective function for improving the prediction accuracy of words based on context and semantic categories, and an objective function for approximating the features of the text based on the output of the language model to the classification of the semantic category of the text. How to learn.

Citation Information

Patent Citations

  • Method and system for identifying biological entities for drug discovery

    WO2023089304A1