Inference device, inference method, and program

The inference device addresses the lack of time-awareness in dialogue models by selecting responses that are both natural and time-specific, improving user satisfaction through contextually appropriate interactions.

WO2025203517A1PCT designated stage Publication Date: 2025-10-02NT T INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/012892
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Conventional dialogue models fail to actively utilize time information when generating responses, leading to the inability to distinguish between temporarily natural and unnatural responses, which affects user satisfaction.

Method used

An inference device that includes a reranking unit to select a response text that is both natural and specific to time information, using a re-ranking method that considers time-aware naturalness and time dependency to proactively output responses that are temporarily natural.

Benefits of technology

Improves user satisfaction by ensuring responses are contextually appropriate and natural at the time of utterance, enhancing the dialogue model's responsiveness to time-related cues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024012892_02102025_PF_FP_ABST
    Figure JP2024012892_02102025_PF_FP_ABST
Patent Text Reader

Abstract

An inference device according to the present invention comprises a re-ranking unit that receives a plurality of response texts which have been generated from speech texts using a dialog model, that selects, from the plurality of response texts, a specific response text which has high naturalness with respect to specific time information and which has high specificity with respect to the time information, and that outputs the specific response text.
Need to check novelty before this filing date? Find Prior Art

Description

Inference device, inference method, and program

[0001] The present invention relates to a technique for generating a response to an utterance using a dialogue model.

[0002] In recent years, the performance of dialogue systems has improved significantly as data volumes have become larger. Increasing the amount of training data improves the naturalness and fluency of responses in dialogue models. Furthermore, it is known that by utilizing external information (external knowledge, user characteristics, etc.) and actively reflecting that information in responses (responses specific to the external information), the user's impression of the dialogue model can be improved.

[0003] Shoetsu Sato, Naoki Yoshinaga, Masashi Toyoda, and Masaru Kitsuregawa. 2017. Modeling situations in neural chat bots. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL) Student Research Workshop, pages 120-127

[0004] Humans unconsciously take time into consideration when responding naturally, but conventional dialogue models have the problem of being unable to actively utilize time information when responding.

[0005] The present invention has been made in view of the above points, and aims to provide a technique that enables responses that actively utilize time information in a dialogue model.

[0006] According to the disclosed technology, an inference device is provided that includes a reranking unit that receives a plurality of response texts generated from a spoken text using a dialogue model, selects a specific response text from the plurality of response texts that has a high degree of naturalness with respect to specific time information and a high degree of specificity with respect to the time information, and outputs the specific response text.

[0007] The disclosed technology provides a technology that enables responses that actively utilize time information in a dialogue model.

[0008] FIG. 1 is a diagram for explaining the classification of responses. FIG. 2 is a diagram showing the definition of each response. FIG. 3 is a configuration diagram of the inference device 100. FIG. 4 is a flowchart for explaining the operation of the inference device 100. FIG. 5 is a diagram showing an example of the hardware configuration of the inference device 100.

