WO2020100738A1 - 処理装置、処理方法、及び処理プログラム - Google Patents

処理装置、処理方法、及び処理プログラム Download PDF

Info

Publication number
WO2020100738A1
WO2020100738A1 PCT/JP2019/043866 JP2019043866W WO2020100738A1 WO 2020100738 A1 WO2020100738 A1 WO 2020100738A1 JP 2019043866 W JP2019043866 W JP 2019043866W WO 2020100738 A1 WO2020100738 A1 WO 2020100738A1
Authority
WO
WIPO (PCT)
Prior art keywords
external knowledge
sentence
processing
search result
question
Prior art date
Application number
PCT/JP2019/043866
Other languages
English (en)
French (fr)
Inventor
光甫 西田
京介 西田
久子 浅野
準二 富田
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US17/293,428 priority Critical patent/US20210319330A1/en
Publication of WO2020100738A1 publication Critical patent/WO2020100738A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation

Definitions

  • the present invention relates to a processing device, a processing method, and a processing program for performing an arithmetic process by searching external knowledge used to obtain an output for an input sentence.
  • Non-Patent Document 1 a technique of using an external text corpus in a neural network is known (for example, Non-Patent Document 1).
  • the model of Non-Patent Document 1 is a dialogue model for obtaining a response sentence as an answer to an utterance sentence (or a question sentence).
  • the external knowledge search unit 51 extracts, for example, 10 sentences from the external knowledge database 2 (for example, a corpus) that is a search target of external knowledge.
  • the external knowledge database 2 for example, a corpus
  • a sentence similar to the uttered sentence Q is searched from the external knowledge database 2 by using the similarity of the sentence obtained from TF-IDF (Term Frequency-Inverse Document Frequency).
  • TF-IDF Term Frequency-Inverse Document Frequency
  • the response sentence A is obtained as an output.
  • the multitask Seq2Seq Sequence to Sequence processing described in Reference 1 is performed.
  • the external knowledge search unit 51 searches for external knowledge similar to the utterance sentence using the similarity obtained from the TF-IDF.
  • the advantages of adopting a method other than a neural network such as TF-IDF are (1) learning of parameters necessary for using a neural network is not required, and (2) computational complexity is higher than that of a neural network. There are two advantages of being small.
  • the search method using TF-IDF the input sentence can be handled only in units of words, and the arrangement of words and the structure of the sentence are not considered. Therefore, there are disadvantages that (1) the accuracy is inferior to the method using the neural network, and (2) the accuracy must be compensated by increasing the number of sentences of the search result.
  • Non-Patent Document 1 since the dialogue processing shown in Non-Patent Document 1 only needs to generate a sentence having a content within a range acceptable as an answer to the inputted utterance sentence as a response sentence, a high search accuracy with external knowledge is not required. However, in the response sentence generation process that generates a response sentence to a question sentence, an accurate answer to the question sentence is required, so it is necessary to accurately search external knowledge necessary for answering the question sentence rather than interactive processing. ..
  • the present invention has been made in view of the above circumstances, and provides a processing device, a processing method, and a processing program capable of accurately searching external knowledge necessary for arithmetic processing with a small amount of calculation.
  • the purpose is to provide.
  • the processing device of the present invention extracts external knowledge from the external knowledge database based on a first score obtained from the similarity between the input sentence and each of the external knowledge included in the external knowledge database. Similarity between each of the external knowledge included in the first search result and the input sentence by using the first external knowledge search unit that searches to obtain the first search result and the first learned neural network.
  • a second external knowledge search unit that obtains a second search result by obtaining a second search result based on a second score obtained from the first search result based on the second score.
  • a processing unit that obtains an output with respect to the input sentence by a predetermined arithmetic processing that inputs each external knowledge included in the search result of No. 2.
  • Knowledge refers to electronic data that records natural language, and is a unit that has a meaning composed of multiple words.
  • Natural language refers to the symbol system used by humans for daily communication, and is written as characters or symbols.
  • the processing device further includes an external knowledge combining unit, and the first external knowledge searching unit receives the processing target sentence and the input sentence as input, and outputs each of the external knowledge included in the external knowledge database and the input sentence.
  • the first score is obtained based on the similarity and two types of similarity of each of the external knowledge and the processing target sentence, and the second external knowledge search unit uses the neural network to generate the first score.
  • the second similarity obtained from two types of similarity, that is, the similarity between each piece of external knowledge included in the search result and the input sentence, and the similarity between each piece of external knowledge included in the first search result and the processing target sentence.
  • the score is calculated, the external knowledge combination unit generates an external knowledge combination processing target sentence in which each external knowledge included in the second search result is combined with the processing target sentence, and the processing unit determines the input sentence and the external knowledge combination processing. It is desirable to obtain the output for the input sentence by arithmetic processing that takes the target sentence and the input.
  • the input sentence is a question sentence
  • the processing unit inputs the question sentence and the external knowledge included in the second search result by using the second neural network learned in advance as the arithmetic processing.
  • a response sentence generation process may be performed, and a response sentence to the question sentence may be acquired as an output.
  • the computer retrieves the external knowledge from the external knowledge database based on the first score obtained from the similarity between the input sentence and each of the external knowledge contained in the external knowledge database.
  • the first external knowledge search step that is used as the search result and the first learned neural network are used to obtain the first external knowledge included in the first search result from the similarity between each of the external knowledge and the input sentence.
  • a second external knowledge search step for obtaining a score of 2 and searching external knowledge from the first search result to obtain a second search result based on the second score, an input sentence and a second search result.
  • the processing program of the present invention is a program for causing a computer to function as each unit of the above processing device.
  • the present invention having the above characteristics, in order to utilize external knowledge for arithmetic processing, when searching a large amount of external knowledge in the external knowledge database, the external knowledge is reduced to a small number by a method that does not use a neural network.
  • the two-step search method of narrowing down and further searching the external knowledge by using the neural network it becomes possible to accurately search the external knowledge required for the arithmetic processing with a small amount of calculation. It is possible to generate an appropriate output for the input sentence by using the retrieved external knowledge.
  • FIG. 1 is a functional block diagram showing an example of the configuration of a processing device 1 according to the first embodiment of the present invention.
  • the processing device 1 is composed of a computer or a server computer including well-known hardware such as an arithmetic processing device, a main storage device, an auxiliary storage device, a data bus, an input / output interface, and a communication interface. Further, various programs constituting the processing program are loaded into the main storage device and then executed by the arithmetic processing device, thereby functioning as respective units of the processing device 1. In the present embodiment, the various programs are stored in the auxiliary storage device included in the processing device 1. However, the storage destination of the various programs is not limited to this, and the various programs are stored in a recording medium such as a magnetic disk, an optical disk, or a semiconductor memory. It may be provided through a network. Further, any other constituent elements do not necessarily have to be realized by a single computer or a server computer, and may be realized by being distributed by a plurality of computers connected by a network.
  • the processing device 1 shown in FIG. 1 includes an input unit 10, a first external knowledge search unit 11, a second external knowledge search unit 12, an external knowledge combination unit 13, a processing unit 14, and an output unit 15.
  • An external knowledge database 2 is connected to the processing device 1.
  • the external knowledge database 2 is assumed to be outside the processing device 1.
  • the processing device 1 will be described as being connected to the external knowledge database 2 via a communication means such as the Internet which communicates according to the protocol of TCP / IP (Transmission Control Protocol / Internet Protocol), for example, but not limited to this. It may be a communication means according to the protocol.
  • TCP / IP Transmission Control Protocol / Internet Protocol
  • External knowledge database 2 refers to a set of knowledge in which a large amount of natural language sentences are collected.
  • a database storing hundreds of thousands or more of knowledge is preferable.
  • a corpus which is a set of knowledge in which natural language sentences are structured and accumulated on a large scale, is desirable.
  • Wikipedia or the like can be used.
  • the knowledge is a sentence composed of one sentence to several sentences.
  • the external knowledge database 2 As the external knowledge database 2, a large number of knowledge databases existing in the Internet space can be used as needed. Further, a plurality of knowledge databases may be used as the external knowledge database 2. Hereinafter, the knowledge stored in the external knowledge database 2 will be described as external knowledge.
  • the search target is narrowed down in two stages.
  • the processing target sentence P is input, and the arithmetic processing performed by the processing unit 14 is the response sentence generation processing.
  • the input sentence Q is a question sentence and the processing target sentence P is a question target sentence.
  • the question sentence will be described as Q and the question subject sentence will be described as P.
  • the question target sentence P is a sentence from which an answer to the question sentence Q is created, and the question sentence Q is a sentence representing a question for the question target sentence P.
  • the question sentence Q is composed of one sentence and the question target sentence P is composed of one sentence to several sentences will be described.
  • the input unit 10 accepts input of data of the question target sentence P and the question sentence Q via the input / output interface, and temporarily stores them in the auxiliary storage device.
  • the question target sentence P and the question sentence Q may be data received from an external terminal device connected via a network.
  • the first external knowledge retrieving unit 11 determines the similarity between the external knowledge included in the external knowledge database 2 and the question sentence Q, and the similarity between the external knowledge and the question target sentence. To obtain a first score. External knowledge is searched from the external knowledge database 2 on the basis of the first score to obtain a first search result R1.
  • the similarity for obtaining the first score the similarity obtained by comparing the appearance frequencies of the words included in the external knowledge, the question sentence Q, and the question sentence P can be used. For example, each sentence is divided into words, the frequency of occurrence of each word in the sentence, and the low value if the words appearing in the sentence occur frequently in various sentences, and a rare word that rarely appears. Then, it is possible to use a method of obtaining the sentence similarity by using an index indicating a high value. Specifically, the similarity using TF-IDF may be obtained as the first similarity.
  • the external knowledge that is similar to the question sentence Q and the question target sentence P is output as the first search result R1, for example, by using the ranking based on the score of the first similarity degree, the external knowledge of the number specified from the top.
  • Two types of similarity can be obtained as the similarity, that is, the similarity between the external knowledge and the question sentence Q, and the similarity between the external knowledge and the question target sentence P. Therefore, a linear sum of the two types of similarity, for example, two types.
  • the average of the similarities of is used as the first score.
  • external knowledge whose first score is equal to or higher than the reference value is output as the first search result R1.
  • the external knowledge database 2 stores tens of thousands to hundreds of thousands or more of external knowledge.
  • the first external knowledge search unit 11 searches the external knowledge database 2 for, for example, about 10 to 100 pieces of external knowledge by using the degree of similarity based on TF-IDF to obtain the first search result R1.
  • the number of the first search results R1 may be appropriately determined according to the accuracy and the like, and is not limited to the above range.
  • the second external knowledge search unit 12 uses a previously learned neural network (first neural network) to calculate the degree of similarity between each of the external knowledge included in the first search result R1 and the question sentence Q, A second score is obtained from two types of similarities between the external knowledge included in the first search result R1 and the question target sentence P. Based on this second score, external knowledge is searched from the first search result R1 and is set as the second search result R2.
  • first neural network previously learned neural network
  • the second external knowledge search unit 12 obtains the degree of similarity by using a method of converting a sentence into a fixed-length vector using a neural network.
  • each of the external knowledge, the question sentence Q, and the question target sentence P included in the first search result R1 is fixed-length external knowledge vector, the question sentence vector, and the question target sentence vector by a neural network that has been learned in advance. Convert to.
  • the inner product of the external knowledge vector and the question sentence vector is obtained as the similarity between the external knowledge and the question sentence Q
  • the inner product of the external knowledge vector and the question target sentence vector is obtained as the external knowledge.
  • the similarity of the question target sentence P two types of similarity are calculated.
  • the external knowledge included in the first search result R1 is ranked as the second score by the linear sum of the two types of similarities or the average of the linear sums, and a predetermined number of external knowledge from the upper rank is acquired by the second knowledge.
  • the search result R2 is output.
  • external knowledge whose similarity is equal to or higher than the reference value is output as the second search result R2.
  • the embedding is a technique for converting a natural language constituent element such as a sentence, a word, or a character that is a target to be handled by a neural network into a vector.
  • a case is included in which the sentence included in each of the external knowledge included in the first search result R1, the question sentence Q, and the question target sentence P are converted into sentence embedded vectors using the technique of sentence embedding.
  • the method of sentence embedding provides a model for converting a sentence into a fixed-length embedded vector, which has been learned in advance by an existing natural language corpus.
  • the sentence embedding vector is a fixed length vector representing the meaning of the sentence.
  • a method of converting a sentence into a sentence embedding vector using a neural network for example, a universal sentence encoder described in Reference 2 below can be used.
  • a vector obtained by converting a word using the technique of word embedding is called a word embedding vector, and is described separately from a sentence embedding vector obtained by converting a sentence. ..
  • the external knowledge database having the largest calculation amount reaches tens of thousands or more.
  • the amount of calculation for narrowing down the external knowledge to several tens can be reduced.
  • the second external knowledge search unit 12 narrows down the first search result R1 by a method using a neural network, the accuracy is high, and the first external knowledge search unit 11 reduces the number to several tens. It is possible to narrow down the external knowledge to a smaller number of external knowledge.
  • the cost for learning the neural network used in the second external knowledge search unit 12 can be suppressed. If the neural network learned in advance is not used, it is necessary to perform learning for improving the search accuracy of the second external knowledge search unit 12. Specifically, the search accuracy should be improved by preparing a combination of the question sentence Q, the question target sentence P, and the corresponding true answer sentence as a data set for learning and performing learning. In addition, it takes time until it can be put to practical use, and the development load increases.
  • a previously learned neural network such as sentence embedding as the neural network
  • the external knowledge combination unit 13 generates an external knowledge combination question target sentence PR as an external knowledge combination processing target sentence in which the character string of the question target sentence P and each character string of the external knowledge included in the second search result R2 are combined. To do.
  • the processing unit 14 receives the question sentence Q and each external knowledge included in the second search result R2, performs a response sentence generation process, and outputs a response sentence A for the question sentence Q.
  • the processing unit 14 inputs the question sentence Q, further inputs the external knowledge combination question target sentence PR obtained by the external knowledge combination unit 13 as the external knowledge of the search result R2, and returns the response sentence A.
  • a method using a neural network can be used.
  • BiDAF Bi-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION
  • the output unit 15 outputs and displays the response sentence A on the display device via the input / output interface. Alternatively, it may be transmitted to an external terminal device connected via a network. Alternatively, the response sentence A may be output by voice.
  • step S101 the input unit 10 receives inputs of the question sentence Q and the question target sentence P.
  • the first external knowledge search unit 11 searches the external knowledge stored in the external knowledge database 2 using the question sentence Q and the question target sentence P as a query.
  • step S102 the first external knowledge search unit 11 uses the TF-IDF to calculate the similarity between the external knowledge and the question sentence Q and the similarity between the external knowledge and the question target sentence P, and these two types are calculated.
  • a first score is calculated from the similarity. The first score becomes higher as the external knowledge that is similar to the question sentence Q and the question target sentence P.
  • the external knowledge of the external knowledge database 2 is ranked using the first score.
  • step S103 the knowledge having a high score is narrowed down to, for example, about 10 to 100, and is set as the first search result R1.
  • the second external knowledge search unit 12 further searches the first search result R1 using the question sentence Q and the question target sentence P as a query.
  • the neural network is used to acquire the external knowledge of the first search result R1, the question sentence Q, and the fixed length vector of the question target sentence P.
  • a second score is calculated from two types of similarities, that is, the similarity between the external knowledge vector and the question sentence vector, and the similarity between the external knowledge vector and the question target sentence vector.
  • the external knowledge included in the first search result R1 is ranked by the second score, and several pieces of external knowledge having high scores are set as the second search result R2.
  • step S107 the external knowledge combination unit 13 generates an external knowledge combination question target sentence PR by combining the character string of the question target sentence P and each character string of the external knowledge included in the second search result R2.
  • step S108 the question sentence Q and the external knowledge combination question target sentence PR are input to the processing unit 14 to obtain the response sentence A.
  • step S109 the output unit 15 displays the response sentence A on the screen of the display device of the computer.
  • the learning device 1 a includes, in addition to the input unit 10, the first external knowledge search unit 11, the second external knowledge search unit 12, the external knowledge combination unit 13, the processing unit 14, and the output unit 15. , A learning unit 16.
  • the learning unit 16 receives the input of the true response sentence T to the question sentence Q and the question target sentence P, and as described above, the first external knowledge search unit 11 and the second external knowledge search unit 11 from the question target sentence P and the question sentence Q.
  • the processing unit 14 obtains the true response sentence T.
  • the parameters can be updated using the gradient method.
  • the learning ends when the convergence condition is reached. The number of iterations can be used as the convergence condition.
  • the parameter may be updated for a predetermined number (for example, 10000) of inputs, and the process may be terminated.
  • step S111 the input unit 10 receives inputs of a plurality of data sets of a question sentence Q, a question target sentence P, and a true response sentence T.
  • step S112 the data set to be input to the processing unit 14 is selected. Then, in step S113, using the response sentence A obtained from the question sentence Q and the question target sentence P and the true response sentence T, learning is performed so that the true response sentence T is obtained, and the processing unit 14 performs the learning. Update the parameters of the neural network used.
  • step S114 the convergence condition is determined. If the convergence condition is not reached, the determination in step S114 is denied, the next input data set is selected in step S112, and the process of updating the parameter in step S113 is repeated. When the convergence condition is reached, the determination in step S114 is affirmed, and the updating of the parameters ends.
  • the accuracy of the search method can be improved by applying a neural network model having parameters that can be learned to the external knowledge search process and by optimizing the model parameters by learning from large-scale data.
  • the process of searching and extracting external knowledge performed in the first embodiment is performed by a non-differentiable operation. Therefore, it is not possible to regard the entire processing device as an end2end (end to end) system and learn all parameters by the error backpropagation method that is usually used in learning of neural networks. Therefore, in the second embodiment, a search method capable of reinforcement learning is used for the second external knowledge search unit.
  • the configuration of the processing device according to the second embodiment of the present invention is the same as that of the processing device 1 according to the first embodiment, so detailed description will be omitted.
  • FIG. 5 is a functional block diagram showing an example of the configuration of the learning device 1b according to the second embodiment of the present invention.
  • the same components as those in the first embodiment are designated by the same reference numerals and detailed description thereof will be omitted.
  • the arithmetic processing performed by the processing unit 14 is the response sentence generation processing
  • the input sentence Q is the question sentence
  • the processing target sentence P is the question. The case where the sentence is the target sentence will be described.
  • the learning device 1b includes an input unit 10, a first external knowledge search unit 11, a second external knowledge search unit 22, an external knowledge combination unit 13, a processing unit 14, an output unit 15, and a reward calculation.
  • the unit 23, the learning unit 26, and the convergence determination unit 27 are provided. Further, the input unit 10, the first external knowledge search unit 11, the external knowledge combination unit 13, the processing unit 14, and the output unit 15 are the same as those in the first embodiment, and detailed description thereof will be omitted.
  • the second external knowledge search unit 22 uses a neural network (first neural network) to calculate the similarity between each piece of external knowledge included in the first search result R1 and the question sentence Q, and the first search.
  • the second similarity is calculated based on the similarity between each piece of external knowledge included in the result R1 and the question target sentence P.
  • External knowledge is selected from the first search result R1 based on the second similarity, and the selected external knowledge is set as the second search result R2.
  • the second external knowledge search unit 22 determines the fixed length vector of each of the two sentences, the question sentence Q and the question target sentence P, and the fixed length vector of each of the external knowledge items included in the first search result R1. To obtain the similarity.
  • the second external knowledge search unit 22 can use various vector expressions such as (a) to (e) below as a method of converting a sentence into a fixed length vector.
  • the method of converting to a fixed length vector may be a method that does not use a neural network such as (a) or a method that uses the neural networks of (b) to (e).
  • A Vector expression using Bag of Words
  • word embedding such as GloVe
  • LSTM LSTM that takes word embedding vector series of sentence as input
  • the final state of the long short-term memory that is, the output of the final time
  • the existing sentence embedding vector such as the universal sentence encoder
  • the question-answer model such as BiDAF that can focus on the similarity between the question and the sentence
  • BiDAF the question-answer model
  • FIG. 6 shows operations performed by the search algorithm of the second external knowledge search unit 22.
  • the process of the search algorithm of the second external knowledge search unit 22 will be described according to the steps of FIG.
  • the search algorithm in FIG. 6 repeats the operations of steps 1 to 7 until the end condition is satisfied, thereby selecting external knowledge from the first search result R1 and generating the second search result R2.
  • q is the question vector of the question sentence Q
  • p i is the sentence vector of the i-th sentence in the sentences constituting the question target sentence P
  • r j is the external knowledge of the first search result R1.
  • the external knowledge vector of the j-th external knowledge included in the set (hereinafter, referred to as set R1) is represented. These vectors are fixed-length vectors and have a dimensionality of 100 to tens of thousands.
  • the question target sentence P is composed of L sentences
  • the subscript i has a value of 1 to L
  • the set R1 is composed of N external knowledges
  • the subscript j has a value of 1 to N.
  • .. k is the number of times of repeating Step 1 to Step 7.
  • step 1 and sentence vectors p i of each sentence constituting the question target sentence, all combinations (i is 1 through L of the external knowledge vector r j external knowledge contained in the set R1, j is 1 to
  • the score e ij using the similarity for N) is calculated using the function f.
  • e ij f (r j , q, p i , c) (1)
  • the function f determines the similarity between each of the external knowledge included in the first search result R1 and the question sentence Q, and the similarity between each of the external knowledge included in the first search result R1 and the question target sentence P. Anything may be used as long as it is based on the score. For example, one of the following two formulas (2) and (3) is used.
  • the first term of the following mathematical expression (2) is the similarity between the j-th external knowledge and the question sentence Q
  • the second term is the similarity between the j-th external knowledge and the i-th sentence forming the question target sentence P.
  • the value of the function f is the sum of the degree of similarity between the external knowledge and the question sentence Q and the degree of similarity between the external knowledge and the i-th sentence forming the question target sentence P.
  • the following formula (3) is a formula in the case of using a learnable parameter of the neural network, the first term represents the importance of the jth external knowledge, and the second term represents the jth external knowledge and question. Similarity with sentence Q, third term is similarity between jth external knowledge and i-th sentence of question target sentence P, and fourth term is similarity between jth external knowledge and already selected external knowledge Indicates the degree.
  • the fifth term represents the bias.
  • w r , W q , W p , Wh , and b are parameters that can be learned by the learning unit 26 described later.
  • a probability distribution a representing the ease of selection of external knowledge is obtained from the j-th external knowledge and the score e ij corresponding to the i-th sentence of the question target sentence.
  • the ease with which external knowledge can be selected corresponds to the importance of external knowledge.
  • a is an N-dimensional real-valued vector
  • the component a j corresponds to the ease of selection of the j-th external knowledge.
  • the component a j expresses the ease of selection with a value of 0 to 1, for example.
  • E is a matrix of L rows and N columns having the score e ij as an element.
  • the function g is a function for calculating the ease of selection of external knowledge. For the function g, one of the following two formulas (6) and (7) is used. When the jth external knowledge has already been selected, the jth component of g (E) is set to 0.
  • step 3 according to the probability distribution a of the external knowledge, the higher the probability of selecting the external knowledge, the higher the probability of sampling.
  • the sampled external knowledge as r sk .
  • s k denotes the index of the external knowledge iterations is selected when k th.
  • step 4 the index s k external knowledge r sk selected, performs an operation to add to connect to the vector S.
  • index s k of external knowledge r sk that has been selected in the k-th is in turn added to the vector S.
  • the component a sk of the probability distribution a representing the ease of selection of external knowledge obtained in step 2 is used.
  • a fixed length vector c of the external knowledge r sk selected up to the present time is obtained.
  • the vector c is obtained using the function h below.
  • the function h is a function that obtains a fixed-length vector that represents the external knowledge selected so far.
  • c h (R1, S) (8)
  • Expression (9) finds the sum of the external knowledge vectors of the external knowledge r s included in the selected set of external knowledge.
  • Equation (10) uses the scalar u k that represents the ease of selection of the external knowledge r sk obtained in step 5, and obtains a weighted sum so that the external knowledge r sk that was easier to select is more important.
  • step 7 it is judged whether the processing of steps 1 to 6 is repeated again.
  • a method of determining the number of iterations of k and a threshold for max (a) can be used.
  • a method of using dummy knowledge, which ends when a predetermined external knowledge is selected can be considered.
  • the second external knowledge search unit 22 outputs the selected set of external knowledge as the second search result R2.
  • step 1, step 2, and step 6 have been described for each of the two methods, but they may be combined in any way. Further, as the method of converting the sentence into the fixed length vector in the second external knowledge search unit 22, the methods of (a) to (e) are mentioned, but any method may be combined with the processing of steps 1 to 7. Good.
  • steps S201 to S203 the same processing as steps S101 to S103 of the first embodiment is performed to obtain the first search result R1.
  • the second external knowledge search unit 22 further searches the first search result R1 using the question sentence Q and the question target sentence P.
  • step S204 the external knowledge of the first search result R1, the question sentence Q, and the fixed length vector of the question sentence P are acquired.
  • step S205 the operations of steps 1 to 7 in FIG. 6 are repeated, and the predetermined termination condition is satisfied from the external knowledge of the first search result R1 by using the probabilities representing the ease of selection of each external knowledge. Select until you do.
  • step S206 the external knowledge selected from the first search result R1 is set as the second search result R2.
  • step S207 to S209 the response sentence A is output by performing the same processing as steps S107 to S109 of the first embodiment.
  • Reinforcement learning progresses learning by defining two measures, a policy indicating the probability of taking an action and a reward obtained by the action.
  • the measure is, for example, a probability distribution a indicating the ease of selection of external knowledge of the first search result R1 of the second external knowledge search unit 22.
  • the reward is calculated from two indicators, that is, an indicator showing the correctness of the response sentence with respect to the true response sentence and an indicator concerning the information quality of the selected external knowledge.
  • the input unit 10 receives a plurality of data sets together with the question sentence Q and the question target sentence P, using the true response sentence T for the question sentence Q as a data set.
  • the reward calculation unit 23 determines the question target sentence P, the question sentence Q, the response sentence A, the external knowledge selected by the second external knowledge search unit 22, and the true sentence given in advance for the question sentence Q.
  • a reward v determined based on the response sentence T and an index indicating the correctness of the response sentence A with respect to the true response sentence T and an index indicating the quality of the external knowledge selected by the second external knowledge search unit 22. To calculate.
  • an index such as F1 or Rouge which indicates the degree of coincidence between the response sentence A and the true response sentence T, can be used.
  • Rouge is an index used for evaluation of automatic summarization processing and the like in natural language processing, and is an index showing the degree of coincidence between an automatic summarization sentence and a handwritten summarization sentence.
  • the index indicating the quality of the external knowledge selected by the second external knowledge search unit 22 is that the question target sentence P and the selected external knowledge are the information that the question sentence Q and the response sentence A have. It is possible to use the degree of coincidence that indicates how much the pieces of information match.
  • the following are two specific examples of the index calculation method (i) and (ii).
  • the method such as coverage described in Reference 4 is used.
  • the index using coverage can be expressed by the following mathematical expression (11).
  • the second external knowledge search unit 22 includes the sentence vector p i of each sentence forming the question target sentence and the external knowledge included in the external knowledge of the first search result R1. It is necessary to learn the parameter of the mathematical expression (3) used when calculating the score e ij obtained from the similarity of the external knowledge vector r j .
  • s k denotes the index of the external knowledge iterations of the second external knowledge search unit 22 is selected when k th.
  • K is the total number of iterations performed by the second external knowledge search unit 22.
  • ⁇ q i is an embedding vector of a natural sentence (a character string connecting words) that connects the question sentence Q and the response sentence A, and i represents the position of the word.
  • ⁇ p is an embedded vector of the question target sentence P.
  • W q is the same as the weight for the similarity between the external knowledge and the question sentence Q in Expression (3).
  • the learning unit 26 updates the parameters of the second external knowledge search unit 22 by the policy gradient method using the policy and the reward v.
  • the probability distribution aj obtained by the second external knowledge search unit 22 is used.
  • the score of the second external knowledge search unit 22 is calculated using Equation (3), the parameters w r , W q , W p , Wh , and b of Equation (3) are Will be updated.
  • the method using the neural network of the above (b) to (e) is used as a method of converting a sentence into a fixed length vector, the parameters for this neural network are updated.
  • the reward v is, for example, a weighted sum of an index indicating the correctness of the response sentence A with respect to the true response sentence T and an index indicating the quality of the external knowledge selected by the second external knowledge search unit 22.
  • the learning unit 26 also updates the parameters of the processing unit 14 as well as the second external knowledge search unit 22 by learning.
  • the following two examples (i) and (ii) are shown as specific examples of the parameter learning method of the processing unit 14.
  • (I) Learning Method Using Gradient Method The input of the true response sentence T to the question sentence Q and the question target sentence P is received, and as described above, the first external knowledge search unit is searched from the question target sentence P and the question sentence Q.
  • the parameters of the processing unit 14 are updated using the response sentence A and the true response sentence T generated by using the 11, second external knowledge retrieval unit 22, external knowledge combination unit 13, and processing unit 14.
  • the parameters can be updated using the gradient method.
  • an objective function to be minimized by the gradient method an objective function generally used when learning question answering processing by a neural network and an error backpropagation method can be used.
  • a cross entropy function which is a general objective function can be used.
  • an index such as F1 or Rouge used for the objective function can evaluate the linguistic similarity due to the exchange of the word order. Therefore, since the linguistic similarity can be evaluated so that the similarity of sentences expressing the same meaning is high even if the word order is changed, it is possible to output a flexible response sentence A.
  • the convergence determination unit 27 performs a search by the first external knowledge search unit 11, a search by the second external knowledge search unit 22, and an external knowledge combination question target sentence by the external knowledge combination unit 13 until a predetermined convergence condition is satisfied.
  • the generation of PR, the acquisition of the response sentence A by the processing unit 14, the calculation by the reward calculating unit 23, and the updating of the parameters by the learning unit 26 are repeated.
  • the broken lines in FIG. 5 indicate the constituent elements that the convergence determination unit 27 repeats.
  • FIG. 8 illustrates a case where the gradient method (i) is used for the learning of the processing unit 14.
  • step S211 input of a plurality of data sets of the question sentence Q, the question sentence P, and the true response sentence T learned by the input unit 10 is accepted.
  • step S212 the learning unit 26 selects one data set to be input to the processing unit 14 from all the input data sets. Subsequently, in step S213, using the question target sentence P and the question sentence Q, a search by the first external knowledge search unit 11 and a search by the second external knowledge search unit 22 are performed to obtain a second search result R2. After that, the external knowledge combination unit 13 generates the external knowledge combination inquiry target sentence PR, inputs the external knowledge combination inquiry target sentence PR to the processing unit 14, and acquires the response sentence A. In step S214, the learning unit 26 updates the parameters of the processing unit 14 using the response sentence A and the true response sentence T.
  • step S215 the reward calculator 23 calculates the reward v.
  • step S216 the learning unit 26 uses the policy and the reward v to perform reinforcement learning, and the parameters of the second external knowledge search unit 22 are updated.
  • step S217 the convergence determination unit 27 determines the convergence condition, and when the convergence condition is not reached, the determination in step S217 is denied, and steps S212 to S216 are repeated to update the parameters.
  • the determination in step S217 is affirmed, and the parameter update ends.
  • steps S211 to S213 in FIG. 9 are the same as the learning method using the gradient method in FIG. 8, detailed description thereof will be omitted.
  • step S225 the reward calculator 23 calculates the reward v.
  • step S226 the learning unit 26 uses the policy and the reward v to update the parameters of both the processing unit 14 and the second external knowledge searching unit 22.
  • step S227 the convergence determination unit 27 determines the convergence condition, and when the convergence condition is not reached, the determination in step S227 is denied, and steps S212 to S226 are repeated to update the parameters.
  • the determination in step S227 is affirmed, and the parameter updating is completed.
  • the second external knowledge search unit of the first embodiment is configured to require parameter learning. It becomes possible to carry out or to carry out reinforcement learning for the second external knowledge search unit and the processing unit. As a result, a more appropriate response sentence can be output by learning in advance the parameters of the first neural network used in the second external knowledge search unit and the second neural network used in the processing unit.
  • the processing device of the third embodiment a case will be described in which the external knowledge search method of the present invention is used in the interactive process for obtaining a response sentence as an answer to an input sentence.
  • FIG. 10 is a functional block diagram showing an example of the configuration of the processing device 1c according to the third embodiment of the present invention.
  • the same components as those in the first embodiment are designated by the same reference numerals and detailed description thereof will be omitted.
  • the input sentence Q is a question sentence will be described.
  • the question sentence is referred to as Q.
  • the processing device 1c includes an input unit 10, a first external knowledge search unit 31, a second external knowledge search unit 32, a processing unit 34, and an output unit 15.
  • the first external knowledge search unit 31 searches the external knowledge database 2 for external knowledge based on a first score obtained from the similarity between each of the external knowledge included in the external knowledge database 2 and the question sentence Q. To obtain the first search result R1.
  • the first similarity is obtained using a method of comparing the appearance frequencies of words included in sentences such as TF-IDF. Ranking is performed using the first score defined by the first similarity, and for example, the external knowledge of a number designated from the top is output as the first search result R1. Alternatively, external knowledge having a first score equal to or higher than a predetermined value is output as the first search result R1.
  • the second external knowledge search unit 32 searches for the first search result R1 by the first external knowledge search unit 31 by using the previously learned neural network and then searches the first search result R1.
  • the search result R2 of 2 is obtained.
  • each of the question sentence Q and the external knowledge included in the first search result R1 is converted into a fixed-length vector, and the fixed-length question sentence vector of the question sentence Q and the first
  • the score using the similarity between the external knowledge included in the search result R1 and the fixed-length external knowledge vector is set as the second similarity.
  • Ranking is performed using the second score defined by the second similarity, and for example, a predetermined number of external knowledge items from the top are output as the second search result R2.
  • external knowledge having a second score equal to or higher than a predetermined value is output as the second search result R2.
  • the score using the above similarity is determined in the same way as the search algorithm of FIG.
  • the question target sentence P does not exist. Therefore, the question sentence Q in this example is used instead of the question target sentence P in the second embodiment.
  • the question sentence Q in the second embodiment is considered to be absent, and the score is calculated assuming that there is no term for the question sentence Q in each of the mathematical expressions (1), (2), and (3).
  • the processing unit 34 generates the response sentence A from the question sentence Q and the external knowledge included in the second search result R2 by the response sentence generation process.
  • the response sentence A is generated by inputting to a neural network such as the multitask Seq2Seq process described in Reference 1.
  • step S301 the input unit 10 receives the input of the question sentence Q.
  • the first external knowledge search unit 31 searches the external knowledge stored in the external knowledge database 2 using the question sentence Q as a query.
  • step S102 the first external knowledge search unit 31 uses the TF-IDF to calculate the degree of similarity between the external knowledge and the question sentence Q to obtain the first score.
  • the first search result R1 is acquired according to the ranking of the first score.
  • the second external knowledge search unit 32 further searches the first search result R1 using the question sentence Q based on a neural network (first neural network) that has been learned in advance.
  • the neural network is used to acquire the external knowledge of the first search result R1 and the fixed length vector of the question sentence Q.
  • the similarity between the external knowledge vector and the question sentence vector is calculated and used as the second score.
  • the second search result R2 is acquired from the external knowledge included in the first search result R1 according to the ranking of the second score.
  • step S308 the question sentence Q and the external knowledge included in the second search result R2 are input to the processing unit 34 to obtain the response sentence A.
  • step S309 the output unit 15 displays the response sentence A on the screen of the display device of the computer.
  • the two-step search method of the present invention is used for the interactive process of generating a response sentence to the question text, but the two-step search method of the present invention is used. It can be applied to language processing.
  • the summary target sentence is set as the processing target sentence P in place of the question target sentence, and the summary target sentence is set in place of the question sentence.
  • the present invention can be applied to the summarization process by setting the input sentence Q and the processing target sentence P as input to generate the summarization sentence by setting the title of the above as the input sentence Q. become.
  • the first external knowledge search unit 41 is the first external knowledge search unit of the first or third embodiment
  • the second external knowledge search unit 42 is the first external knowledge search unit 42.
  • the processing unit 44 uses arbitrary natural language processing in which at least one of the input sentence Q and the processing target sentence P is input. Existing classifiers and generators. For example, the processing target sentence P of the above algorithm may be replaced with the determination target sentence, and the determination result may be output as the response sentence A.
  • a CPU Central Processing Unit
  • a GPU Graphics Processing Unit
  • some of the above functions such as FPGA (Field Programmable Gate Array), the programmable logic device (Programmable Logic Device: PLD), which is a processor whose circuit configuration can be changed after manufacturing, or ASIC (Application Specific Integrated Circuit), etc. It may be realized by using a dedicated electric circuit or the like having a circuit configuration specifically designed to execute a specific process.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

