JP2023149601A - Inference apparatus, inquiry reply apparatus, interactive apparatus, and inference method - Google Patents

Inference apparatus, inquiry reply apparatus, interactive apparatus, and inference method Download PDF

Info

Publication number
JP2023149601A
JP2023149601A JP2022058254A JP2022058254A JP2023149601A JP 2023149601 A JP2023149601 A JP 2023149601A JP 2022058254 A JP2022058254 A JP 2022058254A JP 2022058254 A JP2022058254 A JP 2022058254A JP 2023149601 A JP2023149601 A JP 2023149601A
Authority
JP
Japan
Prior art keywords
question
passage
vector
bert
input
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2022058254A
Other languages
Japanese (ja)
Inventor
健太郎 鳥澤
Kentaro Torisawa
ジュリアン クロエツェー
Kloetzer Julien
淳太 水野
Junta MIZUNO
龍 飯田
Ryu Iida
清敬 大竹
Kiyotaka Otake
鍾勲 呉
Jong Hoon Oh
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Institute of Information and Communications Technology
Original Assignee
National Institute of Information and Communications Technology
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 National Institute of Information and Communications Technology filed Critical National Institute of Information and Communications Technology
Priority to JP2022058254A priority Critical patent/JP2023149601A/en
Priority to PCT/JP2023/003803 priority patent/WO2023188827A1/en
Publication of JP2023149601A publication Critical patent/JP2023149601A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation
    • G06F40/56Natural language generation
    • 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

Landscapes

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

Abstract

To provide an inference apparatus that can operate at a high speed and with a sufficient accuracy using few computational resources.SOLUTION: An inference apparatus 50 includes a first neural net 80 that outputs a vector representation of a first input, and a second neural net that outputs a vector representation of a second input, and when there is a predetermined relation between the vector representation of the first and second inputs using learning data of the first and second inputs which has a predetermined relation, causes the first and second neural nets to be learned so as to be located close to each other in a vector space, and clusters the vector representation which is an output of the learned second neural net. The inference apparatus 50 further includes a database 84 constructed in advance so as to enable retrieval extraction of clusters on the basis of the vector representation of the first input, and infers an output on the basis of information 88 of the clusters retrieved and extracted from the database 84 on the basis of the vector representation of the input by the first neural net 80 with respect to an input 60.SELECTED DRAWING: Figure 1

Description

この発明は自然言語による推論装置、質問回答装置、対話装置、及び推論方法に関する。 The present invention relates to a natural language reasoning device, question answering device, dialogue device, and reasoning method.

従来知られている質問回答システムに、本件出願人が開発しウェブ上において提供しているシステム(WISDOM X)がある。このシステムにおいては、主として入力された質問からキーワード群となる複数の内容語を抽出する。このキーワード群に基づき、インターネット等から収集したパッセージ(連続する7つ程度の文からなる文のまとまり)をいくつか選択する。得られたパッセージ群を質問とともにニューラルネットワークに入力することにより、質問に対する回答を含むか否かという観点からパッセージが分類される。回答が含まれると判断されたパッセージに関しては、そこから質問に対する回答となるフレーズ及び単語などを抽出し整形して回答を出力する。 A conventionally known question answering system is a system (WISDOM X) developed by the applicant of the present invention and provided on the web. This system mainly extracts a plurality of content words, which form a keyword group, from an input question. Based on this keyword group, several passages (groups of sentences consisting of about seven consecutive sentences) collected from the Internet and the like are selected. By inputting the obtained passage group together with the questions into the neural network, the passages are classified from the viewpoint of whether or not they contain answers to the questions. For passages that are determined to contain answers, phrases and words that serve as answers to questions are extracted from them, formatted, and output as answers.

質問回答システムの性格上、質問に対する回答を早期に行う必要がある。そのために、上記したシステムにおいては、あらかじめウェブをクロールしてウェブ上のデータをローカルの記憶装置に蓄積しておく。上記したキーワードベースの検索エンジンの検索範囲は、この記憶装置に記憶された情報であり、その結果、大量の回答候補が得られる。そのため、各回答候補が質問に対する回答を含むか否かの判定処理には大量のデータ処理が伴う。さらに、この処理の対象となるパッセージの各々がある程度のデータ量を持つ上、自然言語処理が必要となる関係上、大規模ニューラルネットワークが処理に使用される。その結果、最終的に行うべきデータ処理の総量は非常に大きなものとなる。したがって、従来の質問回答システムを稼働させるためには大きな計算資源が必要だったという問題がある。 Due to the nature of the question-and-answer system, it is necessary to answer questions quickly. To this end, in the above system, the web is crawled in advance and data on the web is stored in a local storage device. The search range of the keyword-based search engine described above is the information stored in this storage device, resulting in a large number of answer candidates. Therefore, the process of determining whether each answer candidate includes an answer to the question involves processing a large amount of data. Furthermore, since each passage to be processed has a certain amount of data and requires natural language processing, a large-scale neural network is used for the processing. As a result, the total amount of data processing that must be ultimately performed becomes extremely large. Therefore, there is a problem in that large computational resources are required to operate the conventional question answering system.

こうした事情は、質問回答システムに限らない。本件出願人は、質問に限らず一般的な入力に対して応答を行う対話システムも開発している。この対話システムにおいては、応答候補を作成するために、入力から複数の質問を生成し、その質問を上記した質問回答システムに投入してそれぞれ複数の回答を得る。その後、それらの回答から入力発話に対する応答を生成し、更には生成された複数の応答から最適な応答を一つ選ぶ処理を行っている。そのために必要なデータ処理の量は、質問回答システムのためのデータ処理の量を上回る。その結果、対話システムを稼働させるためには非常に大きな計算資源が必要だったという問題がある。 These circumstances are not limited to question-and-answer systems. The applicant has also developed a dialogue system that responds not only to questions but also to general input. In this dialog system, in order to create response candidates, a plurality of questions are generated from input, and the questions are input into the above-described question answering system to obtain a plurality of answers. Thereafter, a response to the input utterance is generated from those answers, and further processing is performed to select one optimal response from the plurality of generated responses. The amount of data processing required for this exceeds the amount of data processing for a question answering system. As a result, there is a problem in that very large computational resources are required to operate the dialogue system.

それ故にこの発明は、従来のものより少ない計算資源により高速に、かつ十分な精度をもって動作可能な推論装置、質問回答装置、対話装置、及び推論方法を提供することである。 Therefore, it is an object of the present invention to provide an inference device, a question answering device, a dialogue device, and an inference method that can operate at high speed and with sufficient accuracy using fewer computational resources than conventional ones.

この発明の第1の局面に係る推論装置は、第1の入力が供給され、この第1の入力のベクトル表現を出力する第1のニューラルネットワークと、第2の入力が供給され、この第2の入力のベクトル表現を出力する第2のニューラルネットワークとを含み、少なくとも、所定の関係にある第1及び第2の入力の学習データを用いて、第1の入力のベクトル表現と第2の入力のベクトル表現が、所定の関係にある場合に、ベクトル空間において近接して位置するように第1及び第2のニューラルネットワークを学習させ、学習済みの第2のニューラルネットワークの出力であるベクトル表現を、ベクトル空間上の位置に基づきクラスタ化し、第1の入力のベクトル表現に基づき、クラスタの検索抽出が可能なようにあらかじめ構築されたデータベースをさらに含み、装置への入力に対して第1のニューラルネットワークによる入力のベクトル表現に基づいてデータベースから検索抽出されたクラスタの情報に基づき、所定の関係にある出力を推論する。 An inference device according to a first aspect of the invention includes a first neural network supplied with a first input and outputting a vector representation of the first input, and a first neural network supplied with a second input and outputting a vector representation of the first input. a second neural network that outputs a vector representation of the input of the first input and a second neural network that outputs the vector representation of the first input and the second input using at least learning data of the first and second inputs having a predetermined relationship. The first and second neural networks are trained to be located close to each other in the vector space when the vector representations of , further includes a database constructed in advance to enable clustering based on the position on the vector space and search and extraction of clusters based on the vector representation of the first input; Outputs having a predetermined relationship are inferred based on cluster information searched and extracted from a database based on the vector representation of input by the network.

好ましくは、データベースは、それぞれのクラスタに含まれる出力のベクトル表現のセントロイドを用いて検索抽出される。 Preferably, the database is searched using a centroid of vector representations of the outputs included in each cluster.

より好ましくは、第1のニューラルネットワークは、第1の入力とこの第1の入力と所定の関係にある第2の入力の属するクラスタに関連したベクトル表現とに基づき、追加の学習がなされる。 More preferably, the first neural network is additionally trained based on a first input and a vector representation associated with a cluster to which a second input having a predetermined relationship with the first input belongs.

この発明の第2の局面に係る質問回答装置は、上記したいずれかの推論装置を含み、所定の関係は、質問とその質問に対する回答を含むものである。 A question answering device according to a second aspect of the invention includes any of the above-mentioned inference devices, and the predetermined relationship includes a question and an answer to the question.

この発明の第3の局面に係る対話装置は、上記したいずれかの推論装置を含み、所定の関係は、発話とその発話に対する応答を含むものである。 A dialogue device according to a third aspect of the invention includes any of the above-mentioned inference devices, and the predetermined relationship includes an utterance and a response to the utterance.

この発明の第4の局面に係る推論方法は、第1の入力が供給され、この第1の入力のベ
クトル表現を出力する第1のニューラルネットワークと、第2の入力が供給され、この第2の入力のベクトル表現を出力する第2のニューラルネットワークとを準備するステップと、少なくとも、所定の関係にある第1及び第2の入力の学習データを用いて、第1の入力のベクトル表現と第2の入力のベクトル表現が、所定の関係にある場合に、ベクトル空間において近接して位置するように第1及び第2のニューラルネットワークを学習させるステップと、学習済みの第2のニューラルネットワークの出力であるベクトル表現を、ベクトル空間上の位置に基づきクラスタ化し、第1の入力のベクトル表現に基づき、クラスタの検索抽出が可能なようにあらかじめデータベースを構築するステップと、入力に対して第1のニューラルネットワークによる入力のベクトル表現に基づいてデータベースから検索抽出されたクラスタの情報に基づき、所定の関係にある出力を推論するステップとを含む。
An inference method according to a fourth aspect of the invention includes a first neural network that is supplied with a first input and outputs a vector representation of the first input; a second neural network that outputs a vector representation of an input; and a second neural network that outputs a vector representation of an input of a step of training the first and second neural networks so that the vector representations of the two inputs are located close to each other in the vector space when they have a predetermined relationship; and an output of the trained second neural network. Clustering the vector representations based on the positions on the vector space, and constructing a database in advance to enable search and extraction of clusters based on the vector representation of the first input; and inferring an output having a predetermined relationship based on cluster information searched and extracted from a database based on a vector representation of an input by the neural network.

この発明の第5の局面に係る質問回答装置は、複数レコードを含むデータベースを含み、複数レコードの各々は、質問に対する回答候補のリンク先と、当該回答候補のベクトル表現が属するクラスタの識別子とを含み、質問文が入力されたことに応答して、質問文を、当該質問文のベクトル表現である質問ベクトルに変換するためのニューラルネットワークと、回答候補の意味的表現ベクトルのクラスタの中で、当該クラスタの代表ベクトルが質問ベクトルと最も近い所定個数のクラスタを選択するクラスタ選択手段と、データベースにおいて、クラスタ選択手段により選択された所定個数のクラスタのいずれかの識別子を持つレコードに含まれるリンク先から、それぞれ回答候補を収集するための回答候補収集手段と、回答候補収集部により収集された回答候補の中から、所定の手順で質問文に対する回答を選択するための回答選択手段とを含む。 A question answering device according to a fifth aspect of the invention includes a database including a plurality of records, each of which includes a link destination of an answer candidate for a question and an identifier of a cluster to which a vector representation of the answer candidate belongs. a neural network for converting a question into a question vector that is a vector representation of the question in response to input of a question; and a cluster of semantic expression vectors of answer candidates. Cluster selection means for selecting a predetermined number of clusters whose representative vector of the cluster is closest to the question vector; and a link destination included in a record having an identifier of one of the predetermined number of clusters selected by the cluster selection means in the database. , and an answer selection means for selecting an answer to the question text in a predetermined procedure from among the answer candidates collected by the answer candidate collecting section.

好ましくは、質問回答装置はさらに、質問文を発した質問者の発話履歴を記憶するための発話履歴記憶手段と、発話履歴記憶手段と、質問文が入力されたことに応答して、当該質問を発した質問者の過去の発話履歴の1又は複数のトピック候補を発話履歴記憶手段に記憶された発話履歴に基づいて特定するためのトピック特定手段と、質問文がニューラルネットワークに入力されるに先立って、トピック特定手段により特定された1又は複数のトピックを表す情報を質問文に付加するためのトピック付加手段とをさらに含む。 Preferably, the question answering device further includes an utterance history storage means for storing the utterance history of the questioner who has uttered the question, and an utterance history storage means for storing the utterance history of the questioner who has uttered the question. topic identification means for identifying one or more topic candidates in the past utterance history of the questioner who uttered the question based on the utterance history stored in the utterance history storage means; The method further includes topic adding means for adding information representing one or more topics specified by the topic specifying means to the question text.

より好ましくは、回答候補の各々は、いずれも複数の連続する文を含む。 More preferably, each of the answer candidates includes a plurality of consecutive sentences.

この発明の第6の局面に係る対話装置は、上記した質問回答装置と、入力される発話のトピックを推定するトピック推定手段と、入力される発話にトピック推定手段により推定されたトピックを示す情報を付加し、質問として質問回答装置に入力するトピック付加手段と、発話に対する質問回答装置の出力を対話にふさわしく整形することにより、入力される発話に対する応答を生成するための応答生成手段とを含む。 A dialogue device according to a sixth aspect of the invention includes the above-described question answering device, topic estimation means for estimating the topic of an input utterance, and information indicating the topic estimated by the topic estimation means for the input utterance. and a topic adding means for adding a question to the question answering device and inputting it as a question to the question answering device, and a response generating means for generating a response to the input utterance by formatting the output of the question answering device in response to the utterance to be suitable for dialogue. .

この発明の第7の局面に係る質問回答用モデルの訓練方法は、複数の質問文と、当該複数の質問文の各々に対する回答候補群とから、質問文と当該質問文に対応する回答候補との組み合わせからなる正例と、質問文と当該質問文に対応しない回答候補との組み合わせからなる負例とを生成することにより、学習データを準備するステップと、質問文を、当該質問文のベクトル表現である質問ベクトルに変換するための質問変換用ニューラルネットワークと、回答候補を、当該回答候補のベクトル表現である回答候補ベクトルに変換するための回答変換用ニューラルネットワークとを、Siameseネットワークにより訓練するステップと、訓練するステップにより訓練された回答変換用ニューラルネットワークを用いて、回答候補群に含まれる回答候補を、当該回答候補のベクトル表現である回答候補ベクトルに変換するステップと、変換するステップにより生成された回答候補ベクトルを所定個数のクラスタにクラスタリングし、回答候補の各々に、当該回答候補が属するクラスタの識別子を付与するステップと、複数の質問文の各々について、当該質問に対応する回答候補を含むクラスタの識別子を対応付けるステップと、複数の質問文の各々について質問変換用ニューラルネットワークの出力する質問ベクトルと、当該質問文に対応する回答候補が属するクラスタとの距離を表す所定の指標が小さくなるように質問変換用ニューラルネットワークの追加学習をするステップとを含む。 A method for training a question-answering model according to a seventh aspect of the present invention is based on a plurality of question sentences and a group of answer candidates for each of the plurality of question sentences. A step of preparing learning data by generating a positive example consisting of a combination of a question sentence and a negative example consisting of a combination of a question sentence and an answer candidate that does not correspond to the question sentence; A question conversion neural network for converting into a question vector, which is a representation, and an answer conversion neural network, which converts an answer candidate into an answer candidate vector, which is a vector representation of the answer candidate, are trained using a Siamese network. and converting an answer candidate included in the answer candidate group into an answer candidate vector that is a vector representation of the answer candidate using the answer conversion neural network trained in the step of training. Clustering the generated answer candidate vectors into a predetermined number of clusters, assigning to each answer candidate an identifier of the cluster to which the answer candidate belongs, and determining an answer candidate corresponding to the question for each of the plurality of question sentences. , and a predetermined index representing the distance between the question vector output by the question conversion neural network for each of the plurality of question sentences and the cluster to which the answer candidate corresponding to the question belongs is small. and a step of additionally learning the question conversion neural network so that the question conversion neural network becomes