[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The embodiment described below is merely an example, and the embodiment to which the present invention is applied is not limited to the following embodiment.

[0010] In the following, we will first explain the classification of responses, then explain the conventional technology and problems in more detail, and then explain the configuration and operation of this embodiment. In the following explanation, for the sake of convenience, in the text of the specification, "=" is used instead of the "symbol with a triangle above the equal sign" that indicates a definition.

[0011] (Regarding response classification) As mentioned above, it is known that in a dialogue model, by utilizing external information and providing responses that actively reflect that information (responses specific to the external information), the user's impression of the dialogue model can be improved.

[0012] One type of information outside of the dialogue is time information (time of day, day of the week, season, etc.), and humans have natural conversations by changing their responses according to the change in time. By introducing naturalness that takes time information into account, responses can be classified into the following four types.

[0013] (1) AN (Always Natural): Natural at any time (2) TN (Temporarily Natural at utterance time): Natural at the time of utterance and unnatural at other times (3) TU (Temporarily Unnatural at other times): Unnatural at the time of utterance and natural at other times (4) AU (Always Unnatural): Unnatural at any time Figure 1 shows examples of the four types of responses mentioned above. As shown in Figure 1, naturalness changes as the time changes (Figure 1 assumes day and night). Responses (1) and (2) (N = AN ∪ TN) are natural responses to an utterance at the time of utterance, but responses (3) and (4) (U = TU ∪ AU) are unnatural responses at the time of utterance. On the other hand, the naturalness of (2) and (3) (T = TN∪TU) changes depending on the time of utterance (day or night), while the naturalness of (1) and (4) (A = AN∪AU) does not change regardless of the time of utterance. In this embodiment, such a classification of responses is called a NUTA category.

[0014] (Regarding the Prior Art and Its Problems) In order to realize a natural conversation using a dialogue model, it is considered necessary to generate natural responses (N above) and avoid generating unnatural responses (U above).

[0015] If a dialogue model takes into account the time of utterance and correctly evaluates the naturalness of a response, it is called time-aware; if not, it is called time-unaware.

[0016] Many existing dialogue models are time-unaware because they are trained using datasets that do not include time information. Large-scale language models (LLMs) that generate responses without specifying time information in prompts also fall into this category.

[0017] A time-unaware dialogue model can distinguish natural responses to an utterance, but cannot distinguish unnatural responses at the time of utterance. That is, a time-unaware dialogue model cannot distinguish between a TU response and an N response, and may generate an inappropriate TU response at the time of utterance.

[0018] In a time-aware dialogue model, time information is included in the input. A time-aware dialogue model can distinguish natural responses based on the time of speech. In other words, it can distinguish between TU responses and TN responses, and therefore can avoid outputting TU responses.

[0019] However, the time-aware dialogue model cannot distinguish between an AN response, which is a natural response at any time, and a TN response, which is a natural response only at the time of utterance, and therefore cannot proactively output a TN response.

[0020] An example of a time-aware dialogue model is "Modeling Situations in Neural Chat Bots, In Proceedings of ACLSRW" described in Non-Patent Document 1. This dialogue model is a dialogue model that learns the naturalness of responses to utterance times. More specifically, this dialogue model is trained using training data in which a timestamp (utterance time) + posted message is input and replies to the posted message are output.

[0021] Furthermore, LLM, which generates a response sentence by specifying time information in a prompt, is also a time-aware dialogue model.

[0022] As described above, the conventional time-aware dialogue model cannot distinguish between TN responses and AN responses, and therefore cannot proactively output TN responses.

[0023] In this embodiment, it is assumed that proactive use of time information will improve the user's impression of the dialogue model. That is, the technology according to this embodiment assumes that users prefer TN responses to AN responses, and aims to realize a time-aware dialogue model that proactively outputs TN responses over AN responses.

[0024] The hypothesis that users prefer the TN response to the AN response has been confirmed by subjective evaluation experiments.

[0025] (Regarding the Automatic Scale) In this embodiment, as will be described later, the time-aware dialogue model actively outputs TN responses using a re-ranking technique. Since an automatic scale is used to distinguish TN responses in the re-ranking, this automatic scale will be described here. Note that the automatic scale may also be called a scale, index, evaluation scale, evaluation index, metric, standard, or the like.

[0026] (1) Definition In this embodiment, time-aware naturalness and time dependency of responses to utterances are introduced, and these quantities are used to define NUTA categories. Time dependency may also be called time specificity. Let u, r, and t be the time of the utterance, the response to u, and the conversation, respectively. Hereinafter, time-aware naturalness may be abbreviated as TAN.

[0027] Assume that the TAN of u and r at time t is implicitly defined by the conditional probability distribution p(u,r|t) = p(u|t)p(r|u,t), where p(u|t) and p(r|u,t) denote the TAN of u at time t and the TAN of r given u at time t, respectively. N responses (AN and TN) in the NUTA category are natural responses at utterance time t. That is, response r is classified as N (or U) if p(r|u,t) is high (or low).

[0028] Note that "high TAN" may mean that the TAN is higher than a certain threshold value, or that the TAN is higher than another TAN.

[0029] By using TAN, the naturalness of a response over time can be quantified, and it is possible to avoid outputting an unnatural response at the time of speech.

[0030] (2) Change of Naturalness (CN) In this embodiment, the change of naturalness (CN) from t' to t is defined as follows using TAN:

[0031]

[0032]

[0033] From the definition, the following formula holds:

[0034] As mentioned above, the CN of a conversation (u, r) is decomposed into the CN of u and the CN of r given u. For example, if conversation (u, r) is more natural at t than at t', then the CN t´:t (u, r)>0 holds.

[0035] (3) Time Dependency (TD) Using the above CN, the time dependence (TD) of r when u is given is defined as follows:

[0036]

[0037] In the above formula (5), t U is the time when r becomes unnatural. By using "max", equation (5) expresses the time t when r becomes most unnatural. U Show that the CN between and t is TD(r|u, t).

[0038] In the above formula (6), t N is the time when r becomes natural. By using "max", equation (6) expresses the time t when r becomes most unnatural. U and r are the most natural N The CN between them is TD(r|u).

[0039] Note that TD(r|u, t) may be written as TD@t, and TD(r|u) may be written as TD@all.

[0040] By using TD@t, we can evaluate whether r is specific to the time t when it is spoken. For example, if r is natural at t but unnatural at other times, TD@t of r will be high. Also, if the naturalness of r does not change even when the time changes, TD@t will be low.

[0041] On the other hand, TD(r|u) represented by TD@all is the most unnatural time t U From the most natural time t N , which allows us to evaluate whether r is time-specific. Thus, if r is natural at some times but not at others, TD@all will be high.

[0042] Note that "TD is high" may mean that TD is higher than a certain threshold value, or that TD is higher than another TD.

[0043] By using TD, it is possible to quantify the degree to which the naturalness of a response changes over time (specificity), and to actively extract responses that take time into consideration.

[0044] (3) NUTA Categories In this embodiment, each NUTA category is defined as shown in FIG. 2 using p(r|u, t) as TAN and TD(r|u) as TD@all. For example, if both p(r|u, t) and TD(r|u) are high, that is, if naturalness is high and time dependency is high, r is classified as TN. Also, if both p(r|u, t) and TD(r|u) are low, r is classified as AU. Note that although TD(r|u) is used as TD in FIG. 2, TD(r|u, t) may be used instead of TD(r|u).

[0045] (4) Experiments An experiment was conducted to confirm whether the above-mentioned scale could correctly classify NUTA categories.

[0046] In the experiment, a dialogue model capable of determining the naturalness of a response at time t was used as a model for calculating TAN (p(r|u, t)). The likelihood when generating each response was taken as naturalness (TAN). TD(r|u, t) and TD(r|u) were calculated from p(r|u, t) and the classification accuracy of each TD was evaluated. It was found that classification was possible with higher accuracy than the baseline index (specifically, PCMI (Pointwise Conditional Mutual Information)).

[0047] The above dialogue model was constructed by fine-tuning the Japanese Transformer Encoder-Decoder dialogue model using "posting time, posting, response" (470 million triplets).

[0048] (Re-ranking method) In this embodiment, the inference device 100 uses a time-aware dialogue model to proactively output TN responses, which are time-aware responses. The inference device 100 proactively outputs TN responses using, for example, a re-ranking method described below. Note that in this embodiment, TD(r|u, t) is used as a measure used to proactively output TN responses, but TD(r|u) may be used instead of TD(r|u, t) or in addition to TD(r|u, t).

[0049] Let M be a dialogue model that can generate multiple responses to the same utterance. The reranking method in this embodiment extends M to a time-aware model. Given a basic dialogue model (base model) M, TAN(p(r|u, t)), a positive integer N, and a probability δ, the inference device 100 generates a time-aware response r to an utterance u at time t as follows: * Output.

[0050] First, the reasoning apparatus 100 generates N candidate responses to u at time t from the dialogue model M. Let the set of candidate responses be R={r i |i∈[N]}.

[0051] Next, the inference device 100 calculates all r i For ∈R, naturalness (specifically, p(ri If r does not have sufficient naturalness (i.e., p(r |u, t)), reasoning apparatus 100 evaluates i |u, t) ≦δ), R to r i Delete.

[0052] Next, the inference device 100 calculates all r i For ∈R, TD@t(TD(r i |u, t) and evaluate the most time-specific response r * ∈ max r∈R TD(r|u,t). Reasoning apparatus 100 finds the obtained r * is output as the time-aware response to u at time t.

[0053] In the above example, we remove candidate responses with naturalness lower than the threshold δ. * However, when a time-aware dialogue model is used as M, it is possible not to remove response candidates using the threshold δ.

[0054] Also, instead of outputting only one response, multiple responses with the highest TD(r|u,t) may be output, or multiple responses and their respective scores (e.g., TD(r|u,t)) may be output.

[0055] (Configuration example and operation overview of inference device 100) Figure 3 shows a configuration example of the inference device 100 that executes the above processing. As shown in Figure 3, the inference device 100 includes a generation unit 110, a response DB (database) 120, and a re-ranking unit 130. The re-ranking unit 130 is able to access a naturalness computation model 140. Note that in the example of Figure 3, the naturalness computation model 140 is provided outside the inference device 100, but the naturalness computation model 140 may also be provided inside the inference device 100.

[0056] Furthermore, as in the example shown in FIG. 4, the inference device 100 may include a reranking unit 130, and the generation unit 110, response DB 120, and naturalness computation model 140 may be provided outside the inference device 100.

[0057] When a time-aware dialogue model capable of evaluating naturalness (i.e., p(r|u, t)) is used as the generation unit 110, the generation unit 110 may be used as the naturalness computation model 140. Each unit will be described in detail below.

[0058] (Generation unit 110, response DB 120) The generation unit 110 is a functional unit corresponding to the above-mentioned dialogue model M. The generation unit 110 receives an utterance (which may also be called an utterance sentence, an utterance text, etc.) and time information as input, and outputs a plurality of responses (which may also be called a group of response candidates). Note that time information may not be input here.

[0059] The generation unit 110 (i.e., the dialogue model M) may be a time-unaware dialogue model or a time-aware dialogue model. Specifically, for example, a Transformer dialogue model, GPT-3.5, GPT-4, or the like may be used as the generation unit 110. The response DB 120 stores the answer candidate set output from the generation unit 110.

[0060] (Re-ranking unit 130, naturalness computation model 140) The re-ranking unit 130 outputs one or more responses (which may also be referred to as response sentences or response texts) using a group of response candidates read from the response DB 120 and time information. As described above, a score may be output together with the response.

[0061] Specifically, the reranking unit 130 reranks the candidate answers using the TAN (e.g., p(r|u,t)) and the TD (e.g., TD(r|u,t)), and selects and outputs a final answer. For example, as described above, the reranking unit 130 excludes answer candidates with low TANs and outputs the answer with the highest TD as the final answer.

[0062] The reranking unit 130 calculates TAN and TD using the naturalness calculation model 140. The naturalness calculation model 140 may be any model as long as it is a dialogue model that can determine the naturalness of a response at time t.

[0063] For example, the naturalness computation model 140 may be a dialogue model trained by adding time information to the input, or an LLM in which time information is given as a prompt.

[0064] The time information may be labeled, such as time period (morning, daytime, night), day of the week, season (spring, summer, fall, winter), weekend / weekday, etc. Alternatively, the time information may be expressed as a numeric value (e.g., month, day, hour, minute).

[0065] (Processing Procedure) The processing of the inference device 100 will be described in accordance with the procedure of the flowchart in FIG.

[0066] In S1 (step 1), an utterance is input to the generation unit 110. In S2, the generation unit 110 generates a plurality of responses. The method of generating the plurality of responses at this time may be to generate the top N responses in terms of likelihood, or to generate a plurality of responses by top p sampling (p is, for example, 0.9).

[0067] In S3, the re-ranking unit 130 re-ranks the multiple responses, and in S4, outputs a response specific to the target time information. A more specific example will be described below.

[0068] Here, the time period (morning, daytime, nighttime) is used as the time information, and it is desired to generate a response to utterance A that is natural in the morning (and unnatural in the daytime and nighttime). Furthermore, p(r|u, t) is used as TAN, and TD(r|u, t) (the above-mentioned formula (5)) is used as TD. Furthermore, for simplicity of explanation, it is assumed that the generation unit 110 generates three responses.

[0069] In this case, when utterance A is input to the generation unit 110, the generation unit 110 outputs response 1, response 2, and response 3.

[0070] The reranking unit 130 inputs "utterance A, response 1, morning" into the naturalness computation model 140, and thereby acquires p(r|u, t) for "utterance A, response 1, morning" from the naturalness computation model 140. Similarly, the reranking unit 130 acquires p(r|u, t) for "utterance A, response 2, morning" and p(r|u, t) for "utterance A, response 3, morning" from the naturalness computation model 140.

[0071] Here, it is assumed that p(r|u, t) for "utterance A, response 3, morning" is lower than the threshold. From response 1, response 2, and response 3, the reranking unit 130 excludes response 3 from the candidates.

[0072] Next, the reranking unit 130 calculates TD(r|u, t) for each of Response 1 and Response 2. As explained in the section on Equation (5), TD(r|u, t) is a value that indicates the change in naturalness from the time when the response is most unnatural to the target time (here, "morning").

[0073] In order to examine the naturalness (p(r|u, t)) of the time when the response is most unnatural, the reranking unit 130 obtains p(r|u, t) for each of the time information other than "morning", namely "daytime" and "night", for each of Response 1 and Response 2 from the naturalness computation model 140.

[0074] Specifically, the reranking unit 130 inputs "utterance A, response 1, daytime" into the naturalness computation model 140, and thereby obtains p(r|u, t) for "utterance A, response 1, daytime" from the naturalness computation model 140. Similarly, by inputting "utterance A, response 1, night" into the naturalness computation model 140, the reranking unit 130 obtains p(r|u, t) for "utterance A, response 1, night" from the naturalness computation model 140.

[0075] Similarly, the re-ranking unit 130 acquires p(r|u, t) for each of “utterance A, response 2, daytime” and “utterance A, response 2, nighttime” from the naturalness computation model 140 .

[0076] The reranking unit 130 calculates TD(r|u, t) for each of response 1 and response 2 using information acquired from the naturalness computation model 140. If the result shows that TD(r|u, t) for response 1 is greater than TD(r|u, t) for response 2, the reranking unit 130 outputs response 1 as the final response.

[0077] (Experiment on the time-aware dialogue model) In order to confirm whether the time-aware dialogue model in this embodiment (corresponding to the inference device 100) can actively output time-aware responses, a subjective evaluation of the response quality of the time-aware dialogue model was performed. As a result, it was confirmed that the time-aware dialogue model improved the naturalness and specificity with respect to time compared to the base model (corresponding to the generation unit 110, which is the model before reranking).

[0078] The Japanese Transformer Encoder-Decoder interactive model, GPT-3.5, and GPT-4 were used as the base models for the above.

[0079] (Hardware Configuration Example) The inference device 100 described in this embodiment can be realized, for example, by causing a computer to execute a program. This computer may be a physical computer or a virtual machine on the cloud.

[0080] That is, inference device 100 can be realized by using hardware resources such as a CPU and memory built into a computer to execute a program corresponding to the processing performed by inference device 100. The program can be recorded on a computer-readable recording medium (such as a portable memory) and can be saved or distributed. The program can also be provided via a network such as the Internet or email.

[0081] Fig. 6 is a diagram showing an example of the hardware configuration of the computer. The computer in Fig. 6 includes a drive device 1000, an auxiliary storage device 1002, a memory device 1003, a CPU 1004, an interface device 1005, a display device 1006, an input device 1007, an output device 1008, and the like, all of which are interconnected via a bus B. The computer may further include a GPU.

[0082] The program that realizes the processing on the computer is provided by a recording medium 1001, such as a CD-ROM or a memory card. When the recording medium 1001 storing the program is set in the drive device 1000, the program is installed from the recording medium 1001 to the auxiliary storage device 1002 via the drive device 1000. However, the program does not necessarily have to be installed from the recording medium 1001, but may be downloaded from another computer via a network. The auxiliary storage device 1002 stores the installed program as well as necessary files, data, etc.

[0083] The memory device 1003 reads and stores the program from the auxiliary storage device 1002 when an instruction to start the program is received. The CPU 1004 realizes functions related to the inference device 100 in accordance with the program stored in the memory device 1003. The interface device 1005 is used as an interface for connecting to a network, etc. The display device 1006 displays a GUI (Graphical User Interface) or the like according to the program. The input device 1007 is composed of a keyboard, mouse, buttons, a touch panel, etc., and is used to input various operation instructions. The output device 1008 outputs the results of calculations.

[0084] (Effects of the embodiment) As described above, the technology described in the present embodiment makes it possible to make a response that actively utilizes time information.

[0085] The following additional notes are provided regarding the above-described embodiments.

[0086] <Additional Notes> (Additional Item 1) An inference device including a memory and at least one processor connected to the memory, wherein the processor receives a plurality of response texts generated from utterance text using a dialogue model, selects from the plurality of response texts a specific response text that has a high degree of naturalness with respect to specific temporal information and a high degree of specificity with respect to the temporal information, and outputs the specific response text. (Additional Item 2) The inference device according to Additional Item 1, wherein the processor selects the specific response text from the plurality of response texts using a first measure representing the naturalness of the response text with respect to the temporal information and the utterance text, and a second measure representing the maximum value of change in naturalness of the response text between one piece of temporal information and another piece of temporal information. (Additional Item 3) An inference method executed by the inference device, comprising: receiving a plurality of response texts generated from utterance text using a dialogue model, selecting from the plurality of response texts a specific response text that has a high degree of naturalness with respect to specific temporal information and a high degree of specificity with respect to the temporal information, and outputting the specific response text. (Supplementary Item 4) A non-transitory storage medium storing a program for causing a computer to function as a reranking unit in the inference device according to Supplementary Item 1 or 2.

[0087] Although the present embodiment has been described above, the present invention is not limited to such a specific embodiment, and various modifications and changes are possible within the scope of the gist of the present invention described in the claims.

[0088] REFERENCE SIGNS LIST 100 Inference device 110 Generation unit 120 Response DB 130 Reranking unit 140 Naturalness computation model 1000 Drive device 1001 Recording medium 1002 Auxiliary storage device 1003 Memory device 1004 CPU 1005 Interface device 1006 Display device 1007 Input device 1008 Output device

Claims

1. An inference device comprising a reranking unit that receives multiple response texts generated from spoken text using a dialogue model, selects a specific response text from the multiple response texts that is highly natural and highly specific to specific temporal information, and outputs the specific response text.

2. The inference device described in claim 1, wherein the reranking unit selects the specific response text from the plurality of response texts using a first measure representing the naturalness of the response text relative to the time information and the spoken text, and a second measure representing the maximum change in the naturalness of the response text between one piece of time information and another piece of time information.

3. An inference method executed by an inference device, comprising: receiving a plurality of response texts generated from spoken text using a dialogue model; selecting a specific response text from the plurality of response texts that is highly natural with respect to specific temporal information and highly specific with respect to the temporal information; and outputting the specific response text.

4. A program for causing a computer to function as a reranking unit in the inference device according to claim 1 or 2.

Citation Information

Patent Citations

  • Dialogue processing method and device, electronic equipment and storage medium

    CN112989013A