Natural language processing model acquisition device, natural language processing device, natural language processing model acquisition method, natural language processing method and program
The implementation of a word sense disambiguation process and response estimation within a mathematical model addresses the issue of polysemy in natural language processing, enhancing accuracy by resolving word meaning ambiguity and improving response estimation.
Patent Information
- Application Number
- JP2021126622
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-08-02
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-08-02
AI Technical Summary
Natural language processing is hindered by polysemy, where the meaning of a word changes depending on context, particularly in dialogue, leading to inaccuracies in processing.
A word sense disambiguation process is implemented to resolve ambiguity in word meanings, combined with a response estimation process using a mathematical model that updates based on the disambiguation results and word positions, enhancing the accuracy of natural language processing.
The system improves the accuracy of natural language processing by resolving word sense ambiguity, leading to more precise responses to input sentences.
Smart Images

Figure 0007557438000021 
Figure 0007557438000026 
Figure 0007557438000018
Abstract
Description
[Technical field]
[0001] The present invention relates to a natural language processing model acquisition device, a natural language processing device, a natural language processing model acquisition method, a natural language processing method, and a program. [Background technology]
[0002] Research is being conducted into natural language processing, a technology for processing natural language by computers. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding”, arXiv:1810.04805v2, 24 May 2019 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in languages, there exists ambiguity, where the meaning of a word changes depending on the context. This can sometimes prevent natural language processing from working properly, especially in dialogue.
[0005] In view of the above circumstances, an object of the present invention is to provide a technique for improving the accuracy of natural language processing. [Means for solving the problem]
[0006] One aspect of the present invention is a natural language processing model acquisition device that includes a mathematical model execution unit that executes a mathematical model including a word sense ambiguity resolution process that resolves ambiguity in the meaning of each word that constitutes a sentence to be processed, and a response estimation process that estimates a response to the sentence based at least on each word that constitutes the sentence, a result of the word sense ambiguity resolution process, and a position of each of the words within the sentence, and an update unit that updates the mathematical model based on a result of the estimation of the response estimation process.
[0007] One aspect of the present invention is a natural language processing device that includes: an object acquisition unit that acquires a sentence to be processed; a mathematical model execution unit that executes a mathematical model including a word sense ambiguity resolution process that resolves ambiguity in meaning for each word that constitutes the sentence to be processed; and a response estimation process that estimates a response to the sentence based at least on each word that constitutes the sentence, a result of the word sense ambiguity resolution process, and a position of each of the words within the sentence; and an estimation unit that estimates a response sentence to the sentence acquired by the object acquisition unit using the mathematical model updated by a natural language processing model acquisition device that includes: an object acquisition unit that acquires a sentence to be processed;
[0008] One aspect of the present invention is a natural language processing model acquisition method comprising: a mathematical model execution step of executing a mathematical model including a word sense ambiguity resolution process that resolves ambiguity in the meaning of each word that constitutes a sentence to be processed, and a response estimation process that estimates a response to the sentence based at least on each word that constitutes the sentence, a result of the word sense ambiguity resolution process, and a position of each of the words within the sentence; and an update step of updating the mathematical model based on a result of the estimation of the response estimation process.
[0009] One aspect of the present invention is a natural language processing method having an object acquisition step of acquiring a sentence to be processed, a word sense ambiguity resolution process of eliminating ambiguity in meaning for each word constituting the sentence to be processed, and a response estimation process of estimating a response to the sentence based at least on each word constituting the sentence, a result of the word sense ambiguity resolution process, and a position of each of the words within the sentence, and an estimation step of estimating a response sentence to the sentence acquired in the object acquisition step using the mathematical model updated by a natural language processing model acquisition device having an update unit that updates the mathematical model based on an estimation result of the response estimation process.
[0010] One aspect of the present invention is a program for causing a computer to function as the above-described natural language processing model acquisition device.
[0011] One aspect of the present invention is a program for causing a computer to function as the above-mentioned natural language processing device. Effect of the Invention
[0012] The present invention makes it possible to provide a technique for improving the accuracy of natural language processing. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is an explanatory diagram illustrating a natural language processing system according to an embodiment. [Diagram 2] FIG. 4 is an explanatory diagram for explaining an example of action embedded data in the embodiment. [Diagram 3] FIG. 2 is a diagram showing an example of a hardware configuration of a natural language processing model acquisition device according to an embodiment. [Figure 4] FIG. 2 is a diagram showing an example of the configuration of a control unit in the embodiment. [Diagram 5] 4 is a flowchart showing an example of a flow of a process executed by a natural language processing model acquisition device in an embodiment. [Figure 6]FIG. 1 is a diagram showing an example of a hardware configuration of a natural language processing apparatus according to an embodiment. [Figure 7] FIG. 2 is a diagram showing an example of the configuration of a control unit in the embodiment. [Figure 8] 1 is a flowchart showing an example of a flow of processing executed by a natural language processing apparatus in an embodiment. [Figure 9] FIG. 11 is an explanatory diagram illustrating a speech topic inference process according to a modified example. [Figure 10] FIG. 11 is a first diagram showing an example of a result of an experiment using the natural language processing system in the modified example. [Figure 11] FIG. 2 is a second diagram showing an example of a result of an experiment using the natural language processing system in the modified example. [Figure 12] FIG. 3 is a third diagram showing an example of a result of an experiment using the natural language processing system in the modified example. [Figure 13] FIG. 11 is an explanatory diagram illustrating an example of an application of a natural language processing system according to a modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] (Embodiment) FIG. 1 is an explanatory diagram for explaining a natural language processing system 100 according to an embodiment. For simplicity of explanation, the following explanation will be given taking as an example a case where the target of processing by the natural language processing system 100 is a dialogue. However, the target of processing by the natural language processing system 100 may be any natural language and is not necessarily limited to a dialogue. The natural language processing system 100 includes a natural language processing model acquisition device 1 and a natural language processing device 2. The natural language processing model acquisition device 1 obtains a mathematical model (hereinafter referred to as a "natural language processing model") that estimates a sentence (hereinafter referred to as a "response sentence") that responds to a sentence (hereinafter referred to as an "action sentence") that is a processing target, by a predetermined optimization method such as machine learning. A sentence is a sequence of words.
[0015] The natural language processing model acquisition device 1 updates a prepared mathematical model (hereinafter referred to as a "natural language processing pre-model") that estimates a response sentence to an action sentence by the above-mentioned predetermined optimization method. For ease of explanation, the natural language processing system 100 will be described below by taking as an example a case where a method for obtaining a natural language processing model is a machine learning method. However, the method for obtaining a natural language processing model is not necessarily limited to a machine learning method. The method for obtaining a natural language processing model may be any optimization method as long as it is capable of updating a natural language processing learning model.
[0016] A mathematical model is a set of one or more processes whose execution conditions and order (hereinafter referred to as "execution rules") are predefined. Executing a mathematical model means executing various processes included in the mathematical model according to the predefined execution rules.
[0017] In the machine learning method, the natural language processing pre-model is updated by learning. That is, in the machine learning method, the natural language processing pre-model is a type of machine learning model. Note that the machine learning model is a set including one or more processes whose execution conditions and order are predetermined. That is, the machine learning model is a type of mathematical model. The learned natural language processing pre-model is the natural language processing model.
[0018] In the following description, learning to be A means that the parameter value in the machine learning model is adjusted to satisfy A. A represents a condition. In addition, hereinafter, for learning means that it is used to update the machine learning model.
[0019] "Completed learning" means that a predetermined end condition (hereinafter referred to as "learning end condition") has been met. The learning end condition is, for example, a condition that a predetermined number of learning rounds have been completed. The learning end condition may be, for example, a condition that the change due to the update of the machine learning model is smaller than a predetermined change. The natural language processing pre-model at the point in time when the learning end condition is met is the natural language processing model.
[0020] The natural language processing pre-model is represented by, for example, a neural network. Note that a neural network is a circuit such as an electronic circuit, an electric circuit, an optical circuit, or an integrated circuit, which represents a machine learning model. Updating a neural network through learning means that the values of the parameters of the neural network are updated. The parameters of a neural network are also parameters of the circuits that constitute the neural network, and are also parameters of the machine learning model represented by the circuits that constitute the neural network. Note that executing a machine learning model means that the circuit that represents the machine learning model executes the machine learning model.
[0021] The natural language processing device 2 uses the natural language processing model acquired by the natural language processing model acquisition device 1 to estimate a response sentence to the input action sentence.
[0022] <About natural language processing pre-model> The natural language processing pre-model will be described in more detail. The natural language processing pre-model includes at least a word sense disambiguation process and a response estimation process. The word sense disambiguation process is a process for eliminating ambiguity in the meaning of each word contained in a sentence that is the target of the word sense disambiguation process. More specifically, resolving the ambiguity of the meaning means estimating a word (hereinafter referred to as a "superordinate word") whose definition includes the content defined by the word.
[0023] Therefore, the word sense disambiguation process obtains a higher-level word for each word contained in a sentence that is the target of the word sense disambiguation process. That is, the word sense disambiguation process obtains a sequence of higher-level words (hereinafter referred to as a "higher-level word sequence"). Hereinafter, the sequence of higher-level words obtained by the word sense disambiguation process is referred to as a higher-level word sequence. The process for disambiguating the word sense may be any process that can resolve the disambiguation of the word sense, such as LMMS (Language modelling makes sense) described in Reference 1 below.
[0024] Reference 1: Daniel Loureiro and Alipio Jorge. 2019. Language modeling makes sense: Propagating representations through WordNet for full-coverage word sense disambiguation.In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5682-5691.
[0025] In LMMS, for example, the top words are estimated by the process represented by the following equation (1).
[0026]
number
[0027] In equation (1), t i,j means the jth word contained in the ith utterance of a sentence (i.e., a sequence of words). The left side of equation (1) is the word t i,j The U in formula (1) i is the i-th U i The function f in equation (1) is the sum of the sentences in the utterance U 1 , , utterance U i , , utterance U Nu If the sequence is i,j This refers to the process of estimating the top words of a given keyword.
[0028] The response estimation process is a process of estimating a response sentence to an action sentence based on at least the result of the word sense disambiguation process. In the response estimation process, for example, the following matching estimation process is performed. In the matching estimation process, a response higher-rank word sequence acquisition process and a response determination process are executed.
[0029] The process of acquiring a higher-level response word sequence is a process of acquiring a higher-level word sequence of a response sentence candidate by executing a word sense disambiguation process on a response sentence candidate prepared in advance (hereinafter, referred to as a "response sentence candidate"). Note that "prepared in advance" means that the response sentence candidate has been stored in advance in a predetermined storage device such as the storage unit 14 or the storage unit 24 described later.
[0030] The response determination process is a process that determines, based on the effect-embedded data and the response candidate-embedded data, a response sentence candidate whose difference between the effect-embedded data and the response candidate-embedded data satisfies a predetermined condition as a response sentence to an action sentence. The effect-embedded data includes at least an action sentence and a sequence of upper words of the action sentence. As described above, a sentence is a sequence of words, so including an action sentence means including each word of the action sentence and information indicating the position of each word within the action sentence (hereinafter referred to as "effect sentence word position information").
[0031] The response candidate embedded data includes at least a response sentence candidate and a sequence of upper words of the response sentence candidate. As described above, a sentence is a sequence of words, so including a response sentence candidate means that response This means including each word of the sentence candidate and information indicating the position of each word in the response sentence candidate (hereinafter referred to as "response sentence candidate word position information"). Hereinafter, when there is no need to distinguish between action sentence word position information and response sentence candidate word position information, they will be referred to as word position information.
[0032] The action embedding data and the response embedding data are represented by vectors in a predetermined vector space, for example. That is, the action embedding data and the response embedding data are represented by vectors in a predetermined embedding space. Hereinafter, a vector in a predetermined vector space that represents information is referred to as an embedding vector.
[0033] The action embedding data is, for example, a vector expressed by the following formula (2).
[0034]
number
[0035] The symbols in formula (2) represented by the following formula (3) refer to the sequence of words used to generate the action-embedded data. N refers to the sequence length. The sequence of words used to generate the action-embedded data may be a sequence of words belonging to any utterance as long as the sequence of words belongs to an utterance that satisfies a predetermined condition. The sequence of words used to generate the action-embedded data may be, for example, a sequence of words belonging to the last utterance contained in the action sentence. The sequence of words used to generate the action-embedded data may be, for example, a sequence of words belonging to the last utterance contained in the action sentence and a sequence of words belonging to the utterance just before the last utterance.
[0036]
number
[0037] The degree of difference between the action embedding data and the response candidate embedding data is expressed, for example, by cosine similarity indicating the similarity of the embedding vectors.
[0038] FIG. 2 is an explanatory diagram illustrating an example of action embedding data in an embodiment. In the action embedding data in FIG. 2, "input" means an action sentence. The sentences occur in order from the right in FIG. 2. Therefore, in the example in FIG. 2, the word "?" occurs last. "Token embedding" means a word contained in the action sentence. More specifically, "Token embedding" means an embedding vector (hereinafter referred to as "word embedding vector") that represents the words contained in the action sentence.
[0039] "Utterance embedding" refers to the utterance to which each word in the action sentence belongs. More specifically, "Utterance embedding" refers to an embedding vector that represents the topic of the utterance to which each word in the action sentence belongs (hereinafter referred to as "utterance topic embedding vector"). Figure 2 shows, for example, that a total of five words from the word "how" to the word "?" belong to the utterance "Eu3". "Class embedding" refers to higher-level words. More specifically, "Class embedding" refers to an embedding vector that represents higher-level words (hereinafter referred to as "higher-level word embedding vector").
[0040] "Position embedding" indicates the position of a word contained in the action sentence within the action sentence. More specifically, "Position embedding" means an embedding vector (hereinafter referred to as "position embedding vector") that represents the position of a word contained in the action sentence within the action sentence. Therefore, "Position embedding" is an example of action sentence word position information. As such, since the action embedding data in the example of Figure 2 includes a pair of "Token embedding" and "Position embedding", the action embedding data in the example of Figure 2 is information that includes an action sentence. And, since the action embedding data in the example of Figure 2 includes "Class embedding", the action embedding data in the example of Figure 2 is information that includes a higher-level word sequence of the action sentence.
[0041] The example in Figure 2 shows that the "compression" process is performed on words belonging to the "Eu3" utterance. The "compression" process is the process of formula (2). In other words, Figure 2 means that an example of the set represented by the symbols in formula (3) is the set of words belonging to the "Eu3" utterance. The "compression" process is also a type of embedding process.
[0042] The embedding vector expressing the action embedding data is, for example, a vector obtained by adding a word embedding vector, a speech topic embedding vector, a superordinate word embedding vector, and a position embedding vector. As described above, the action embedding data need not necessarily include a speech topic embedding vector, since it is sufficient for the action embedding data to include at least an action sentence and a superordinate word sequence of the action sentence. Therefore, the embedding vector expressing the data to be embedded may be, for example, a vector obtained by adding a word embedding vector, a superordinate word embedding vector, and a position embedding vector. Although FIG. 2 illustrates an example of an embedding vector using action embedding data as an example, the same applies to response embedding data.
[0043] <About learning> The learning of the natural language processing pre-model will now be described. In the learning of the natural language processing pre-model, data (hereinafter referred to as "learning data") is used that is a pair of an action sentence and a sentence (hereinafter referred to as "correct answer sentence") that is predetermined as a response sentence to the action sentence.
[0044] In training the natural language processing pre-model, an action sentence included in the training data is input to the natural language processing pre-model, and the natural language processing pre-model estimates a sentence that responds to the action sentence (hereinafter referred to as an "estimated response sentence") based on the action sentence. Specifically, the estimated response sentence is a sentence determined by the response determination process. In training the natural language processing pre-model, the natural language processing pre-model is updated so as to reduce the difference between the estimated response document and the correct answer document.
[0045] In training a natural language processing pre-model, training is performed using the loss function expressed by the following formula (4), for example. The loss function in formula (4) is a type of hinge loss.
[0046]
number
[0047] In equation (4), the symbol represented by equation (5) below means a correct response, and the symbol represented by equation (6) below means an incorrect response.
[0048]
number
[0049]
number
[0050] In equation (4), the symbols represented in equation (7) below represent estimated response sentences.
[0051]
number
[0052] 3 is a diagram showing an example of a hardware configuration of a natural language processing model acquisition device 1 in an embodiment. The natural language processing model acquisition device 1 includes a control unit 11 including a processor 91 such as a CPU (Central Processing Unit) and a memory 92 connected by a bus, and executes a program. The natural language processing model acquisition device 1 functions as a device including the control unit 11, an input unit 12, a communication unit 13, a storage unit 14, and an output unit 15 by executing the program.
[0053] More specifically, the processor 91 reads out a program stored in the storage unit 14 and stores the read out program in the memory 92. The processor 91 executes the program stored in the memory 92, whereby the natural language processing model acquisition device 1 functions as a device including a control unit 11, an input unit 12, a communication unit 13, a storage unit 14, and an output unit 15.
[0054] The control unit 11 controls the operation of various functional units included in the natural language processing model acquisition device 1. The control unit 11 executes, for example, a natural language processing pre-model. The control unit 11 executes, for example, an update process. The update process is a process of updating the natural language processing pre-model so as to reduce the difference between an estimated response document obtained by executing the natural language processing pre-model and a correct answer document.
[0055] The control unit 11 controls, for example, the operation of the output unit 15. The control unit 11 records, for example, various pieces of information generated by the execution of a natural language processing pre-model in the storage unit 14. The control unit 11 records, for example, various pieces of information generated by the execution of an update process in the storage unit 14.
[0056] The input unit 12 includes input devices such as a mouse, a keyboard, a touch panel, etc. The input unit 12 may be configured as an interface that connects these input devices to the natural language processing model acquisition device 1. The input unit 12 accepts input of various information to the natural language processing model acquisition device 1.
[0057] The communication unit 13 includes a communication interface for connecting the natural language processing model acquisition device 1 to an external device. The communication unit 13 communicates with the external device via wired or wireless communication. The external device is, for example, a device that transmits learning data. The external device is, for example, the natural language processing device 2.
[0058] The storage unit 14 is configured using a computer-readable storage medium device such as a magnetic hard disk device or a semiconductor storage device. The storage unit 14 stores various information related to the natural language processing model acquisition device 1. The storage unit 14 stores a natural language processing pre-model in advance. The storage unit 14 stores an updated natural language processing pre-model. Note that storing a model means storing values of various parameters of a circuit that represents the model. The storage unit 14 stores information inputted, for example, via the input unit 12 or the communication unit 13. The storage unit 14 stores various information generated, for example, by the execution of the natural language processing pre-model. The storage unit 14 stores various information generated, for example, by the execution of an update process.
[0059] The output unit 15 outputs various information. The output unit 15 includes a display device such as a CRT (Cathode Ray Tube) display, a liquid crystal display, or an organic EL (Electro-Luminescence) display. The output unit 15 may be configured as an interface that connects these display devices to the natural language processing model acquisition device 1. The output unit 15 outputs information input to the input unit 12, for example. The output unit 15 may display the result of execution of a natural language processing pre-model, for example. The output unit 15 may display the result of execution of an update process, for example.
[0060] 4 is a diagram showing an example of the configuration of the control unit 11 in the embodiment. The control unit 11 includes a learning data acquisition unit 110, a natural language processing pre-model execution unit 120, an update control unit 130, a storage control unit 140, a communication control unit 150, and an output control unit 160. The learning data acquisition unit 110 acquires learning data input to the communication unit 13. The learning data acquired by the learning data acquisition unit 110 is output to the natural language processing pre-model execution unit 120. The output learning data is input to the natural language processing pre-model.
[0061] The natural language processing pre-model execution unit 120 executes a natural language processing pre-model on the action sentences included in the learning data acquired by the learning data acquisition unit 110. By executing the natural language processing pre-model on the action sentences, the natural language processing pre-model execution unit 120 estimates estimated response sentences for the action sentences. The natural language processing pre-model execution unit 120 includes a word sense disambiguation unit 121 and a response estimation unit 122. The word sense disambiguation unit 121 executes a word sense disambiguation process on the action sentences. The response estimation unit 122 estimates estimated response sentences based on at least the execution result of the word sense disambiguation unit 121 and the action sentences.
[0062] The update control unit 130 executes the update process. The update control unit 130 determines whether or not a learning end condition is satisfied. If the learning end condition is satisfied, the update control unit 130 does not update the natural language processing pre-model and ends the learning process of the natural language processing pre-model. If the learning end condition is satisfied, the update control unit 130 does not end the learning process.
[0063] The memory control unit 140 records various information in the memory unit 14. The communication control unit 150 controls the operation of the communication unit 13. The output control unit 160 controls the operation of the output unit 15.
[0064] FIG. 5 is a flowchart showing an example of the flow of processing executed by the natural language processing model acquisition device 1 in the embodiment. The learning data acquisition unit 110 acquires learning data (step S101). Next, the natural language processing pre-model execution unit 120 executes the natural language processing pre-model to estimate an estimated response sentence (step S102). Next, the update control unit 130 executes an update process (step S103). Next, the update control unit 130 determines whether or not a learning end condition is satisfied (step S104). If the learning end condition is satisfied (step S104: YES), the processing ends. The natural language processing pre-model at the time the processing ends is the natural language processing model. On the other hand, if the learning end condition is not satisfied (step S104: NO), the processing returns to step S101.
[0065] 6 is a diagram showing an example of a hardware configuration of a natural language processing device 2 in an embodiment. The natural language processing device 2 includes a control unit 21 including a processor 93 such as a CPU and a memory 94 connected by a bus, and executes a program. The natural language processing device 2 functions as a device including the control unit 21, an input unit 22, a communication unit 23, a storage unit 24, and an output unit 25 by executing the program.
[0066] More specifically, the processor 93 reads out a program stored in the storage unit 24 and stores the read out program in the memory 94. The processor 93 executes the program stored in the memory 94, whereby the natural language processing device 2 functions as a device including a control unit 21, an input unit 22, a communication unit 23, a storage unit 24, and an output unit 25.
[0067] The control unit 21 controls the operation of various functional units included in the natural language processing device 2. The control unit 21 executes, for example, the natural language processing model acquired by the natural language processing model acquisition device 1. The control unit 21 controls, for example, the operation of the output unit 25. The control unit 21 records, for example, various pieces of information generated by the execution of the natural language processing model in the storage unit 24.
[0068] The input unit 22 includes input devices such as a mouse, a keyboard, a touch panel, etc. The input unit 22 may be configured as an interface that connects these input devices to the natural language processing device 2. The input unit 22 accepts input of various information to the natural language processing device 2.
[0069] The communication unit 23 includes a communication interface for connecting the natural language processing device 2 to an external device. The communication unit 23 communicates with the external device via wired or wireless communication. The external device is, for example, a device that is a sender of an action sentence to be processed. The external device is, for example, the natural language processing model acquisition device 1. The communication unit 23 acquires a natural language processing model by communicating with the natural language processing model acquisition device 1.
[0070] The storage unit 24 is configured using a computer-readable storage medium device such as a magnetic hard disk device or a semiconductor storage device. The storage unit 24 stores various information related to the natural language processing device 2. The storage unit 24 stores information inputted via the input unit 22 or the communication unit 23, for example. The storage unit 24 stores various information generated by execution of a natural language processing model, for example. The storage unit 24 stores a natural language processing model, for example.
[0071] The output unit 25 outputs various information. The output unit 25 includes a display device such as a CRT display, a liquid crystal display, or an organic EL display. The output unit 25 may be configured as an interface that connects these display devices to the natural language processing device 2. The output unit 25 outputs, for example, information input to the input unit 22. The output unit 25 may display, for example, the execution result of a natural language processing model.
[0072] 7 is a diagram showing an example of the configuration of the control unit 21 in the embodiment. The control unit 21 includes an object acquisition unit 210, an estimation unit 220, a memory control unit 230, a communication control unit 240, and an output control unit 250. The object acquisition unit 210 acquires an action sentence to be processed that is input to the communication unit 23. The estimation unit 220 executes a natural language processing model on the action sentence acquired by the object acquisition unit 210. The estimation unit 220 estimates a response sentence to the action sentence by executing the natural language processing model.
[0073] The memory control unit 230 records various information in the memory unit 24. The communication control unit 240 controls the operation of the communication unit 23. The output control unit 250 controls the operation of the output unit 25.
[0074] FIG. 8 is a flowchart showing an example of the flow of processing executed by the natural language processing device 2 in the embodiment. The target acquisition unit 210 acquires the action sentence to be processed input to the communication unit 23 (step S201). Next, the estimation unit 220 executes a natural language processing model on the action sentence acquired in step S201 (step S202). By executing the natural language processing model, the estimation unit 220 estimates a response sentence to the action sentence acquired in step S201. Next, the communication control unit 240 controls the operation of the communication unit 23 to transmit the response sentence to a predetermined destination (step S203). The predetermined destination is, for example, a speaker. In this case, the speaker speaks the received response sentence. In step S203, the output control unit 250 may control the operation of the output unit 25 to cause the output unit 25 to output the response sentence.
[0075] The natural language processing system 100 configured in this way resolves the ambiguity of the meaning of each word contained in the sentence to be processed, and estimates a sentence that responds to the sentence to be processed based on the result of the resolution. Therefore, the natural language processing system 100 can reduce the low accuracy of natural language processing caused by ambiguity, that is, the meaning of a single word changes depending on the context. Therefore, the natural language processing system 100 can improve the accuracy of natural language processing.
[0076] (Modification) The natural language processing pre-model may include a topic estimation process. The topic estimation process is a process for estimating a topic of an utterance to which each word in a sentence to be processed belongs. The topic embedding vector shown in FIG. 2 above is an example of a vector representing a topic estimated by the topic estimation process.
[0077] 9 is an explanatory diagram for explaining the utterance topic inference process in the modified example. The utterance topic inference process includes a max pooling process, a topic distribution acquisition process, and an utterance embedding vector acquisition process.
[0078] The max pooling process is a process in which the maximum value of the elements of each word embedding vector contained in each utterance is obtained for each utterance, and a vector (hereinafter referred to as a "max pool vector") is generated in which the obtained values are arranged in the order of the words in the utterance.
[0079] The subject distribution acquisition process is a process for acquiring a distribution of subjects. The subject distribution acquisition process is executed, for example, by a feedforward neural network. The subject distribution acquisition process is, for example, the process of the following formula (8).
[0080]
number
[0081] The left side of Fig. 8 is a vector representing the j-th theme among J themes (J is a natural number) prepared in advance. The symbol represented by the following formula (9) in formula (8) represents a shared weight matrix, and the symbol represented by the following formula (10) in formula (8) is a vector representing a bias. Note that the shared weight matrix is a matrix shared by all the training data during training, and is a matrix indicating weight parameters.
[0082]
number
[0083]
number
[0084] In addition, in Fig. 9, W p,q means the element in row p and column q of the shared weight matrix in equation (9). 1 ~t 20 Each denotes a theme.
[0085] The utterance embedding vector acquisition process is a process for acquiring an embedding vector that represents an utterance (hereinafter, referred to as an "utterance embedding vector"). The utterance embedding vector acquisition process is, for example, a process expressed by the following formula (11).
[0086]
number
[0087] The symbol on the left side of equation (11) represents an utterance embedding vector that expresses the i-th utterance included in the sentence. The symbol represented by the following equation (12) in equation (11) represents a shared weight matrix, and the symbol represented by the following equation (13) in equation (11) is a vector representing a bias. Note that the shared weight matrix in equation (9) is a weight parameter matrix for learning a topic, and the shared weight matrix in equation (12) is a weight parameter matrix for learning an utterance based on the topic.
[0088]
number
[0089]
number
[0090] Symbol T in formula (11) is a vector whose elements are quantities indicating J predetermined themes. Specifically, symbol T is a vector expressed by the following formula (14).
[0091]
number
[0092] In this way, the topic inference process estimates the point (i.e., topic) in the topic space that corresponds to the maxpool vector. The topic space is an embedding space that contains the topic embedding vector. The topic inference process then estimates the correspondence between the utterances and the topics contained in the sentence to be processed. In this way, the topic inference process estimates the correspondence between each utterance u i Infer the subject matter.
[0093] During training of the natural language processing pre-model, the values expressed by equations (9), (10), (12), and (13) are updated. As a result, the accuracy of the topic estimation process is improved by training.
[0094] The topic inference process may be trained using a Masked Language Model (MML), for example. That is, the content of the topic inference process may be updated using MML.
[0095] When the natural language processing pre-model includes a topic estimation process, the natural language processing pre-model is trained using a loss function represented by, for example, the following formula (15) instead of the loss function of, for example, the above formula (4).
[0096]
number
[0097] L m is a loss function in MML. α is a predetermined value between 0 and 1. Learning to update the content of the utterance topic estimation process may be performed before learning to update the content of the word sense disambiguation process and the content of the response estimation process.
[0098] <Experimental Results> The results of an experiment using the natural language processing system 100 will be described. FIG. 10 is a first diagram showing an example of the results of an experiment using the natural language processing system 100 in the modified example. In the experiment, conversations uploaded to the following online bulletin board (hereinafter referred to as "first experimental conversations") and conversations included in translations of television shows and movies uploaded online (second experimental conversations) were used. There were 3,273,386 first experimental conversations. The 3,273,386 first experimental conversations contained a total of 12,190,160 utterances. The number of second experimental conversations was 2,836,382. The 2,836,382 conversations contained a total of 34,037,025 utterances.
[0099] In the experiments, sequences were truncated to 60-character subwords. The embedding size for all subwords was 512-dimensional. The embedding size for the final encoding was 512-dimensional. The learning rate started at 1.0 and decreased to 0.001 with cosine decay as the learning progressed. The hyperparameter λ for L2 regularization was 0.00001. Note that cosine decay refers to the phenomenon of decay along a cosine curve.
[0100] In addition, for example, a sequence means a sequence of words in a sentence. In a dialogue, a sequence means a sequence of utterances. In this way, a sequence means a string. A subword means a minimum set of words. Therefore, to explain a specific example of a subword using the word "for example", the subword is a set of "etae" and "ba". Truncating to 60-character subwords means, for example, 60 words in the case of 60 characters, and left-justifying to 60 words in the case of 65 words.
[0101] In the experiments, Recall@k was used. Recall@k is a measure of whether a relevant response occurs in the top k candidate responses, given a set of N responses to a given query, where only one response is relevant. In the experiments, Recall@k with N=100 and k=1 was used.
[0102] In the experiment, Recall@k was calculated for the following five processes. One of the five was a fine-tuned Bidirectional Encoder Representations from Transformers (BERT) (hereinafter referred to as "Process a"). One of the five was a process in which the following restrictions were imposed on the process executed by the natural language processing system 100 (hereinafter referred to as "Process b"). The restrictions were that the higher-level words were not estimated when the natural language processing pre-model was executed, and further, the topic of speech estimation process was not executed.
[0103] One of the five was a process that placed the following restriction on the process executed by the natural language processing system 100 (hereinafter referred to as "process c"). The restriction was that higher-level words were not estimated when the natural language processing pre-model was executed. One of the five was a process that placed the following restriction on the process executed by the natural language processing system 100 (hereinafter referred to as "process d"). The restriction was that sentences containing multiple utterances were not processed. The last of the five was a process that was executed by the natural language processing system 100 and that executed a speech topic estimation process and a natural language processing pre-model (hereinafter referred to as "process e"). In other words, it was a process with no restrictions.
[0104] (a) in Fig. 10 means process a. (b) in Fig. 10 means process b. (c) in Fig. 10 means process c. (d) in Fig. 10 means process d. (e) in Fig. 10 means process e.
[0105] Result D101 in Fig. 10 shows the result of the experiment using the first experimental conversation. Result D102 in Fig. 10 shows the result of the experiment using the second experimental conversation. Both result D101 and result D102 show that Recall@k is highest for process e.
[0106] FIG. 11 is a second diagram showing an example of the results of an experiment using the natural language processing system 100 in the modified example. More specifically, FIG. 11 shows an example of the results of evaluation of the estimation accuracy of the response estimation process. In FIG. 11, "ConvBERT (w / o topics and w / o semantics)" means the above-mentioned process b. In FIG. 11, "ConvBERT (w / o semantics)" means the above-mentioned process c. In FIG. 11, "ConvBERT" means the above-mentioned process e.
[0107] In Figure 11, "Set1" refers to the results using a large-scale threaded bulletin board dataset. "OpenSub" refers to the results using a dataset fine-tuned after pre-training using Set1. The numbers in Figure 11 indicate that the higher the number, the higher the estimation accuracy. Therefore, the results in Figure 11 show that the estimation accuracy of the response estimation process of "ConvBERT" is higher than others.
[0108] FIG. 12 is a third diagram showing an example of the results of an experiment using the natural language processing system 100 in the modified example. More specifically, FIG. 12 shows an example of the results of evaluation of the accuracy of word estimation. The definitions of "ConvBERT (w / o topics and w / o semantics)", "ConvBERT (w / o semantics)", "ConvBERT", "BERT-BASE", "Set1", and "OpenSub" in FIG. 12 are the same as those in FIG. 11. The numerical values in FIG. 12 indicate that the accuracy of estimation is higher as the numerical values are larger. Therefore, the result in FIG. 12 indicates that the accuracy of word estimation of "ConvBERT" is higher than others.
[0109] <Application Examples> In this way, the natural language processing system 100 can estimate at least the top words for each word. Therefore, the natural language processing system 100 has a high accuracy in estimating important words in each utterance. An important word means a word that has a larger amount of information than other words. And, the important word in each utterance is a word called an entity or a slot in the field of natural language processing.
[0110] Since the natural language processing system 100 has a high accuracy in estimating important words in each utterance, the natural language processing system 100 can determine with high accuracy the intention of a sentence input by a user to the natural language processing system 100. Thus, the natural language processing system 100 is applicable to a technology for supporting reservations for facilities such as restaurants, for example.
[0111] Fig. 13 is an explanatory diagram explaining an example of an application of the natural language processing system 100 in the modified example. Fig. 13 shows a reservation system 300 as one application example of the natural language processing system 100. The reservation system 300 includes a terminal 400 and the natural language processing system 100. The reservation system 300 is a system that reserves a restaurant in response to an input to the terminal 400 by a user's voice.
[0112] The terminal 400 is a computer equipped with a processor 95, a memory 96, etc., and executes a program. The terminal 400 is equipped with an input unit 401 and an output unit 402. The input unit 401 accepts voice input. The output unit 402 outputs voice. The terminal 400 is, for example, a smartphone. The terminal 400 may be a personal computer. The terminal 400 is capable of executing an artificial intelligence program. The terminal 400 is connected to the natural language processing system 100 so as to be able to communicate with it.
[0113] The terminal 400 is capable of converting a voice input to an input unit 401 into text data and converting a sentence of the text data into a voice by executing an artificial intelligence program. The text data output by the terminal 400 is input to a natural language processing device 2 included in the natural language processing system 100. The natural language processing device 2 is connected to the terminal 400 via a communication unit 23.
[0114] The voice input by the user to the terminal is, for example, "Please make a reservation at a restaurant near Tokyo Station that has reservations available at 6 p.m. on July 7." In this case, the natural language processing device 2 receives text data indicating the sentence "Please make a reservation at a restaurant near Tokyo Station that has reservations available for 4 people at 6 p.m. on July 7." The control unit 21 of the natural language processing device 2 executes a word sense disambiguation process for the sentence indicated by the received text data. The control unit 21 of the natural language processing device 2 estimates a slot using a technique for estimating a slot, such as an utterance embedding vector acquisition process, based on the result of the execution of the word sense disambiguation process. The slot is estimated by, for example, the estimation unit 220.
[0115] The control unit 21 of the natural language processing device 2 determines the operation to be performed by the terminal 400 based on the estimated slot. The operation to be performed is determined by, for example, the estimation unit 220. Information indicating the determined operation is transmitted to the terminal 400 by the communication control unit 240 via the communication unit 23. The terminal 400 performs the instructed operation and makes a reservation. The terminal 400 transmits the result of the reservation to the natural language processing device 2. The natural language processing device 2 receives the result of the reservation and generates a response sentence using the received result. The generation of the response sentence using the received result is performed by, for example, a method of returning a sentence from among answer candidates. The generation of the response sentence is performed by, for example, the estimation unit 220.
[0116] The response sentence is, for example, "A reservation for four tables has been made at Aiueo Restaurant at 18:00 on July 7th." The response sentence generated by the natural language processing device 2 is transmitted to the terminal 400 via the communication unit 23. The output unit 402 of the terminal 400 that receives the response sentence outputs the response sentence by voice. Note that the "dialogue-type artificial intelligence service" in FIG. 13 is a device.
[0117] In this way, the natural language processing device 2 is applied to a technology for supporting restaurant reservations. Note that the object of a reservation is not necessarily limited to a restaurant.
[0118] Each of the natural language processing model acquisition device 1 and the natural language processing device 2 may be implemented using a plurality of information processing devices communicably connected via a network. In this case, each functional unit included in each of the natural language processing model acquisition device 1 and the natural language processing device 2 may be distributed and implemented in the plurality of information processing devices.
[0119] Each natural language processing system 100 may be implemented using a plurality of information processing devices communicably connected via a network. In this case, each functional unit included in each natural language processing system 100 may be distributed and implemented in the plurality of information processing devices.
[0120] All or part of the functions of the natural language processing model acquisition device 1, the natural language processing device 2, and the natural language processing system 100 may be realized using hardware such as an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array). The program may be recorded on a computer-readable recording medium. Examples of computer-readable recording media include portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into computer systems. The program may be transmitted via an electric communication line.
[0121] Although an embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to this embodiment, and designs that do not deviate from the gist of the present invention are also included.
[0122] The natural language processing pre-model executing unit 120 is an example of a mathematical model executing unit. The update control unit 130 is an example of an update unit. [Explanation of symbols]
[0123] 100...natural language processing system, 1...natural language processing model acquisition device, 2...natural language processing device, 11...control unit, 12...input unit, 13...communication unit, 14...storage unit, 15...output unit, 110...learning data acquisition unit, 120...natural language processing pre-model execution unit, 130...update control unit, 140...storage control unit, 150...communication control unit, 160...output control unit, 121...word sense disambiguation unit, 122...response estimation unit, 21...control unit, 22...input unit, 23...communication unit, 24...storage unit, 25...output unit, 210...object acquisition unit, 220...estimation unit, 230...storage control unit, 240...communication control unit, 250...output control unit, 300...reservation system, 400...terminal, 401...input unit, 402...output unit, 91...processor, 92...memory, 93...processor, 94...memory, 95...processor, 96...memory
Claims
1. a mathematical model execution unit that executes a mathematical model including a word sense ambiguity resolution process that resolves ambiguity in the meaning of each word constituting an action sentence, which is a sentence to be processed, and a response estimation process that estimates a response sentence, which is a sentence that responds to the action sentence, based at least on each word constituting the action sentence, the result of the word sense ambiguity resolution process, and the position of each of the words in the action sentence; an update unit that updates the mathematical model based on a result of the response estimation process; Equipped with The response estimation process includes a response top word sequence acquisition process for acquiring each top word of the response sentence candidate by eliminating ambiguity of the meaning of each word constituting the response sentence candidate, which is a candidate of the response sentence, and a response determination process for determining the response sentence candidate in which the difference between the action embedding data and the response candidate embedding data satisfies a predetermined condition as the response sentence to the action sentence, The action embedding data includes each word constituting the action sentence, the position of each word constituting the action sentence in the action sentence, and each upper word of the action sentence which is a result of the word sense disambiguation process; A natural language processing model acquisition device, wherein the response candidate embedded data includes each word constituting the response sentence candidate, the position within the response sentence candidate of each of the words constituting the response sentence candidate, and each top word of the response sentence candidate which is a result of the response top word sequence acquisition process.
2. The mathematical model execution unit estimates a topic for each of an utterance to which each word included in the action sentence belongs and an utterance to which each word included in the response sentence candidate belongs, The action embedding data further includes a topic of an utterance to which each word included in the action sentence belongs; The response candidate embedding data further includes a topic of an utterance to which each word included in the response sentence candidate belongs. The natural language processing model acquisition device according to claim 1 .
3. The content of the subject estimation process is updated by a Masked Language Model (MLM). The natural language processing model acquisition device according to claim 2 .
4. an object acquisition unit for acquiring an action sentence which is a sentence to be processed; a mathematical model execution unit that executes a mathematical model including a word sense ambiguity resolution process that resolves ambiguity in the meaning of each word constituting the action sentence, and a response estimation process that estimates a response sentence that is a sentence that responds to the action sentence based at least on each word constituting the action sentence, the result of the word sense ambiguity resolution process, and the position of each of the words in the action sentence, and an update unit that updates the mathematical model based on the estimation result of the response estimation process; and an estimation unit that estimates the response sentence to the action sentence acquired by the target acquisition unit using the mathematical model updated by a natural language processing model acquisition device having: Equipped with The response estimation process includes a response top word sequence acquisition process for acquiring each top word of the response sentence candidate by eliminating ambiguity of the meaning of each word constituting the response sentence candidate, which is a candidate of the response sentence, and a response determination process for determining the response sentence candidate in which the difference between the action embedding data and the response candidate embedding data satisfies a predetermined condition as the response sentence to the action sentence, The action embedding data includes each word constituting the action sentence, the position of each word constituting the action sentence in the action sentence, and each upper word of the action sentence which is a result of the word sense disambiguation process; The response candidate embedded data includes each word constituting the response sentence candidate, the position of each word constituting the response sentence candidate within the response sentence candidate, and each top word of the response sentence candidate which is a result of the response top word sequence acquisition process.
5. a mathematical model execution step of executing a mathematical model including a word sense ambiguity resolution process for resolving ambiguity of the meaning of each word constituting an action sentence, which is a sentence to be processed, and a response estimation process for estimating a response sentence, which is a sentence that responds to the action sentence, based at least on each word constituting the action sentence, the result of the word sense ambiguity resolution process, and the position of each of the words in the action sentence; an updating step of updating the mathematical model based on a result of the estimation of the response estimation process; having The response estimation process includes a response top word sequence acquisition process for acquiring each top word of the response sentence candidate by eliminating ambiguity of the meaning of each word constituting the response sentence candidate, which is a candidate of the response sentence, and a response determination process for determining the response sentence candidate in which the difference between the action embedding data and the response candidate embedding data satisfies a predetermined condition as the response sentence to the action sentence, The action embedding data includes each word constituting the action sentence, the position of each word constituting the action sentence in the action sentence, and each upper word of the action sentence which is a result of the word sense disambiguation process; A natural language processing model acquisition method, wherein the response candidate embedded data includes each word constituting the response sentence candidate, a position within the response sentence candidate of each of the words constituting the response sentence candidate, and each top word of the response sentence candidate which is a result of the response top word sequence acquisition process.
6. A target acquisition step of acquiring an action sentence which is a sentence to be processed; a mathematical model execution unit that executes a mathematical model including a word sense ambiguity resolution process that resolves ambiguity in the meaning of each word constituting the action sentence, and a response estimation process that estimates a response sentence that responds to the action sentence based at least on each word constituting the action sentence, the result of the word sense ambiguity resolution process, and the position of each of the words in the action sentence, and an update unit that updates the mathematical model based on the estimation result of the response estimation process, and an estimation step of estimating a response sentence that is a sentence that responds to the action sentence acquired in the target acquisition step using the mathematical model updated by a natural language processing model acquisition device having an update unit that updates the mathematical model based on the estimation result of the response estimation process; having The response estimation process includes a response top word sequence acquisition process for acquiring each top word of the response sentence candidate by eliminating ambiguity of the meaning of each word constituting the response sentence candidate, which is a candidate of the response sentence, and a response determination process for determining the response sentence candidate in which the difference between the action embedding data and the response candidate embedding data satisfies a predetermined condition as the response sentence to the action sentence, The action embedding data includes each word constituting the action sentence, the position of each word constituting the action sentence in the action sentence, and each upper word of the action sentence which is a result of the word sense disambiguation process; A natural language processing method, wherein the response candidate embedded data includes each word constituting the response sentence candidate, a position within the response sentence candidate of each of the words constituting the response sentence candidate, and each top word of the response sentence candidate which is a result of the response top word sequence acquisition process.
7. A program for causing a computer to function as the natural language processing model acquisition device according to any one of claims 1 to 3.
8. A program for causing a computer to function as the natural language processing device according to claim 4.
Citation Information
Patent Citations
Method for processing information, information processor, and program
JP2019082987A