時間計算量及び空間計算量を節約しつつも、検索精度が高い自然言語処理における処理装置を提供する。 第1の外部知識検索部11が、入力文Qを入力とし、外部知識データベース2に含まれる外部知識の各々と入力文との類似度に基づいて得られる第1のスコアに基づいて検索した外部知識を第1の検索結果R1を取得し、第2の外部知識検索部12は、ニューラルネットワークを用いて、第1の検索結果R1に含まれる外部知識の各々と入力文との類似度から得られる第2のスコアを求めて、第1の検索結果R1から検索して第2の検索結果を取得する。処理部14が、入力文と第2の検索結果R2に含まれる各々の外部知識とを入力とする演算処理により、入力文に対する出力を取得する。

Description

処理装置、処理方法、及び処理プログラム
 本発明は、入力文に対する出力を得るために用いる外部知識を検索して演算処理を行う処理装置、処理方法、及び処理プログラムに関する。
 近年、深層学習技術の台頭や自然言語処理に用いられるデータセットの整備により、人工知能(AI:Artificial Intelligence)による文章に対する質問応答や対話等の言語処理が注目を集めている。
 人間が自然言語を理解して回答する場合は、自身のもつ経験、常識、及び世界知識を踏まえて、理解した質問に対して回答を推論することができる。例えば、人間が文章を読んでその文章に対する質問に回答をする場合には、文章からだけでなく、自分のもつ経験等から回答を見つけている。しかし、AIの場合は質問の対象となっている文章に含まれている情報だけから回答を推論する必要がある。そのため、AIによる質問応答や対話には限界があると考えられる。
 この限界を超えるため、自然言語処理のうち、特に質問応答モデルで、質問対象の文章だけでなく外部の文章から得られる外部知識を用いて回答を推論することが有効である。この技術には、広範な外部知識を扱うことができるというメリットがある。その一方で、外部知識が大きいほど時間計算量及び空間計算量が大きくなるという問題がある。特に、外部知識に存在する大量の文章集合を実用的な計算量にして取り扱うためには、事前の検索によって外部知識の文章を絞り込む必要がある。従来のこうした外部知識を用いる手法には、外部テキストコーパスをニューラルネットワーク内で利用する技術が知られている(例えば、非特許文献1)。