好ましくは、質問回答用モデルの訓練方法はさらに、学習データを準備するステップに先立って、インターネットから複数の質問文を収集するステップを含む。 Preferably, the method for training a question answering model further includes the step of collecting a plurality of question sentences from the Internet, prior to the step of preparing training data.

より好ましくは、収集するステップは、学習データを準備するステップに先立って、インターネットから複数の質問文を、その前又は後の文とともに収集するステップと、複数の質問文の各々について、当該質問文について収集された前又は後の文に基づいて、質問文の関連するトピックを推定するステップとを含み、学習データを準備するステップは、複数の質問文の各々に、当該質問文の関連するトピックを付与するステップと、トピックが付与された複数の質問文と、回答候補群とから、質問文と当該質問文に対応する回答候補との組み合わせからなる正例と、質問文と当該質問文に対応しない回答候補との組み合わせからなる負例とを生成することにより、学習データを準備するステップとを含む。 More preferably, the collecting step includes, prior to the step of preparing the learning data, collecting a plurality of question sentences from the Internet together with sentences before or after the question sentences, and for each of the plurality of question sentences, the question sentence estimating a topic related to the question based on previous or subsequent sentences collected for the question, and the step of preparing learning data includes estimating a topic related to the question for each of the plurality of question sentences. A positive example consisting of a combination of a question sentence and an answer candidate corresponding to the question sentence, a positive example consisting of a combination of a question sentence and an answer candidate corresponding to the question sentence, from a plurality of question sentences to which topics have been assigned, and an answer candidate group, and preparing learning data by generating negative examples consisting of combinations with non-corresponding answer candidates.

さらに好ましくは、質問回答用モデルの訓練方法はさらに、学習データを準備するステップに先立って、インターネットから複数の質問文の各々に対する回答候補群を収集するステップと、収集された回答候補群に含まれる回答候補の各々に関連付けて、当該回答候補のインターネット上のURLを記憶するステップとを含み、方法はさらに、回答候補の各々について、当該回答候補が属するクラスタの識別子と、当該回答候補のインターネット上のURLとを含む新たなレコードをデータベースに追加するステップを含む。 More preferably, the method for training a question answering model further includes, prior to the step of preparing learning data, collecting a group of answer candidates for each of the plurality of question sentences from the Internet; storing, for each candidate answer, an identifier of a cluster to which the candidate answer belongs, and a URL on the Internet of the candidate answer, in association with each of the candidate answers. and adding a new record to the database containing the above URL.

この発明の上記及び他の目的、特徴、局面及び利点は、添付の図面と関連して理解されるこの発明に関する次の詳細な説明から明らかとなるであろう。 The above and other objects, features, aspects and advantages of the present invention will become apparent from the following detailed description of the invention, understood in conjunction with the accompanying drawings.

図1は、この発明の第1実施形態に係る質問回答装置の機能的ブロック図である。FIG. 1 is a functional block diagram of a question answering device according to a first embodiment of the present invention. 図2は、第1実施形態に係る質問回答装置において、質問BERTの学習を行う学習装置の機能的ブロック図である。FIG. 2 is a functional block diagram of a learning device that learns the question BERT in the question answering device according to the first embodiment. 図3は、図2に示すBERT学習部の機能的ブロック図である。FIG. 3 is a functional block diagram of the BERT learning section shown in FIG. 2. 図4は、追加学習前の質問BERTにより生ずることのある問題を示す模式図である。FIG. 4 is a schematic diagram illustrating problems that may occur due to question BERT before additional learning. 図5は、追加学習した後の質問BERTによる問題の解消を示す模式図である。FIG. 5 is a schematic diagram illustrating problem solving by question BERT after additional learning. 図6は、図2に示す追加学習部の機能的ブロック図である。FIG. 6 is a functional block diagram of the additional learning section shown in FIG. 2. 図7は、この発明の第2実施形態に係る対話装置の機能的ブロック図である。FIG. 7 is a functional block diagram of an interaction device according to a second embodiment of the invention. 図8は、図2実施形態に係る対話装置において、対話履歴管理部の学習を行う学習装置の機能的ブロック図である。FIG. 8 is a functional block diagram of a learning device that performs learning of the dialog history management section in the dialog device according to the embodiment in FIG. 図9は、図8に示す追加学習部の機能的ブロック図である。FIG. 9 is a functional block diagram of the additional learning section shown in FIG. 8. 図10は、この発明の第1実施形態に係る質問回答装置50及び第2実施形態に係る対話装置350並びにそれらにおいて使用されるニューラルネットワークの学習を行う学習装置を実現するコンピュータシステムの外観を示す図である。FIG. 10 shows the external appearance of a computer system that realizes a question answering device 50 according to a first embodiment of the present invention, an interaction device 350 according to a second embodiment, and a learning device for learning a neural network used therein. It is a diagram. 図11は、図10に示すコンピュータシステムのハードウェア構成を示すブロック図である。FIG. 11 is a block diagram showing the hardware configuration of the computer system shown in FIG. 10.

以下の説明及び図面においては、同一の部品には同一の参照番号を付してある。したがって、それらについての詳細な説明は繰返さない。 In the following description and drawings, identical parts are provided with the same reference numerals. Therefore, detailed description thereof will not be repeated.

第1 第1実施形態
1.構成
A.質問回答装置
図1に、この発明の第1実施形態に係る質問回答装置50の機能的ブロック図を示す。図1を参照して、質問回答装置50は、質問60を受け取り、インターネット62から回答候補となるパッセージ群を検索するための回答候補検索部64と、回答候補検索部64により検索されたパッセージ群を記憶するためのパッセージDB(Database)66とを含む。パッセージDB66に記憶されるパッセージ群は、従来のものと比較して限定された数である。質問回答装置50はさらに、パッセージDB66に記憶されたパッセージ群に基づき、従来の手法と同様の手法を用いて質問60に対する回答70を生成し出力するための回答生成部68を含む。回答生成部68が回答70を生成する手法は、この実施形態においては従来技術と全く同様である。ただし、回答生成部68が処理する対象となるパッセージの数は、従来技術と比較してはるかに少ない。
1st Embodiment 1. Configuration A. Question Answering Device FIG. 1 shows a functional block diagram of a question answering device 50 according to a first embodiment of the present invention. Referring to FIG. 1, a question answering device 50 receives a question 60, and includes an answer candidate search section 64 for searching a passage group that becomes an answer candidate from the Internet 62, and a passage group searched by the answer candidate search section 64. and a passage DB (Database) 66 for storing. The number of passage groups stored in the passage DB 66 is limited compared to the conventional one. The question answering device 50 further includes an answer generation unit 68 for generating and outputting an answer 70 to the question 60 based on the passage group stored in the passage DB 66 using a method similar to a conventional method. The method by which the answer generation unit 68 generates the answer 70 in this embodiment is exactly the same as in the prior art. However, the number of passages to be processed by the answer generation unit 68 is much smaller than in the prior art.

この実施形態の特徴は、質問60を受けた時点においてインターネット62から検索するパッセージの数が限定されている点である。したがってパッセージDB66に記憶されるパッセージの数は少なく、回答生成部68が必要とする計算資源も従来と比較してはるかに少なく済む。 A feature of this embodiment is that the number of passages to be searched from the Internet 62 at the time the question 60 is received is limited. Therefore, the number of passages stored in the passage DB 66 is small, and the calculation resources required by the answer generation section 68 are also far fewer than in the past.

回答候補検索部64は、質問60を変換し、質問60を表現するベクトルである質問ベクトル82を出力するための質問BERT80を含む。質問BERT80は、あらかじめ学習済みだが、その学習については図2以降を参照して後述する。ここで、質問BERT等は、ニューラルネットワークのBidirectional Encoder Representation from Transformersを含むものであり、BERT、RoBERTa等、Transformer Encoderを含むニューラルネットワークであり、一般的に、言語資源による事前学習を経て、タスクに応じたファインチューニングの後に利用される。この実施形態におけるファインチューニング等については、後述する。 The answer candidate search unit 64 includes a question BERT 80 for converting the question 60 and outputting a question vector 82 that is a vector expressing the question 60. The question BERT80 has been trained in advance, and the learning will be described later with reference to FIG. 2 and subsequent figures. Here, the question BERT etc. includes a neural network Bidirectional Encoder Representation from Transformers, and is a neural network including Transformer encoders such as BERT, RoBERTa, etc., and generally uses pre-learning using language resources. to the task Used after appropriate fine tuning. Fine tuning and the like in this embodiment will be described later.

回答候補検索部64はさらに、セントロイドDB84を含む。セントロイドDB84は質問BERT80などの訓練過程において同時に生成される。セントロイドDB84を生成する方法については学習の説明の際にあわせて後述する。簡単に言えば、セントロイドDB84は、様々な質問に対する回答を含む多くのパッセージをベクトル化し、クラスタリングして、そのセントロイドをデータベース化したものである。セントロイドDB84の各レコードは、そのセントロイドが代表するクラスタのクラスタ識別子と、そのセントロイドのベクトル空間上の位置を表すベクトルとを含む。パッセージをベクトル化したものをパッセージベクトルと呼ぶ。パッセージベクトルと質問ベクトル82とは同じ次元数のベクトルである。 The answer candidate search unit 64 further includes a centroid DB 84. The centroid DB 84 is generated simultaneously during the training process such as the query BERT 80. The method for generating the centroid DB 84 will be described later along with the explanation of learning. Simply put, the centroid DB 84 vectorizes and clusters many passages containing answers to various questions, and creates a database of centroids. Each record in the centroid DB 84 includes the cluster identifier of the cluster represented by the centroid and a vector representing the position of the centroid in the vector space. A vectorized passage is called a passage vector. The passage vector and the question vector 82 are vectors with the same number of dimensions.

回答候補検索部64はさらに、質問ベクトル82を受けて、ベクトル空間内において質問ベクトル82に最も近い所定個数のセントロイドのレコードをセントロイドDB84において検索し、検索された所定個数のセントロイドのクラスタ識別子88をそれぞれ出力するための回答候補クラスタ特定部86を含む。これらクラスタ識別子88により表される各クラスタには、質問60に対する回答を含む可能性が高いパッセージに対応するパッセージベクトルが含まれることが想定されている。なぜそのようになるかについては、質問BERT80の訓練に関する説明において明らかにする。 The answer candidate search unit 64 further receives the question vector 82, searches the centroid DB 84 for records of a predetermined number of centroids closest to the question vector 82 in the vector space, and searches for clusters of the predetermined number of searched centroids. It includes an answer candidate cluster identification unit 86 for outputting identifiers 88, respectively. It is assumed that each cluster represented by these cluster identifiers 88 includes a passage vector corresponding to a passage that is likely to include an answer to the question 60. Why this is so will be made clear in the explanation regarding the training of question BERT80.

回答候補検索部64はさらに、あらかじめ様々な質問について、その回答候補となるパッセージを表す多数のパッセージレコードを記憶するための回答候補DB90を含む。回答候補DB90の各レコードは、あらかじめ作成された質問に対して、その回答が含まれていると考えられるパッセージをウェブからダウンロードした情報から作成される。より具体的には、各レコードは、パッセージが存在していたロケーションを示すURLと、そのパッセージベクトルが属するクラスタのクラスタ識別子とを含む。 The answer candidate search unit 64 further includes an answer candidate DB 90 for storing in advance a large number of passage records representing passages that are answer candidates for various questions. Each record in the answer candidate DB 90 is created from information obtained by downloading a passage that is considered to contain an answer to a previously created question from the web. More specifically, each record includes a URL indicating the location where the passage was located and a cluster identifier of the cluster to which the passage vector belongs.

回答候補検索部64はさらに、回答候補クラスタ特定部86が出力するクラスタ識別子88を受け、クラスタ識別子88と一致するクラスタ識別子を持つレコードを回答候補DB90において検索し、検索されたレコードのURLを回答候補URL群94として出力するための回答候補検索部92と、回答候補URL群94に含まれるURLの各々にアクセスし、回答候補を含むと思われるパッセージを含むテキストをダウンロードして、パッセージを抽出し、パッセージDB66に蓄積するためのパッセージ検索部96とを含む。 The answer candidate search unit 64 further receives the cluster identifier 88 output by the answer candidate cluster specifying unit 86, searches the answer candidate DB 90 for a record having a cluster identifier that matches the cluster identifier 88, and returns the URL of the searched record. Access the answer candidate search unit 92 for output as a candidate URL group 94 and each of the URLs included in the answer candidate URL group 94, download text containing passages that are considered to include answer candidates, and extract the passages. and a passage search unit 96 for storing in the passage DB 66.

前述したとおり、パッセージ検索部96がアクセスするURLは、回答候補クラスタ特定部86により特定されたセントロイドに対応するクラスタに属するものだけである。したがって、従来技術のようにウェブ全体からダウンロードした大量のデータにアクセスする必要はない。選択された個数のクラスタに属するURLからダウンロードしたものだけがアクセスの対象となる。そのため、回答生成部68として従来のものと同じものを採用したとしても、必要な記憶容量も、計算資源もはるかに小さくて済む。 As described above, the passage search section 96 accesses only URLs that belong to the cluster corresponding to the centroid specified by the answer candidate cluster specifying section 86. Therefore, there is no need to access large amounts of data downloaded from across the web as in the prior art. Only those downloaded from URLs belonging to the selected number of clusters are to be accessed. Therefore, even if the answer generation section 68 is the same as the conventional one, the required storage capacity and calculation resources will be much smaller.

B.学習装置
図2に、図1に示す質問BERT80の学習を行い、同時にセントロイドDB84及び回答候補DB90の生成を行うための学習装置150の機能的構成を示す。図2を参照して、学習装置150は、インターネット62から多数の質問と、各質問に対する回答候補を含む多数のパッセージとを収集するための質問・パッセージ収集部160と、質問・パッセージ収集部160が収集した質問を記憶するための質問DB162と、質問・パッセージ収集部160が収集したパッセージを記憶するためのパッセージDB164とを含む。図2ではパッセージDB164に蓄積されるパッセージを用いて、BERTの学習とパッセージのクラスタリングを行うようにしているが、これは別のDB、例えばパッセージDB164に蓄積されているパッセージの一部からなるDBを用いることもできる。
B. Learning Device FIG. 2 shows a functional configuration of a learning device 150 for learning the question BERT 80 shown in FIG. 1 and simultaneously generating the centroid DB 84 and answer candidate DB 90. Referring to FIG. 2, the learning device 150 includes a question/passage collection unit 160 for collecting a large number of questions and a large number of passages including answer candidates for each question from the Internet 62; includes a question DB 162 for storing questions collected by the question/passage collection unit 160, and a passage DB 164 for storing passages collected by the question/passage collection unit 160. In FIG. 2, BERT learning and passage clustering are performed using the passages stored in the passage DB 164, but this is done in another DB, for example, a DB consisting of part of the passages stored in the passage DB 164. You can also use

質問DB162の各レコードは各質問に対応する。各レコードは、例えば、質問識別子と、その質問に対応するパッセージが主として属するクラスタのクラスタ識別子と、質問のテキストと、その質問が存在するインターネット上のURLとを含む。 Each record in the question DB 162 corresponds to each question. Each record includes, for example, a question identifier, a cluster identifier of the cluster to which the passage corresponding to the question mainly belongs, the text of the question, and the URL on the Internet where the question exists.

質問・パッセージ収集部160の各レコードは各パッセージに対応する。各レコードは、パッセージIDと、対応する質問IDと、そのパッセージが存在するインターネット上のURLとを含む。 Each record of the question/passage collection unit 160 corresponds to each passage. Each record includes a passage ID, a corresponding question ID, and a URL on the Internet where the passage exists.

