An information processing apparatus 10 includes an acceptance unit 12, a formal language generation unit 14, an inference unit 16, and an update unit 18. The formal language generation unit 14 generates training expressions in a formal language based on parameters prepared in advance and pieces of text accepted by the acceptance unit 12. The inference unit 16 executes at least one inference out of deductive inference and abduction on the above training expressions using a knowledge base prepared in advance. The update unit 18 compares an inference result of the inference unit 16 with a model answer input in advance, and updates parameters such that an inference result that matches the model answer is likely to be obtained through inference performed by the inference unit 16.
|
7. An information processing method comprising:
accepting at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
transferring the at least one of words in the texts into another word corresponding to the at least one of words based on a pre-determined feature table, the feature table defining a weight of each relationship between the at least one of words in the texts and the another word;
generating at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts, wherein input data of the pre-trained machine learning model comprises the another word;
automatically inferring at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
automatically updating the weight such that the at least one of inference results that matches the labels is likely to be obtained through the automatically inferring.
1. An information processing apparatus comprising:
one or more memories storing instructions; and
one or more processors configured to execute the instructions to:
accept at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
transfer the at least one of words in the texts into another word corresponding to the at least one of words based on a pre-determined feature table, the feature table defining a weight of each relationship between the at least one of words in the texts and the another word;
generate at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts, wherein input data of the pre-trained machine learning model comprises the another word;
automatically infer at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
update the weight such that the at least one of inference results that matches the labels is likely to be obtained through the inference performed.
13. A non-transitory computer-readable recording medium that includes a program recorded thereon, the program including instructions that cause a computer to carry out:
accepting at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
transferring the at least one of words in the texts into another word corresponding to the at least one of words based on a pre-determined feature table, the feature table defining a weight of each relationship between the at least one of words in the texts and the another word;
generating at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts, wherein input data of the pre-trained machine learning model comprises the another word;
automatically inferring at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
automatically updating the model such that the at least one of inference results that matches the labels is likely to be obtained through the automatically inferring.
2. The information processing apparatus according to
wherein the one or more processors are configured to calculate a probability that the labels are obtained from the at least one of queries by executing probabilistic inference, and
the one or more processors are configured to update the model such that the probability that is calculated is increased.
3. The information processing apparatus according to
wherein the labels include a plurality of expressions written in a formal language, and
the one or more processors are configured to update, in response to a condition that the at least one of inference results that matches at least one expression out of the plurality of expressions included in the labels is obtained through the inference, the model such that the at least one of inference results that matches the at least one expression is likely to be obtained through the inference .
4. The information processing apparatus according to
wherein the one or more processors are configured to generate queries for each texts accepted, and
the one or more processors are configured to inference the at least one of inference results on the queries generated for each texts.
5. The information processing apparatus according to
wherein the one or more processors are configured to update, in response to a condition that the at least one of inference results that matches the labels is obtained, the model such that the queries from which the queries from which the labels are obtained is likely to be generated.
6. The information processing apparatus according to
wherein the one or more processors are is configured to update the model using machine learning.
8. The information processing method according to
wherein, when the at least one of inference results is inferred, a probability that the labels are obtained from the at least one of queries is calculated by executing probabilistic inference, and
when the model is updated, the model is updated such that the probability is increased.
9. The information processing method according to
wherein the labels include a plurality of expressions written in a formal language, and
when the model is updated, the model is updated such that the at least one of inference results that matches the at least one expression is likely to be obtained through the automatically inferring, in response to a condition that the at least one of inference results that matches at least one expression out of the plurality of expressions included in the labels is obtained through the automatically inferring.
10. The information processing method according to
wherein texts in the natural language are accepted,
when a plurality of queries are generated, the plurality of queries are generated for each texts, and
when the at least one of inference results is inferred, the at least one of inference results is inferred on the plurality of queries generated for each texts.
11. The information processing method according to
wherein, when the model is updated, the model is updated such that the queries from which the at least one of inference results that matches the labels is obtained is likely to be generated, in response to a condition that the at least one of inference results that matches the labels is obtained.
12. The information processing method according to
wherein when the model is automatically updated, the model is updated using machine learning.
14. The non-transitory computer-readable recording medium according to
wherein, when the at least one of inference results is inferred, a probability that the labels are obtained from the at least one of queries is calculated by executing probabilistic inference, and
when the model is updated, the model is updated such that the probability is increased.
15. The non-transitory computer-readable recording medium according to
wherein the labels include a plurality of expressions written in a formal language, and
when the model is updated, the model is updated such that the at least one of inference results that matches the at least one expression is likely to be obtained through the automatically inferring, in response to a condition that the at least one of inference results that matches at least one expression out of the plurality of expressions included in the labels is obtained through the automatically inferring.
16. The non-transitory computer-readable recording medium according to
wherein texts in the natural language are accepted,
when a plurality of queries are generated, a the plurality of queries are generated for each texts, and
when the at least one of inference results is inferred, the at least one of inference results is inferred on the plurality of queries generated for each texts.
17. The non-transitory computer-readable recording medium according to
wherein, when the model is updated, the model is updated such that the queries from which the at least one of inference results that matches the labels is obtained is likely to be generated, in response to a condition that the at least one of inference results that matches the labels is obtained.
18. The non-transitory computer-readable recording medium according to
wherein when the model is automatically updated, the model is updated using machine learning.
|
This application is a National Stage of International Application No. PCT/JP2019/004305 filed Feb. 6, 2019, claiming priority based on Japanese Patent Application No. 2018-020258 filed Feb. 7, 2018, the disclosure of which is incorporated herein in its entirety by reference.
The present invention relates to an information processing apparatus and an information processing method for optimizing parameters that are used when text in a natural language is converted into an expression in a formal language, as well as a computer-readable recording medium in which a program for optimizing parameters that are used when text in a natural language is converted into an expression in a formal language is recorded.
In recent years, it has become possible to acquire large-scale knowledge bases via the Internet, and research on systems for performing question-answering using a knowledge base is advancing. A knowledge base that is used in such a system commonly has a structure in which knowledge corresponding to a query written in a formal language can be extracted. For example, Resource Description Framework (RDF) is used as a formal language.
Even when a question answering system that uses such a knowledge base, to which an inquiry can be made in a formal language, is used, a user's question is commonly expressed in a natural language. Therefore, in order to extract a piece of knowledge corresponding to the user's question from the knowledge base, the user's question expressed in a natural language needs to be converted into a formal language.
In view of this, conventionally, semantic parsers are used to convert a natural language into a formal language. Commonly, question answering systems that use a knowledge base convert a user's question expressed in a natural language into a query expression written in a formal language using a semantic parser, extract, from the knowledge base, an answer corresponding to the query expression obtained by the conversion, and present the answer to the user.
Incidentally, in order to extract an appropriate answer to a user's question from a knowledge base, there is a need to properly understand the semantic structure of the user's question, and convert the question in a natural language into a query expression suitable for the knowledge base. However, expressions in a natural language vary greatly, and thus it is difficult to manually construct rules for appropriately converting a user's question in the natural language into a query expression.
In view of this, techniques for automatically constructing a semantic parser suitable for any knowledge base using machine learning have been proposed (for example, see Non-patent Document 1).
In the technique described in Non-patent Document 1, questions in a natural language and correct answers to the questions are prepared in advance, and the questions in the natural language prepared in advance are converted into a plurality of query expressions by a semantic parser. Specifically, the semantic parser converts (the questions in) the natural language into query expressions written in a formal language based on parameters set in advance. In addition, in the technique described in Non-patent Document 1, answers respectively corresponding to a plurality of query expressions and generated by the semantic parser are extracted from the knowledge base, and the plurality of extracted answers are compared with the above correct answers prepared in advance. Then, the above-mentioned parameters are updated based on the result of the comparison between the plurality of extracted answers and the correct answers prepared in advance so as to obtain a correct answer to a user's question.
Non-patent Document 1: Percy Liang, Michael Jordan, and Dan Klein. 2011. Learning dependency-based compositional semantics. In Proceedings of the Human Language Technology Conference of the Association for Computational Linguistics, pages 590-599, Portland, Oreg.
Incidentally, the technique in Non-patent Document 1 is considered to be useful for a system that presents an answer determined unambiguously for a question input by the user. However, in a system that presents an inference result that is based on a natural language input by the user, it is difficult to present an appropriate inference result simply by using the technique of Non-patent Document 1 alone.
An example object of the invention is to provide an information processing apparatus, an information processing method, and a computer-readable recording medium that can optimize parameters that are used when a natural language is converted into a formal language in a system that performs inference that is based on a natural language input by the user.
In order to achieve the foregoing object, an information processing apparatus according to an example aspect of the invention includes:
an acceptance circuit configured to accept at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
a formal language generation circuit configured to generate at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts;
an inference circuit configured to automatically infer at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
an update circuit configured to update the model such that the at least one of inference results that matches the labels is likely to be obtained through the inference that is performed by the inference circuit.
In addition, in order to achieve the foregoing object, an information processing method according to an example aspect of the invention includes;
accepting at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts;
automatically inferring at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
automatically updating the model such that the at least one of inference results that matches the labels is likely to be obtained through the automatically inferring.
Furthermore, in order to achieve the foregoing object, a non-transitory computer-readable recording medium according to an example aspect of the invention includes a program recorded thereon, the program including instructions that cause a computer to carry out:
accepting at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
generating at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts;
executing automatically inferring at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
automatically updating the model such that the at least one of inference results that matches the labels is likely to be obtained through the automatically inferring.
As described above, according to the invention, it is possible to optimize parameters that are used when a natural language is converted into a formal language in a system that performs inference that is based on a natural language input by the user.
Hereinafter, an information processing apparatus, an information processing method and a program according to an example embodiment of the invention is described, with reference to
The information processing apparatus 10 includes an acceptance unit 12 (e.g., an acceptance circuit), a formal language generation unit 14 (e.g., a formal language generation circuit), an inference unit 16 (e.g., an inference circuit), and an update unit 18 (e.g., an update circuit). One or more pieces of text written in a natural language and a model answer of an inference result obtained from the pieces of text are input to the acceptance unit 12. The acceptance unit 12 transmits the one or more accepted pieces of text to the formal language generation unit 14, and transmits the accepted model answer to the update unit 18.
The formal language generation unit 14 generates, as one or more training expressions, one or more expressions written in a formal language corresponding to the above pieces of text transmitted from the acceptance unit 12, based on parameters prepared in advance and the above one or more pieces of text. The formal language generation unit 14 transmits the one or more generated training expressions to the inference unit 16. In the example embodiment, the formal language generation unit 14 converts a piece of text in a natural language into an expression in a formal language using machine learning such as that that uses a log-linear model. Although a detailed description is omitted, the formal language generation unit 14 can be configured similarly to a known converter that converts a piece of text in a natural language input by the user into an expression in a formal language, for example. The formal language generation unit 14 can be constructed using the technique disclosed in Non-patent Document 1, for example.
The inference unit 16 executes at least one inference out of deductive inference and abduction on the one or more training expressions transmitted from the formal language generation unit 14, using a knowledge base prepared in advance. The knowledge base stores, for example, at least one relationship out of a causal relationship, a temporal before-after relationship, a semantic super-sub relationship, and an implicational relationship between the antecedent and consequent item. The inference unit 16 transmits a result obtained through the inference, to the update unit 18.
The update unit 18 compares the inference result transmitted from the inference unit 16 with the model answer transmitted from the acceptance unit 12, and updates the above-mentioned parameters such that an inference result that matches the model answer is likely to be obtained through the inference performed by the inference unit 16.
As described above, according to the example embodiment, an expression in a formal language is obtained as a result of inputting a piece of text written in a natural language to the formal language generation unit 14, and inference is executed by the inference unit 16 based on the obtained expression in the formal language. Parameters are then updated such that an inference result that matches a model answer set in advance is likely to be obtained through the above inference performed by the inference unit 16. In this manner, it is possible to optimize parameters that are used when one or more pieces of text in a natural language are converted into one or more expressions in a formal language.
Next, a configuration of an information processing apparatus according to an example embodiment of the invention is described in more detail with reference to
As shown in
As described above, one or more pieces of text written in a natural language and a model answer of an inference result obtained from the one or more pieces of text are input to the acceptance unit 12. The acceptance unit 12 transmits the one or more pieces of accepted text to the formal language generation unit 14, and transmits the accepted model answer to the update unit 18.
The formal language generation unit 14 generates, as one or more training expressions, one or more expressions written in a formal language corresponding to the above one or more pieces of text transmitted from the acceptance unit 12, based on parameters stored in the parameter storage unit 102 (to be described later) in advance and the above one or more pieces of text. The formal language generation unit 14 transmits the one or more generated training expressions to the inference unit 16.
In the example embodiment, the formal language generation unit 14 converts one or more pieces of text written in a natural language into one or more training expressions written in a formal language, for example, based on a plurality of pre-set features (characteristics) characterizing a pair of text that is input and an expression in a formal language that is output, using machine learning such as that that uses a log-linear model.
In the example embodiment, for example, a plurality of combinations of surface layer words and deep layer words as shown in
In addition, as shown in
Note that surface layer words and deep layer words shown in
In the example embodiment, the formal language generation unit 14 converts surface layer words into deep layer words based on features set in advance, for example, and converts a piece of text in a natural language into an expression in a formal language by substituting an argument of a deep layer word with another deep layer word. An example of a conversion operation of the formal language generation unit 14 is described briefly below.
As shown in
In the example embodiment, as shown in
Although a detailed description is omitted, in the example embodiment, for example, a configuration may also be adopted in which, when converting surface layer words into deep layer words, the formal language generation unit 14 selects features that have a weight of a predetermined threshold value or higher, and performs conversion. The formal language generation unit 14 may also transmit, for example, only a predetermined number of training expressions selected in the order of highest generation probability, from among a plurality of generated training expressions, to the inference unit 16 along with the probabilities of the training expressions. The formal language generation unit 14 may also output, for example, a predetermined number of randomly sampled training expressions, from among a plurality of generated training expressions, to the inference unit 16.
The inference unit 16 executes at least one inference out of deductive inference and abduction, on one or more training expressions transmitted from the formal language generation unit 14, using the knowledge base stored in the knowledge base storage unit 104.
In the example embodiment, when a plurality of training expressions are generated for each piece of text by the formal language generation unit 14, the inference unit 16 executes inference on all of the combinations of training expressions generated from different pieces of text, for example. In the example in
Note that the inference unit 16 may execute inference on a predetermined number of combinations of training expressions randomly sampled from among all of the combinations of the training expressions generated from different pieces of text. In addition, the inference unit 16 may also execute inference on a predetermined number of combinations of training expressions sampled based on parameters when training expressions are generated, from among all of the combinations of the training expressions generated from different pieces of text.
The inference unit 16 transmits a result obtained by inference, to the update unit 18. The update unit 18 compares the inference result transmitted from the inference unit 16 with a model answer transmitted from the acceptance unit 12, and updates parameters stored in the parameter storage unit 102 such that an inference result that matches the model answer is likely to be obtained through inference performed by the inference unit 16. A description thereof is given below with an example.
Assume that, for example, the expression “grandfather (Jiro, Taro)” written in a formal language has been input to the acceptance unit 12 as a model answer. Also, assume that a plurality of rules are stored in a knowledge base, and the rules include “father (a, b){circumflex over ( )} father (b, c)->grandfather (a, c)”.
Under the above conditions, when inference is executed on the nine combinations shown in
The output unit 20 outputs parameters updated by the update unit 18. The parameters output from the output unit 20 and updated parameters stored in the parameter storage unit 102 can also be used in an apparatus other than the information processing apparatus 10 (for example, a known converter). In the example embodiment, the output unit 20 outputs parameters stored in the parameter storage unit 102, when the number of updates performed by the update unit 18 reaches a designated number set in advance, for example.
Note that a case has been described above in which one model answer is input to the acceptance unit 12, but a plurality of model answers may also be input to the acceptance unit 12. In this case, there is a possibility that a plurality of inference results that match the plurality of model answers is obtained through inference performed by the inference unit 16. In this case, the update unit 18 may update parameters stored in the parameter storage unit 102 such that a plurality of training expressions corresponding to a plurality of inference results that match a plurality of model answers are likely to be generated by the formal language generation unit 14, for example. Note that inference results that match all of a plurality of model answers do not need to be obtained through inference performed by the inference unit 16. That is to say, it suffices for an inference result that matches one of the plurality of model answers to be obtained by the inference unit 16. In this case, the update unit 18 may update parameters stored in the parameter storage unit 102 such that a training expression corresponding to an inference result that matches one of a plurality of model answers is likely to be generated by the formal language generation unit 14, for example.
In addition, one piece of text or three or more pieces of text may also be input to the acceptance unit 12. For example, when one piece of text is input to the acceptance unit 12, a plurality of training expressions are generated by the formal language generation unit 14 based on that one piece of text. Inference is then executed on each of the plurality of training expressions, and, in response to a condition that an inference result that matches the model answer is obtained, parameters stored in the parameter storage unit 102 are updated by the update unit 18. In addition, when three or more pieces of text are input to the acceptance unit 12, one or more training expressions are generated for each piece of text by the formal language generation unit 14. In this case, for example, inference is executed on all of the combinations of training expressions generated from different pieces of text, or a combination of randomly selected training expressions, and, when an inference result that matches the model answer is obtained, parameters stored in the parameter storage unit 102 are updated by the update unit 18.
Next, operations of an information processing apparatus in an example embodiment of the invention is described with reference to
Note that a case is described below in which the inference unit 16 executes inference on a predetermined number of training expressions randomly sampled from among one or more training expressions generated from one or more pieces of text (or a predetermined number of randomly sampled combinations of training expressions). However, the inference unit 16 may execute inference on training expressions sampled based on parameters (or a combination of training expressions sampled based on parameters), for example.
As shown in
Next, the inference unit 16 executes inference on one or more training expressions randomly sampled from among the one or more training expressions generated by the formal language generation unit 14 (or one or more combinations of randomly sampled training expressions), using a knowledge base stored in the knowledge base storage unit 104, and obtains one or more inference results (step S3). Next, the update unit 18 compares the one or more inference results obtained by the inference unit 16 with the model answer input to the acceptance unit 12, and determines whether or not an inference result that matches the model answer has been obtained (step S4).
If it is determined in step S4 that an inference result that matches the model answer has been obtained, the update unit 18 updates parameters stored in the parameter storage unit 102 as described above (step S5). Note that, in step S5, as described above, for example, the update unit 18 may update parameters such that the weights of features, based on which text in a natural language is converted into a correct expression, are increased, or may update parameters such that the weights of features, based on which text in a natural language is converted into a training expression different from the correct expression, are reduced. After the parameters have been updated by the update unit 18, the output unit 20 determines whether or not the number of updates performed by the update unit 18 has reached a designated number of times set in advance (step S6). If the number of updates has reached the designated number, the output unit 20 outputs parameters (step S7).
If it is determined in step S4 that an inference result that matches the model answer has not been obtained, or if it is determined in step S6 that the number of updates has not reached the designated number, the process in step S2 is executed again, and a training expression is newly generated by the formal language generation unit 14. Subsequently, the above-described processing is repeatedly executed. Note that, if it is determined in step S4 that an inference result that matches the model answer has not been obtained, the procedure may return to the process step S1.
As described above, according to the example embodiment, it is possible to optimize parameters that are used when one or more pieces of text in a natural language are converted into one or more expressions in a formal language such that an inference result that matches a model answer set in advance is likely to be obtained by the inference unit 16.
In the above example embodiment, in step S4, the update unit 18 compares an inference result obtained by the inference unit 16 with a model answer input to the acceptance unit 12, and determines whether or not an inference result that matches the model answer has been obtained. However, content of processing that is performed by the update unit 18 is not limited to the above-described example.
For example, in response to a condition that a model answer input to the acceptance unit 12 includes a plurality of expressions written in a formal language, the update unit 18 determines whether or not an inference result that matches at least one expression out of the plurality of expressions included in the model answer has been obtained through inference performed by the inference unit 16, in step S4, as shown in
In step S4, if an inference result that matches at least one expression out of the plurality of expressions included in the model answer has been obtained, the update unit 18 updates parameters such that the inference result that matches at least one expression is likely to be obtained through inference performed by the inference unit 16 (step S5). Specifically, parameters stored in the parameter storage unit 102 are updated such that the training expression from which the inference result that matches at least one expression can be obtained is likely to be generated by the formal language generation unit 14.
In step S4, if an inference result that matches at least one expression out of the plurality of expressions included in the model answer has not been obtained, the process in step S2 is executed again, and training expressions are newly generated by the formal language generation unit 14. The above-described processing is then executed repeatedly. Note that the content of processes other than the process in step S4 is similar to that described with reference to
In the above example embodiment, a case has been described in which the output unit 20 determines in step S6 whether or not the number of updates performed by the update unit 18 has reached the designated number, but the process in step S6 is not limited to the above-described example. For example, a configuration may also be adopted in which, in step S6, if the above generation probability of a correct expression that is based on updated parameters is larger than the generation probability of a training expression different from the correct expression, the output unit 20 makes a determination of Yes, and if the generation probability of the correct expression is smaller than or equal to the generation probability of a training expression other than the correct expression, the output unit 20 makes a determination of No. In addition, for example, a configuration may also be adopted in which, in step S6, if the smallest value of the difference between the above generation probability of the correct expression that is based on updated parameters and the generation probability of a training expression other than the correct expression is larger than a threshold value set in advance, the output unit 20 makes a determination of Yes, and, if the above smallest value is smaller than or equal to the threshold value, makes a determination of No.
In the above example embodiment, a case has been described in which the inference unit 16 performs decisive inference in step S3, but the inference unit 16 may also perform probabilistic inference. When the inference unit 16 performs probabilistic inference, the probability that a model answer is obtained from one or more training expressions generated by the formal language generation unit 14 is calculated in step S3. Specifically, for example, as shown in
A probability that a model answer is obtained can be calculated using an MLN (Markov Logic Network), for example, with training expressions generated by the formal language generation unit 14 serving as inputs (nodes). When an MLN is used, sampling is performed such that, for example, regarding the generation probability of each training expression (probability that each training expression is obtained) described with reference to
As shown in
In addition, in the information processing apparatus 10 according to Modified Example 3, in step S6, determination is performed as to whether or not any one of scores currently calculated by the inference unit 16 exceeds a predetermined threshold value. If it is determined in step S6 that any one of the scores calculated by the inference unit 16 exceeds the predetermined threshold value, the output unit 20 outputs parameters updated by the update unit 18 (step S7).
If it is determined in step S4 that none of the scores calculated by the inference unit 16 is higher than the highest value of the scores previously calculated, or, if it is determined in step S6 that none of the scores calculated by the inference unit 16 exceeds the threshold value, the process in step S2 is executed again, and training expressions are newly generated by the formal language generation unit 14. Subsequently, the above-described processing is repeatedly executed. Note that content of processes other than those in steps S4 and S6 is similar to that described with reference to
When probabilistic inference is performed as in Modified Example 3, the value of a score calculated by the inference unit 16 increases as a result of some pieces of text out of a plurality of pieces of text being converted into a proper formal language. Therefore, even if only some pieces of text of a plurality of pieces of text (for example, several thousands of pieces of text) are converted into proper expressions in a formal language by the formal language generation unit 14, parameters stored in the parameter storage unit 102 can be updated.
The program according to the example embodiment of the invention need only be a program that causes a computer to execute steps S1 to S7 shown in
Also, the program according to the example embodiment may be executed by a computer system built from a plurality of computers. In this case, for example, each of the computers may function as one of the acceptance unit 12, the formal language generation unit 14, the inference unit 16, the update unit 18, and the output unit 20.
Here, a computer that realizes an information processing apparatus by executing the program according to the example embodiment is described with reference to drawings.
As shown in
The CPU 111 implements various computational operations, by extracting programs (code) according to the example embodiment that are stored in the storage device 113 in the main memory 112, and executing these programs in predetermined order. The main memory 112, typically, is a volatile storage device such as a DRAM (Dynamic Random Access Memory). Also, programs according to the example embodiment are provided in a state of being stored on a computer-readable recording medium 120. Note that programs according to the example embodiment may be distributed over the Internet connected via the communication interface 117.
Also, a semiconductor storage device such as a flash memory is given as a specific example of the storage device 113, other than a hard disk drive. The input interface 114 mediates data transmission between the CPU 111 and input devices 118 such as a keyboard and a mouse. The display controller 115 is connected to a display device 119 and controls display by the display device 119.
The data reader/writer 116 mediates data transmission between the CPU 111 and the recording medium 120, and executes readout of programs from the recording medium 120 and writing of processing results of the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and other computers.
Also, a general-purpose semiconductor storage device such as a CF (Compact Flash (registered trademark)) card or an SD (Secure Digital) card, a magnetic storage medium such as a flexible disk, and an optical storage medium such as a CD-ROM (Compact Disk Read Only Memory) are given as specific examples of the recording medium 120.
Note that the information processing apparatus according to the example embodiment is also realizable by using hardware corresponding to the respective units, rather than by a computer on which programs are installed. Furthermore, the information processing apparatus may be realized in part by programs, and the remaining portion may be realized by hardware.
The example embodiment described above can be partially or wholly realized by supplementary notes 1 to 15 described below, but the invention is not limited to the following description.
An information processing apparatus comprising:
an acceptance circuit configured to accept at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
a formal language generation circuit configured to generate at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts;
an inference circuit configured to automatically infer at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
an update circuit configured to update the model such that the at least one of inference results that matches the labels is likely to be obtained through the inference performed by the inference circuit.
The information processing apparatus according to Supplementary Note 1,
wherein the inference circuit is configured to calculate a probability that the labels is obtained from the at least one of queries by executing probabilistic inference, and
the update circuit updates the model such that the probability that is calculated by the inference circuit is increased.
The information processing apparatus according to Supplementary Note 1,
wherein the labels include a plurality of expressions written in a formal language, and
the update circuit is configured to update, in response to a condition that the at least one of inference results that matches at least one expression out of the plurality of expressions included in the labels is obtained through the inference performed by the inference circuit, the model such that the at least one of inference results that matches the at least one expression is likely to be obtained through the inference performed by the inference circuit.
The information processing apparatus according to Supplementary Note 1 or 3,
wherein the formal language generation circuit is configured to generate queries for each texts accepted by the acceptance circuit, and
the inference circuit is configured to inference the at least one of inference results on the queries generated for each texts.
The information processing apparatus according to Supplementary Note 1, 3, or 4,
wherein the update circuit is configured to update, in response to a condition that the inference circuit obtains the at least one of inference results that matches the labels, the model such that the queries from which the queries that matches the labels is obtained is likely to be generated by the formal language generation circuit.
An information processing method, comprising:
(a) a step of accepting at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
(b) a step of generating at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts;
(c) a step of inferencing automatically at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
(d) a step of updating automatically the model the at least one of inference results that matches the labels is likely to be obtained through the inference in the (c) step.
The information processing method according to Supplementary Note 6,
wherein, in the (c) step, a probability that the labels are obtained from the at least one of queries is calculated by executing probabilistic inference, and
in the (d) step, the model is updated such that the probability that is calculated in the (c) step is increased.
The information processing method according to Supplementary Note 6,
wherein the labels include a plurality of expressions written in a formal language, and in the (d) step, the model is updated such that the at least one of inference results that matches the at least one expression is likely to be obtained through the inference in the (c) step, in response to a condition that the at least one of inference results that matches at least one expression out of the plurality of expressions included in the labels is obtained through the inference in the (c) step.
The information processing method according to Supplementary Note 6 or 8,
wherein, in the (a) step, texts in the natural language are accepted,
in the (b) step, the plurality of queries are generated for each texts accepted in the (a) step, and
in the (c) step, the at least one of inference results is inferred on the plurality of queries generated for each texts.
The information processing method according to Supplementary Note 6, 8, or 9,
wherein, in the (d) step, the model is updated such that the queries from which the at least one of inference results that matches the labels is obtained is likely to be generated in the (b) step, in response to a condition that the at least one of inference results that matches the labels is obtained in the (c) step.
A computer-readable recording medium that includes a program recorded thereon, the program including instructions that cause a computer to carry out:
(a) a step of accepting at least one of texts written in a natural language and at least one of labels written in a formal language for the texts;
(b) a step of generating at least one of queries written in the formal language for the texts by using a pre-trained machine learning model and the texts;
(c) a step of automatically inferring at least one of inference results written in the formal language by applying at least one of deductive inference method and abduction method to the queries and a knowledge base; and
(d) a step of automatically updating the model such that the at least one of inference results that matches the labels is likely to be obtained through the inference in the (c) step.
The computer-readable recording medium according to Supplementary Note 11,
wherein, in the (c) step, a probability that the labels are obtained from the at least one of queries is calculated by executing probabilistic inference, and
in the (d) step, the model is updated such that the probability that is calculated in the (c) step is increased.
The computer-readable recording medium according to Supplementary Note 11,
wherein the labels include a plurality of expressions written in a formal language, and
in the (d) step, the model is updated such that the at least one of inference results that matches the at least one expression is likely to be obtained through the inference in the (c) step, in response to a condition that the at least one of inference results that matches at least one expression out of the plurality of expressions included in the labels is obtained through the inference in the (c) step.
The computer-readable recording medium according to Supplementary Note 11 or 13,
wherein, in the (a) step, texts in the natural language are accepted,
in the (b) step, a plurality of queries are generated for each texts accepted in the (a) step, and
in the (c) step, the at least one of inference results inferred on the plurality of queries generated for each texts.
The computer-readable recording medium according to Supplementary Note 11, 13, or 14,
wherein, in the (d) step, the model is updated such that the queries from which the at least one of inference results that matches the labels is obtained is likely to be generated in the (b) step, in response to a condition that the at least one of inference results that matches the labels is obtained in the (c) step.
As described above, according to the invention, it is possible to optimize parameters that are used when a piece of text in a natural language is converted into an expression in a formal language in a system that performs inference based on a natural language input by the user.
Sadamasa, Kunihiko, Okajima, Yuzuru
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
11250841, | Jun 10 2016 | Conduent Business Services, LLC | Natural language generation, a hybrid sequence-to-sequence approach |
5960384, | Sep 03 1997 | Method and device for parsing natural language sentences and other sequential symbolic expressions | |
6789054, | Apr 25 1999 | Geometric display tools and methods for the visual specification, design automation, and control of adaptive real systems | |
6879967, | Mar 24 2000 | RICOH CO , LTD | Method and apparatus for open data collection |
7941438, | Apr 04 2000 | Sosy, Inc. | Method and apparatus for automatic generation of information system user interfaces |
8401837, | Nov 24 2009 | The Boeing Company | Efficient text discrimination for word recognition |
8706477, | Apr 25 2008 | Softwin SRL Romania | Systems and methods for lexical correspondence linguistic knowledge base creation comprising dependency trees with procedural nodes denoting execute code |
9311388, | Dec 05 2011 | International Business Machines Corporation | Semantic and contextual searching of knowledge repositories |
20070203863, | |||
20110125484, | |||
20110320187, | |||
20120254143, | |||
20130288219, | |||
20130318012, | |||
20140006012, | |||
20140195466, | |||
20140258286, | |||
20140272909, | |||
20140358964, | |||
20150100943, | |||
20160140123, | |||
20170032262, | |||
20170075891, | |||
20170140290, | |||
20170154043, | |||
20170278000, | |||
20170364587, | |||
20170371861, | |||
20180025075, | |||
20180033325, | |||
JP6095884, | |||
JP7028630, | |||
JP8115218, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Feb 06 2019 | NEC Corporation | (assignment on the face of the patent) | / | |||
Sep 25 2020 | SADAMASA, KUNIHIKO | NEC Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 054299 | /0658 | |
Oct 19 2020 | OKAJIMA, YUZURU | NEC Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 054299 | /0658 |
Date | Maintenance Fee Events |
Jul 09 2020 | BIG: Entity status set to Undiscounted (note the period is included in the code). |
Date | Maintenance Schedule |
Apr 11 2026 | 4 years fee payment window open |
Oct 11 2026 | 6 months grace period start (w surcharge) |
Apr 11 2027 | patent expiry (for year 4) |
Apr 11 2029 | 2 years to revive unintentionally abandoned end. (for year 4) |
Apr 11 2030 | 8 years fee payment window open |
Oct 11 2030 | 6 months grace period start (w surcharge) |
Apr 11 2031 | patent expiry (for year 8) |
Apr 11 2033 | 2 years to revive unintentionally abandoned end. (for year 8) |
Apr 11 2034 | 12 years fee payment window open |
Oct 11 2034 | 6 months grace period start (w surcharge) |
Apr 11 2035 | patent expiry (for year 12) |
Apr 11 2037 | 2 years to revive unintentionally abandoned end. (for year 12) |