Xinyu Hua, Lu Wang, " Neural Argument Generation Augmented with Externally Retrieved Evidence " College of Computer and Information Science Northeastern University Boston, MA 02115, temarXiv: 1805.10254v1 [cs.CL] 25 May 2018
 非特許文献1のモデルは、発話文(あるいは、質問文)に対する回答として応答文を得るための対話モデルである。図13に示すように、まず、外部知識検索部51によって外部知識の検索対象である外部知識データベース2(例えば、コーパス)から、例えば10個の文を抽出する。外部知識の検索手法として、TF-IDF(Term Frequency-Inverse Document Frequency)から得られる文の類似度を用いて、発話文Qに類似する文章を外部知識データベース2から検索している。次に、外部知識結合部53が、検索した10個の文章Rを発話文の後ろにつなげる操作を行う。最後に、発話文Qに検索した10個の文をつないで新しくできた発話文QRを応答部54のニューラルネットワークに入力することで、応答文Aを出力として得ている。ニューラルネットワークでは、参考文献1に記載のマルチタスクSeq2Seq(Sequence to Sequence)の処理を行っている。
[参考文献1] Minh-Thang Luong, Quoc V. Le, Ilya Sutskever, Oriol Vinyals, Lukasz Kaiser "MULTI-TASK SEQUENCE TO SEQUENCE LEARNING" Published as a conference paper at ICLR 2016
 非特許文献1では、外部知識検索部51で、TF-IDFから得られる類似度を用いて発話文に類似する外部知識の検索を行っている。TF-IDF等のニューラルネットワーク以外の手法を採用する利点としては、(1)ニューラルネットワークを利用するために行う必要があるパラメータの学習を必要としない、(2)計算量がニューラルネットワークに比べると小さい、という2つの利点が挙げられる。一方で、TF-IDFを用いた検索手法では、入力文を単語単位でしか扱えず単語の並びや文の構造については考慮されない。そのため、(1)精度面ではニューラルネットワークを用いた手法に劣る、(2)検索結果の文の件数を多くすることで精度を補わなければならない、という欠点が存在する。
 また、非特許文献1に示される対話処理は、入力された発話文に対する回答として許容される範囲の内容の文を応答文として生成すればよいので、外部知識の高い検索精度は要求されない。しかし、質問文に対する応答文を生成する応答文生成処理では、質問文に対する正確な回答が求められるため、対話処理よりも、質問文に答えるために必要な外部知識を正確に検索する必要がある。
 大量の文章集合を実用的な計算量で取り扱うためには、事前に検索によって文章量を絞り込む必要がある。しかし、TF-IDFの類似度を用いた検索手法では、入力文を単語単位でしか扱えず検索精度が不十分なため、検索件数を絞り込み過ぎると応答文生成処理に必要な文章が漏れてしまう可能性があり、十分な絞り込みができなかった。
 本発明は、以上のような事情に鑑みてなされたものであり、演算処理に必要な外部知識を、少ない計算量で精度高く検索することが可能になる処理装置、処理方法、及び処理プログラムを提供することを目的とする。
 上記目的を達成するために、本発明の処理装置は、入力文と外部知識データベースに含まれる外部知識の各々との類似度から得られる第1のスコアに基づいて、外部知識を外部知識データベースから検索して第1の検索結果とする第1の外部知識検索部と、予め学習された第1のニューラルネットワークを用いて、第1の検索結果に含まれる外部知識の各々と入力文との類似度から得られる第2のスコアを求め、第2のスコアに基づいて外部知識を第1の検索結果から検索して第2の検索結果を得る第2の外部知識検索部と、入力文と第2の検索結果に含まれる各々の外部知識とを入力とする所定の演算処理により、入力文に対する出力を取得する処理部と、を備える。
 「知識」とは、自然言語を記録した電子データを指し、複数の単語から構成された意味を持つ単位をいう。
 「自然言語」とは、人間によって日常の意思疎通のために用いられる記号体系をいい、文字や記号として書かれたものをいう。
 なお、処理装置は、外部知識結合部をさらに含み、第1の外部知識検索部は、処理対象文章と、入力文とを入力とし、外部知識データベースに含まれる外部知識の各々と入力文との類似度と、外部知識の各々と処理対象文章との類似度の2種類の類似度に基づいて第1のスコアを求め、第2の外部知識検索部は、ニューラルネットワークを用いて、第1の検索結果に含まれる外部知識の各々と入力文との類似度と、第1の検索結果に含まれる外部知識の各々と処理対象文章との類似度の2種類の類似度から得られる第2のスコアを求め、外部知識結合部は、処理対象文章に第2の検索結果に含まれる各々の外部知識を結合した外部知識結合処理対象文章を生成し、処理部は、入力文と外部知識結合処理対象文章とを入力とする演算処理により、入力文に対する出力を取得するものが望ましい。
 なお、入力文は、質問文であり、処理部は、演算処理として、予め学習された第2のニューラルネットワークを用いて、質問文と第2の検索結果に含まれる外部知識とを入力とする応答文生成処理を行い、出力として、質問文に対する応答文を取得するようにしてもよい。
 本発明の処理方法は、コンピュータが、入力文と外部知識データベースに含まれる外部知識の各々との類似度から得られる第1のスコアに基づいて、外部知識を外部知識データベースから検索して第1の検索結果とする第1の外部知識検索ステップと、予め学習された第1のニューラルネットワークを用いて、第1の検索結果に含まれる外部知識の各々と入力文との類似度から得られる第2のスコアを求め、第2のスコアに基づいて外部知識を第1の検索結果から検索して第2の検索結果を得る第2の外部知識検索ステップと、入力文と第2の検索結果に含まれる各々の外部知識とを入力とする所定の演算処理により、入力文に対する出力を取得する処理ステップと、を実行する。
 本発明の処理プログラムは、コンピュータを、上記の処理装置の各部として機能させるためのプログラムである。
 以上の特徴からなる本発明によれば、演算処理に外部知識を利用するために、外部知識データベースにある膨大な外部知識を検索する際に、ニューラルネットワークを用いない手法で外部知識を少ない数に絞り込み、さらにニューラルネットワークを用いて外部知識を検索する二段階検索手法を用いることで、演算処理に必要な外部知識を、少ない計算量で精度高く検索することが可能になる。この検索した外部知識を用いることで入力文に対して適切な出力を生成することが可能になる。