学習装置150はさらに、図1に示す質問BERT80と同じ構成の、訓練対象の質問BERT168と、質問BERT168と同じ構成の回答候補BERT170と、質問DB162及び質問・パッセージ収集部160に記憶されたデータを用いて、質問BERT168及び回答候補BERT170の学習をSiamese BERTネットワーク(Siamese BERT Networks)により同時に行うためのBERT学習部166とを含む。Siamese BERTネットワークについては、以下の参考文献に記載がある。この実施形態におけるSiamese BERTネットワークの概略については図3を参照して後述する。なお、本発明は、Siamese BERTネットワークによる構成に限定されるものではなく、質問BERT80と回答候補BERT170の出力であるベクトル表現の近い、遠いが学習データと整合していれば、問題ない。 The learning device 150 further includes a training target question BERT 168 having the same configuration as the question BERT 80 shown in FIG. and a BERT learning unit 166 for simultaneously learning a question BERT 168 and an answer candidate BERT 170 using Siamese BERT Networks. The Siamese BERT network is described in the following references: An outline of the Siamese BERT network in this embodiment will be described later with reference to FIG. 3. Note that the present invention is not limited to the configuration using the Siamese BERT network, and there is no problem as long as the vector representations that are the outputs of the question BERT 80 and the answer candidate BERT 170 are close or distant but consistent with the learning data.

[参考文献]
Nils Reimers and Iryna Gurevych,”Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks,”[online],令和元年8月27日,Arxiv.org,[令和4年3月10日検索],インターネット,<https://arxiv.org/pdf/1908.10084>
学習装置150はさらに、BERT学習部166により学習が行われた回答候補BERT170を用いて質問・パッセージ収集部160に含まれる各パッセージをパッセージベクトル化し、さらにクラスタリングして回答候補DB90及びセントロイドDB84を生成するためのパッセージクラスタリング部172を含む。パッセージクラスタリング部172による回答候補DB90の生成は、以下の手順に従って行われる。まず質問・パッセージ収集部160に含まれる各パッセージを回答候補BERT170に入力することにより、回答候補BERT170の出力に得られるベクトルに変換する。これらのベクトルは、各パッセージを表すパッセージベクトルである。パッセージクラスタリング部172はさらに、これらパッセージベクトルを所定個数のクラスタにクラスタリングする。このクラスタの個数は、あらかじめ定めておいてもよいし、クラスタ内のベクトルの分散の合計を最小にするなど、所定の基準により支障の出ない一定範囲内において決めるようにしてもよい。
[References]
Nils Reimers and Iryna Gurevych, “Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks,” [online], August 27, 2019, Arxiv.org, [searched March 10, 2020], Internet ,<https://arxiv.org/pdf/1908.10084>
The learning device 150 further converts each passage included in the question/passage collection unit 160 into a passage vector using the answer candidate BERT 170 trained by the BERT learning unit 166, and further clusters the passages to create an answer candidate DB 90 and a centroid DB 84. It includes a passage clustering unit 172 for generating. Generation of the answer candidate DB 90 by the passage clustering unit 172 is performed according to the following procedure. First, by inputting each passage included in the question/passage collection unit 160 to the answer candidate BERT 170, it is converted into a vector obtained as an output of the answer candidate BERT 170. These vectors are passage vectors representing each passage. The passage clustering unit 172 further clusters these passage vectors into a predetermined number of clusters. The number of clusters may be determined in advance, or may be determined within a certain range without causing any problems based on predetermined criteria, such as minimizing the total variance of vectors within the cluster.

パッセージクラスタリング部172は、このようにしてパッセージベクトルをクラスタリングした後、各クラスタのセントロイドを決定する。さらに各セントロイドに、そのセントロイドが代表するクラスタの識別子を付与する。パッセージクラスタリング部172は、このようにして得られた各セントロイドに関する情報をレコード化しセントロイドDB84を生成する。具体的には、セントロイドDB84の各レコードは、クラスタ識別子と、そのセントロイドのベクトルとを含む。当然のことだがセントロイドのベクトルはパッセージベクトル及び質問ベクトルと同次元である。 After clustering the passage vectors in this manner, the passage clustering unit 172 determines the centroid of each cluster. Furthermore, each centroid is given an identifier of the cluster represented by that centroid. The passage clustering unit 172 records the information regarding each centroid obtained in this manner and generates a centroid DB 84. Specifically, each record in the centroid DB 84 includes a cluster identifier and a vector of its centroid. Naturally, the centroid vector has the same dimension as the passage vector and the question vector.

なお、パッセージクラスタリング部172は、回答候補DB90の各レコードを以下のように生成する。パッセージクラスタリング部172は、質問・パッセージ収集部160の各レコードについて、そのレコードのパッセージから得られたパッセージベクトルの属するクラスタのクラスタ識別子と、そのレコードのURLとを一組にして回答候補DB90にレコードを登録する。パッセージクラスタリング部172はまた、質問DB162の各レコードについて、その質問DB162に対して得られたパッセージが主として属するクラスタのセントロイドIDを付与する処理も行う。 Note that the passage clustering unit 172 generates each record in the answer candidate DB 90 as follows. The passage clustering unit 172 sets, for each record in the question/passage collection unit 160, the cluster identifier of the cluster to which the passage vector obtained from the passage of that record belongs and the URL of that record as a set and records it in the answer candidate DB 90. Register. The passage clustering unit 172 also performs, for each record in the question DB 162, a process of assigning the centroid ID of the cluster to which the passage obtained for that question DB 162 mainly belongs.

学習装置150はさらに、セントロイドDB84及び質問DB162を用いて、質問BERT168の追加学習を行うための追加学習部174を含む。BERT学習部166による学習がされた後の質問BERT168は、追加学習部174による追加学習を受けて図1に示す質問BERT80となる。この追加学習の意味については図4及び図5を参照して後述する。 The learning device 150 further includes an additional learning unit 174 for performing additional learning of the question BERT 168 using the centroid DB 84 and the question DB 162. The question BERT168 that has been trained by the BERT learning unit 166 becomes the question BERT80 shown in FIG. 1 after undergoing additional learning by the additional learning unit 174. The meaning of this additional learning will be described later with reference to FIGS. 4 and 5.

図3に、図2に示すBERT学習部166の構成についてブロック図形式により示す。この学習における教師データは、質問及びパッセージと、そのパッセージがその質問に対する回答を含むか否かを示すラベルとを1組とする。ラベルは、例えばパッセージが質問に対する回答を含むときは1であり、さもなければ0とする。 FIG. 3 shows the configuration of the BERT learning section 166 shown in FIG. 2 in block diagram form. The teacher data for this learning includes a question, a passage, and a label indicating whether or not the passage includes an answer to the question. The label is, for example, 1 when the passage contains an answer to a question, and 0 otherwise.

図3を参照して、BERT学習部166は、学習データの質問と回答候補パッセージとを質問BERT168及び回答候補BERT170にそれぞれ入力し、質問を表現するベクトル200(U)と回答候補パッセージを表現するベクトル202(V)とに変換した後、ベクトルU及びベクトルVの間のコサイン類似度を算出するためのコサイン類似度算出部204と、コサイン類似度算出部204の出力([-1,1]の範囲)を[0,1]の範囲に正規化するための正規化処理部206と、正規化処理部206の出力と学習データのラベル210(0又は1)とに基づき、両者が一致する方向に質問BERT168及び回答候補BERT170の各々のパラメータを誤差逆伝播法により更新するためのパラメータ更新部208とを含む。正規化処理部206による正規化は、例えば{cos(U、V)+1}/2により行うことができる。なお、この実施形態においては、パラメータ更新部208における更新のための損失関数として平均二乗誤差を用いている。 Referring to FIG. 3, the BERT learning unit 166 inputs the question and answer candidate passage of the learning data into the question BERT 168 and the answer candidate BERT 170, respectively, and expresses the vector 200 (U) expressing the question and the answer candidate passage. After converting into a vector 202 (V), a cosine similarity calculation unit 204 for calculating the cosine similarity between the vector U and the vector V and the output of the cosine similarity calculation unit 204 ([-1, 1] range) to the range [0, 1], and based on the output of the normalization processing unit 206 and the label 210 (0 or 1) of the learning data, the two match. and a parameter updating unit 208 for updating each parameter of the question BERT 168 and the answer candidate BERT 170 in the direction using the error backpropagation method. The normalization by the normalization processing unit 206 can be performed using, for example, {cos (U, V)+1}/2. Note that in this embodiment, the mean square error is used as a loss function for updating in the parameter updating unit 208.

質問BERT168は、BERT220と、BERT220の最終層の各要素について平均プーリングを行うことによりベクトル200を出力するためのPooling層222とを含む。 Query BERT 168 includes a BERT 220 and a pooling layer 222 for outputting a vector 200 by performing average pooling on each element of the final layer of BERT 220.

回答候補BERT170は質問BERT168と全く同じ構成である。すなわち、回答候補BERT170は、BERT220と同じ構成のBERT230と、BERT230の最終層の各要素について平均プーリングを行うことによりベクトル202を出力するためのPooling層232とを含む。この段階においては、BERT220とBERT230とのパラメータ構成は全て共通であり、それらの値の更新も互いに反映される。 The answer candidate BERT 170 has exactly the same configuration as the question BERT 168. That is, the answer candidate BERT 170 includes a BERT 230 having the same configuration as the BERT 220, and a pooling layer 232 for outputting the vector 202 by performing average pooling on each element of the final layer of the BERT 230. At this stage, the parameter configurations of BERT 220 and BERT 230 are all common, and updates of their values are also reflected in each other.

前述したとおり、質問BERT168及び回答候補BERT170は同じ構成であり、かつパラメータの値も共通するようパラメータ更新部208による更新が行われる。BERT学習部166は、こうした学習を全ての学習データに対して所定の終了条件が成立するまで繰り返す。その結果、回答候補BERT170に与えられる回答候補パッセージが質問BERT168に与えられる質問に対する回答を含む場合にはベクトル200とベクトル202とが類似したベクトルとなり、そうでない場合には互いに異なるベクトルとなる。 As described above, the question BERT 168 and the answer candidate BERT 170 have the same configuration, and are updated by the parameter updating unit 208 so that the parameter values are also common. The BERT learning unit 166 repeats such learning for all learning data until a predetermined end condition is satisfied. As a result, if the answer candidate passage given to answer candidate BERT 170 includes an answer to the question given to question BERT 168, vector 200 and vector 202 are similar vectors, otherwise they are different vectors.

ただし、上記した学習を行った場合には以下のような問題が生じ得る。図4を参照して、例えばある質問に対する質問BERT168による変換256の結果、ベクトル254が得られたものとする。一方、この質問に対する正しい回答を含むパッセージを回答候補BERT170により変換した結果がベクトル260だとする。またベクトル260が属するのがクラスタ250であり、そのセントロイドがベクトル270だとする。 However, when the above learning is performed, the following problems may occur. Referring to FIG. 4, assume that a vector 254 is obtained as a result of transformation 256 by question BERT 168 for a certain question. On the other hand, it is assumed that the vector 260 is the result of converting the passage containing the correct answer to this question using the answer candidate BERT 170. It is also assumed that the vector 260 belongs to the cluster 250 and its centroid is the vector 270.

一方、クラスタ250と異なるクラスタ252が存在し、そのセントロイドがベクトル272だとする。なお、図4はベクトルを2次元として考えているが、実際ははるかに次元数が高いことに注意する必要がある。 On the other hand, it is assumed that a cluster 252 different from the cluster 250 exists, and its centroid is the vector 272. Although FIG. 4 assumes that the vector is two-dimensional, it should be noted that the number of dimensions is actually much higher.

この状況においては、ベクトル254とベクトル260との間のコサイン類似度は、ベクトル254とクラスタ252に含まれるどのベクトルとの間のコサイン類似度よりも大きい。しかし、ベクトル254と各セントロイドのベクトル270及び272とのコサイン類似度を考えると、ベクトル254とベクトル270との間のコサイン類似度264(cos)と、ベクトル254とベクトル272との間のコサイン類似度262(cos2)との間にはcos<cosという関係が成立してしまうことになる。このような状況になると、図1に示す回答候補検索部92が質問ベクトル82と各クラスタのセントロイドとのコサイン類似度に基づいてクラスタを選択する以上、正しい処理が行えなくなる可能性がある。そこで、図2に示す追加学習部174により以下のような追加学習を行う。 In this situation, the cosine similarity between vector 254 and vector 260 is greater than the cosine similarity between vector 254 and any vector included in cluster 252. However, considering the cosine similarity between vector 254 and vectors 270 and 272 of each centroid, the cosine similarity between vector 254 and vector 270 is 264 (cos 1 ), and the cosine similarity between vector 254 and vector 272 is The relationship cos 1 <cos 2 holds true with the cosine similarity 262 (cos2). In such a situation, since the answer candidate search unit 92 shown in FIG. 1 selects clusters based on the cosine similarity between the question vector 82 and the centroid of each cluster, it may not be possible to perform correct processing. Therefore, the additional learning section 174 shown in FIG. 2 performs the following additional learning.

図5を参照して、追加学習においては、例えば質問BERT168による変換により生成されるベクトルとベクトル270とのコサイン類似度が、ベクトル272とのコサイン類似度よりも大きくなるようにすればよい。そこで、質問BERT168の追加学習により、質問BERT168の変換256ではなく、得られるベクトル280がよりベクトル270に近づく変換258が実現されるように質問BERT168のパラメータを更新する。すなわち、ベクトル254をベクトル282に相当する分だけ移動してベクトル280の位置に来るようにすればよい。ベクトル280とベクトル270のコサイン類似度286をcos′により表し、ベクトル280とベクトル272とのコサイン類似度284をcos′により表すとすれば、cos′>cos′となるようにすればよい。 Referring to FIG. 5, in the additional learning, for example, the cosine similarity between the vector generated by the transformation by the question BERT 168 and the vector 270 may be made larger than the cosine similarity between the vector 272 and the vector 272. Therefore, by additional learning of the question BERT 168, the parameters of the question BERT 168 are updated so that a transformation 258, in which the obtained vector 280 becomes closer to the vector 270, is realized instead of the transformation 256 of the question BERT 168. That is, the vector 254 may be moved by an amount corresponding to the vector 282 so that it comes to the position of the vector 280. If the cosine similarity 286 between vectors 280 and 270 is expressed by cos' 1 , and the cosine similarity 284 between vectors 280 and 272 is expressed by cos' 2 , then cos' 1 >cos' 2 . Bye.