本発明の第1の実施形態に係る処理装置の構成を示すブロック図である。 本発明の第1の実施形態に係る処理装置の応答文出力処理の流れを示すフローチャートである。 本発明の第1の実施形態に係る学習装置の構成を示すブロック図である。 本発明の第1の実施形態に係る学習装置の学習処理の流れを示すフローチャートである。 本発明の第2の実施形態に係る学習装置の構成を示すブロック図である。 本発明の第2の実施形態に係る第2の外部知識検索部22の検索アルゴリズムで行われる操作を説明するための図である。 本発明の第2の実施形態に係る学習装置の応答文出力処理の流れを示すフローチャートである。 本発明の第2の実施形態に係る学習装置の勾配法を用いた学習処理の流れを示すフローチャートである。 本発明の第2の実施形態に係る学習装置の強化学習を用いた学習処理の流れを示すフローチャートである。 本発明の第3の実施形態に係る処理装置の構成を示すブロック図である。 本発明の第3の実施形態に係る処理装置の応答文出力処理の流れを示すフローチャートである。 本発明の処理装置の変形例の構成を示すブロック図である。 従来装置の構成を示すブロック図である。
 以下、図面を参照して本発明の実施の形態を詳細に説明する。
 図1は、本発明の第1の実施形態に係る処理装置1の構成の一例を示す機能ブロック図である。
 処理装置1は、演算処理装置、主記憶装置、補助記憶装置、データバス、入出力インターフェース、及び通信インターフェース等の周知のハードウェアを備えたコンピュータあるいはサーバコンピュータにより構成されている。また、処理プログラムを構成する各種プログラムが主記憶装置にロードされた後に演算処理装置によって実行されることにより、処理装置1の各部として機能する。本実施形態では、各種プログラムは、処理装置1が備える補助記憶装置に記憶されているが、各種プログラムの記憶先はこれに限らず、磁気ディスク、光ディスク、半導体メモリ等の記録媒体に記録されても良く、ネットワークを通して提供されても良い。また、その他のいかなる構成要素も、必ずしも単一のコンピュータやサーバコンピュータによって実現される必要はなく、ネットワークによって接続された複数のコンピュータにより分散されて実現されてもよい。
 図1に示す処理装置1は、入力部10、第1の外部知識検索部11、第2の外部知識検索部12、外部知識結合部13、処理部14、及び、出力部15を備える。また、処理装置1には、外部知識データベース2が接続されている。
 本実施形態では、外部知識データベース2が処理装置1の外部にあるものとする。処理装置1は、例えばTCP/IP(Transmission Control Protocol/Internet Protocol)のプロトコルに従って通信するインターネット等の通信手段を介して外部知識データベース2に接続された場合について説明するが、これに限らず、他のプロトコルに従った通信手段であってもよい。
 外部知識データベース2は、自然言語の文章を大量に集めた知識の集合を指す。例えば、数十万以上の知識が格納されたデータベースが好ましい。特に、自然言語の文章を構造化し大規模に集積した知識の集合であるコーパスが望ましい。例えば、Wikipedia等を用いることができる。なお、知識は、1文から数文で構成される文章である。
 外部知識データベース2として、インターネット空間に存在する多数の知識データベースを必要に応じて利用することが可能である。また、外部知識データベース2として、複数の知識データベースを用いるようにしてもよい。以下、外部知識データベース2に格納されている知識を外部知識として説明する。
 外部知識データベース2には、大量の外部知識が格納されているため、全ての外部知識を入力文と比較することで、入力文に対応する最適な外部知識を得ようとすると膨大な計算量になる。そこで、本実施の形態では、二段階で検索対象を絞り込む。
 また、第1の実施の形態では、入力文Qに加えて、処理対象文章Pを入力し、処理部14で行われる演算処理が応答文生成処理である場合について説明する。具体的には、入力文Qが質問文であり、処理対象文章Pが質問対象文章であるものとする。以下、質問文をQとし、質問対象文章をPとして説明する。また、質問対象文章Pは、質問文Qに対する回答を作成する元となる文章であり、質問文Qは質問対象文章Pに対する質問を表す文である。質問文Qは、1文で構成され、質問対象文章Pは、1文から数文で構成される場合について説明する。
 入力部10は、入出力インターフェースを介して質問対象文章Pと質問文Qのデータの入力を受け付けて、一旦、補助記憶装置上に記憶する。質問対象文章Pと質問文Qは、ネットワークを介して接続された外部の端末装置から送信されたデータを受信したものでもよい。
 第1の外部知識検索部11は、外部知識データベース2に含まれる外部知識の各々と質問文Qとの類似度と、外部知識の各々と質問対象文章との類似度の2種類の類似度に基づいて第1のスコアを得る。この第1のスコアに基づいて、外部知識を外部知識データベース2から検索して第1の検索結果R1とする。
 第1のスコアを得るための類似度として、外部知識、質問文Q、及び質問対象文章Pに含まれる単語の出現頻度を比較することによって得られる類似度を用いることができる。例えば、文の各々を単語に分けて、各単語が文中に出現した単語の出現頻度と、文中に出てきた単語が色々な文によく出現する単語なら低い値とし、あまり出現しない稀な単語なら高い値を示す指標とを用いて、文の類似度を求める手法を用いることができる。具体的には、TF-IDFを用いた類似度を第1の類似度として求めるようにしてもよい。質問文Qと質問対象文章Pに類似する外部知識を、第1の類似度のスコアによるランキングを用いて、例えば上位から指定された数の外部知識を第1の検索結果R1として出力する。類似度は、外部知識と質問文Qとの類似度と外部知識と質問対象文章Pとの類似度の2種類の類似度が得られるので、2種類の類似度の線形和、例えば、2種類の類似度の平均を第1のスコアとして用いる。あるいは、第1のスコアが基準値以上の外部知識を第1の検索結果R1として出力する。
 外部知識データベース2には、数万から数十万以上の外部知識が記憶されている。まず、第1の外部知識検索部11では、TF-IDFによる類似度を用いて、外部知識データベース2から、例えば10~100個程度の外部知識を検索して第1の検索結果R1とする。第1の検索結果R1の数は、精度等に応じて適宜決定すればよく上記の範囲に限定されるものではない。
 第2の外部知識検索部12は、予め学習されたニューラルネットワーク(第1のニューラルネットワーク)を用いて、第1の検索結果R1に含まれる外部知識の各々と質問文Qとの類似度と、第1の検索結果R1に含まれる外部知識の各々と質問対象文章Pとの類似度の2種類の類似度から第2のスコアを得る。この第2のスコアに基づいて、外部知識を第1の検索結果R1から検索して第2の検索結果R2とする。
 具体的には、第2の外部知識検索部12は、ニューラルネットワークにより文を固定長のベクトルに変換する手法を用いて類似度を求める。まず、第1の検索結果R1に含まれる外部知識の各々、質問文Q、及び質問対象文章Pを、予め学習されたニューラルネットワークにより固定長の外部知識ベクトル、質問文ベクトル、及び質問対象文章ベクトルに変換する。次に、外部知識の各々に対して、外部知識ベクトルと質問文ベクトルの内積を求めて外部知識と質問文Qの類似度とし、外部知識ベクトルと質問対象文ベクトルの内積を求めて外部知識と質問対象文章Pの類似度として、2種類の類似度を計算する。第1の検索結果R1に含まれる外部知識を、2種類の類似度の線形和、あるいは、線形和の平均を第2のスコアとしてランキングして、上位から所定の数の外部知識を第2の検索結果R2として出力する。あるいは、類似度が基準値以上の外部知識を第2の検索結果R2として出力する。
 予め学習されたニューラルネットワークとして、文embeddingの技術を用いて文埋め込みベクトルに変換するニューラルネットワークを用いることができる。embeddingとは、ニューラルネットワークで扱う対象である文、単語、又は文字など自然言語の構成要素をベクトルに変換する技術である。本実施の形態では、第1の検索結果R1に含まれる外部知識の各々に含まれる文、質問文Q、及び質問対象文章Pを、文embeddingの技術を用いて文埋め込みベクトルに変換する場合について説明する。文embeddingの手法では、既存の自然言語のコーパスによって事前に学習が行われた、文を固定長の埋め込みベクトルに変換するためのモデルが提供されている。文埋め込みベクトルは、文の意味を表す固定長ベクトルである。ニューラルネットワークを用いて文を文埋め込みベクトルに変換する手法として、例えば、下記の参考文献2に記載のuniversal sentense encoder等を用いることができる。なお、以下の説明では、単語を単語embeddingの技術(後述)を用いて変換して得られたベクトルを単語埋め込みベクトルといい、文を変換して得られた文埋め込みベクトルとは区別して説明する。