そのため、この実施形態においては、追加学習部174は以下のような構成を持つ。図6を参照して、追加学習部174は、ある質問60を質問BERT168に入力してベクトル310を出力させ、一方、質問60に対応するパッセージが主として属するクラスタのセントロイドのベクトルをベクトルWとすると、ベクトル310とベクトルWからなるベクトル312とのコサイン類似度を算出するためのコサイン類似度算出部314と、コサイン類似度算出部314の出力([-1,1]の範囲)を[0,1]の範囲に正規化するための正規化処理部316と、正規化処理部316の出力がラベル「1」に近づくようにBERT220のパラメータを誤差逆伝播法により更新するためのパラメータ更新部318とを含む。コサイン類似度算出部314は図3に示すコサイン類似度算出部204と同じものである。正規化処理部316は図3に示す正規化処理部206と同じものである。またパラメータ更新部318は基本的には図3に示すパラメータ更新部208と同じものだが、質問BERT168のBERT220のみのパラメータを更新する点においてパラメータ更新部208と異なる。追加学習部174は、この更新を、所定の終了条件が成立するまで繰り返し実行する。 Therefore, in this embodiment, the additional learning section 174 has the following configuration. Referring to FIG. 6, the additional learning unit 174 inputs a certain question 60 to the question BERT 168 to output a vector 310, and on the other hand, the centroid vector of the cluster to which the passage corresponding to the question 60 mainly belongs is defined as a vector W. Then, the cosine similarity calculation unit 314 for calculating the cosine similarity between the vector 310 and the vector 312 consisting of the vector W, and the output of the cosine similarity calculation unit 314 (range [-1, 1]) are set to [0 . 318. The cosine similarity calculation unit 314 is the same as the cosine similarity calculation unit 204 shown in FIG. The normalization processing unit 316 is the same as the normalization processing unit 206 shown in FIG. The parameter update unit 318 is basically the same as the parameter update unit 208 shown in FIG. 3, but differs from the parameter update unit 208 in that it updates the parameters of only the BERT 220 of the question BERT 168. The additional learning unit 174 repeatedly executes this update until a predetermined termination condition is satisfied.

ラベル「1」は正解を示す。このような更新をすることにより、各質問のベクトルとその正しい回答を含むパッセージのベクトルとの間のコサイン類似度が大きくなるように、BERT220のパラメータを更新できる。なお、この追加学習においては、正解パッセージのベクトルが属するクラスタのセントロイドに対して質問のベクトルが近く(コサイン類似度が大きくなるように)配置されるようになればよい。そのため、不正解のパッセージは使用せず、正解のパッセージに関する学習データのみを利用して学習を行えばよい。 Label "1" indicates the correct answer. Such an update allows the parameters of BERT 220 to be updated such that the cosine similarity between each question's vector and the passage's vector containing its correct answer increases. In addition, in this additional learning, it is sufficient that the vector of the question is arranged close to the centroid of the cluster to which the vector of the correct passage belongs (so that the cosine similarity becomes large). Therefore, learning can be performed using only learning data related to correct passages, without using incorrect passages.

2.動作
上記した構成を持つ質問回答装置50及び学習装置150は以下のように動作する。まず、質問BERT80の学習時の学習装置150について説明し、次に質問BERT80を用いた質問回答装置50の動作について説明する。
2. Operation The question answering device 50 and the learning device 150 having the configurations described above operate as follows. First, the learning device 150 during learning of the question BERT 80 will be explained, and then the operation of the question answering device 50 using the question BERT 80 will be explained.

2-1.質問BERT80の学習
図2を参照して、質問BERT80の学習時には学習装置150は以下のように動作する。まず質問・パッセージ収集部160が、インターネット62をクロールし、質問文を収集し質問DB162に記憶する。質問・パッセージ収集部160はさらに、質問DB162に記憶された質問文の各々について、その質問に対する回答を含むと考えられるパッセージをさらにインターネット62から収集する。質問・パッセージ収集部160は、収集したパッセージを対応する質問と関連付けてパッセージDB164に格納する。質問・パッセージ収集部160によるこれら処理は従来技術により実現できる。
2-1. Learning of Question BERT 80 Referring to FIG. 2, learning device 150 operates as follows when learning Question BERT 80. First, the question/passage collection unit 160 crawls the Internet 62, collects question sentences, and stores them in the question DB 162. The question/passage collecting unit 160 further collects passages from the Internet 62 that are considered to include an answer to each question stored in the question DB 162. The question/passage collection unit 160 stores the collected passages in the passage DB 164 in association with the corresponding questions. These processes by the question/passage collection unit 160 can be realized by conventional techniques.

次にBERT学習部166が、質問DB162に記憶された質問の各々と、これら質問に対してパッセージDB164に記憶されたパッセージとから、正例と負例とからなる学習データを生成する。BERT学習部166はこれら学習データを用いて質問BERT168と回答候補BERT170との学習をSiamese BERTネットワークにより同時に行う。 Next, the BERT learning unit 166 generates learning data consisting of positive examples and negative examples from each of the questions stored in the question DB 162 and the passages stored in the passage DB 164 for these questions. The BERT learning unit 166 uses these learning data to simultaneously learn the question BERT 168 and the answer candidate BERT 170 using the Siamese BERT network.

より具体的には、図3を参照して、この学習における教師データは、質問及びパッセージと、そのパッセージがその質問に対する回答を含むか否かを示すラベルとを1組とする。ラベルは、例えばパッセージが質問に対する回答を含むときは1であり、さもなければ0である。 More specifically, referring to FIG. 3, the teacher data for this learning includes a question, a passage, and a label indicating whether or not the passage includes an answer to the question. The label is, for example, 1 when the passage contains an answer to a question, and 0 otherwise.

BERT学習部166は、学習データの質問と回答候補パッセージとを質問BERT168及び回答候補BERT170にそれぞれ入力する。質問BERT168のBERT220及びPooling層222は、質問をベクトル200(U)に変換する。回答候補BERT170のBERT230及びPooling層232は、回答候補パッセージをベクトル202(V)に変換する。コサイン類似度算出部204が、ベクトルU及びベクトルVの間のコサイン類似度を算出し正規化処理部206に入力する。この値は[-1,1]の範囲である。正規化処理部206は、コサイン類似度算出部204の値を[0,1]の範囲に正規化してパラメータ更新部208に入力する。パラメータ更新部208は、正規化処理部206の出力と学習データのラベル210(0又は1)とに基づき、両者が一致する方向に質問BERT168及び回答候補BERT170の各々のパラメータを誤差逆伝播法により更新する。質問BERT168及び回答候補BERT170は同じ構成であり、かつパラメータの値も共通するようパラメータ更新部208による更新が行われる。 The BERT learning unit 166 inputs the question and answer candidate passage of the learning data into the question BERT 168 and the answer candidate BERT 170, respectively. BERT 220 and Pooling layer 222 of query BERT 168 transform the query into a vector 200(U). The BERT 230 and pooling layer 232 of the answer candidate BERT 170 convert the answer candidate passage into a vector 202(V). The cosine similarity calculation unit 204 calculates the cosine similarity between the vector U and the vector V, and inputs the calculated cosine similarity to the normalization processing unit 206. This value is in the range [-1,1]. The normalization processing unit 206 normalizes the value of the cosine similarity calculation unit 204 to the range [0, 1] and inputs the normalized value to the parameter updating unit 208. Based on the output of the normalization processing unit 206 and the label 210 (0 or 1) of the learning data, the parameter updating unit 208 uses the error backpropagation method to change the parameters of the question BERT 168 and the answer candidate BERT 170 in the direction that the two match. Update. The question BERT 168 and the answer candidate BERT 170 have the same configuration, and are updated by the parameter updating unit 208 so that the parameter values are also common.

BERT学習部166は、こうした学習を全ての学習データに対して所定の終了条件が成立するまで繰り返す。その結果、回答候補BERT170に与えられる回答候補パッセージが質問BERT168に与えられる質問に対する回答を含む場合にはベクトル200とベクトル202とが類似したベクトルとなり、そうでない場合には互いに異なるベクトルとなる。 The BERT learning unit 166 repeats such learning for all learning data until a predetermined end condition is satisfied. As a result, if the answer candidate passage given to answer candidate BERT 170 includes an answer to the question given to question BERT 168, vector 200 and vector 202 are similar vectors, otherwise they are different vectors.

パッセージクラスタリング部172は、このように学習が終わった回答候補BERT170を用いて、パッセージDB164に記憶されたパッセージを全てパッセーベクトルに変換する。パッセージクラスタリング部172はさらに、それらパッセージベクトルをk平均法により所定個数のクラスタに分類する。これらクラスタにはそれぞれ識別子が割り当てられる。パッセージクラスタリング部172はさらに、各クラスタのセントロイドのベクトルを算出し、クラスタの識別子をセントロイドの識別子に割り当てる。パッセージクラスタリング部172は、こうして得られた各セントロイドについて、クラスタ識別子とそのセントロイドのベクトルとを組にしてセントロイドDB84に登録する。 The passage clustering unit 172 converts all the passages stored in the passage DB 164 into passage vectors using the answer candidate BERT 170 that has been trained in this way. The passage clustering unit 172 further classifies the passage vectors into a predetermined number of clusters using the k-means method. Each of these clusters is assigned an identifier. The passage clustering unit 172 further calculates the centroid vector of each cluster and assigns the cluster identifier to the centroid identifier. For each centroid thus obtained, the passage clustering unit 172 registers the cluster identifier and the vector of the centroid as a pair in the centroid DB 84.

一方、パッセージクラスタリング部172は、各クラスタに属するパッセージベクトルに対応するパッセージのURLと、その属するクラスタの識別子とを組にしてレコードを回答候補DB90に登録する。またパッセージクラスタリング部172は、質問DB162に記憶されている各質問のレコードに、その質問に対する回答を最も多く含むクラスタのクラスタ識別子を追加する。 On the other hand, the passage clustering unit 172 registers a record in the answer candidate DB 90 by combining the URL of the passage corresponding to the passage vector belonging to each cluster and the identifier of the cluster to which the passage belongs. The passage clustering unit 172 also adds, to each question record stored in the question DB 162, the cluster identifier of the cluster containing the most answers to that question.

セントロイドDB84へのセントロイドの登録が完了すると、追加学習部174が、質問DB162に記憶されている各質問に対し、その質問に対応するセントロイドのベクトルをセントロイドDB84から読み出す。追加学習部174は各質問に対して、セントロイドDB84から読み出したセントロイドベクトルを正解データとして質問BERT80の追加学習を行う。所定の終了条件が成立した時点で質問BERT80の学習が終了する。 When the registration of the centroid in the centroid DB 84 is completed, the additional learning unit 174 reads out the centroid vector corresponding to each question stored in the question DB 162 from the centroid DB 84. The additional learning unit 174 performs additional learning of the question BERT 80 for each question using the centroid vector read from the centroid DB 84 as correct answer data. Learning of the question BERT 80 ends when a predetermined end condition is met.

より具体的には、図6を参照して、学習データは、質問と、質問に対する正しい回答を含むパッセージのパッセージベクトルが属するクラスタのセントロイドのベクトルWと、ラベルである。この場合、ラベルの値は常に「1」である。 More specifically, referring to FIG. 6, the learning data is a question, a centroid vector W of a cluster to which a passage vector of a passage including a correct answer to the question belongs, and a label. In this case, the value of the label is always "1".

質問は質問BERT168に与えられる。質問BERT168のBERT220及びPooling層222が質問を処理し、ベクトル310を出力する。ベクトル310はコサイン類似度算出部314の第1の入力に与えられる。一方、コサイン類似度算出部314の第2の入力には、ベクトルWが与えられる。コサイン類似度算出部314は、第1の入力のベクトルと第2の入力のベクトルとの類似度を算出し正規化処理部316に与える。正規化処理部316はコサイン類似度算出部314の出力を[0,1]の範囲に正規化しパラメータ更新部318に与える。パラメータ更新部318は、この値がラベル(1)に近づくようにBERT220のパラメータを誤差逆伝播法により更新する。 The question is given to question BERT168. BERT 220 and Pooling layer 222 of query BERT 168 process the query and output vector 310. Vector 310 is given to the first input of cosine similarity calculating section 314. On the other hand, the vector W is given to the second input of the cosine similarity calculation unit 314. The cosine similarity calculation unit 314 calculates the similarity between the first input vector and the second input vector and provides it to the normalization processing unit 316. The normalization processing unit 316 normalizes the output of the cosine similarity calculation unit 314 to the range [0, 1] and provides it to the parameter updating unit 318. The parameter update unit 318 updates the parameters of the BERT 220 using the error backpropagation method so that this value approaches label (1).

追加学習部174は、こうした追加学習を、所定の終了条件が終了するまで繰り返し実行する。 The additional learning unit 174 repeatedly performs such additional learning until a predetermined termination condition is met.

この追加学習により、図4のような状態が発生する可能性が小さくなり、図5に示すように質問を質問BERT80によりベクトル化した質問ベクトルとのコサイン類似度が最も大きなセントロイドが、正しいクラスタ250のセントロイドのベクトル270となる可能性を高くできる。 This additional learning reduces the possibility that the situation shown in Figure 4 will occur, and as shown in Figure 5, the centroid with the highest cosine similarity to the question vector obtained by vectorizing the question using the Question BERT80 will be assigned to the correct cluster. The probability that the vector 270 of the centroid 250 will be obtained can be increased.

2-2.回答の生成
図1を参照して、追加学習後の質問BERT80を持つ回答候補検索部64、及び回答候補検索部64を含む質問回答装置50は以下のように動作する。なお学習により、回答候補DB90及びセントロイドDB84も既に得られている。
2-2. Generation of Answers Referring to FIG. 1, the answer candidate search unit 64 having the question BERT 80 after additional learning and the question answering device 50 including the answer candidate search unit 64 operate as follows. Note that the answer candidate DB 90 and centroid DB 84 have already been obtained through learning.

対話相手から何らかの質問60が入力されたものとする。質問60は質問BERT80に与えられる。質問60は同時に回答生成部68にも与えられる。 Assume that some question 60 has been input by the conversation partner. Question 60 is given to question BERT80. The question 60 is also given to the answer generation section 68 at the same time.

質問BERT80は質問60が入力されたことに応答して、質問60を表す質問ベクトル82を出力する。回答候補クラスタ特定部86は、質問ベクトル82に最も近いセントロイドのベクトルをセントロイドDB84において検索しそのクラスタ識別子88を出力する。 Question BERT 80 outputs a question vector 82 representing question 60 in response to question 60 being input. The answer candidate cluster specifying unit 86 searches the centroid DB 84 for the centroid vector closest to the question vector 82 and outputs its cluster identifier 88.

回答候補検索部92は回答候補DB90を検索し、このクラスタ識別子88を持つパッセージ(回答候補)を全て取り出し、回答候補URL群94を出力する。パッセージ検索部96は、これら回答候補URL群94を受けて、インターネット62の各URLからパッセージをダウンロードしパッセージDB66に格納する。 The answer candidate search unit 92 searches the answer candidate DB 90, extracts all passages (answer candidates) having this cluster identifier 88, and outputs a group of answer candidate URLs 94. The passage search unit 96 receives the answer candidate URL group 94, downloads a passage from each URL on the Internet 62, and stores it in the passage DB 66.

回答生成部68は、パッセージDB66に格納されたパッセージ群の中から、質問60に対する回答として最も適切なものを選択し、回答70として出力する。回答生成部68による回答の選択は従来の手法と全く同様である。 The answer generation unit 68 selects the most appropriate answer to the question 60 from the passage group stored in the passage DB 66 and outputs it as an answer 70. The selection of answers by the answer generation unit 68 is exactly the same as the conventional method.

3.効果
この第1実施形態によれば、オフラインの状態であらかじめ作成した回答候補DB90、セントロイドDB84を用い、同様にオフラインの状態であらかじめ学習した質問BERT80を使用して、質問60に対する回答候補をパッセージDB66に収集する。回答候補の数は、図1に示す回答候補クラスタ特定部86により選択されたクラスタに属する回答候補に限定される。質問に対する回答時に、大量の回答回答候補に対してニューラルネットワークを適用して回答を選択する必要がない。そのため、必要な記憶容量も計算資源もはるかに小さく済むという効果がある。特に図1に示す例のように、回答候補DB90がパッセージそのものではなくそのパッセージが存在するURLを記憶しているため、パッセージそのものを記憶する場合と比較してさらに記憶容量が小さく済み、処理が軽くできるという効果がある。また、パッセージ検索部96によるインターネットからの各パッセージのダウンロードは並列処理が可能であり、質問60に対して回答70を生成するために要する時間を短くできるという効果もある。
3. Effects According to the first embodiment, by using the answer candidate DB 90 and the centroid DB 84 created in advance in an offline state, and by using the question BERT 80 learned in advance in an offline state, answer candidates for the question 60 are created in a passage. Collect to DB66. The number of answer candidates is limited to answer candidates belonging to the cluster selected by the answer candidate cluster specifying unit 86 shown in FIG. When answering a question, there is no need to select an answer by applying a neural network to a large number of answer candidates. Therefore, the required storage capacity and computational resources are much smaller. In particular, as in the example shown in FIG. 1, the answer candidate DB 90 stores not the passage itself but the URL where the passage exists, so the storage capacity is smaller compared to the case where the passage itself is stored, and the processing is faster. It has the effect of being lightweight. Furthermore, downloading of each passage from the Internet by the passage search unit 96 can be processed in parallel, which has the effect of shortening the time required to generate the answer 70 to the question 60.

なお、上記の構成に加えて、質問60を行う主体の質問履歴(過去の複数の質問)を、参考情報として、回答動作を制御する(例えば、初心者向けの回答や、専門家向けの回答のように、回答のレベルを変更する)ように、構成することも可能である。 In addition to the above configuration, the question history (past questions) of the person asking the question 60 is used as reference information to control the answering operation (for example, answering for beginners and answering for experts). It is also possible to configure the answer level (to change the answer level).

第2 第2実施形態
1.構成
第1実施形態は、質問に対する回答を与える質問回答装置に関している。しかしこの発明はそのような実施形態だけではなく、いわゆる対話装置に適用することもできる。対話装置においてシステムが受ける入力は質問とは限らない。しかし、入力に対する応答を検索するための手法としては、質問回答と同様の手法を利用できる。
Second Second Embodiment 1. Configuration The first embodiment relates to a question answering device that provides answers to questions. However, the present invention can be applied not only to such embodiments but also to so-called dialogue devices. The input that the system receives in the dialog device is not necessarily a question. However, as a method for searching for a response to an input, a method similar to that for answering questions can be used.

対話装置において質問回答装置と異なるのは、相手の発話に対する応答を生成するときに、それまでの対話の履歴と関連する応答をすることが望ましいということである。この第2実施形態は、そのような対話システムに関する。 A dialog device differs from a question-answer device in that when generating a response to the other party's utterance, it is desirable to make a response that is related to the history of previous dialogs. This second embodiment relates to such a dialogue system.

A.対話装置
図7に、この発明の第2実施形態に係る対話装置350の構成を示す。この対話装置350においても、第1実施形態の質問BERT80と同様の構成を持つ質問BERT380を使用する。質問BERT380の学習については図8以下を参照して後述する。
A. Dialogue Device FIG. 7 shows the configuration of a dialogue device 350 according to a second embodiment of the present invention. This dialog device 350 also uses a question BERT 380 having the same configuration as the question BERT 80 of the first embodiment. Learning of the question BERT 380 will be described later with reference to FIG. 8 and subsequent figures.

図7を参照して、対話装置350は、相手の発話362に応答して、発話362に対する応答として適切な応答候補をインターネット62から検索する応答候補検索装置360と、応答候補検索装置360が検索した応答候補を記憶するためのパッセージDB363と、パッセージDB363に記憶された応答候補の中から発話362に対する応答として適切なものを選択し、応答366を生成し出力するための応答生成部364と、応答生成部364の出力を、対話に相応しい形に整形し出力するための応答整形部368とを含む。パッセージDB363は、第1実施形態において使用されたものと同様の構成である。ただし、応答候補検索装置360が選択するパッセージが第1実施形態と異なってくるため、パッセージDB363の記憶内容も第1実施形態とは異なる。対話には対話に相応しい発話スタイルがある。そのためこの実施形態においては応答整形部368により応答生成部364の出力を整形して出力する。 Referring to FIG. 7, the dialogue device 350 includes a response candidate search device 360 that searches the Internet 62 for appropriate response candidates as a response to the utterance 362 in response to the other party's utterance 362; a passage DB 363 for storing response candidates stored in the passage DB 363; a response generation unit 364 for selecting an appropriate response to the utterance 362 from among the response candidates stored in the passage DB 363, and generating and outputting a response 366; It includes a response shaping section 368 that formats the output of the response generation section 364 into a form suitable for dialogue and outputs it. The passage DB 363 has the same configuration as that used in the first embodiment. However, since the passage selected by the response candidate search device 360 is different from the first embodiment, the storage contents of the passage DB 363 are also different from the first embodiment. Dialogue has a speaking style that is appropriate for dialogue. Therefore, in this embodiment, the response shaping section 368 formats and outputs the output of the response generation section 364.

応答候補検索装置360は、対話装置350と相手との対話の履歴を管理するための対話履歴管理部370と、対話履歴管理部370の管理する対話履歴を記憶する対話履歴DB372と、複数の内容語が入力されたことに応答して、その内容語を含む対話のトピックを示す情報を出力するためのトピックモデル374とを含む。トピックモデル374は例えば統計的モデルであり、あらかじめ学習済だとする。トピックモデルの学習には、例えば特開2015-045915号公報に記載の方法が利用できる。また、ニューラルネットワークによりトピックモデルを構築することもできる。トピックモデル374の出力は、例えばトピックを表す1又は複数の単語である。 The response candidate search device 360 includes a dialogue history management unit 370 for managing the history of dialogue between the dialogue device 350 and the other party, a dialogue history DB 372 that stores the dialogue history managed by the dialogue history management unit 370, and a dialogue history DB 372 that stores a plurality of contents. and a topic model 374 for outputting information indicating a conversation topic including the content word in response to input of the content word. It is assumed that the topic model 374 is, for example, a statistical model and has been trained in advance. For example, the method described in Japanese Patent Application Publication No. 2015-045915 can be used to learn the topic model. It is also possible to construct topic models using neural networks. The output of topic model 374 is, for example, one or more words representing the topic.

応答候補検索装置360はさらに、発話362に応答し、対話履歴DB372に記憶された情報とトピックモデル374とを使用して、発話362に相手との対話のトピックを示す情報を付与するためのトピック付与部376を含む。具体的には、トピック付与部376は、対話履歴DB372から相手との対話の履歴を読み出し、内容語を抽出する。トピック付与部376はこれらの内容語をトピックモデル374に与えて、トピックモデル374の出力する、トピックを表す1又は複数の単語を受け取る。トピック付与部376はさらに、発話362の後ろに、トピック付与部376から受け取った1又は複数の単語を付加して出力する。 The response candidate search device 360 further responds to the utterance 362 and uses the information stored in the dialogue history DB 372 and the topic model 374 to search for a topic for giving the utterance 362 information indicating the topic of the dialogue with the other party. It includes an imparting section 376. Specifically, the topic assigning unit 376 reads the history of the conversation with the other party from the conversation history DB 372 and extracts the content words. The topic providing unit 376 provides these content words to the topic model 374 and receives one or more words representing the topic output from the topic model 374. The topic adding unit 376 further adds one or more words received from the topic adding unit 376 to the end of the utterance 362 and outputs the added word.

応答候補検索装置360はさらに、トピック付与部376の出力を受けて、第1実施形態における質問ベクトルと同様の質問ベクトル382を出力するための、第1実施形態における質問BERT80と同様の構成を持つ質問BERT380と、第1実施形態にお
けるセントロイドDB84と同様にして得られたセントロイドDB378と、質問ベクトル382に応答して、質問ベクトル382とのコサイン類似度が最も大きな所定個数のセントロイドベクトルをセントロイドDB378において検索し、それらのクラスタ識別子388を出力するための応答候補クラスタ特定部386とを含む。セントロイドDB378の構成自体は第1実施形態のセントロイドDB84と同じである。ただしこの第2実施形態においてはセントロイドDB378の学習を第1実施形態とはやや異なる方法により行っている。そのため、ここではセントロイドDB378をセントロイドDB84とは別のものとして記載している。
The response candidate search device 360 further has a configuration similar to the question BERT 80 in the first embodiment for outputting a question vector 382 similar to the question vector in the first embodiment upon receiving the output of the topic assigning unit 376. In response to the question BERT 380, the centroid DB 378 obtained in the same manner as the centroid DB 84 in the first embodiment, and the question vector 382, a predetermined number of centroid vectors having the largest cosine similarity with the question vector 382 are generated. It also includes a response candidate cluster identification unit 386 for searching in the centroid DB 378 and outputting cluster identifiers 388 thereof. The configuration of the centroid DB 378 itself is the same as the centroid DB 84 of the first embodiment. However, in this second embodiment, learning of the centroid DB 378 is performed by a method slightly different from that in the first embodiment. Therefore, the centroid DB378 is described here as being different from the centroid DB84.

応答候補検索装置360はさらに、第1実施形態における回答候補DB90と同様の構成を持つ応答候補DB390と、応答候補クラスタ特定部386からのクラスタ識別子388に応答して応答候補DB390を検索し、クラスタ識別子388と一致するクラスタ識別子を持つ応答候補のレコードを全て読み出して応答候補URL群394として出力するための、第1実施形態のものと同じ構成の応答候補検索部392とを含む。 The response candidate search device 360 further searches the response candidate DB 390 in response to the response candidate DB 390 having the same configuration as the response candidate DB 90 in the first embodiment and the cluster identifier 388 from the response candidate cluster specifying unit 386, and searches the response candidate DB 390 to determine the cluster. It includes a response candidate search unit 392 having the same configuration as that of the first embodiment, for reading out all records of response candidates having cluster identifiers that match the identifier 388 and outputting them as a response candidate URL group 394.

応答候補検索装置360はさらに、応答候補URL群394を受けて、インターネット62を検索し、各応答候補のレコードに格納されているURLから応答候補のパッセージをダウンロードしてパッセージDB363に格納するための、これも第1実施形態のパッセージ検索部96と同様のパッセージ検索部396を含む。 The response candidate search device 360 further receives the response candidate URL group 394, searches the Internet 62, downloads response candidate passages from the URLs stored in the records of each response candidate, and stores them in the passage DB 363. , this also includes a passage search section 396 similar to the passage search section 96 of the first embodiment.

B.学習装置
図8を参照して、応答候補検索装置360の質問BERT380の学習を行うための学習装置400は、インターネット62をクロールして、質問をその前後のいくつかの文(以下、このように質問とその前後の文の集まりを質問パッセージという)とともにダウンロードし、さらに各質問に対する応答として適切なパッセージをダウンロードするための質問・パッセージ収集部410と、質問・パッセージ収集部410がダウンロードした質問パッセージを記憶するための質問パッセージDB412と、質問・パッセージ収集部410がダウンロードしたパッセージを、質問と関係付けて記憶するための、図2に示すものと同様の構成を持つパッセージDB164とを含む。
B. Learning Device Referring to FIG. 8, a learning device 400 for learning the question BERT 380 of the response candidate search device 360 crawls the Internet 62 and analyzes the question by searching several sentences before and after it (hereinafter, like this). A question/passage collection unit 410 downloads a question and a collection of sentences before and after the question (called a question passage), and further downloads an appropriate passage as a response to each question, and the question passage downloaded by the question/passage collection unit 410. and a passage DB 164 having a configuration similar to that shown in FIG. 2, for storing passages downloaded by the question/passage collection unit 410 in association with questions.

学習装置400はさらに、トピックモデル374と、質問パッセージDB412に記憶された各質問パッセージ、パッセージDB164に記憶されたパッセージ、及びトピックモデル374から得られるトピックに関する単語とを使用して作成した学習データにより、質問BERT380及び応答候補BERT418の学習をSiamese BERTネットワークにより実行するためのBERT学習部414を含む。第1実施形態における質問BERT168及び回答候補BERT170と同様、質問BERT380及び応答候補BERT418も互いに同じ構成であり、学習時の一方のパラメータの更新は他方のパラメータの更新に反映される。実際には、質問BERT380と応答候補BERT418の構成は、第1実施形態の質問BERT168及び回答候補BERT170と同一であり、学習の結果、その内部のパラメータが異なってくる。 The learning device 400 further uses learning data created using the topic model 374, each question passage stored in the question passage DB 412, the passage stored in the passage DB 164, and the words related to the topic obtained from the topic model 374. , a BERT learning unit 414 for performing learning of the question BERT 380 and response candidate BERT 418 using the Siamese BERT network. Similar to the question BERT 168 and answer candidate BERT 170 in the first embodiment, the question BERT 380 and response candidate BERT 418 have the same configuration, and updating of one parameter during learning is reflected in updating of the other parameter. In reality, the configurations of the question BERT 380 and the response candidate BERT 418 are the same as the question BERT 168 and the answer candidate BERT 170 of the first embodiment, and their internal parameters differ as a result of learning.

学習装置400はさらに、BERT学習部414による訓練が終了した応答候補BERT418を使用して、パッセージDB164に記憶されているパッセージを所定個数のクラスタにクラスタリングし各クラスタにクラスタ識別子を付与するためのパッセージクラスタリング部172と、パッセージクラスタリング部172によりクラスタリングされた各応答候補に、その属するクラスタのクラスタ識別子を付して記憶する応答候補DB390と、パッセージクラスタリング部172によるクラスタリングの結果として得られた各クラスタのセントロイドベクトルと、その代表するクラスタのクラスタ識別子とを含むレコードを各クラスタについて記憶するためのセントロイドDB378とを含む。なおパッセージクラスタリング部172は、質問パッセージDB412に記憶されている各質問について、その質問に関するパッセージが最も多く属するクラスタのクラスタ識別子を質問パッセージDB412の各質問のレコードに付与する。 The learning device 400 further uses the response candidate BERT 418 that has been trained by the BERT learning unit 414 to cluster the passages stored in the passage DB 164 into a predetermined number of clusters, and assigns a cluster identifier to each cluster. Clustering unit 172; a response candidate DB 390 that stores each response candidate clustered by the passage clustering unit 172 with a cluster identifier of the cluster to which it belongs; and a response candidate DB 390 that stores each response candidate clustered by the passage clustering unit 172; It includes a centroid DB 378 for storing, for each cluster, a record including a centroid vector and a cluster identifier of the cluster it represents. Note that for each question stored in the question passage DB 412, the passage clustering unit 172 assigns to each question record in the question passage DB 412 the cluster identifier of the cluster to which the largest number of passages related to the question belong.

学習装置400はさらに、質問パッセージDB412に記憶された質問と、セントロイドDB378に記憶された各クラスタのセントロイドに関する情報とを使用して質問BERT380の追加学習を行うための追加学習部422を含む。質問BERT380に対し追加学習部422による追加学習を行うことにより、図7に示す質問BERT380が得られる。 The learning device 400 further includes an additional learning unit 422 for performing additional learning of the question BERT 380 using the questions stored in the question passage DB 412 and information regarding the centroid of each cluster stored in the centroid DB 378. . By performing additional learning on the question BERT 380 by the additional learning unit 422, the question BERT 380 shown in FIG. 7 is obtained.

図9に、BERT学習部414の機能的構成をブロック図形式により示す。図9を参照して、BERT学習部414は、図8に示す質問パッセージDB412に記憶された各質問とその質問を含む質問パッセージとを受け、トピックモデル374を使用してその質問を含む文脈のトピックを示す1又は複数の単語を質問に付与するためのトピック付与部450と、パッセージDB164に記憶されている各応答候補パッセージに対し、トピックモデル374を使用してその応答候補パッセージのトピックを示す1又は複数の単語を応答候補パッセージに付与するためのトピック付与部452とを含む。トピック付与部450の出力、トピック付与部452の出力、及び応答候補パッセージが質問に対する応答を与えるパッセージであれば1であり、さもなければ0であるラベルとにより、質問BERT380の学習データが生成される。 FIG. 9 shows the functional configuration of the BERT learning section 414 in block diagram form. Referring to FIG. 9, the BERT learning unit 414 receives each question and the question passage including the question stored in the question passage DB 412 shown in FIG. A topic adding unit 450 for adding one or more words indicating a topic to a question and a topic model 374 are used for each response candidate passage stored in the passage DB 164 to indicate the topic of the response candidate passage. and a topic adding unit 452 for adding one or more words to the response candidate passage. Learning data for the question BERT 380 is generated by the output of the topic assignment unit 450, the output of the topic assignment unit 452, and a label that is 1 if the response candidate passage provides an answer to the question, and 0 otherwise. Ru.

質問BERT416は、BERT480と、BERT480の最終層の各要素に対して平均プーリングを行ってベクトル454(U)を出力するためのPooling層482とを含む。同様に、応答候補BERT418は、BERT490と、BERT484の最終層の各要素に対して平均プーリングを行ってベクトル456(V)を出力するためのPooling層492とを含む。 The query BERT 416 includes a BERT 480 and a pooling layer 482 for performing average pooling on each element of the final layer of the BERT 480 and outputting a vector 454(U). Similarly, the response candidate BERT 418 includes a BERT 490 and a pooling layer 492 for performing average pooling on each element of the final layer of the BERT 484 and outputting a vector 456(V).

BERT学習部414はさらに、トピック付与部450の出力を質問BERT416に、トピック付与部452の出力を応答候補BERT418にそれぞれ与え、質問BERT416の出力するベクトル454と応答候補BERT418の出力するベクトル456とのコサイン類似度を算出するためのコサイン類似度算出部204と、コサイン類似度算出部204の出力する値([-1,1]の範囲)を[0,1]の範囲に正規化するための正規化処理部206と、正規化処理部206により得られた正規化後のコサイン類似度がラベル210と等しくなる方向に、BERT480及び490の各パラメータを更新するためのパラメータ更新部208とを含む。 The BERT learning unit 414 further provides the output of the topic assignment unit 450 to the question BERT 416 and the output of the topic assignment unit 452 to the response candidate BERT 418, and calculates the difference between the vector 454 output from the question BERT 416 and the vector 456 output from the response candidate BERT 418. A cosine similarity calculation unit 204 for calculating cosine similarity, and a cosine similarity calculation unit 204 for normalizing the value output from the cosine similarity calculation unit 204 (range of [-1, 1]) to the range of [0, 1]. It includes a normalization processing unit 206 and a parameter updating unit 208 for updating each parameter of the BERT 480 and 490 in a direction in which the cosine similarity after normalization obtained by the normalization processing unit 206 becomes equal to the label 210. .

BERT学習部414は、上記した学習データを用い、こうした更新処理を所定の終了条件が成立するまで繰り返し実行する機能を持つ。 The BERT learning unit 414 has a function of repeatedly executing such update processing using the above-mentioned learning data until a predetermined termination condition is satisfied.

追加学習部422の構成は、第1の実施形態において図6に示した追加学習部174と実質的に同一である。ただしこの例においては、質問に対してその質問パッセージのトピックが付されている点が追加学習部174と異なる。 The configuration of the additional learning section 422 is substantially the same as the additional learning section 174 shown in FIG. 6 in the first embodiment. However, this example differs from the additional learning section 174 in that the topic of the question passage is attached to the question.

2.動作
この第2実施形態においても、最初に図8に示す学習装置400による質問BERT416の学習、及びセントロイドDB378と応答候補DB390の生成が行われる。さらに追加学習部422により質問BERT416に対する追加学習が行われる。この結果、質問BERT380が得られ、図7に示す対話装置350の処理が可能になる。
2. Operation Also in this second embodiment, first, the learning device 400 shown in FIG. 8 learns the question BERT 416 and generates the centroid DB 378 and response candidate DB 390. Further, the additional learning unit 422 performs additional learning on the question BERT 416. As a result, the question BERT 380 is obtained, and the processing of the dialog device 350 shown in FIG. 7 becomes possible.

2-1.質問BERT380の学習
質問BERT380の学習の流れは、概略、第1実施形態における質問BERT80の学習の流れと同様である。
2-1. Learning of Question BERT380 The learning flow of Question BERT380 is roughly the same as the learning flow of Question BERT80 in the first embodiment.

図8を参照して、質問BERT380の学習時には学習装置150は以下のように動作する。まず質問・パッセージ収集部410が、インターネット62をクロールし、質問文及びその質問文の前後を含む質問パッセージを収集し質問パッセージDB412に記憶する。質問・パッセージ収集部410はさらに、質問パッセージDB412に記憶された質問文の各々について、その質問に対する応答を含むと考えられる複数のパッセージをさらにインターネット62から収集する。質問・パッセージ収集部410は、収集したパッセージを質問パッセージDB412に記憶された質問と関連付けてパッセージDB164に格納する。質問・パッセージ収集部410によるこれら処理は従来技術により実現できる。 Referring to FIG. 8, learning device 150 operates as follows when learning question BERT380. First, the question/passage collection unit 410 crawls the Internet 62, collects question sentences and question passages including the parts before and after the question sentences, and stores them in the question passage DB 412. The question/passage collection unit 410 further collects from the Internet 62, for each question text stored in the question passage DB 412, a plurality of passages that are considered to include a response to that question. The question/passage collection unit 410 stores the collected passages in the passage DB 164 in association with the questions stored in the question passage DB 412. These processes by the question/passage collection unit 410 can be realized using conventional techniques.

次にBERT学習部414が、質問パッセージDB412に記憶された質問の各々及びその質問パッセージと、これら質問に対してパッセージDB164に記憶された応答候補であるパッセージとから、トピックモデル374を用いて正例と負例とからなる学習データを生成する。BERT学習部414はこれら学習データを用いて質問BERT416と応答候補BERT418との学習をSiamese BERTネットワークにより同時に行う。 Next, the BERT learning unit 414 uses the topic model 374 to correct Generate learning data consisting of examples and negative examples. The BERT learning unit 414 uses these learning data to simultaneously learn the question BERT 416 and the response candidate BERT 418 using the Siamese BERT network.

パッセージクラスタリング部172は、このように学習が終わった応答候補BERT418を用いて、パッセージDB164に記憶されたパッセージを全てパッセージベクトルに変換する。パッセージクラスタリング部172はさらに、それらパッセージベクトルをk平均法により所定個数のクラスタに分類する。これらクラスタにはそれぞれ識別子が割り当てられる。パッセージクラスタリング部172はさらに、各クラスタのセントロイドのベクトルを算出し、クラスタの識別子をセントロイドの識別子に割り当てる。パッセージクラスタリング部172は、こうして得られた各セントロイドについて、クラスタ識別子とそのセントロイドのベクトルとを組にしてセントロイドDB378に登録する。 The passage clustering unit 172 converts all the passages stored in the passage DB 164 into passage vectors using the response candidate BERT 418 that has been trained in this way. The passage clustering unit 172 further classifies the passage vectors into a predetermined number of clusters using the k-means method. Each of these clusters is assigned an identifier. The passage clustering unit 172 further calculates the centroid vector of each cluster and assigns the cluster identifier to the centroid identifier. For each centroid thus obtained, the passage clustering unit 172 registers the cluster identifier and the vector of the centroid as a pair in the centroid DB 378.

一方、パッセージクラスタリング部172は、各クラスタに属するパッセージベクトルに対応するパッセージのURLと、その属するクラスタの識別子とを組にしたレコードを応答候補DB390に登録する。またパッセージクラスタリング部172は、質問パッセージDB412に記憶されている各質問のレコードに、その質問に対する応答を最も多く含むクラスタのクラスタ識別子を追加する。 On the other hand, the passage clustering unit 172 registers in the response candidate DB 390 a record that is a set of the URL of the passage corresponding to the passage vector belonging to each cluster and the identifier of the cluster to which it belongs. The passage clustering unit 172 also adds, to each question record stored in the question passage DB 412, the cluster identifier of the cluster containing the most responses to the question.

セントロイドDB378へのセントロイドの登録が完了すると、追加学習部422が、質問パッセージDB412に記憶されている各質問に対し、その質問に対応するセントロイドのベクトルをセントロイドDB378から読み出す。追加学習部422は、各質問に対して、セントロイドDB378から読み出したセントロイドベクトルを正解データとして質問BERT380の追加学習を行う。所定の終了条件が成立した時点で質問BERT380の学習が終了する。 When the registration of the centroid in the centroid DB 378 is completed, the additional learning unit 422 reads out the centroid vector corresponding to each question stored in the question passage DB 412 from the centroid DB 378. The additional learning unit 422 performs additional learning of the question BERT 380 using the centroid vector read from the centroid DB 378 as correct answer data for each question. Learning of the question BERT 380 ends when a predetermined end condition is met.

2-2.応答の生成
図7を参照して、追加学習後の質問BERT380を持つ応答候補検索装置360、及び応答候補検索装置360を含む対話装置350は以下のように動作する。なお上記した学習により、応答候補DB390及びセントロイドDB378も既に得られている。また、トピックモデル374としては学習に用いられたものと同じものを用いる。
2-2. Generation of Responses Referring to FIG. 7, response candidate search device 360 having question BERT 380 after additional learning and interaction device 350 including response candidate search device 360 operate as follows. Note that the response candidate DB 390 and centroid DB 378 have already been obtained through the above-described learning. Further, as the topic model 374, the same one used for learning is used.

対話相手から何らかの発話362が入力されたものとする。発話362はトピック付与部376、対話履歴管理部370及び応答生成部364に与えられる。対話履歴管理部370はこのようにして受けた過去の一定期間の対話の履歴を、各対話相手について対話履歴DB372に保存する。一方、トピック付与部376は、対話履歴DB372において対話相手の過去の発話履歴を検索し、それら発話から内容語を抽出する。トピック付与部376はさらに、これら内容語をトピックモデル374に入力し、それぞれトピックを表す1又は複数の単語をトピックモデル374の出力として受け取る。トピック付与部376は、これら1又は複数の単語を発話362の後ろに付加して質問BERT380に入力する。 Assume that some kind of utterance 362 has been input from the conversation partner. The utterance 362 is provided to a topic adding section 376, a dialogue history management section 370, and a response generation section 364. The dialogue history management unit 370 stores the history of past dialogues received over a certain period of time in the dialogue history DB 372 for each dialogue partner. On the other hand, the topic assigning unit 376 searches the dialogue partner's past utterance history in the dialogue history DB 372 and extracts content words from those utterances. The topic assigning unit 376 further inputs these content words into the topic model 374 and receives one or more words representing each topic as an output of the topic model 374. The topic adding unit 376 adds these one or more words to the end of the utterance 362 and inputs the result to the question BERT 380.

質問BERT380は、トピックが付加された発話362に応答して質問ベクトルを出力する。この質問ベクトルは応答候補クラスタ特定部386に与えられる。 Question BERT 380 outputs a question vector in response to topic-added utterance 362. This question vector is given to the response candidate cluster identifying section 386.

応答候補クラスタ特定部386は、質問ベクトル382に応答して、セントロイドDB378に記憶されているセントロイドの中で、そのベクトルと質問ベクトル382との間のコサイン類似度が最も大きいものを、所定個数だけ選択し、それらのクラスタ識別子をクラスタ識別子88として応答候補検索部392に与える。 In response to the question vector 382, the response candidate cluster specifying unit 386 selects a centroid having the largest cosine similarity between the vector and the question vector 382 among the centroids stored in the centroid DB 378. The selected number of cluster identifiers are given to the response candidate search unit 392 as cluster identifiers 88.

応答候補検索部392は応答候補DB390を検索し、このクラスタ識別子388のいずれかと等しいクラスタ識別子を持つパッセージ(応答候補)のレコードを全て取り出し、それらのURLをまとめて応答候補URL群394として出力する。パッセージ検索部396は、この応答候補URL群394を受けて、応答候補URL群394に含まれる各URLを使用してインターネット62にアクセスすることにより、応答候補のパッセージをダウンロードしパッセージDB363に格納する。 The response candidate search unit 392 searches the response candidate DB 390, extracts all records of passages (response candidates) having a cluster identifier equal to one of the cluster identifiers 388, and outputs the URLs together as a response candidate URL group 394. . The passage search unit 396 receives the response candidate URL group 394, accesses the Internet 62 using each URL included in the response candidate URL group 394, downloads the response candidate passage, and stores it in the passage DB 363. .

応答生成部364は、パッセージD3B66に格納されたパッセージ群の中から、発話362に対する応答として最も適切なものを選択し、応答整形部368に与える。応答整形部368は、入力を対話に相応しい形式に整形して応答366として出力する。応答生成部364による応答の選択及び生成方法は従来の手法をそのまま利用できる。 The response generation unit 364 selects the most appropriate response to the utterance 362 from among the passage group stored in the passage D3B 66, and provides it to the response shaping unit 368. The response formatter 368 formats the input into a format suitable for dialogue and outputs it as a response 366. The response selection and generation method by the response generation unit 364 can be the same as the conventional method.

3.効果
この第2実施形態によれば、入力された発話に対する応答を生成するために処理するパッセージは、図7に示す応答候補クラスタ特定部386により選択された1又は複数の線路ロイドに対応するクラスタに属するベクトルに対応するものに限定される。そのため、最適な応答は、従来のように質問回答システムから得られた複数の回答をもとに生成された複数の応答候補から選択する必要がないので、応答生成部364が応答を生成する際に行う処理は、従来と比較して大幅に削減される。また、処理に必要な計算資源も大幅に削減される。また、実施形態1と異なり、応答候補パッセージを検索する際に、発話のトピックを情報として用いる。そのため、得られる応答は対話のトピックに相応しいものとなる。その結果、従来よりも少ない資源を用いて高速に、かつ十分な精度をもって動作可能な対話装置を提供できる。
3. Effects According to the second embodiment, the passage to be processed to generate a response to an input utterance is a cluster corresponding to one or more railroad tracks selected by the response candidate cluster identification unit 386 shown in FIG. is limited to those corresponding to vectors belonging to . Therefore, the optimal response does not need to be selected from a plurality of response candidates generated based on a plurality of answers obtained from a question answering system as in the past, so when the response generation unit 364 generates a response, The amount of processing required is significantly reduced compared to conventional methods. Additionally, the computational resources required for processing are also significantly reduced. Also, unlike the first embodiment, the topic of the utterance is used as information when searching for response candidate passages. Therefore, the responses obtained will be appropriate to the topic of the conversation. As a result, it is possible to provide an interactive device that can operate at high speed and with sufficient accuracy using fewer resources than before.

第3 コンピュータによる実現
図10は、例えば図1に示す質問回答装置50として動作するコンピュータシステムの外観図である。図11は、図10に示すコンピュータシステムのハードウェアブロック図である。図2に示す学習装置150、図7に示す対話装置350及び図8に示す学習装置400についてもそれぞれ質問回答装置50とほぼ同様の構成のコンピュータシステムにより実現できる。ここでは質問回答装置50として動作するコンピュータシステムの構成についてのみ述べることとし、他の装置を実現するコンピュータシステムの構成の詳細については述べない。
Third Realization by Computer FIG. 10 is an external view of a computer system that operates as, for example, the question answering device 50 shown in FIG. 1. FIG. 11 is a hardware block diagram of the computer system shown in FIG. 10. The learning device 150 shown in FIG. 2, the dialogue device 350 shown in FIG. 7, and the learning device 400 shown in FIG. 8 can each be realized by a computer system having substantially the same configuration as the question answering device 50. Here, only the configuration of the computer system that operates as the question answering device 50 will be described, and details of the configuration of the computer system that implements other devices will not be described.

図10を参照して、このコンピュータシステム950は、DVD(Digital Versatile Disc)ドライブ1002を有するコンピュータ970と、いずれもコンピュータ970に接続された、ユーザと対話するためのキーボード974、マウス976、及びモニタ972とを含む。もちろんこれらはユーザ対話が必要となったときのための構成の一例であって、ユーザ対話に利用できる一般のハードウェア及びソフトウェア(例えばタッチパネル、音声入力、ポインティングデバイス一般)であればどのようなものも利用できる。 Referring to FIG. 10, this computer system 950 includes a computer 970 having a DVD (Digital Versatile Disc) drive 1002, a keyboard 974, a mouse 976, and a monitor for interacting with the user, all connected to the computer 970. 972. Of course, these are examples of configurations for when user interaction is required, and any general hardware and software (e.g. touch panel, voice input, general pointing device) that can be used for user interaction can be used. Also available.

図11を参照して、コンピュータ970は、DVDドライブ1002に加えて、CPU(Central Processing Unit)990と、GPU(Graphics Processing Unit)992と、CPU990、GPU992、DVDドライブ1002に接続されたバス1010とを含む。コンピュータ970はさらに、バス1010に接続され、コンピュータ970のブートアッププログラムなどを記憶するROM(Read-Only Memory)996と、バス1010に接続され、プログラムを構成する命令、システムプログラム、及び作業データなどを記憶するRAM(Random Access Memory)998と、バス1010に接続された不揮発性メモリであるSSD(Solid State Drive)1000とを含む。SSD1000は、CPU990及びGPU992が実行するプログラム、並びにCPU990及びGPU992が実行するプログラムが使用するデータなどを記憶するためのものである。コンピュータ970はさらに、他端末との通信を可能とするネットワーク986(図7に示す応答生成部364)への接続を提供するネットワークI/F(Interface)1008と、USB(Universal Serial Bus)メモリ984が着脱可能であり、USBメモリ984とコンピュータ970内の各部との通信を提供するUSBポート1006とを含む。 Referring to FIG. 11, in addition to a DVD drive 1002, a computer 970 includes a CPU (Central Processing Unit) 990, a GPU (Graphics Processing Unit) 992, and a bus 101 connected to the CPU 990, GPU 992, and DVD drive 1002. 0 and including. The computer 970 further includes a ROM (Read-Only Memory) 996 that is connected to the bus 1010 and stores boot-up programs for the computer 970, etc. A RAM (Random Access Memory) 998 for storing , and an SSD (Solid State Drive) 1000 which is a nonvolatile memory connected to a bus 1010 are included. The SSD 1000 is for storing programs executed by the CPU 990 and GPU 992, data used by the programs executed by the CPU 990 and GPU 992, and the like. The computer 970 further includes a network I/F (Interface) 1008 that provides connection to a network 986 (response generation unit 364 shown in FIG. 7) that enables communication with other terminals, and a USB (Universal Serial Bus) memory 984. is removable and includes a USB memory 984 and a USB port 1006 that provides communication with various parts within the computer 970.

コンピュータ970はさらに、マイクロフォン982及びスピーカ980とバス1010とに接続され、CPU990により生成されRAM998又はSSD1000に保存された音声信号、映像信号及びテキストデータをCPU990の指示に従って読み出し、アナログ変換及び増幅処理をしてスピーカ980を駆動したり、マイクロフォン982からのアナログの音声信号をデジタル化し、RAM998又はSSD1000の、CPU990により指定される任意のアドレスに保存したりする機能を持つ音声I/F1004を含む。 The computer 970 is further connected to a microphone 982, a speaker 980, and a bus 1010, reads audio signals, video signals, and text data generated by the CPU 990 and stored in the RAM 998 or the SSD 1000 according to instructions from the CPU 990, and performs analog conversion and amplification processing. It includes an audio I/F 1004 having a function of driving a speaker 980, digitizing an analog audio signal from a microphone 982, and storing it in an arbitrary address specified by the CPU 990 in the RAM 998 or the SSD 1000.

上記実施形態においては、図1に示す質問回答装置50、図2に示す学習装置150、図7に示す対話装置350及び図8に示す学習装置400などの各機能を実現するプログラムなどは、いずれも例えば図11に示すSSD1000、RAM998、DVD978又はUSBメモリ984、若しくはネットワークI/F1008及びネットワーク986を介して接続された図示しない外部装置の記憶媒体などに格納される。典型的には、これらのデータ及びパラメータなどは、例えば外部からSSD1000に書込まれコンピュータ970の実行時にはRAM998にロードされる。 In the above embodiment, the programs for realizing each function of the question answering device 50 shown in FIG. 1, the learning device 150 shown in FIG. 2, the dialog device 350 shown in FIG. 7, and the learning device 400 shown in FIG. It is also stored in, for example, the SSD 1000, RAM 998, DVD 978, or USB memory 984 shown in FIG. 11, or a storage medium of an external device (not shown) connected via the network I/F 1008 and network 986. Typically, these data and parameters are written into the SSD 1000 from the outside, for example, and loaded into the RAM 998 when the computer 970 is executed.

このコンピュータシステムを、図1に示す質問回答装置50、図2に示す学習装置150、図7に示す対話装置350及び図8に示す学習装置400、並びにその各構成要素の機能を実現するよう動作させるためのコンピュータプログラムは、DVDドライブ1002に装着されるDVD978に記憶され、DVDドライブ1002からSSD1000に転送される。又は、これらのプログラムはUSBメモリ984に記憶され、USBメモリ984をUSBポート1006に装着し、プログラムをSSD1000に転送する。又は、このプログラムはネットワーク986を通じてコンピュータ970に送信されSSD1000に記憶されてもよい。 This computer system is operated to realize the functions of the question answering device 50 shown in FIG. 1, the learning device 150 shown in FIG. 2, the dialogue device 350 shown in FIG. 7, and the learning device 400 shown in FIG. 8, and their respective components. A computer program for doing this is stored on the DVD 978 installed in the DVD drive 1002 and transferred from the DVD drive 1002 to the SSD 1000. Alternatively, these programs are stored in the USB memory 984, the USB memory 984 is attached to the USB port 1006, and the programs are transferred to the SSD 1000. Alternatively, this program may be transmitted to computer 970 via network 986 and stored on SSD 1000.

プログラムは実行のときにRAM998にロードされる。もちろん、キーボード974、モニタ972及びマウス976を用いてソースプログラムを入力し、コンパイルした後のオブジェクトプログラムをSSD1000に格納してもよい。プログラムがスクリプト言語で記述されている場合には、キーボード974などを用いて入力したスクリプトをSSD1000に格納してもよい。仮想マシン上において動作するプログラムの場合には、仮想マシンとして機能するプログラムを予めコンピュータ970にインストールしておく必要がある。音声認識及び音声合成などにはニューラルネットワークが使用される。質問回答装置50及び対話装置350においては、学習済のニューラルネットワークを使用してもよいし、質問回答装置50及び対話装置350をそれぞれ学習装置150及び400として使用してニューラルネットワークの学習を行ってもよい。 The program is loaded into RAM 998 during execution. Of course, a source program may be input using the keyboard 974, monitor 972, and mouse 976, and the compiled object program may be stored in the SSD 1000. If the program is written in a script language, the script input using the keyboard 974 or the like may be stored in the SSD 1000. In the case of a program that operates on a virtual machine, it is necessary to install the program that functions as a virtual machine on the computer 970 in advance. Neural networks are used for speech recognition, speech synthesis, etc. In the question answering device 50 and the dialogue device 350, a trained neural network may be used, or the question answering device 50 and the dialogue device 350 may be used as the learning devices 150 and 400, respectively, to perform neural network learning. Good too.

CPU990は、その内部のプログラムカウンタと呼ばれるレジスタ(図示せず)により示されるアドレスに従ってRAM998からプログラムを読み出して命令を解釈し、命令の実行に必要なデータを命令により指定されるアドレスに従ってRAM998、SSD1000又はそれ以外の機器から読み出して命令により指定される処理を実行する。CPU990は、実行結果のデータを、RAM998、SSD1000、CPU990内のレジスタなど、プログラムにより指定されるアドレスに格納する。アドレスによってはコンピュータから外部出力される。このとき、プログラムカウンタの値もプログラムによって更新される。コンピュータプログラムは、DVD978から、USBメモリ984から、又はネットワーク986を介して、RAM998に直接にロードしてもよい。なお、CPU990が実行するプログラムの中で、一部のタスク(主として数値計算)については、プログラムに含まれる命令により、又はCPU990による命令実行時の解析結果に従って、GPU992にディスパッチされる。 The CPU 990 reads the program from the RAM 998 according to the address indicated by an internal register called a program counter (not shown), interprets the instruction, and stores the data necessary for executing the instruction in the RAM 998 and the SSD 1000 according to the address specified by the instruction. Or read it from other devices and execute the process specified by the command. The CPU 990 stores the data of the execution result at an address specified by the program, such as the RAM 998, the SSD 1000, or a register within the CPU 990. Some addresses are output externally from the computer. At this time, the value of the program counter is also updated by the program. Computer programs may be loaded directly into RAM 998 from DVD 978, from USB memory 984, or via network 986. Note that in the program executed by the CPU 990, some tasks (mainly numerical calculations) are dispatched to the GPU 992 according to instructions included in the program or according to an analysis result when the CPU 990 executes the instructions.

コンピュータ970により上記した実施形態に係る各部の機能を実現するプログラムは、それら機能を実現するようコンピュータ970を動作させるように記述され配列された複数の命令を含む。この命令を実行するのに必要な基本的機能のいくつかはコンピュータ970上において動作するオペレーティングシステム(OS)若しくはサードパーティのプログラム、コンピュータ970にインストールされる各種ツールキットのモジュール又はプログラムの実行環境により提供される場合もある。したがって、このプログラムはこの実施形態のシステム及び方法を実現するのに必要な機能全てを必ずしも含まなくてよい。このプログラムは、命令の中で、所望の結果が得られるように制御されたやり方によって適切な機能又はモジュールなどをコンパイル時に静的にリンクすることにより、又は実行時に動的に呼出すことにより、上記した各装置及びその構成要素としての動作を実行する命令のみを含んでいればよい。そのためのコンピュータ970の動作方法は周知である。したがって、ここではコンピュータ970の動作方法の説明は繰り返さない。 A program for realizing the functions of each unit according to the above-described embodiments by the computer 970 includes a plurality of instructions written and arranged to cause the computer 970 to operate to realize those functions. Some of the basic functions required to execute this instruction are provided by the operating system (OS) running on the computer 970, third party programs, modules of various toolkits installed on the computer 970, or the program execution environment. In some cases, it may be provided. Therefore, this program does not necessarily include all the functions necessary to implement the system and method of this embodiment. This program is constructed by statically linking appropriate functions or modules in a controlled manner at compile time or by calling them dynamically at run time in a controlled manner to achieve the desired results. It is sufficient to include only the instructions for executing the operations of each device and its constituent elements. The manner in which computer 970 operates for this purpose is well known. Therefore, the description of how computer 970 operates will not be repeated here.

なお、GPU992は並列処理を行うことが可能であり、機械学習に伴う多量の計算を同時並列的又はパイプライン的に実行できる。例えばプログラムのコンパイル時にプログラム中に発見された並列的計算要素、又はプログラムの実行時に発見された並列的計算要素は、随時、CPU990からGPU992にディスパッチされ、実行され、その結果が直接に、又はRAM998の所定アドレスを介してCPU990に返され、プログラム中の所定の変数に代入される。 Note that the GPU 992 can perform parallel processing, and can execute a large amount of calculations associated with machine learning simultaneously in parallel or in a pipeline manner. For example, parallel computing elements found in a program when the program is compiled, or parallel computing elements discovered when the program is executed are dispatched from the CPU 990 to the GPU 992 and executed, and the results are sent directly or to the RAM 998. is returned to the CPU 990 via a predetermined address, and is substituted into a predetermined variable in the program.

第4 変形例
上記実施形態においては、BERTの更新の終了条件として、所定の終了条件とだけ述べている。この場合の終了条件とは、例えば全ての学習データについて所定回数だけ使用してBERTのパラメータ更新が終了したという条件である。別の条件としては、例えばパラメータの更新において、各パラメータの勾配がほぼゼロに等しくなったときという条件もあり得る。その他、終了条件としては様々なものが考えられる。
Fourth Modified Example In the above embodiment, only a predetermined termination condition is mentioned as the termination condition for updating BERT. The termination condition in this case is, for example, that the BERT parameter update has been completed after all learning data have been used a predetermined number of times. Another condition may be, for example, when the gradient of each parameter becomes approximately equal to zero during parameter updating. In addition, various other termination conditions can be considered.

上記実施形態においては、BERTとしてBERTラージを使用することを前提としている。しかしこの発明はBERTラージに限定されるわけではない。BERTベースを使用してもよい。またBERTと同様、トランスフォーマのエンコーダ又はそれに類似した要素を並べることにより、センテンスベースの変換が行えるようなモデルを使用してもよい。 In the above embodiment, it is assumed that BERT large is used as BERT. However, the invention is not limited to BERT large. A BERT base may also be used. Also, similar to BERT, a model that can perform sentence-based conversion by arranging transformer encoders or similar elements may be used.

さらに、上記実施形態においては、図1に示す質問BERT80などにおいて、BERTの出力をベクトル化するために、平均プーリングを行っている。しかし、この発明はそのような実施形態には限定されない。平均プーリングに代えて、最大値プーリングを用いてもよい。 Furthermore, in the above embodiment, average pooling is performed in order to vectorize the output of BERT in the query BERT 80 shown in FIG. 1 and the like. However, the invention is not limited to such embodiments. Maximum pooling may be used instead of average pooling.

上記実施形態においては、BERTの学習のための損失関数として平均二乗誤差を用いている。しかしこの発明はそのような実施形態には限定されない。尺度としてコサイン類似度ではなくソフトマックスを採用し、損失関数としてはクロスエントロピー誤差を用いてもよい。 In the above embodiment, the mean square error is used as the loss function for BERT learning. However, the invention is not limited to such embodiments. Instead of cosine similarity, softmax may be used as the measure, and cross-entropy error may be used as the loss function.

また、上記実施形態においては学習時のパッセージベクトルのクラスタリングにk平均法を用いている。しかしこの発明はそのような実施形態に限定されない。Related Minimum Variance基準によるクラスタリング、散布図基準によるクラスタリングなどを使用してもよい。 Further, in the above embodiment, the k-means method is used for clustering passage vectors during learning. However, the invention is not limited to such embodiments. Clustering based on Related Minimum Variance criteria, clustering based on scatter plot criteria, etc. may also be used.

また、上記実施形態においては、応答候補クラスタ特定部386には、トピックが付加された発話の質問ベクトルが与えられ、セントロイドDB378のセントロイドから適切なセントロイドのクラスタ識別子を得ている。しかしそれに限らず、応答候補クラスタ特定部386に、発話に基づく質問ベクトルとベクトル表現されたこれまでの対話履歴を与えて、類似度(あるいは距離)からセントロイドを決定しそのクラスタ識別子を得るようにしてもよい。 Further, in the above embodiment, the response candidate cluster identifying unit 386 is given the question vector of the utterance to which the topic has been added, and obtains an appropriate centroid cluster identifier from the centroids in the centroid DB 378. However, the present invention is not limited to this, and the response candidate cluster identification unit 386 may be provided with a question vector based on utterances and a past dialogue history expressed as a vector, determine a centroid from similarity (or distance), and obtain its cluster identifier. You can also do this.

さらに、上記実施形態では、図1に示す回答候補DB90及び図7に示す応答候補DB390には応答候補のURLが格納されている。しかしこの発明はそのような実施形態には限定されない。回答候補DB90及び応答候補DB390に、応答候補のURLではなく、パッセージそのものを格納しておいてもよい。その場合には、回答候補検索部92及び応答候補検索部392が出力するのは応答候補のURL群ではなく応答候補のパッセージそのものとなる。したがって、図1に示すパッセージ検索部96及び図7に示すパッセージ検索部396が必要なくなる。質問に対する回答時又は応答時にインターネット62からパッセージをダウンロードする必要がなくなるので、処理量はより少なくなり、応答は上記第1実施形態及び第2実施形態よりも速くなる可能性が高い。 Furthermore, in the embodiment described above, the URL of the response candidate is stored in the response candidate DB 90 shown in FIG. 1 and the response candidate DB 390 shown in FIG. However, the invention is not limited to such embodiments. The response candidate DB 90 and the response candidate DB 390 may store the passage itself instead of the URL of the response candidate. In that case, what the answer candidate search unit 92 and the response candidate search unit 392 output is not the URL group of the response candidates but the response candidate passage itself. Therefore, the passage search section 96 shown in FIG. 1 and the passage search section 396 shown in FIG. 7 are no longer necessary. Since there is no need to download passages from the Internet 62 when answering or responding to a question, the amount of processing is less and the response is likely to be faster than in the first and second embodiments.

さらに、図2及び図8に示すパッセージDB164は、上記実施形態ではBERTの学習が終了すると不要であり廃棄できる。しかし、パッセージDB164に大量のパッセージを記憶しておいてもよいだけの余裕が記憶容量にあるならば、パッセージDB164を残しておいてもよい。この場合、回答候補DB90及び応答候補DB390に、応答候補のパッセージではなく、パッセージDB164から該当パッセージを検索するのに必要な情報を格納しておけばよい。検索するのに必要な情報とは、例えばそのパッセージを含むレコードの識別子、又はそのパッセージが存在していたURLなどである。特にURLを格納しておくようにすると、パッセージDB164にそのパッセージがあればパッセージDB164からそのパッセージを取り出すことができ、もしもパッセージDB164にそのパッセージがなければ、そのURLにアクセスしてそのパッセージをダウンロードできる。この場合には回答候補検索部92及び応答候補検索部392が出力するのは応答候補のURL群ではあるが、通常はインターネットにアクセスすることなく、ローカルに存在するパッセージDB164からそのパッセージを読み出せる。したがって、応答は上記第1実施形態及び第2実施形態よりも速くなる可能性が高い。また、一部のパッセージをパッセージDB164から削除したとしても、URLが分かっているので、インターネットからそのパッセージをダウンロードできる。 Further, in the above embodiment, the passage DB 164 shown in FIGS. 2 and 8 is unnecessary and can be discarded after BERT learning is completed. However, if the passage DB 164 has enough storage capacity to store a large number of passages, the passage DB 164 may be left alone. In this case, the answer candidate DB 90 and the response candidate DB 390 may store information necessary to search for the relevant passage from the passage DB 164 instead of the response candidate passage. The information necessary for the search is, for example, the identifier of the record containing the passage, or the URL where the passage existed. In particular, if you store the URL, if the passage exists in the passage DB 164, you can retrieve the passage from the passage DB 164, and if the passage does not exist in the passage DB 164, access the URL and download the passage. can. In this case, the answer candidate search unit 92 and the response candidate search unit 392 output a group of response candidate URLs, but normally the passage can be read from the locally existing passage DB 164 without accessing the Internet. . Therefore, the response is likely to be faster than in the first and second embodiments. Further, even if some passages are deleted from the passage DB 164, since the URL is known, the passages can be downloaded from the Internet.

上記した第2実施形態では、対話装置350への入力に対する応答候補を含むと思われるパッセージをインターネット62から検索し、それらパッセージを用いて応答生成部364において応答を生成している。しかし、この発明はそのような実施形態には限定されない。例えば発話362に対する応答として適切な応答候補があらかじめ準備できるなら、パッセージに代えて、そのような応答候補を応答候補DB390に記憶させておくことができる。発話362として様々なものを準備し、それらに対して適切な応答候補が定まれば、それを応答候補DB390に蓄積しておく。それら応答候補が大量に得られれば、それらを用いて第2実施形態で説明した手法により対話装置350が構築できる。この場合には、応答候補を含むと思われるパッセージから応答を生成するのではなく、あらかじめ発話に対する適切な応答であるものが集められ、それらから応答が生成される。したがって、応答は第2実施形態で説明した場合よりさらに適切なものとなる。 In the second embodiment described above, the Internet 62 is searched for passages that are thought to include response candidates to the input to the dialogue device 350, and the response generation unit 364 generates a response using these passages. However, the invention is not limited to such embodiments. For example, if an appropriate response candidate can be prepared in advance as a response to the utterance 362, such a response candidate can be stored in the response candidate DB 390 instead of a passage. Various utterances 362 are prepared, and once appropriate response candidates are determined, they are stored in the response candidate DB 390. If a large number of these response candidates are obtained, the dialog device 350 can be constructed using them using the method described in the second embodiment. In this case, rather than generating a response from a passage that is thought to include response candidates, appropriate responses to the utterance are collected in advance and a response is generated from them. Therefore, the response becomes more appropriate than that described in the second embodiment.

そのように発話に対する応答として適切なものをあらかじめ集積する手法として以下のようなものが考えられる。まず、発話を構成する可能性のある名詞を大量に(例えば100万語)選ぶ。これらの名詞の各々から既存の手法を用いて複数の質問を生成する。それら質問を第1実施形態の質問回答装置50に入力する。質問回答装置50の回答に基づいて、元の名詞を含む質問に相応しい応答を作成し、その質問と応答を図8の質問パッセージDB412及びパッセージDB164に蓄積する。後は第2実施形態と同様の手法で図7及び図8に示す質問BERT380の訓練を行えばよい。発話に対する応答候補を含むと考えられるパッセージではなく、発話に対する応答として相応しい応答候補を使用して対話装置350が構築できる。このような変形例では、発話に対して最も適切と考えられる応答候補を事前に生成・選択することから、対話装置における計算処理の重い作業を事前に完了することができる。したがって、推論処理時の高速化及び計算資源の軽量化が図れる。 The following methods can be considered as methods for collecting appropriate responses to utterances in advance. First, a large number of nouns (for example, 1 million words) that may constitute an utterance are selected. Multiple questions are generated from each of these nouns using existing techniques. These questions are input into the question answering device 50 of the first embodiment. Based on the answers from the question answering device 50, a response suitable for the question including the original noun is created, and the question and response are stored in the question passage DB 412 and the passage DB 164 in FIG. After that, the question BERT 380 shown in FIGS. 7 and 8 may be trained using the same method as in the second embodiment. Dialogue device 350 can be constructed using response candidates suitable as responses to utterances, rather than passages that are considered to include response candidates to utterances. In such a modified example, response candidates considered to be most appropriate for the utterance are generated and selected in advance, so that heavy computational work in the dialogue device can be completed in advance. Therefore, it is possible to speed up the inference processing and reduce the weight of computational resources.

なお、図7以下に示す第2実施形態では、訓練及び推論の双方においてトピックモデル374を用いている。しかし対話におけるトピック付与では、トピックモデル374を用いることが必須というわけではない。例えば対話履歴から何らかの条件を充足する単語など、又は対話履歴そのものを抽出し、トピック付与部376により発話362に付与してもよい。対話履歴を使用してトピックを特定するのではなく、あらかじめ行われる設定によりトピックを決定してもよい。例えば発話者が明示的にトピックを指定してもよい。また、トピック付与部376自体を省略してもよい。 Note that in the second embodiment shown in FIG. 7 and below, the topic model 374 is used in both training and inference. However, it is not essential to use the topic model 374 when assigning topics in dialogue. For example, a word that satisfies some condition or the dialogue history itself may be extracted from the dialogue history and added to the utterance 362 by the topic adding unit 376. Rather than specifying a topic using the conversation history, the topic may be determined based on settings made in advance. For example, the speaker may explicitly specify the topic. Further, the topic adding section 376 itself may be omitted.

今回開示された実施の形態は単に例示であって、本発明が上記した実施の形態のみに制限されるわけではない。本発明の範囲は、発明の詳細な説明の記載を参酌した上で、特許請求の範囲の各請求項によって示され、そこに記載された文言と均等の意味及び範囲内での全ての変更を含む。 The embodiment disclosed this time is merely an example, and the present invention is not limited to the above-described embodiment. The scope of the present invention is indicated by each claim, with reference to the description of the detailed description of the invention, and all changes within the scope and meaning equivalent to the words described therein are defined. include.

50 質問回答装置
64、92 回答候補検索部
66、164、363 パッセージDB
68 回答生成部
80、168、380、416 質問BERT
82、382 質問ベクトル
84、378 セントロイドDB
86 回答候補クラスタ特定部
88、388 クラスタ識別子
90 回答候補DB
94 回答候補URL群
96、396 パッセージ検索部
150、400 学習装置
160、410 質問・パッセージ収集部
162 質問DB
166、414 BERT学習部
170 回答候補BERT
172 パッセージクラスタリング部
174、422 追加学習部
204、314 コサイン類似度算出部
206、316 正規化処理部
208、318 パラメータ更新部
210 ラベル
220、230、480、484、490 BERT
222、232、482、492 Pooling層
250、252 クラスタ
350 対話装置
360 応答候補検索装置
362 発話
364 応答生成部
368 応答整形部
370 対話履歴管理部
372 対話履歴DB
374 トピックモデル
376、450、452 トピック付与部
386 応答候補クラスタ特定部
390 応答候補DB
392 応答候補検索部
394 応答候補URL群
412 質問パッセージDB
418 応答候補BERT
50 Question answering device 64, 92 Answer candidate search unit 66, 164, 363 Passage DB
68 Answer generation unit 80, 168, 380, 416 Question BERT
82, 382 Question vector 84, 378 Centroid DB
86 Answer candidate cluster identification unit 88, 388 Cluster identifier 90 Answer candidate DB
94 Answer candidate URL group 96, 396 Passage search unit 150, 400 Learning device 160, 410 Question/passage collection unit 162 Question DB
166, 414 BERT learning section 170 Answer candidate BERT
172 Passage clustering unit 174, 422 Additional learning unit 204, 314 Cosine similarity calculation unit 206, 316 Normalization processing unit 208, 318 Parameter update unit 210 Label 220, 230, 480, 484, 490 BERT
222, 232, 482, 492 Pooling layer 250, 252 Cluster 350 Dialogue device 360 Response candidate search device 362 Utterance 364 Response generation section 368 Response shaping section 370 Dialogue history management section 372 Dialogue history DB
374 Topic models 376, 450, 452 Topic assignment unit 386 Response candidate cluster identification unit 390 Response candidate DB
392 Response candidate search unit 394 Response candidate URL group 412 Question passage DB
418 Response candidate BERT

Claims (6)

第1の入力が供給され、この第1の入力のベクトル表現を出力する第1のニューラルネットワークと、
第2の入力が供給され、この第2の入力のベクトル表現を出力する第2のニューラルネットワークとを含み、
少なくとも、所定の関係にある前記第1及び第2の入力の学習データを用いて、前記第1の入力のベクトル表現と前記第2の入力のベクトル表現が、前記所定の関係にある場合に、ベクトル空間において近接して位置するように前記第1及び第2のニューラルネットワークを学習させ、
学習済みの前記第2のニューラルネットワークの出力であるベクトル表現を、前記ベクトル空間上の位置に基づきクラスタ化し、前記第1の入力のベクトル表現に基づき、前記クラスタの検索抽出が可能なようにあらかじめ構築されたデータベースをさらに含み、
装置への入力に対して前記第1のニューラルネットワークによる前記入力のベクトル表現に基づいて前記データベースから検索抽出された前記クラスタの情報に基づき、前記所定の関係にある出力を推論する、推論装置。
a first neural network provided with a first input and outputting a vector representation of the first input;
a second neural network provided with a second input and outputting a vector representation of the second input;
At least, when the vector representation of the first input and the vector representation of the second input have the predetermined relationship using learning data of the first and second inputs that have a predetermined relationship, learning the first and second neural networks to be located close to each other in vector space;
The vector representation that is the output of the second neural network that has been trained is clustered based on the position on the vector space, and based on the vector representation of the first input, it is possible to search and extract the cluster in advance. further including the constructed database,
An inference device that infers an output having the predetermined relationship based on information on the clusters searched and extracted from the database based on a vector representation of the input by the first neural network with respect to an input to the device.
請求項1記載の推論装置において、前記データベースは、それぞれのクラスタに含まれる出力のベクトル表現のセントロイドを用いて検索抽出されることを特徴とする推論装置。 2. The inference device according to claim 1, wherein the database is searched and extracted using a centroid of a vector representation of an output included in each cluster. 前記第1のニューラルネットワークは、前記第1の入力とこの第1の入力と前記所定の関係にある前記第2の入力の属するクラスタに関連したベクトル表現とに基づき、追加の学習がなされたことを特徴とする請求項1又は請求項2記載の推論装置。 The first neural network has undergone additional learning based on the first input and a vector representation related to a cluster to which the second input, which has the predetermined relationship with the first input, belongs. The inference device according to claim 1 or claim 2, characterized in that: 前記所定の関係は、質問とその質問に対する回答を含むものである、請求項1から請求項3のいずれか1項に記載の推論装置を含む質問回答装置。 A question answering device including an inference device according to any one of claims 1 to 3, wherein the predetermined relationship includes a question and an answer to the question. 前記所定の関係は、発話とその発話に対する応答を含むものである、請求項1から請求項3のいずれか1項に記載の推論装置を含む対話装置。 4. An interaction device including an inference device according to claim 1, wherein the predetermined relationship includes an utterance and a response to the utterance. 第1の入力が供給され、この第1の入力のベクトル表現を出力する第1のニューラルネットワークと、第2の入力が供給され、この第2の入力のベクトル表現を出力する第2のニューラルネットワークとを準備するステップと、
少なくとも、所定の関係にある前記第1及び第2の入力の学習データを用いて、前記第1の入力のベクトル表現と前記第2の入力のベクトル表現が、前記所定の関係にある場合に、ベクトル空間において近接して位置するように前記第1及び第2のニューラルネットワークを学習させるステップと、
学習済みの前記第2のニューラルネットワークの出力であるベクトル表現を、前記ベクトル空間上の位置に基づきクラスタ化し、前記第1の入力のベクトル表現に基づき、前記クラスタの検索抽出が可能なようにあらかじめデータベースを構築するステップと、
入力に対して前記第1のニューラルネットワークによる前記入力のベクトル表現に基づいて前記データベースから検索抽出された前記クラスタの情報に基づき、前記所定の関係にある出力を推論するステップとを含む、推論方法。
a first neural network provided with a first input and outputting a vector representation of the first input; and a second neural network provided with a second input and outputting a vector representation of the second input. and a step of preparing the
At least, when the vector representation of the first input and the vector representation of the second input have the predetermined relationship using learning data of the first and second inputs that have a predetermined relationship, training the first and second neural networks to be located close to each other in vector space;
The vector representation that is the output of the second neural network that has been trained is clustered based on the position on the vector space, and based on the vector representation of the first input, it is possible to search and extract the cluster in advance. a step of building a database;
and inferring an output having the predetermined relationship based on the cluster information searched and extracted from the database based on the vector representation of the input by the first neural network. .
JP2022058254A 2022-03-31 2022-03-31 Inference apparatus, inquiry reply apparatus, interactive apparatus, and inference method Pending JP2023149601A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022058254A JP2023149601A (en) 2022-03-31 2022-03-31 Inference apparatus, inquiry reply apparatus, interactive apparatus, and inference method
PCT/JP2023/003803 WO2023188827A1 (en) 2022-03-31 2023-02-06 Inference device, question answering device, dialogue device, and inference method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022058254A JP2023149601A (en) 2022-03-31 2022-03-31 Inference apparatus, inquiry reply apparatus, interactive apparatus, and inference method

Publications (1)

Publication Number Publication Date
JP2023149601A true JP2023149601A (en) 2023-10-13

Family

ID=88200989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022058254A Pending JP2023149601A (en) 2022-03-31 2022-03-31 Inference apparatus, inquiry reply apparatus, interactive apparatus, and inference method

Country Status (2)

Country Link
JP (1) JP2023149601A (en)
WO (1) WO2023188827A1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10740566B2 (en) * 2018-03-23 2020-08-11 Servicenow, Inc. Method and system for automated intent mining, classification and disposition
US11113323B2 (en) * 2019-05-23 2021-09-07 Adobe Inc. Answer selection using a compare-aggregate model with language model and condensed similarity information from latent clustering

Also Published As

Publication number Publication date
WO2023188827A1 (en) 2023-10-05

Similar Documents

Publication Publication Date Title
CN111933129B (en) Audio processing method, language model training method and device and computer equipment
JP6819990B2 (en) Dialogue system and computer programs for it
EP1366490B1 (en) Hierarchichal language models
Gomathy Optimal feature selection for speech emotion recognition using enhanced cat swarm optimization algorithm
CN109840287A (en) A kind of cross-module state information retrieval method neural network based and device
CN113836277A (en) Machine learning system for digital assistant
JP3627299B2 (en) Speech recognition method and apparatus
CN111191002A (en) Neural code searching method and device based on hierarchical embedding
CN111933127A (en) Intention recognition method and intention recognition system with self-learning capability
CN111694940A (en) User report generation method and terminal equipment
CN116166782A (en) Intelligent question-answering method based on deep learning
CN115497465A (en) Voice interaction method and device, electronic equipment and storage medium
Wang Speech recognition in English cultural promotion via recurrent neural network
Han et al. Generative adversarial networks for open information extraction
WO2023188827A1 (en) Inference device, question answering device, dialogue device, and inference method
CN116978367A (en) Speech recognition method, device, electronic equipment and storage medium
Daelemans Abstraction considered harmful: Lazy learning of language processing
CN111506764B (en) Audio data screening method, computer device and storage medium
CN114238605A (en) Automatic conversation method and device for intelligent voice customer service robot
JP2019125154A (en) Information processing device, dialogue data processing method, and information processing system
CN114239555A (en) Training method of keyword extraction model and related device
Sati et al. An Intelligent Virtual System using Machine Learning
WO2023243273A1 (en) Utterance data generation device, interaction device, and method for creating generation model
Yin et al. Speech Recognition for Power Customer Service Based on DNN and CNN Models
WO2024014230A1 (en) Speech filtering device, interaction system, context model training data generation device, and computer program