[参考文献2]Daniel Cera, Yinfei Yanga, Sheng-yi Konga, Nan Huaa, Nicole Limtiacob, Rhomni St. Johna, Noah Constanta, Mario Guajardo-C´espedesa, Steve Yuanc, Chris Tara, Yun-Hsuan Sunga, Brian Stropea, Ray Kurzweil "Universal Sentence Encoder", arXiv:1803.11175v2 [cs.CL] 12 Apr 2018
 上述のように、まず、最初に、第1の外部知識検索部11のように計算量が小さい非ニューラルネットワークの手法を用いることで、最も計算量の大きい外部知識データベースの数万個以上に及ぶ外部知識を数十個に絞るための計算量を小さくすることができる。次に、第2の外部知識検索部12では、第1の検索結果R1をニューラルネットワークを用いた手法で絞り込みを行っているため精度が高く、第1の外部知識検索部11で数十個に絞られた外部知識からさらに少数精鋭の外部知識に絞り込むことが可能となる。このような第1の外部知識検索部11と第2の外部知識検索部12の二段階検索手法を用いることによって、計算量を小さくすることが可能になり、さらに計算量が小さくても外部知識の検索結果の精度を高くすることが可能になる。
 また、ニューラルネットワークとして、文embedding等の事前に学習されたニューラルネットワークを用いることによって、第2の外部知識検索部12で用いるニューラルネットワークを学習するためのコストを抑えることができる。事前に学習されたニューラルネットワークを用いない場合は、第2の外部知識検索部12の検索精度を向上させるための学習を行う必要がある。具体的には、質問文Qと質問対象文章Pと、これらに対応する真の応答文との組み合わせを、学習のためのデータセットとして用意して、学習を行うことで検索精度を向上させなければならず、実用化できるようになるまでの時間がかかり開発負荷が高くなる。
 外部知識結合部13は、質問対象文章Pの文字列と第2の検索結果R2に含まれる外部知識の各々の文字列を結合した外部知識結合処理対象文章として外部知識結合質問対象文章PRを生成する。
 処理部14は、質問文Qと第2の検索結果R2に含まれる各々の外部知識とを入力として応答文生成処理を行い、質問文Qに対する応答文Aを出力する。本実施の形態では、処理部14は、質問文Qを入力し、さらに外部知識結合部13で得られた外部知識結合質問対象文章PRを検索結果R2の外部知識として入力して、応答文Aを生成する。応答文生成処理は既存の様々な手法を用いることができるが、例えば、ニューラルネットワーク(第2のニューラルネットワーク)を用いた手法を用いることができる。具体的には、参考文献3に記載のBiDAF(BI-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION)等を用いることができる。
[参考文献3] Minjoon Seo1 Aniruddha Kembhavi2 Ali Farhadi1;2 Hananneh Hajishirzi "BI-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION" arXiv:1611.01603v5 [cs.CL] 24 Feb 2017
 出力部15は、入出力インターフェースを介して、表示装置に応答文Aを出力して表示させる。あるいは、ネットワークを介して接続される外部の端末装置に送信するようにしてもよい。あるいは、応答文Aを音声で出力するようにしてもよい。
 次に、図2のフローチャートに従って、第1の実施形態における処理装置1の応答文出力処理の流れを説明する。
 ステップS101では、入力部10が質問文Qと質問対象文章Pの入力を受け付ける。第1の外部知識検索部11は、質問文Qと質問対象文章Pをクエリとして、外部知識データベース2に格納されている外部知識を検索する。ステップS102で、第1の外部知識検索部11は、TF-IDFを用いて、外部知識と質問文Qの類似度と外部知識と質問対象文章Pの類似度を算出し、これらの2種類の類似度から第1のスコアを算出する。第1のスコアは、質問文Qと質問対象文章Pに類似する外部知識ほど高くなる。外部知識データベース2の外部知識は第1のスコアを用いてランキングされる。ステップS103で、スコアが高い知識を、例えば10~100個程度に絞り込み第1の検索結果R1とする。
 次に、第2の外部知識検索部12は、質問文Qと質問対象文章Pをクエリとして、第1の検索結果R1をさらに検索する。ステップS104で、まず、ニューラルネットワークを用いて、第1の検索結果R1の外部知識、質問文Q、質問対象文章Pの固定長ベクトルを取得する。ステップS105では、外部知識ベクトルと質問文ベクトルの類似度と、外部知識ベクトルと質問対象文章ベクトルの類似度の2種類の類似度から第2のスコアを算出する。ステップS106では、第1の検索結果R1に含まれる外部知識を第2のスコアでランキングして、スコアが高い外部知識の数個を第2の検索結果R2とする。
 さらに、ステップS107では、外部知識結合部13で質問対象文章Pの文字列と第2の検索結果R2に含まれる外部知識の各々の文字列を結合した外部知識結合質問対象文章PRを生成する。ステップS108で、処理部14に質問文Qと外部知識結合質問対象文章PRを入力して、応答文Aを得る。最後に、ステップS109で、出力部15は、応答文Aをコンピュータの表示装置の画面上に表示する。
 次に、第1の実施の形態の処理部14で用いるニューラルネットワークを学習するための学習装置について説明する。なお、処理装置1と同様の構成となる部分については、同一符号を付して説明を省略する。
 図3に示すように、学習装置1aは、入力部10、第1の外部知識検索部11、第2の外部知識検索部12、外部知識結合部13、処理部14、出力部15に加えて、学習部16を備える。
 学習部16は、質問文Qと質問対象文章Pに対する真の応答文Tの入力を受け取り、上述のように、質問対象文章P、質問文Qから、第1の外部知識検索部11、第2の外部知識検索部12、外部知識結合部13、及び処理部14を用いて生成した応答文Aと真の応答文Tを用いて、真の応答文Tが得られるように、処理部14で用いるニューラルネットワークのパラメータを更新する。パラメータの更新は勾配法を用いて行うことができる。収束条件に達すると学習を終了する。収束条件として、反復回数を用いることができる。所定の数(例えば、10000個)の入力に対してパラメータを更新したら終了とするようにしてもよい。
 次に、図4のフローチャートに従って、第1の実施形態の学習装置1aの学習処理の流れについて説明する。
 まず、ステップS111では、入力部10が、質問文Q、質問対象文章P、及び真の応答文Tの複数のデータセットの入力を受け付ける。
 ステップS112で、処理部14に入力するデータセットを選択する。続いて、ステップS113で、質問文Qと質問対象文章Pから得られた応答文Aと、真の応答文Tを用いて、真の応答文Tが得られるように学習を行い処理部14で用いるニューラルネットワークのパラメータを更新する。
 ステップS114で、収束条件を判定し、収束条件に達しないときはステップS114の判定が否定され、ステップS112で次の入力するデータセットを選択して、S113でパラメータを更新する処理を繰り返す。収束条件に達すると、ステップS114の判定が肯定され、パラメータの更新を終了する。
 上述のように、学習部16で処理部14で用いるニューラルネットワークのパラメータを予め学習させておくことにより、処理部14から出力される応答文の精度を高めることが可能になる。
 次に、第2の実施の形態について説明する。第2の実施の形態では、上述の第1の実施の形態の第2の外部知識検索部の精度を向上させる手法について説明する。
 検索手法の精度の向上は、外部知識検索処理に学習可能なパラメータを持つニューラルネットワークモデルを適用し、かつ大規模なデータからの学習によってモデルのパラメータを最適化することで実現できると考えられる。しかし、第1の実施の形態で行われている外部知識を検索して抽出する処理は微分不可能な操作で行われている。そのため、処理装置の全体をend2end(end to end)のシステムとみなして、ニューラルネットワークの学習で通常用いられる誤差逆伝播法によって全てのパラメータを学習させることができない。そこで、第2の実施の形態では、第2の外部知識検索部に対して強化学習が可能な検索手法を用いる。
 本発明の第2の実施形態に係る処理装置の構成は、第1の実施形態に係る処理装置1と同様であるため、詳細な説明を省略する。
 図5は、本発明の第2の実施形態に係る学習装置1bの構成の一例を示す機能ブロック図である。第1の実施の形態と同じ構成については同一符号を付して詳細な説明は省略する。第2の実施の形態においても、第1の実施の形態と同様に、処理部14で行われる演算処理が応答文生成処理であり、入力文Qが質問文であり、処理対象文章Pが質問対象文章である場合について説明する。
 第2の実施の形態の学習装置1bは、入力部10、第1の外部知識検索部11、第2の外部知識検索部22、外部知識結合部13、処理部14、出力部15、報酬計算部23、学習部26、及び収束判定部27を備える。また、入力部10、第1の外部知識検索部11、外部知識結合部13、処理部14、及び出力部15は、第1の実施の形態と同様であるので、詳細な説明は省略する。
 第2の外部知識検索部22は、ニューラルネットワーク(第1のニューラルネットワーク)を用いて、第1の検索結果R1に含まれる外部知識の各々と質問文Qとの類似度、及び第1の検索結果R1に含まれる外部知識の各々と質問対象文章Pとの類似度に基づいて第2の類似度を求める。この第2の類似度に基づいて、第1の検索結果R1から外部知識を選択して、選択された外部知識を第2の検索結果R2とする。
 まず、第2の外部知識検索部22は、質問文Qと質問対象文章Pの2つの文の各々の固定長ベクトルと、第1の検索結果R1に含まれる外部知識の各々の固定長ベクトルとから類似度を取得する。第2の外部知識検索部22は、文を固定長ベクトルに変換する手法として、下記の(a)~(e)のような様々なベクトル表現を用いることができる。固定長ベクトルに変換する手法には、(a)のようなニューラルネットワークを用いていない手法を用いても、(b)~(e)のニューラルネットワークを用いた手法であってもよい。
 (a) Bag of Wordsを用いたベクトル表現
 (b) GloVe等の既存の単語埋め込みベクトル表現(word embedding)の和ベクトル又は最大値のベクトル
 (c)文の単語埋め込みベクトル系列を入力とするLSTM(Long short-term memory)の最終状態、つまり最終時刻の出力
 (d)universal sentense encoder等の既存の文埋め込みベクトル
 (e)質問と文章の類似性に注視することができるBiDAF等の質問応答モデルで得られるベクトル系列
 図6に第2の外部知識検索部22の検索アルゴリズムで行われる操作を示す。図6の各ステップに従って、第2の外部知識検索部22の検索アルゴリズムの処理について説明する。
 図6の検索アルゴリズムは、ステップ1~ステップ7の操作を終了条件を満足するまで繰り返すことで、第1の検索結果R1から外部知識を選択して第2の検索結果R2を生成する。
 図6において、qは、質問文Qの質問ベクトル、pは、質問対象文章Pを構成する文のうちi番目の文の文ベクトル、rは、第1の検索結果R1の外部知識の集合(以下、集合R1とする)に含まれるj番目の外部知識の外部知識ベクトルを表す。これらのベクトルは、固定長ベクトルであり、次元数は100次元から数万次元である。また、質問対象文章PはL個の文で構成され、添え字iは1~Lの値をとり、集合R1はN個の外部知識で構成され、添え字jは1~Nの値をとる。kは、ステップ1~ステップ7を繰り返した反復回数である。
 まず、ステップ1では、質問対象文章を構成する各文の文ベクトルpと、集合R1に含まれる外部知識の外部知識ベクトルをrの全ての組み合わせ(iが1~L、jが1~N)についての類似度を用いたスコアeijを、関数fを用いて計算する。
  eij=f(r,q,p,c)     (1)
 関数fは、第1の検索結果R1に含まれる外部知識の各々と質問文Qとの類似度、及び第1の検索結果R1に含まれる外部知識の各々と質問対象文章Pとの類似度に基づくスコアを求めるものであれば何でもよい。例えば、下記の2つの数式(2)と数式(3)のいずれかを用いる。下記の数式(2)の第1項はj番目の外部知識と質問文Qとの類似度、第2項はj番目の外部知識と質問対象文章Pを構成するi番目の文との類似度を表し、関数fの値は、外部知識と質問文Qとの類似度と、外部知識と質問対象文章Pを構成するi番目の文との類似度の和である。
Figure JPOXMLDOC01-appb-M000001

 
 下記の数式(3)は、ニューラルネットワークの学習可能なパラメータを用いた場合の数式であり、第1項はj番目の外部知識の重要度を表し、第2項はj番目の外部知識と質問文Qとの類似度、第3項はj番目の外部知識と質問対象文章Pのi番目の文との類似度、第4項はj番目の外部知識と既に選ばれた外部知識との類似度を表す。第5項はバイアスを表す。
Figure JPOXMLDOC01-appb-M000002

 
 ただし、w、W、W、W、bは後述する学習部26によって学習可能なパラメータである。また、第4項のcは、k回目までに選ばれた全ての外部知識を表現するr、pと同じ固定長の実数値ベクトルである。cの計算方法は後述する。初回(k=1)は、cを零ベクトルとする。
 次に、ステップ2では、j番目の外部知識と質問対象文章のi番目の文に対応するスコアeijから、外部知識の選ばれやすさを表す確率分布aを求める。外部知識の選ばれやすさは、外部知識の重要度に対応している。aは、N次元の実数値ベクトルであり、成分aは、j番目の外部知識の選ばれやすさに対応する。また、成分aは、例えば0~1の値で選ばれやすさを表現する。
Figure JPOXMLDOC01-appb-M000003

 
 Eはスコアeijを成分に持つL行N列の行列である。
 関数gは、外部知識の選ばれやすさを計算する関数である。関数gは、下記の2つの数式(6)及び数式(7)のいずれかを用いる。なお、j番目の外部知識が既に選ばれている場合は、g(E)のj番目の成分は0とする。
Figure JPOXMLDOC01-appb-M000004

 
Figure JPOXMLDOC01-appb-M000005

 
 ステップ3では、外部知識の確率分布aに従って、外部知識の選ばれやすさが高いものほど高い確率でサンプリングされる。サンプリングされた外部知識をrskと表す。sは、反復回数がk番目のときに選ばれた外部知識のインデックスを表す。
 ステップ4では、選ばれた外部知識rskのインデックスsを、ベクトルSにつなげるように追加する操作を行う。k回目に選ばれた外部知識rskのインデックスsが順にベクトルSに追加される。
 さらに、ステップ5では、k回目に選ばれた外部知識rskの選ばれやすさを表すスカラーu(=ask)を求める。ここでは、ステップ2で求めた外部知識の選ばれやすさを表す確率分布aの成分askを用いる。
 続いて、ステップ6では、現在までに選ばれた外部知識rskの固定長ベクトルcを得る。ベクトルcは下記の関数hを用いて求める。関数hは、現在までに選ばれた外部知識を表す固定長ベクトルを得る関数である。
  c=h(R1,S)           (8)
 関数hは下記の数式(9)及び数式(10)のいずれかを用いる。数式(9)は、選ばれた外部知識の集合に含まれる外部知識rの外部知識ベクトルの和を求める。
Figure JPOXMLDOC01-appb-M000006

 
 数式(10)は、ステップ5で得た外部知識rskの選ばれやすさを表すスカラーuを用いて、選ばれやすかった外部知識rskほど重要視するように重み付きの和を求める。
Figure JPOXMLDOC01-appb-M000007

 
 ステップ7では、ステップ1~6の処理を再度繰り返すか否かを判定する。終了条件として、kの反復回数、max(a)に関する閾値で決定する手法を用いることができる。あるいは、所定の外部知識が選ばれた時点で終了とするダミー知識を利用する手法が考えられる。例えば、反復回数k=10となったら終了するようにしてもよい。終了すると、第2の外部知識検索部22は、選ばれた外部知識の集合を第2の検索結果R2として出力する。
 上記のステップ1、ステップ2、及びステップ6は、それぞれ2つの手法について説明したが、それらはどのように組み合わせてもよい。また、第2の外部知識検索部22で文を固定長ベクトルに変換する手法として、(a)~(e)の手法を挙げたが、いずれの手法をステップ1~7の処理と組み合わせてもよい。
 次に、図7のフローチャートを用いて、第2の実施形態における処理装置1bの応答文出力処理の流れについて説明する。第2の実施の形態の処理は、第1の実施の形態と第2の外部知識検索部以外は同様であるので、詳細な説明は省略し、主に相違する部分について詳細に説明を行う。
 ステップS201~ステップS203では、第1の実施の形態のステップS101~ステップS103と同様の処理を行って第1の検索結果R1を取得する。続いて、第2の外部知識検索部22は、質問文Qと質問対象文章Pを用いて、第1の検索結果R1をさらに検索する。まず、ステップS204で、第1の検索結果R1の外部知識、質問文Q、質問対象文章Pの固定長ベクトルを取得する。
 ステップS205では、図6のステップ1~ステップ7の操作を繰り返して、各外部知識の選ばれやすさを表す確率を用いて、第1の検索結果R1の外部知識から、所定の終了条件を満足するまで選択を行う。ステップS206では、第1の検索結果R1から選択された外部知識を第2の検索結果R2とする。
 ステップS207~ステップS209では、第1の実施の形態のステップS107~ステップS109と同様の処理を行って応答文Aを出力する。
 次に、学習装置1bが第2の外部知識検索部22の検索精度を上げるために強化学習を行う手法について説明する。強化学習は、行動をとる確率を表す方策と、行動によって得られる報酬の2つを定義することで学習が進む。方策は、例えば、第2の外部知識検索部22の第1の検索結果R1の外部知識の選ばれやすさを表す確率分布aである。報酬は、真の応答文に対して応答文の正しさを表す指標と、選ばれた外部知識の情報の質に関する指標の2つから計算される。
 まず、学習時には、入力部10は、質問文Qと質問対象文章Pと一緒に、質問文Qに対する真の応答文Tをデータセットにして複数のデータセットを受け取る。
 報酬計算部23は、質問対象文章Pと、質問文Qと、応答文Aと、第2の外部知識検索部22で選択された外部知識と、質問文Qに対して予め与えられた真の応答文Tとに基づいて、真の応答文Tに対する応答文Aの正しさを表す指標と、第2の外部知識検索部22で選択された外部知識の質を表す指標とから定められる報酬vを計算する。
 応答文Aの正しさに関する指標は、F1又はRouge等の、応答文Aと真の応答文Tの一致度を表す指標を用いることができる。Rougeは、自然言語処理における自動要約処理等の評価に用いられる指標であり、自動要約文と、人手で作成した要約文との一致度を表す指標である。
 また、第2の外部知識検索部22で選択された外部知識の質を表す指標は、質問文Qと応答文Aとが持つ情報に対して、質問対象文章Pと選択された外部知識とが持つ情報がどの程度一致するかを表す一致度を用いることができる。指標の計算方法の具体例として以下に(i)(ii)の2通りを示す。
 (i)第2の外部知識検索部22で選択された外部知識の情報の質に関する指標として、質問文Qと応答文Aをつなげた自然文の文と、質問対象文章Pと選択された外部知識をつなげた自然文の文とのRougeを取得する。
 (ii)第2の外部知識検索部22で選択された外部知識の情報の質に関する指標として、参考文献4に記載のcoverage等の手法を利用する。coverageを用いる指標は以下の数式(11)で表すことができる。なお、この手法を選択する場合には、第2の外部知識検索部22において、質問対象文章を構成する各文の文ベクトルpと、第1の検索結果R1の外部知識に含まれる外部知識の外部知識ベクトルrの類似度から得られるスコアeijを算出する際に用いられる数式(3)のパラメータを学習しておく必要がある。
Figure JPOXMLDOC01-appb-M000008

 
 ここで、sは、第2の外部知識検索部22の反復回数がk番目のときに選ばれた外部知識のインデックスを表す。Kは、第2の外部知識検索部22で行われた総反復回数である。~qは、質問文Qと応答文Aをつなげた自然文(単語をつないだ文字列)の埋め込みベクトルであり、iは単語の位置を表す。~pは、質問対象文章Pの埋め込みベクトルである。また、Wは、数式(3)の外部知識と質問文Qの類似度に対する重みと同じである。
[参考文献4]Abigail See, Peter J. Liu, Christopher D. Manning "Get To The Point: Summarization with Pointer-Generator Networks " arXiv:1704.04368v2 [cs.CL] 25 Apr 2017
 学習部26は、方策と報酬vを用いて、方策勾配法により第2の外部知識検索部22のパラメータを更新する。方策としては、例えば、第2の外部知識検索部22で得た確率分布ajを用いる。また、第2の外部知識検索部22のスコアを算出する際に、数式(3)を用いて求める場合には、数式(3)のパラメータw、W、W、W、bが更新される。また、文を固定長ベクトルに変換する手法として、上述の(b)~(e)のニューラルネットワークを用いた手法を用いた場合には、このニューラルネットワークに対するパラメータが更新される。
 報酬vは、例えば、真の応答文Tに対する応答文Aの正しさを表す指標と、第2の外部知識検索部22で選択された外部知識の質を表す指標との重み付き和である。
 また、学習部26は、学習により、第2の外部知識検索部22だけでなく処理部14のパラメータも更新する。処理部14のパラメータの学習方法の具体例として以下に(i)(ii)の2通りを示す。
(i)勾配法を用いる学習方法
 質問文Qと質問対象文章Pに対する真の応答文Tの入力を受け取り、上述のように、質問対象文章P、質問文Qから、第1の外部知識検索部11、第2の外部知識検索部22、外部知識結合部13、及び処理部14を用いて生成した応答文Aと真の応答文Tを用いて、処理部14のパラメータを更新する。パラメータの更新は勾配法を用いて行うことができる。勾配法で最小化する目的関数としては、ニューラルネットワークと誤差逆伝播法で質問応答処理の学習を行う際に一般的に用いられる目的関数を用いることができる。例えば、一般的な目的関数であるクロスエントロピー関数を用いることができる。
(ii)強化学習
 F1又はRougeから作った目的関数は微分不可能な関数であり、通常の勾配法を用いて学習を行うことができない。そのため、勾配法におけるクロスエントロピー関数に対応する目的関数を別に用意する必要がある。そこで、第2の外部知識検索部22と同様に、処理部14も、方策と報酬vを用いて方策勾配法によりパラメータの更新を行うことができる。
 上述では、2つの学習方法について説明したが、(i)より、(ii)を用いる方が、質問応答処理で質問文に適した柔軟な応答文Aを出力することが期待できる。例えば、質問対象文書Pのように与えられた文書の中から質問文Qに対する応答文を抜き出すタイプの質問応答処理の場合、応答文Aは、語順を入れ替えても同じ意味を表す文であれば正答といえる。しかし、(i)で用いられるクロスエントロピー関数は、質問対象文書Pのうちの真の応答文Tに対応する区間をどのくらい出力しやすいかを評価する。そのため、正答として許容され得るが真の応答文Tに対応する区間とは異なる単語列の出力も全て誤答として学習してしまう。一方、(ii)では、目的関数に用いるF1又はRougeといった指標が語順の入れ替え等による言語的な類似性を評価できる。そのため、語順を入れ替えても同じ意味を表す文の類似度が高くなるように言語的な類似性を評価できるので、柔軟な応答文Aを出力することが可能になる。
 収束判定部27は、予め定められた収束条件を満たすまで、第1の外部知識検索部11による検索、第2の外部知識検索部22による検索、外部知識結合部13による外部知識結合質問対象文章PRの生成、処理部14による応答文Aの取得、報酬計算部23による計算、及び学習部26によるパラメータの更新を繰り返させる。なお、図5の破線は、収束判定部27が繰り返しを行う構成要素を示す。
 次に、図8のフローチャートを用いて、第2の実施形態における学習装置1bの学習処理の流れについて説明する。図8は、処理部14の学習に(i)の勾配法を用いる場合について説明する。
 まず、ステップS211では、入力部10が学習する質問文Q、質問対象文章P、及び真の応答文Tの複数のデータセットの入力を受け付ける。
 ステップS212で、学習部26は、入力された全てのデータセットから、処理部14に入力するデータセットを1つ選択する。続いて、ステップS213で、質問対象文章P、質問文Qを用いて、第1の外部知識検索部11による検索と、第2の外部知識検索部22による検索を行って第2の検索結果R2を得て、外部知識結合部13で外部知識結合質問対象文章PRの生成を行って、外部知識結合質問対象文章PRを処理部14に入力して応答文Aを取得する。ステップS214で、応答文Aと真の応答文Tを用いて、学習部26は処理部14のパラメータを更新する。
 ステップS215では、報酬計算部23で報酬vを計算する。続いて、ステップS216で、方策と報酬vを学習部26が用いて強化学習を行ない、第2の外部知識検索部22のパラメータを更新する。
 ステップS217で、収束判定部27は収束条件を判定し、収束条件に達していないときはステップS217の判定が否定され、ステップS212~S216を繰り返してパラメータを更新する。収束条件に達すると、ステップS217の判定が肯定され、パラメータの更新を終了する。
 このように第2の外部知識検索部に強化学習を行うことによって、第2の検索結果に含まれる外部知識の精度を高めることが可能になり、処理部からより適切な応答文を出力させることができる。
 次に、図9のフローチャートを用いて、第2の実施形態において、処理部14の学習に(ii)の強化学習を用いた学習装置1bの学習処理の流れについて説明する。
 図9のステップS211~ステップS213までは、図8の勾配法を用いる学習方法と同様であるので詳細な説明は省略する。
 ステップS225で、報酬計算部23で報酬vを計算する。続いて、ステップS226で、方策と報酬vを学習部26が用いて、処理部14と第2の外部知識検索部22の両方のパラメータを更新する。
 ステップS227で、収束判定部27は収束条件を判定し、収束条件に達していないときはステップS227の判定が否定され、ステップS212~S226を繰り返してパラメータを更新する。収束条件に達すると、ステップS227の判定が肯定され、パラメータの更新を終了する。
 このように第2の外部知識検索部と処理部の全体に強化学習を行うことによって、質問文に適した柔軟な応答文を出力させることができる。
 上述のように、第2の実施の形態では、第1の実施の形態の第2の外部知識検索部をパラメータの学習が必要な構成としたので、第2の外部知識検索部に強化学習を行う、または、第2の外部知識検索部と処理部に対して強化学習を行うことが可能になる。これにより、第2の外部知識検索部で用いる第1のニューラルネットワークと処理部で用いる第2のニューラルネットワークのパラメータと予め学習させておくことで、より適切な応答文を出力させることができる。
 次に第3の実施の形態について説明する。第3の実施の形態の処理装置では、入力文に対する回答として応答文を得るための対話処理に、本発明の外部知識の検索手法を利用する場合について説明する。
 図10は、本発明の第3の実施形態に係る処理装置1cの構成の一例を示す機能ブロック図である。第1の実施の形態と同じ構成については同一符号を付して詳細な説明は省略する。また、入力文Qが質問文である場合について説明する。以下、質問文をQとする。
 第3の実施の形態の処理装置1cは、入力部10、第1の外部知識検索部31、第2の外部知識検索部32、処理部34、及び出力部15を備える。
 第1の外部知識検索部31は、外部知識データベース2に含まれる外部知識の各々と質問文Qとの類似度から得られる第1のスコアに基づいて、外部知識を外部知識データベース2から検索して第1の検索結果R1とする。第1の類似度については、第1の実施の形態と同様に、TF-IDF等の文中に含まれる単語の出現頻度を比較する手法を用いて第1の類似度を求める。第1の類似度で定義される第1のスコアを用いてランキングし、例えば上位から指定された数の外部知識を第1の検索結果R1として出力する。あるいは、第1のスコアが所定の値以上の外部知識を第1の検索結果R1として出力する。
 第2の外部知識検索部32は、第1の実施の形態と同様に、予め学習されたニューラルネットワークを用いて、第1の外部知識検索部31による第1の検索結果R1を検索して第2の検索結果R2を得る。まず、ニューラルネットワークを用いて、質問文Qと第1の検索結果R1に含まれる外部知識の各々を固定長のベクトルに変換して、質問文Qの固定長の質問文ベクトルと、第1の検索結果R1に含まれる外部知識の固定長の外部知識ベクトルとの類似度を用いたスコアを第2の類似度とする。第2の類似度で定義される第2のスコアを用いてランキングし、例えば上位から所定の数の外部知識を第2の検索結果R2として出力する。あるいは、第2のスコアが所定の値以上の外部知識を第2の検索結果R2として出力する。
 上記の類似度を用いたスコアは、図6の検索アルゴリズムと同様に定められる。ただし本実施例では、第2の実施形態と異なり、質問対象文章Pが存在しない。そのため、第2の実施形態における質問対象文章Pの代わりに本実施例における質問文Qを用いる。第2の実施形態における質問文Qはないものとみなし、各数式(1)、(2)、(3)の質問文Qに関する項はないものとしてスコアを計算する。
 処理部34は、応答文生成処理により、質問文Qと第2の検索結果R2に含まれる外部知識とから応答文Aを生成する。応答文生成処理は既存の様々な手法を用いることができるが、例えば、参考文献1に記載のマルチタスクSeq2Seq処理等のニューラルネットワークに入力することで応答文Aを生成する。
 次に、図11のフローチャートを用いて第3の実施形態における処理装置1cの応答文出力処理の流れについて説明する。
 ステップS301では、入力部10が質問文Qの入力を受け付ける。第1の外部知識検索部31は、質問文Qをクエリとして、外部知識データベース2に格納されている外部知識を検索する。ステップS102で、第1の外部知識検索部31は、TF-IDFを用いて、外部知識と質問文Qとの類似度を算出して第1のスコアとする。第1のスコアのランキングに応じて第1の検索結果R1を取得する。
 次に、第2の外部知識検索部32は、質問文Qを用いて、予め学習済みのニューラルネット(第1のニューラルネットワーク)に基づき、第1の検索結果R1をさらに検索する。ステップS304で、まず、ニューラルネットワークを用いて、第1の検索結果R1の外部知識、質問文Qの固定長ベクトルを取得する。ステップS305では、外部知識ベクトルと質問文ベクトルの類似度を算出し、第2のスコアとする。ステップS306では、第1の検索結果R1に含まれる外部知識を第2のスコアのランキングに応じて第2の検索結果R2を取得する。
 さらに、ステップS308で、処理部34に、質問文Qと第2の検索結果R2に含まれる外部知識を入力して、応答文Aを得る。最後に、ステップS309で、出力部15は、応答文Aをコンピュータの表示装置の画面上に表示する。
 上述の第3の実施の形態では、質問文に対して応答文を生成する対話処理に、本発明の二段階検索手法を用いる場合について説明したが、本発明の二段階検索手法を任意の自然言語処理に適用することが可能である。
 例えば、第1及び第2の実施の形態で説明した応答文生成処理のためのアルゴリズムにおいて、質問対象文章の代わりに要約対象の文章を処理対象文章Pとし、質問文の代わりに要約対象の文章のタイトルを入力文Qとすることで、処理部が、入力文Qと処理対象文章Pとを入力として要約文を生成する構成とすることにより、本願発明を要約処理においても適用することが可能になる。
 また、図12に示すように、第1の外部知識検索部41として、第1又は第3の実施の形態の第1の外部知識検索部を用い、第2の外部知識検索部42として、第1、第2、又は第3の実施の形態の第2の外部知識検索部を用い、処理部44が、入力文Q及び処理対象文章Pの少なくとも一方を入力とする任意の自然言語処理を用いた分類器や生成器となるように構成することができる。例えば、上記アルゴリズムの処理対象文章Pを判定対象文章に置き換えて、判定結果を応答文Aとして出力するようにしてもよい。
 なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。
 なお、上述の実施の形態において、演算処理装置は、汎用的なプロセッサであるCPU(Central Processing Unit)が用いられる。さらに、必要に応じてGPU(Graphics Processing Unit)を設けるのが好ましい。また、上述の機能の一部をFPGA (Field Programmable Gate Array) 等の製造後に回路構成を変更可能なプロセッサであるプログラマブルロジックデバイス(Programmable Logic Device:PLD)、又はASIC(Application Specific Integrated Circuit)等の特定の処理を実行させるために専用に設計された回路構成を有する専用電気回路等を用いて実現してもよい。
1、1a、1b、1c 処理装置
2 外部知識データベース
10 入力部
11、31、41 第1の外部知識検索部
12、22、32、42 第2の外部知識検索部
13、53 外部知識結合部
14、24、34、44 処理部
15 出力部
16、26 学習部
23 報酬計算部
27 収束判定部
51 外部知識検索部
54 応答部
A 応答文
P 処理対象文章
PR 外部知識結合質問対象文章
Q 入力文
R1 第1の検索結果
R2 第2の検索結果
v 報酬

Claims (5)

  1.  入力文と外部知識データベースに含まれる外部知識の各々との類似度から得られる第1のスコアに基づいて、外部知識を前記外部知識データベースから検索して第1の検索結果とする第1の外部知識検索部と、
     予め学習された第1のニューラルネットワークを用いて、前記第1の検索結果に含まれる外部知識の各々と前記入力文との類似度から得られる第2のスコアを求め、前記第2のスコアに基づいて外部知識を前記第1の検索結果から検索して第2の検索結果を得る第2の外部知識検索部と、
     前記入力文と前記第2の検索結果に含まれる各々の外部知識とを入力とする所定の演算処理により、前記入力文に対する出力を取得する処理部と、
     を備えた処理装置。
  2.  外部知識結合部をさらに含み、
     前記第1の外部知識検索部は、処理対象文章と、入力文とを入力とし、外部知識データベースに含まれる外部知識の各々と前記入力文との類似度と、前記外部知識の各々と前記処理対象文章との類似度の2種類の類似度に基づいて前記第1のスコアを求め、
     前記第2の外部知識検索部は、前記第1のニューラルネットワークを用いて、前記第1の検索結果に含まれる外部知識の各々と前記入力文との類似度と、前記第1の検索結果に含まれる外部知識の各々と前記処理対象文章との類似度の2種類の類似度から得られる前記第2のスコアを求め、
     前記外部知識結合部は、前記処理対象文章に前記第2の検索結果に含まれる各々の外部知識を結合した外部知識結合処理対象文章を生成し、
     前記処理部は、前記入力文と前記外部知識結合処理対象文章とを入力とする前記所定の演算処理により、前記入力文に対する出力を取得する請求項1記載の処理装置。
  3.  前記入力文は、質問文であり、
     前記処理部は、前記所定の演算処理として、予め学習された第2のニューラルネットワークを用いて、前記質問文と前記第2の検索結果に含まれる外部知識とを入力とする応答文生成処理を行い、前記出力として、前記質問文に対する応答文を取得する請求項1又は2記載の処理装置。
  4.  コンピュータが、
     入力文と外部知識データベースに含まれる外部知識の各々との類似度から得られる第1のスコアに基づいて、外部知識を前記外部知識データベースから検索して第1の検索結果とする第1の外部知識検索ステップと、
     予め学習された第1のニューラルネットワークを用いて、前記第1の検索結果に含まれる外部知識の各々と前記入力文との類似度から得られる第2のスコアを求め、前記第2のスコアに基づいて外部知識を前記第1の検索結果から検索して第2の検索結果を得る第2の外部知識検索ステップと、
     前記入力文と前記第2の検索結果に含まれる各々の外部知識とを入力とする所定の演算処理により、前記入力文に対する出力を取得する処理ステップと、
     を実行する処理方法。
  5.  コンピュータを、請求項1乃至請求項3の何れか1項に記載の処理装置の各部として機能させるための処理プログラム。
PCT/JP2019/043866 2018-11-15 2019-11-08 処理装置、処理方法、及び処理プログラム WO2020100738A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/293,428 US20210319330A1 (en) 2018-11-15 2019-11-08 Processing device, processing method, and processing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018215087A JP7081454B2 (ja) 2018-11-15 2018-11-15 処理装置、処理方法、及び処理プログラム
JP2018-215087 2018-11-15

Publications (1)

Publication Number Publication Date
WO2020100738A1 true WO2020100738A1 (ja) 2020-05-22

Family

ID=70731422

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/043866 WO2020100738A1 (ja) 2018-11-15 2019-11-08 処理装置、処理方法、及び処理プログラム

Country Status (3)

Country Link
US (1) US20210319330A1 (ja)
JP (1) JP7081454B2 (ja)
WO (1) WO2020100738A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022044957A1 (en) * 2020-08-31 2022-03-03 Recruit Co., Ltd. Systems and methods for enhanced review comprehension using domain-specific knowledgebases

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102265945B1 (ko) * 2020-11-23 2021-06-17 주식회사 엠로 기계 학습 기반 아이템을 분류하는 방법 및 장치
KR102265946B1 (ko) * 2020-11-23 2021-06-17 주식회사 엠로 기계 학습 기반 유사 아이템에 관한 정보를 제공하는 방법 및 장치

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001160067A (ja) * 1999-09-22 2001-06-12 Ddi Corp 類似文書検索方法および該類似文書検索方法を利用した推薦記事通知サービスシステム
JP2002230005A (ja) * 2001-02-05 2002-08-16 Seiko Epson Corp サポートセンターシステム
JP2007011604A (ja) * 2005-06-29 2007-01-18 It Service:Kk 不具合診断システム及びプログラム
WO2009113494A1 (ja) * 2008-03-10 2009-09-17 国立大学法人横浜国立大学 Wwwを情報源として記述的な回答が可能な質問応答システム
JP2013190985A (ja) * 2012-03-13 2013-09-26 Sakae Takeuchi 知識応答システム、方法およびコンピュータプログラム

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11347751B2 (en) * 2016-12-07 2022-05-31 MyFitnessPal, Inc. System and method for associating user-entered text to database entries

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001160067A (ja) * 1999-09-22 2001-06-12 Ddi Corp 類似文書検索方法および該類似文書検索方法を利用した推薦記事通知サービスシステム
JP2002230005A (ja) * 2001-02-05 2002-08-16 Seiko Epson Corp サポートセンターシステム
JP2007011604A (ja) * 2005-06-29 2007-01-18 It Service:Kk 不具合診断システム及びプログラム
WO2009113494A1 (ja) * 2008-03-10 2009-09-17 国立大学法人横浜国立大学 Wwwを情報源として記述的な回答が可能な質問応答システム
JP2013190985A (ja) * 2012-03-13 2013-09-26 Sakae Takeuchi 知識応答システム、方法およびコンピュータプログラム

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022044957A1 (en) * 2020-08-31 2022-03-03 Recruit Co., Ltd. Systems and methods for enhanced review comprehension using domain-specific knowledgebases
US11620448B2 (en) 2020-08-31 2023-04-04 Recruit Co., Ltd. Systems and methods for enhanced review comprehension using domain-specific knowledgebases
US11934783B2 (en) 2020-08-31 2024-03-19 Recruit Co., Ltd. Systems and methods for enhanced review comprehension using domain-specific knowledgebases

Also Published As

Publication number Publication date
JP2020086548A (ja) 2020-06-04
JP7081454B2 (ja) 2022-06-07
US20210319330A1 (en) 2021-10-14

Similar Documents

Publication Publication Date Title
CN110162749B (zh) 信息提取方法、装置、计算机设备及计算机可读存储介质
CN109840287B (zh) 一种基于神经网络的跨模态信息检索方法和装置
CN108959246B (zh) 基于改进的注意力机制的答案选择方法、装置和电子设备
CN109033068B (zh) 基于注意力机制的用于阅读理解的方法、装置和电子设备
WO2020100738A1 (ja) 処理装置、処理方法、及び処理プログラム
CN112232087B (zh) 一种基于Transformer的多粒度注意力模型的特定方面情感分析方法
US20190286978A1 (en) Using natural language processing and deep learning for mapping any schema data to a hierarchical standard data model (xdm)
WO2021034941A1 (en) A method for multi-modal retrieval and clustering using deep cca and active pairwise queries
CN114358657B (zh) 一种基于模型融合的岗位推荐方法及装置
JP2022530447A (ja) ディープラーニングに基づく中国語単語分割方法、装置、記憶媒体及びコンピュータ機器
CN113254716B (zh) 视频片段检索方法、装置、电子设备和可读存储介质
CN112000788B (zh) 一种数据处理方法、装置以及计算机可读存储介质
CN114492451B (zh) 文本匹配方法、装置、电子设备及计算机可读存储介质
WO2020100739A1 (ja) 学習装置、学習方法、及び学習プログラム
CN113468311B (zh) 一种基于知识图谱的复杂问句问答方法、装置及存储介质
CN112528003B (zh) 一种基于语义排序和知识修正的多项选择问答方法
CN111401069A (zh) 会话文本的意图识别方法、意图识别装置及终端
CN114676237A (zh) 语句相似度确定方法、装置、计算机设备和存储介质
CN110633363B (zh) 一种基于nlp和模糊多准则决策的文本实体推荐方法
CN110413956B (zh) 一种基于bootstrapping的文本相似度计算方法
CN110569331A (zh) 一种基于上下文的关联性预测方法、装置及存储设备
CN117591658B (zh) 一种智能问答方法、装置、设备及存储介质
Adedokun et al. Transforming Smallholder Farmers Support with an AI-Powered FAQbot: A Comparison of Techniques
CN117473400B (zh) 基于多通道层级变换网络结构的设备故障诊断方法
CN117370521A (zh) 医疗问答方法、系统、装置、设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19884647

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19884647

Country of ref document: EP

Kind code of ref document: A1