JP2023167720A - Dialogue device, dialogue system, and dialogue method - Google Patents
Dialogue device, dialogue system, and dialogue method Download PDFInfo
- Publication number
- JP2023167720A JP2023167720A JP2022079113A JP2022079113A JP2023167720A JP 2023167720 A JP2023167720 A JP 2023167720A JP 2022079113 A JP2022079113 A JP 2022079113A JP 2022079113 A JP2022079113 A JP 2022079113A JP 2023167720 A JP2023167720 A JP 2023167720A
- Authority
- JP
- Japan
- Prior art keywords
- response
- dialogue
- model
- input data
- 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
Links
- 238000000034 method Methods 0.000 title claims description 54
- 230000004044 response Effects 0.000 claims abstract description 180
- 230000009931 harmful effect Effects 0.000 claims abstract description 94
- 230000009118 appropriate response Effects 0.000 claims abstract description 18
- 230000010365 information processing Effects 0.000 claims abstract description 15
- 238000013210 evaluation model Methods 0.000 claims description 56
- 230000003993 interaction Effects 0.000 claims description 53
- 230000001988 toxicity Effects 0.000 claims description 42
- 231100000419 toxicity Toxicity 0.000 claims description 42
- 239000000203 mixture Substances 0.000 claims description 2
- 230000008569 process Effects 0.000 description 42
- 238000012545 processing Methods 0.000 description 30
- 238000010586 diagram Methods 0.000 description 26
- 230000001537 neural effect Effects 0.000 description 9
- 230000005477 standard model Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 4
- 238000013145 classification model Methods 0.000 description 3
- 230000036541 health Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 206010037180 Psychiatric symptoms Diseases 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000009193 crawling Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
Images
Abstract
Description
本発明は、対話装置、対話システム、及び、対話方法に関する。 The present invention relates to a dialogue device, a dialogue system, and a dialogue method.
Web上からSNSやチャットの対話ログを収集して作成した対話システムでは、誹謗中傷などの不適切な応答を防止するため、例えば、特開2006-11592(特許文献1)に記載の技術がある。この公報では、禁止用語を含む文を出力することを防止することを目的とする。そのため、分割部81は、入力された文を単語に分割する。単語リスト記憶部83は、文中での使用を許可する単語を記憶する。文削除部82は、分割部81から供給される文のすべての単語が、単語リスト記憶部83に記憶される文中での使用を許可する単語である場合、その文を出力する。特許文献1には、例えば、対話を行うロボット装置の対話の応答文の作成に利用される入出力ペア(の出力例)の取捨選択に適用する、技術が記載されている。 In a dialogue system created by collecting SNS and chat dialogue logs from the Web, there is a technique described in, for example, Japanese Patent Laid-Open No. 2006-11592 (Patent Document 1) to prevent inappropriate responses such as slander. . The purpose of this publication is to prevent sentences containing prohibited words from being output. Therefore, the dividing unit 81 divides the input sentence into words. The word list storage unit 83 stores words that are permitted to be used in a sentence. If all the words in the sentence supplied from the dividing unit 81 are words that are allowed to be used in the sentence stored in the word list storage unit 83, the sentence deletion unit 82 outputs the sentence. Patent Document 1 describes, for example, a technique applied to selecting (output examples of) input/output pairs used for creating a response sentence for a dialogue of a robot device that performs a dialogue.
また、非特許文献1には、事前学習済言語モデルを用いた対話システムにおいて、誹謗中傷を含む発話とそれに対して適切な応答を返している対話ログをSNSから収集し、この対話ログで言語モデルを追加学習することで誹謗中傷の発話に対して適切な応答を出力する技術が記載されている。 Furthermore, in Non-Patent Document 1, in a dialogue system using a pre-trained language model, dialogue logs of utterances containing slander and appropriate responses are collected from SNS, and this dialogue log is used to evaluate the language A technology is described that outputs an appropriate response to slanderous utterances by additionally learning a model.
特許文献1では応答に含まれる単語のみで出力可否、つまり、不適切か否かを判定しており、有害な単語は含まれていなくとも意味としては不適切となる応答を抑制することができない。例えば、誹謗中傷に対して「私もそう思う。」と応答した場合、不適切な応答となるが、応答文に有害な単語は含まれておらず、単語のみでは不適切と判定することができない。 In Patent Document 1, it is determined whether the response can be outputted, that is, whether it is inappropriate or not, based only on the words included in the response, and it is not possible to suppress responses that are inappropriate in meaning even if they do not include harmful words. . For example, if you respond to slander with "I think so too," it will be an inappropriate response, but the response does not contain any harmful words, and the words alone cannot be judged as inappropriate. Can not.
非特許文献1はこのような課題を解決するものだが、有害発言には、人種・民族差別やジェンダー差別などさまざまなカテゴリーがあるのに対し、これらを一つの有害性として扱っていることから、有害発言によってカテゴリーに応じた適切な応答を出力できない場合がある。 Non-Patent Document 1 solves this problem, but since there are various categories of harmful speech, such as racial/ethnic discrimination and gender discrimination, it treats these as one type of harmful speech. , it may not be possible to output an appropriate response according to the category due to harmful comments.
そこで、本発明は、さまざまなカテゴリーの有害入力に対して、それぞれのカテゴリーに合った適切な応答を返すことができる対話システムを提供する。 Accordingly, the present invention provides an interaction system that can respond to harmful inputs of various categories and return appropriate responses suitable for each category.
上記目的を達成するために、例えば特許請求の範囲に記載の構成を採用する。 In order to achieve the above object, for example, the configurations described in the claims are adopted.
本願は上記課題を解決する手段を複数含んでいるが、その一例を挙げるならば、情報処理装置と、情報処理装置にネットワークを介して接続されるサーバを有する対話システムである。サーバは、情報処理装置から、投稿コメントやその投稿コメントに対する返信コメント等の入力文を含む入力データを受け付ける入力部と、入力データによる攻撃対象ごとに、有害な入力データに対し安全な応答文を出力するよう学習され、入力データに対し、それぞれが応答文を生成する複数の対話モデルと、複数の対話モデルから生成される複数の応答文から、所定の基準に基づいて、一つの応答文を選択して出力する応答選択部と、を備える対話システムである。 The present application includes a plurality of means for solving the above problems, and one example thereof is an interaction system having an information processing device and a server connected to the information processing device via a network. The server has an input section that receives input data including input text such as posted comments and reply comments to the posted comments from the information processing device, and a safe response text for each attack target by the input data against harmful input data. A single response sentence is generated based on a predetermined standard from multiple dialogue models that are trained to output and each generates a response sentence in response to input data, and multiple response sentences generated from the multiple dialogue models. This is a dialogue system including a response selection unit that selects and outputs a response.
本発明によれば、さまざまな種類の有害発言に対して、カテゴリーに応じた適切な応答を返すことができる対話システムを提供することができる。 According to the present invention, it is possible to provide a dialogue system that can respond to various types of harmful comments with appropriate responses according to their categories.
上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。 Problems, configurations, and effects other than those described above will be made clear by the following description of the embodiments.
以下、図面を参照して本発明の実施形態を説明する。以下の記載および図面は、本発明を説明するための例示であって、説明の明確化のため、適宜、省略および簡略化がなされている。本発明は、他の種々の形態でも実施する事が可能である。特に限定しない限り、各構成要素は単数でも複数でも構わない。 Embodiments of the present invention will be described below with reference to the drawings. The following description and drawings are examples for explaining the present invention, and are omitted and simplified as appropriate for clarity of explanation. The present invention can also be implemented in various other forms. Unless specifically limited, each component may be singular or plural.
図面において示す各構成要素の位置、大きさ、形状、範囲などは、発明の理解を容易にするため、実際の位置、大きさ、形状、範囲などを表していない場合がある。このため、本発明は、必ずしも、図面に開示された位置、大きさ、形状、範囲などに限定されない。 The position, size, shape, range, etc. of each component shown in the drawings may not represent the actual position, size, shape, range, etc. in order to facilitate understanding of the invention. Therefore, the present invention is not necessarily limited to the position, size, shape, range, etc. disclosed in the drawings.
また、以下の説明では、プログラムを実行して行う処理を説明する場合があるが、プログラムは、プロセッサ(例えばCPU(Central Processing Unit)、GPU(Graphics Processing Unit))によって実行されることで、定められた処理を、適宜に記憶資源(例えばメモリ)および/またはインターフェースデバイス(例えば通信ポート)等を用いながら行うため、処理の主体がプロセッサとされてもよい。同様に、プログラムを実行して行う処理の主体が、プロセッサを有するコントローラ、装置、システム、計算機、ノードであってもよい。プログラムを実行して行う処理の主体は、演算部であれば良く、特定の処理を行う専用回路(例えばFPGA(Field-Programmable Gate Array)やASIC(Application Specific Integrated Circuit))を含んでいてもよい。 In addition, in the following explanation, processing performed by executing a program may be explained, but the program is executed by a processor (for example, a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit)). The processor may be the main body of the processing in order to perform the processing using appropriate storage resources (for example, memory) and/or interface devices (for example, communication ports). Similarly, the subject of processing performed by executing a program may be a controller, device, system, computer, or node having a processor. The main body of the processing performed by executing the program may be an arithmetic unit, and may include a dedicated circuit (for example, FPGA (Field-Programmable Gate Array) or ASIC (Application Specific Integrated Circuit)) that performs specific processing. .
本実施の形態による対話装置、対話システム、対話方法は、例えば、パーソナルコンピューターの操作に対するQA、保険加入に関するQAの他、受付ロボット、コールセンタや高齢者向けロボットに適応される。特に、受付ロボット、コールセンタや高齢者向けロボットでは、多岐にわたる入力文を含む入力データに対して安全な応答文を出力することができ、受付時やコールセンタへの問い合わせに対する適切なおもてなし、高齢者の孤独を和らげるといった価値を提供することできる。 The dialogue device, dialogue system, and dialogue method according to the present embodiment are applied to, for example, QA for personal computer operations, QA for insurance enrollment, reception robots, call centers, and robots for the elderly. In particular, reception robots, call centers, and robots for the elderly can output safe response sentences to input data that includes a wide variety of input sentences. It can provide value such as alleviating loneliness.
本発明の第1の実施形態に係る対話処理の説明図を図1に示す。対話システム100は、ユーザから入力文を含む入力データ110を受け取り、応答文111を出力する。入力データ110は入力文含み、入力文は有害な発言の一例であり、投稿コメント、投稿コメントと投稿コメントに対する返信コメント等を含む。以下、入力データ110を入力文110として説明を続ける。対話システム100は、有害カテゴリー1に分類される有害な入力文に適切な応答ができるよう調整した有害カテゴリー1対応対話モデル101、有害カテゴリー2に分類される有害な入力文に適切な応答ができるよう調整した有害カテゴリー2対応対話モデル102、有害カテゴリーNに分類される有害な入力文に適切な応答ができるよう調整した有害カテゴリーN対応対話モデル103を備えており、入力文をそれぞれの対話モデルに入力して応答文を生成する。
FIG. 1 shows an explanatory diagram of interaction processing according to the first embodiment of the present invention. The
ここで「有害カテゴリー」とは、投稿コメントを含む入力データ、投稿コメントと投稿コメントに対する返信コメントを含む入力データに含まれる入力文よって攻撃される対象「攻撃対象」であって、例えば、人種・民族差別や犯罪記事等である。そのため、有害カテゴリー1対応対話モデル101、有害カテゴリー2対応対話モデル102、有害カテゴリーN対応対話モデル103を、攻撃対象対応対話モデルと称することもできる。
Here, the term "harmful category" refers to an "attack target" that is attacked by input data including posted comments, and input sentences included in input data including posted comments and reply comments to posted comments, and includes, for example, racial - Articles about ethnic discrimination or crimes. Therefore, the
そして、対話システム100は、対話モデルが生成した各応答文に対して、有害か否かを評価して有害性スコアを算出し、有害性スコアがもっとも低い応答文を選択して出力する。図1では、入力文110に対して、有害カテゴリー1対応対話モデル101が出力した応答文104の有害性が最も低いと判定され、応答文111として出力されている様子を表している。
Then, the
<対話システム>
図2は、実施例1にかかる対話システムのシステム構成例を示す説明図である。対話システム100は、たとえば、クライアントサーバシステムであり、サーバ201と、PC203、スマートフォン204などの情報処理装置205と、を有する。サーバ201と情報処理装置205とは、インターネット、LAN(Local Area Network)、WAN(Wide Area Network)などのネットワーク202を介して通信可能である。
<Dialogue system>
FIG. 2 is an explanatory diagram showing an example of the system configuration of the dialogue system according to the first embodiment. The
クライアントサーバシステムの場合、対話プログラムは、サーバ201にインストールされる。したがって、サーバ201は、対話システムとして、応答生成、モデル管理、応答選択、対話履歴管理処理を実行する。この場合、情報処理装置205は、処理対象のテキストのサーバ201への送信、サーバ201からの処理結果の受信、処理対象のテキストを入力するインタフェースとなる。
In the case of a client-server system, the interaction program is installed on the
一方、スタンドアロン型の場合、対話プログラムは、情報処理装置205にインストールされ、サーバ201は不要である。したがって、情報処理装置205は、対話装置として、テキストの入力、入力したテキストの応答生成、結果の出力を実行する。
On the other hand, in the case of a stand-alone type, the dialog program is installed on the
<対話システムのハードウェア構成例>
図3は、対話装置300のハードウェア構成例を示すブロック図である。
<Example of hardware configuration of dialogue system>
FIG. 3 is a block diagram showing an example of the hardware configuration of the
対話装置300は、対話システムの場合にはサーバ201に相当し、スタンドアロン型の場合には情報処理装置205に相当する。対話装置300は、プロセッサ301と、記憶デバイス302と、入力デバイス303と、出力デバイス304と、通信インタフェース(通信IF)305と、を有する。プロセッサ301、記憶デバイス302、入力デバイス303、出力デバイス304、および通信IF305は、バス306により接続される。プロセッサ301は、対話装置300を制御する。記憶デバイス302は、プロセッサ301の作業エリアとなる。また、記憶デバイス302は、各種プログラムやデータを記憶する非一時的なまたは一時的な記録媒体である。記憶デバイス302としては、たとえば、ROM(Read Only Memory)、RAM(Random Access Memory)、HDD(Hard Disk Drive)、フラッシュメモリがある。入力デバイス303は、データを入力する。入力デバイス303としては、たとえば、キーボード、マウス、タッチパネル、テンキー、スキャナ、マイク、生体センサがある。出力デバイス304は、データを出力する。出力デバイス304としては、たとえば、ディスプレイ、プリンタ、スピーカがある。通信IF305は、ネットワーク202と接続し、データを送受信する。
The
<対話システム100の機能的構成例>
図4Aは、実施例1にかかる対話システム100の機能的構成例を示すブロック図である。対話システム100は、対話処理プログラムがインストールされたコンピュータであり、情報処置装置205、あるいはサーバ201である。対話システム100は、対話処理プログラムにより、入力部401、応答生成部404、モデル管理部402、対話モデル群408、有害性評価モデル403、応答選択部405、対話履歴管理部407、出力部406を実現する。
<Functional configuration example of
FIG. 4A is a block diagram showing an example of the functional configuration of the
図4Bに示すように、入力部401、モデル管理部402、応答生成部404、応答選択部405、出力部406、対話履歴管理部407は、プロセッサ301が記憶デバイス302に格納された対話処理プログラム410を実行することで各種機能を実現する。
As shown in FIG. 4B, an
また、対話モデル群408、有害性評価モデル403、ベース対話モデル1002も、記憶デバイス302に格納される。
Furthermore, the
また、後述する有害単語リスト802、アノテーションデータ600等の各種データは、記憶デバイス302の各種データ411内に格納される。
Further, various data such as a
入力部401は、図3の入力デバイス303に対応し、入力文であるテキストデータを読み込むモジュールで、テキストデータの加工と応答生成部404への入力を行う。また、有害性評価モデル403と対話モデル群408作成時のテキストデータの登録は、すべて入力部401を介して行われる。
The
モデル管理部402は、応答生成部404が使用する対話モデル群408と、応答選択部405が使用する有害性評価モデル403を管理する。モデル管理部402は、応答生成部404の指示に従って所定のモデルにテキスト(入力文)を入力し、モデルの出力結果(応答文)を返す。また、モデル管理部402は、応答選択部405の指示に従って所定のモデルに応答文を入力し、所定のモデルにより応答文の有害性スコアを算出し、応答文の有害性を把握する。さらに、モデル管理部402は、各種モデルの作成と登録も行う。
The
応答生成部404は、入力部401から受け取ったテキスト(入力文)を、モデル管理部402を介して対話モデル群408に入力し、それぞれの有害カテゴリー対応対話モデル(以下、単に対話モデルと称する)から応答文を取得する。対話モデルは、テキストを入力するとそのテキストに対する応答文を生成する。対話モデルは、SNSなどから取得した複数往復の対話文で学習したニューラル言語モデルである。
The
図5は、入力部401から入力される掲示板型SNSから取得した投稿コメントと返信コメントのテキストで、ニューラル言語モデルの学習を行って対話モデルを作成するまでの説明図である。
FIG. 5 is an explanatory diagram of the process of training a neural language model and creating a dialogue model using the texts of posted comments and reply comments acquired from the bulletin board type SNS input from the
500は、入力部401から入力される掲示板型SNSのスレッド(投稿と一連の返信のツリー構造)を示す一例である。投稿コメント501に対する返信コメントが502と505である。また、返信コメント502に対する返信として返信コメント503が、さらにその返信として返信コメント504がある。
500 is an example of a bulletin board type SNS thread (tree structure of posts and a series of replies) input from the
510は、入力部401において、500の投稿コメントと返信コメントをニューラル言語モデルの学習用に整形したデータである。500は502~504と505~506の2つの枝を持ち、510では、それぞれの枝が511と512として整形されている。511は、501~504のコメントを連結したテキストで、「|」はコメントとコメントの境界を示す特殊なトークン(単語)であり、ニューラル言語モデルはこのトークンをもとに複数のコメントで構成されるテキストからそれぞれのコメントの範囲を認識する。
510 is data in which the
入力文として、投稿コメントと返信コメントを含む510の形式で大量の対話データを用意してニューラル言語モデルを学習することで、対話モデル522が作成され、例えば、対話モデル522に入力文521「午後から雪が降るそうです。」を与えると、この入力に対して尤もらしい応答として出力523「初雪ですね。」が得られる。対話モデル群408の対話モデルは、後述の方法で有害発言に対して適切な応答を出力できるよう学習された対話モデルである。
A
ニューラル言語モデルを用いた対話モデルには、例えば、GPT-2(Generative Pre-trained Transformer 2)を用いて作成できる。例えば、SNSから取得したデータをGPT-2アーキテクチャで学習した対話モデルに、DialoGPTがある。なお、複数往復の対話履歴を含むテキストを入力としてその応答のテキストを出力することができればよく、これ以外の技術を用いて実現してもよい。例えば、別のアーキテクチャとして、BART(Bidirectional Auto-Regressive Transformer)が挙げられる。 A dialogue model using a neural language model can be created using, for example, GPT-2 (Generative Pre-trained Transformer 2). For example, DialoGPT is an interaction model that is trained using the GPT-2 architecture using data obtained from SNS. It should be noted that it is only necessary to input a text including a history of multiple round-trip conversations and output a response text, and it may be realized using other techniques. For example, another architecture is BART (Bidirectional Auto-Regressive Transformer).
有害性評価モデル403は、入力部401から入力されたテキストが有害発言等の有害な内容か否かを判別する文分類モデルで、入力されたテキスト(入力文)に対して有害か否かの二値の分類を行う。また、分類モデルの出力をソフトマックス関数に通して算出した分類結果の確率を、有害性スコアとして出力する。
The
有害性評価モデル403も、GPT-2(Generative Pre-trained Transformer 2)によって実現される。有害性評価モデル403は、後述の方法で有害な内容か安全な内容かの二値のラベルをコメント単位で付与したデータを用意し、文を入力した際にその文のラベルを予測するよう追加学習を行う。
The
応答選択部405は、応答生成部404が対話モデルによって出力した各応答文に対してモデル管理部402を介して有害性評価モデル403による評価を行う。応答選択部405は、有害性スコアが所定の閾値未満でかつ、もっとも低い応答文を出力部406と対話履歴管理部407に出力する。出力部406は、応答選択部405が選択した応答文を出力デバイス304に出力する。
The
対話履歴管理部407は、応答選択部405が選択した応答文を対話履歴として保持し、入力部401が入力を受け取ったときに、保持していた対話履歴を応答生成部404に出力する。例えば、対話履歴管理部407は、図5の入力される投稿コメント521に対し、応答選択部405により選択された応答文523との対応を管理する。
The dialogue
<有害性評価モデル作成処理>
有害性評価モデル作成処理は、実施例1にかかる対話システム100において、モデル管理部402が、対話処理に必要な有害性評価モデルの作成、および、有害カテゴリー対応対話モデルの作成処理に使用するカテゴリー別有害性評価モデルの作成を行う処理である。モデル管理部402は、掲示板型SNSから取得した投稿コメントとそれに対する返信コメントに対し、ユーザを介して有害性有無のアノテーションを行い、これを使用して有害性評価モデルの学習を行う。有害性評価モデルを作成する処理のフローチャートを図7に、また、この処理におけるデータフローを図8に示す。アノテーションを行うデータの例を図6に示す。
<Hazard assessment model creation process>
In the hazard evaluation model creation process, in the
図8に示すように、モデル管理部402は、まず、SNSのダンプデータ801から有害発言を含むスレッドを抽出し、有害性評価モデルの学習用にデータの整形を行う(ステップS701)。ダンプデータ801は、一定期間のSNSのログをまとめたデータである。ダンプデータが取得できない場合は、SNSのクローリングによってデータを、入力部401から取得する。
As shown in FIG. 8, the
有害発言を含むスレッドの抽出は、有害発言関連用語リスト802の単語を含むスレッドをスクリーニングする。有害単語リスト802は誹謗中傷等の有害発言で頻出する単語のリストであり、記憶デバイス302の各種データ411として格納されている。単語リストは、Web上で公開されている禁止用語のリストなどを利用すればよく、また、ユーザが独自に作成してもよい。ステップS701のデータ整形は、図5で例示した形式500のデータを形式510のデータに整形する入力部401の処理である。
To extract threads containing harmful remarks, threads containing words in the harmful speech-
次にモデル管理部402は、ステップS701で整形されたデータ803に対して有害性有無に関するデータを付与するアノテーションを行う。アノテーションは人手で行うため、モデル管理部402がアノテーション対象のデータを出力デバイス304に出力し、入力デバイス303を通してユーザの入力を受け付ける。
Next, the
モデル管理部402は、整形済データ803から一つのデータを取り出す(ステップS702)。ここで、データとは、図5の511、512で例示した投稿コメントとその返信コメントを結合したデータである。このように投稿コメントとその返信コメントのアノテーションを同時に実施することで、コメント単体ではなく前のコメントも踏まえた有害性をアノテーションする。例えば、有害なコメントに同意するコメントも有害とする。
The
有害性は、予め定義されたカテゴリーから選択する。「有害性のカテゴリー」は、投稿コメントを含む入力データ、投稿コメントと投稿コメントに対する返信コメント等の入力文を含む入力データによって攻撃される対象「攻撃対象」であって、たとえば、人種・民族、ジェンダー、宗教、容姿、健康(障がい)、政治・社会経済などである。また、たとえば、特定の人種の特定の性別のように複数のカテゴリーにまたがった有害発言もあるため、有害性のラベルは複数カテゴリーを指定できるようにしておく。このようにして、一つのデータに含まれるすべてのコメントに対してアノテーションを行う(ステップS703)。 Hazards are selected from predefined categories. "Harmful categories" are "attack targets" that are attacked by input data including posted comments, posted comments and input data such as reply comments to posted comments, and include, for example, race/ethnicity. , gender, religion, appearance, health (disability), politics/socioeconomics, etc. Furthermore, since there are some harmful comments that fall into multiple categories, such as those related to a specific race or gender, the harmfulness label should be able to specify multiple categories. In this way, all comments included in one data are annotated (step S703).
アノテーションデータの例を図6に示す。図6は、アノテーションデータ600を示し、投稿コメント601とその返信コメント602~604に対し、有害性のカテゴリーとしてラベルが付与されている。前述の通り、モデル管理部402は一連の返信コメントをまとめて出力デバイス304に出力し、ユーザに対してアノテーションを実行させることで、文脈を考慮したラベルを付与できるようにする。605~608はアノテーションによって付与されたラベルである。アノテーションデータ600は、コメントに対する攻撃対象を特定するカテゴリーをラベルとして付与されたデータである。
An example of annotation data is shown in FIG. FIG. 6 shows annotation data 600, in which a posted
コメント601「あの国は犯罪者が多いですね。」は、人種・民族差別的なコメントであるため、「人種・民族」のラベルを付与する。コメント602「そんなことはない。」は、コメント601に反対するコメントであり有害性はないため、「有害性なし」のラベルが付与する。コメント603「いや、その通りだと思う。」は、コメント単体では有害性はないが、コメント601に同意する人種・民族差別的なコメントと判断できるため「人種・民族」のラベルを付与する。コメント604「あの国の男は怠け者の犯罪者だ。」は、人種・民族差別とジェンダー差別の二つの有害性を含むため、608の通り、「人種・民族」と「ジェンダー」の二つのラベルを付与する。
ユーザが一つのデータのアノテーションを完了し、ユーザから入力デバイス303を通して登録指示を受け付けると、モデル管理部402は、当該データを登録するとともに、このデータを含めて、これまでアノテーションされたデータについてカテゴリーごとのデータ数を集計する。
When a user completes the annotation of one piece of data and receives a registration instruction from the user through the
モデル管理部402は、アノテーションされたデータ数が、あらかじめ設定されたデータ数に満たないカテゴリーがある場合、ステップS702に戻り、次のデータを取り出してアノテーションを続ける。このように、カテゴリーごとに十分な数のデータが登録できるまでアノテーションを行うことで、有害性評価モデルにカテゴリー間の精度差が出ることを防ぐ。
If there is a category in which the number of annotated data is less than the preset number of data, the
すべてのカテゴリーについて所定の数のデータが登録されると(ステップS704:YES)、モデル管理部402は、アノテーション済データ804を使用して有害性評価モデル403の学習を行う(ステップS705)。各データは、カテゴリーを含めた有害性がアノテーションされているが、このステップでは、モデル管理部402は、カテゴリーを分けずに有害か否かの二値分類を行う有害性評価モデルを作成する。したがって、モデル管理部402は、アノテーションされたデータに対して、正解ラベルを有害か否かの二値に変換して有害性評価モデル403の学習を行う。
When a predetermined number of data are registered for all categories (step S704: YES), the
次に、モデル管理部402は、カテゴリーごとの有害性評価モデル403を作成するため、アノテーション済データ804をカテゴリーごとに分類する(ステップS706)。データの分類後、モデル管理部402は、そのうちの一つのカテゴリーに着目し(ステップS707)、当該カテゴリーのデータ805を使用して有害性評価モデルの学習を行う(ステップS708)。そして、モデル管理部402は、未処理のカテゴリーがあれば(ステップS709:YES)、ステップS707に戻り、当該カテゴリーの有害性評価モデルの学習を行う。このようにしてすべてのカテゴリーの有害性評価モデルの学習が終わると(ステップS709)、有害性評価モデル作成処理が完了する。
Next, the
<有害カテゴリー対応対話モデル作成処理>
有害カテゴリー対応対話モデル(対話モデル)作成処理は、有害発言に対して適切な応答ができる対話モデルを、攻撃対象、即ち有害カテゴリーごとに作成する処理である。モデル管理部402が、有害性評価モデルを用いて、入力部401から入力されたSNSのダンプデータから有害発言に対して適切な応答を行っているスレッドを抽出し、このようなスレッドを使用してベース対話モデルの追加学習を行う。
<Harmful category compatible dialogue model creation process>
The harmful category compatible dialogue model (dialogue model) creation process is a process of creating a dialogue model that can appropriately respond to harmful comments for each target of attack, that is, for each harmful category. The
実施例1にかかる対話システム100において各種有害発言に対応した対話モデルの作成処理のフローチャートを図9に、また、この処理におけるデータフローを図10に示す。
FIG. 9 shows a flowchart of a process for creating a dialogue model corresponding to various harmful comments in the
モデル管理部402は、まず、有害カテゴリー対応対話モデルのもとになるベース対話モデル1002を、ネットワーク202を介して外部装置から読み込み、記憶デバイス302に格納する(ステップS901)。ベース対話モデル1002は、SNS等から取得した大量の対話ログを用いて学習されたニューラル言語モデルで、第三者が公開しているニューラル対話モデルを流用する。
The
なお、使用する対話モデルは、モデル管理部402が扱うアーキテクチャで、対話システム100の対話処理で扱う言語と同じ言語の学習データ、または当該言語を一定量含む多言語データで学習されたモデルとする。学習済みの対話モデルがない場合、対話システム100によって、SNSのダンプデータの取得からデータ整形、言語モデルの学習を行って作成する。
Note that the dialogue model to be used is a model that is trained using training data of the same language as the language handled by the dialogue processing of the
次に、モデル管理部402は、有害性評価モデル作成処理の過程で入力部401が作成した整形済データ803を読み込む(ステップS902)。そして、モデル管理部402は、有害性評価モデル作成処理で作成した有害性評価モデル403を使用して、整形したデータに対して有害性の自動アノテーションを行う(ステップS903)。有害性評価モデル403による自動アノテーションは、有害性評価モデル作成処理のアノテーションと同様にコメント単位で行われる。なお、ここでの自動アノテーションは、有害か否かの二値である。
Next, the
次にモデル管理部402は、有害なコメントを含み最後の返信コメントが有害ではないデータ1001を、有害性評価モデル403を用いて抽出する(ステップS904)。このスクリーニングによって、有害発言に対して適切な応答を行っている対話データを収集する。
Next, the
次にモデル管理部402は、有害性評価モデル作成処理で作成したカテゴリー別の有害性評価モデルを使用して、ステップS904で抽出したデータ1001を有害性のカテゴリー別に分類する(ステップS905)。そして、次のステップにて、モデル管理部402は、有害カテゴリー対応対話モデルの追加学習を行っていく。
Next, the
まず、モデル管理部402は、有害カテゴリーの一つに着目する(ステップS906)。そして、モデル管理部402は、ステップS901で読み込んだベース対話モデル1002に対して、ステップS904で抽出したデータを使用した追加学習を行い、汎用有害性対応対話モデル1003を作成する(ステップS907)。作成された汎用有害性対応対話モデル1003は記憶デバイス302に格納される。
First, the
そして、モデル管理部402は、ステップS905で分類したカテゴリー別のデータから着目しているカテゴリーのデータを選択する。モデル管理部402は、さらに、ステップS907で追加学習を行った汎用有害性対応対話モデル1003に対して選択したデータを使用した追加学習を行い、当該カテゴリーのカテゴリー対応対話モデルを作成する。
Then, the
未処理のカテゴリーがある場合(ステップS909:YES)、ステップS906に戻り、未処理のカテゴリーの対話モデルを作成する。このようにしてすべてのカテゴリーの対話モデルを作成し(ステップS909:NO)、処理を終了する。このように、カテゴリー別データによる追加学習の前に、全カテゴリーのデータで追加学習を行うことで、有害発話全般に対する汎用性と特定の有害カテゴリーに対する専用性の両方の性質を獲得する効果がある。 If there is an unprocessed category (step S909: YES), the process returns to step S906 and an interaction model for the unprocessed category is created. In this way, interaction models for all categories are created (step S909: NO), and the process ends. In this way, performing additional learning using data from all categories before performing additional learning using categorical data has the effect of acquiring both generality for harmful utterances in general and specialization for specific harmful categories. .
<対話処理>
実施例1にかかる対話システム100における対話処理のフローチャートを図11に示す。対話処理では、有害性評価モデル作成処理で作成した有害性評価モデル403と、有害カテゴリー対応対話モデル作成処理で作成した、有害カテゴリー別の複数の対話モデルを使用して、有害入力に対して適切な応答を出力する処理である。
<Interaction processing>
FIG. 11 shows a flowchart of dialogue processing in the
対話処理は、入力デバイス303を通してユーザからテキストが入力されることで開始される。まず、入力部401が入力データを読み込み、入力データに含まれる入力文を、応答生成部404に出力する(ステップS1101)。ここで応答生成部404は、対話履歴管理部407が対話履歴を保持していた場合、対話履歴と入力文を結合する。次に、応答生成部404が、モデル管理部402を介して、入力文を各対話モデルに入力する(ステップS1102)。尚、対話履歴管理部407に対話履歴を保持していない場合には、入力文のみを各対話モデルに入力する。モデル管理部402は、すべての対話モデルから入力文に対する応答文を取得し、応答生成部404へ出力する。
The interaction process is started when a user inputs text through the
応答生成部404は、モデル管理部402から受け取った応答文を応答選択部405に入力し、応答選択部405がこれらの応答文の有害性を評価する(ステップS1103)。応答選択部405は、モデル管理部402を介して、有害性評価モデル403に各応答文を入力し、応答文ごとに有害性スコアを得る。有害性スコアは、有害性評価モデル403が出力をソフトマックス関数に通して算出した分類結果の確率で0~1の値を取る。有害性スコアが1に近いほど、有害である確率が高いことを示す。
The
次に応答選択部405は、算出した有害性スコアをもとに応答選択部405が出力した複数の応答文から最も適切な一つの応答文を選択する。応答選択部405は、まず、有害性スコアが閾値未満、つまり、安全な応答文があるかを判定する(ステップS1104)。有害性スコアが閾値未満の応答文があった場合(ステップS1104:YES)、応答選択部405は、その中から有害性スコアがもっとも低い応答文を選択する(ステップS1105)。なお、閾値未満の応答文が一つであった場合、この処理は省略される。
Next, the
有害性スコアが閾値未満の応答文がなかった場合(ステップS1104:NO)、つまり、すべての応答文を有害であると判定された場合、応答選択部405は、例外処理として、予め設定しておいた定型の応答文を出力する(ステップS1106)。定型の応答文とは、たとえば、「その発言には同意できません。」、あるいは「わかりません。」など、その有害入力文に対して同意しないことを示す応答である。このように処理することで、いずれの対話モデルからも適切な応答が得られなかった場合でも、有害な応答を出力することを防ぐ。
If there is no response sentence with a harmfulness score below the threshold (step S1104: NO), that is, if all the response sentences are determined to be harmful, the
そして、応答選択部405は、選択した応答文を出力部406に出力するとともに、入力文と選択した応答文を対話履歴として対話履歴管理部407に出力する(ステップS1107)。対話履歴管理部407は、応答選択部405が出力した入力文と応答文を対話履歴に追加する。対話履歴管理部407は、次の対話処理が開始された際に、対話履歴を応答生成部404に出力する。
Then, the
以上説明した実施例1によれば、さまざまな種類の有害発言に対して適切な応答を返すことができる対話システムを提供することができる。 According to the first embodiment described above, it is possible to provide a dialogue system that can return appropriate responses to various types of harmful comments.
実施例1によれば、さまざまなカテゴリーに分類される有害発言に対して、カテゴリーごとに生成された対話モデルが適切な応答を生成し、応答選択部が各対話モデルにより生成した応答から最も適切な応答を選択することができる。換言すると、さまざまなカテゴリーの有害入力文に対して、適切な応答を返すことができる。 According to the first embodiment, the dialogue models generated for each category generate appropriate responses to harmful comments classified into various categories, and the response selection unit selects the most appropriate response from among the responses generated by each dialogue model. You can choose the appropriate response. In other words, it is possible to return appropriate responses to various categories of harmful input sentences.
本実施例では、有害性評価に有害カテゴリー別の有害性評価モデルを使用し、有害カテゴリーごとに有害性スコアの閾値を設定することで、有害カテゴリーごとの重要度を指定できるよう構成した対話システムについて説明する。 In this example, a hazard evaluation model for each hazard category is used for hazard evaluation, and a hazard score threshold is set for each hazard category, thereby making it possible to specify the importance of each hazard category. I will explain about it.
図12は、本実施例にかかる対話システムの機能的構成例を示すブロック図である。有害性評価モデルが有害性評価モデル群1201として複数モデル構成となっている以外は、実施例1にかかる対話システムと同じ構成である。また、有害性評価モデル群を構成するカテゴリー別の有害性評価モデルは、図7で説明した有害性評価モデル作成処理のフローチャートにおけるステップS708で作成されたカテゴリー別の有害性評価モデルである。
FIG. 12 is a block diagram showing an example of the functional configuration of the dialogue system according to this embodiment. The configuration is the same as that of the dialog system according to the first embodiment, except that the hazard evaluation model is a multiple model configuration as the hazard
<対話処理>
実施例2にかかる対話処理のフローチャートを図13に示す。ステップS1301~ステップS1302までは、図11のステップS1101~ステップS1102までの処理と同様である。ステップS1303にて、応答生成部404は、モデル管理部402から受け取った応答文を応答選択部405に入力し、応答選択部405がこれらの応答文の有害性を評価する。応答選択部405は、モデル管理部402を介して、有害性評価モデル群1201に各応答文を入力し、応答文ごとにカテゴリー別有害性評価モデルから有害性スコアを得る。
<Interaction processing>
FIG. 13 shows a flowchart of the interaction process according to the second embodiment. Steps S1301 to S1302 are the same as steps S1101 to S1102 in FIG. 11. In step S1303, the
図14は、対話システムにおいて、応答選択部405が参照する有害性スコアテーブル1400であり、記憶デバイス302の各種データ411内に格納されている。有害性スコアテーブル1400は、複数の応答文の有害性スコアを管理する。図14では、3つの応答文のカテゴリーごとの有害性スコアの例を示す。応答文1401~1403について、カテゴリーセット1405それぞれのスコアが記載されている。1406は、後述の方法で算出された総合有害性スコアである。
FIG. 14 shows a harmfulness score table 1400 that is referred to by the
応答選択部405は、次に、有害性スコアが閾値未満の応答文があるかを判定する(ステップS1304)。応答選択部405は、カテゴリー別有害性評価モデルごとに得られたすべての有害性スコアが閾値未満かを判定する。つまり、応答選択部405は、攻撃対象ごとに有害性スコアテーブル1400の有害性スコアと閾値、重み係数管理テーブル1500の閾値1501を比較することで、応答文の有害性を判断する。
The
図15は、閾値、重み係数管理テーブル1500であり、記憶デバイス302の各種データ411内に格納される。閾値、重み係数管理テーブル1500は、カテゴリーごとの閾値1501と後述の総合有害性スコアの算出に用いる重み係数1502の例を示す。図15では、ジェンダーのみ閾値が0.5でありそのほかのカテゴリーの0.6に対して低く設定されているが、これはジェンダーの有害性を重視し、確率が低くても有害と判定する設定としていることを意味する。
FIG. 15 shows a threshold value and weighting coefficient management table 1500, which is stored in
図14に示す応答文の例では、応答文1401が、人種・民族とジェンダーの有害性スコアがともに0.55である。図15において、人種・民族の閾値は0.6であるため閾値未満となるが、ジェンダーの閾値は0.5となっているため閾値以上となる。したがって、応答選択部405は応答文1401を有害と判定する。一方、応答文1402と応答文1403はいずれの有害性スコアも閾値未満であり、応答選択部405はこの二つの応答文を安全と判定する。
In the example of the response sentence shown in FIG. 14, the
有害性スコアが閾値未満の応答文1402と1403があるため(ステップS1304:YES)、応答選択部405は、それぞれの応答文に対して、重み係数1502を用いて総合有害性スコア1406を算出する(ステップS1305)。総合有害性スコアは、カテゴリー別有害性スコアにそれぞれ指定された重み係数を乗算したときの最大値である。応答文1402のカテゴリーごとの有害性スコアそれぞれに重み係数を乗算すると、ジェンダーは有害性スコア0.4に重み係数1.2を乗算した0.48が最大となり、この値が応答文1402の総合有害性スコアとなる。同様の方法で計算すると、応答文1403の総合有害性スコアは0.4となる。
Since there are
そして、応答選択部405は、総合有害性スコアが最も低い応答を選択する(ステップS1306)。図14の例では、応答文1403の総合有害性スコア0.4が最低となるため、応答文1403が最終的な出力として選択される。そして、応答選択部405は、選択した応答文を出力部406と対話履歴管理部407に出力する(ステップS1308)。
Then, the
以上説明した実施例2によれば、すべての有害カテゴリーを同等に扱うか、または、特定のカテゴリーについて有害性の判断における重要度を変えるかを任意に設定できる対話システムを提供することができる。 According to the second embodiment described above, it is possible to provide an interaction system in which it is possible to arbitrarily set whether to treat all harmful categories equally or to change the importance of a specific category in determining the harmfulness.
本実施例では、対話モデル群の構成を任意に変更することで、対応する有害カテゴリーの変更や、使用する対話モデルの数を削減することで限られたリソースでの動作を可能にする対話システムについて説明する。 In this example, by arbitrarily changing the configuration of a group of dialogue models, the corresponding harmful category can be changed, and the number of dialogue models to be used can be reduced, thereby making it possible to operate with limited resources. I will explain about it.
図16は、本実施例にかかる対話システムの機能的構成例を示すブロック図である。実施例3では、対話モデル群1600が、標準モデル群1601、混合モデル群1602、詳細モデル群1603で構成される。
FIG. 16 is a block diagram showing an example of the functional configuration of the dialogue system according to this embodiment. In the third embodiment, the
標準モデル群1601は、実施例1にかかる対話システムの対話モデル群408と同様の構成で、実施例1と実施例2で説明した有害カテゴリー別対応対話モデルで構成される。
The
混合モデル群1602は、複数の有害カテゴリーを混合した対話モデルで、例えば、一つの対話モデルで人種・民族とジェンダーに対応するよう構成した対話モデルである。
The
詳細モデル群1603は、標準モデル群1601の有害カテゴリーを細分化したカテゴリー分類で作成した対話モデルである。例えば、人種・民族は、黒人、白人、アメリカ先住民、ジェンダーは、男性、女性、LGPTなどに細分化できる。対話モデル群1600以外は、実施例1にかかる対話システムと同じ構成である。
The
本実施例では、標準モデル群1601、混合モデル群1602、詳細モデル群1603を使い分けることにより、特に重視したい有害カテゴリーへの対応やそのためのハードウェアリソースの節約を行う。
In this embodiment, by properly using the
<有害性評価モデル作成処理>
図17に実施例3にかかる対話システムのモデル管理部402による有害性評価モデル作成処理のフローチャートを示す。なお、図17では図7で説明した有害性評価モデル作成処理に対する変更部分のみ図示している。図17のフローチャートは図7におけるステップS702~704にあたり、これ以降の動作は図7と同様である。
<Hazard assessment model creation process>
FIG. 17 shows a flowchart of the hazard evaluation model creation process by the
モデル管理部402は、有害性評価モデルの学習用に整形したデータから一つのデータに着目する(ステップS1701)。
The
そして、モデル管理部402がアノテーション対象のデータを出力デバイス304に出力し、入力デバイス303を通してユーザの入力を受け付ける(ステップS1702)。このとき、メインカテゴリーとサブカテゴリーの両方を登録する。メインカテゴリーは実施例1で用いたカテゴリーで、サブカテゴリーは前述した人種・民族に対する黒人、白人、アメリカ先住民などのカテゴリーである。メインカテゴリーとサブカテゴリーはあらかじめ定義しておき、アノテーション時にユーザが選択できるようにしておく。
Then, the
登録されたデータに複数のメインカテゴリーが含まれていた場合(ステップS1703:YES)、モデル管理部402は、カテゴリーの組み合わせを共起カテゴリーとして登録する(ステップS1704)。図6に示したデータ608の例では、人種・民族とジェンダーの二つのカテゴリーが含まれており、この条件に該当する。なお、図6の例では、一つのコメント(コメント604)に対して二つのカテゴリーが付与されている例だが、ステップS1703では、一連のコメント列であるデータ単位で複数のカテゴリーが含まれるか否かを条件とする。
If the registered data includes a plurality of main categories (step S1703: YES), the
図18に共起カテゴリーテーブル1800の登録例を示す。共起カテゴリーテーブル1800は、記憶デバイス302の各種データ411内に格納される。共起カテゴリーテーブル1800は、共起カテゴリーのパターン1801とその頻度1802との対応関係を管理する。図6の例である人種・民族とジェンダーは1803のパターンに一致するため、モデル管理部402により、このパターンの頻度が加算される。なお、当該パターンが登録されていなかった場合は、パターンの登録を行う。ステップS1705の処理に移り、全カテゴリーのデータ数が充足されている場合(ステップS1705:YES)、ステップS1706の処理に移り、充足されていない場合(ステップS1705:NO)はステップS1701に戻り、次のデータのアノテーションを行う。
FIG. 18 shows a registration example of the co-occurrence category table 1800. The co-occurrence category table 1800 is stored in the
ステップS1706にて、モデル管理部402は、任意の閾値を超える高頻度の共起カテゴリーを混合カテゴリーとして登録する。図18の例では、モデル管理部402は、例えば、共起カテゴリー1803、1804、1805を混合カテゴリーセットとして登録する。次にモデル管理部402は、ステップS1706で登録した混合カテゴリーセットに含まれないカテゴリーがあるかを確認する(ステップS1707)。
In step S1706, the
全カテゴリーを、人種・民族、ジェンダー、宗教、容姿、健康(障がい)、政治・社会経済として、登録した混合カテゴリーを「人種・民族、ジェンダー」、「容姿、ジェンダー」、「人種・民族、政治・社会経済」とすると、「健康(障がい)」が混合カテゴリーセットに含まれていない。混合カテゴリーセットに含まれないカテゴリーがある場合(ステップS1707:YES)、モデル管理部402は、作成した混合カテゴリーセットに当該カテゴリーを追加する(ステップS1708)。これにより、「人種・民族、ジェンダー」、「容姿、ジェンダー」、「人種・民族、政治・社会経済」、「健康(障がい)」が混合カテゴリーセットとなる。
All categories are classified as race/ethnicity, gender, religion, appearance, health (disability), politics/socioeconomics, and registered mixed categories are classified as "race/ethnicity, gender," "appearance, gender," and "race/ethnicity." ``Ethnicity, Politics/Socioeconomics'', ``Health (Disability)'' is not included in the mixed category set. If there is a category that is not included in the mixed category set (step S1707: YES), the
これ以降の処理は、図7のステップS705以降と同様で、モデル管理部402は、有害性評価モデルの作成とカテゴリー別有害性評価モデルの作成を行って処理を終了する。なお、各有害性評価モデルは、メインカテゴリー、サブカテゴリー、混合カテゴリーそれぞれで作成する。
The subsequent processing is similar to step S705 and subsequent steps in FIG. 7, and the
<有害カテゴリー対応対話モデル作成処理>
実施例3にかかる対話システムの有害カテゴリー対応対話モデル作成処理は、作成する対話モデルがメインカテゴリー、サブカテゴリー、混合カテゴリーとなるのみで作成処理自体は同一である。メインカテゴリーの対話モデルが標準モデル群1601、サブカテゴリーの対話モデルが詳細モデル群1603、混合カテゴリーの対話モデルが、混合モデル群1602である。
<Harmful category compatible dialogue model creation process>
The dialogue model creation process corresponding to harmful categories in the dialogue system according to the third embodiment is the same as the creation process itself except that the dialogue models to be created are main category, subcategory, and mixed category. Main category interaction models are
<対話処理>
実施例3にかかる対話システムの対話処理では、起動時に使用する対話モデルを、入力部401から指定ユーザによって行われる。対話モデルが指定されるとモデル管理部402は、当該指定された対話モデルが標準モデル群1601の場合、実施例1にかかる対話システムの対話処理と同等を実行する。例えばユーザが対話モデルとして、混合モデル群1602を指定した場合、標準モデル群1601を使用した場合と比較して応答の質は低下するが、使用する対話モデルの数が削減されることで動作に必要なハードウェアリソースを低減することができる。
<Interaction processing>
In the dialog processing of the dialog system according to the third embodiment, a dialog model to be used at startup is input by a designated user from the
具体的には、ユーザから入力を受け付けてから応答が出力されるまでの時間が削減される、また、クライアントサーバ方式で運用する場合、一度に対応できるクライアント数を増やすことができる、などの効果が期待できる。一方、詳細モデル群1603を使用する場合は、処理に必要なハードウェアリソースは増えるものの、サブカテゴリーに応じたより適切な応答を生成することができる。
Specifically, the time from receiving input from the user to outputting the response is reduced, and when operating in a client-server format, the number of clients that can be handled at once can be increased. can be expected. On the other hand, when using the
また、必ずしも、標準モデル群1601、混合モデル群1602、詳細モデル群1603の括りに限定せず、異なるモデル群の対話モデルを組み合わせた運用も可能である。例えば、ハードウェアリソースの問題で混合モデル群1602による少数モデル構成とする必要がある一方、「女性差別」についてはより適切な応答を出力したいというニーズがあった場合、混合モデル群1602と詳細モデル群1603に含まれる「女性」カテゴリー対応モデルを併用すればよい。
Furthermore, the present invention is not necessarily limited to the
以上説明した実施例3によれば、対話システムを動作させるハードウェアリソースの都合や特に重視したい有害カテゴリーがある場合に対応して、対話モデルの構成を任意に変更できる対話システムを提供することができる。 According to the third embodiment described above, it is possible to provide a dialogue system in which the configuration of the dialogue model can be arbitrarily changed depending on the availability of hardware resources for operating the dialogue system or when there is a harmful category that should be particularly emphasized. can.
なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 Note that the present invention is not limited to the embodiments described above, and includes various modifications. For example, the embodiments described above are described in detail to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to having all the configurations described. Furthermore, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace some of the configurations of each embodiment with other configurations.
また、上記の各構成、機能、処理部、処理ステップ等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。 Moreover, each of the above-mentioned configurations, functions, processing units, processing steps, etc. may be realized in part or in whole by hardware, for example, by designing an integrated circuit.
また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。 Further, the control lines and information lines are shown to be necessary for explanation purposes, and not all control lines and information lines are necessarily shown in the product. In reality, almost all components may be considered to be interconnected.
100 対話システム
101 有害カテゴリー1対応対話モデル
110 入力文
111 応答文
401 入力部
402 モデル管理部
403 有害性評価モデル
404 応答生成部
405 応答選択部
406 出力部
407 対話履歴管理部
408 対話モデル群
100
Claims (10)
前記サーバは、
前記情報処理装置から、入力データを受け付ける入力部と、
入力データによる攻撃対象ごとに、有害な入力データに対し安全な応答文を出力するよう学習され、入力データに対し、それぞれが応答文を生成する複数の対話モデルと、
前記複数の対話モデルによって生成された複数の応答文から、所定の基準に基づいて最も適切な応答文を選択して出力する応答選択部と、を備える
対話システム。 An interaction system comprising an information processing device and a server connected to the information processing device via a network,
The server is
an input unit that receives input data from the information processing device;
For each attack target using input data, multiple interaction models are trained to output safe response sentences to harmful input data, and each generates a response sentence in response to input data,
A dialogue system comprising: a response selection unit that selects and outputs the most appropriate response sentence from a plurality of response sentences generated by the plurality of dialogue models based on a predetermined criterion.
前記応答選択部は、
応答文が有害か否かを判定する有害性評価モデルを使用して前記複数の対話モデルが出力した複数の応答文のそれぞれの有害性スコアを算出し、
有害性スコアが所定の閾値未満、かつ、最も低い応答文を選択する
対話システム。 The dialogue system according to claim 1,
The response selection section includes:
Calculating the toxicity score of each of the plurality of response sentences output by the plurality of dialogue models using a toxicity evaluation model that determines whether the response sentence is harmful;
A dialogue system that selects a response sentence whose toxicity score is less than a predetermined threshold and the lowest.
前記複数の対話モデルのそれぞれは、
入力データによる攻撃対象ごとに、有害な入力データと入力データに対する安全な応答文で学習される
対話システム。 The dialogue system according to claim 1,
Each of the plurality of interaction models is
A dialogue system that learns from harmful input data and safe response sentences for each input data attack target.
前記サーバは、前記複数の対話モデルを作成するモデル管理部を有し、
前記モデル管理部は、
前記入力部から入力した入力データに対し有害性評価モデルを利用してアノテーションを実行し、
前記入力部から入力した入力データから、有害な入力データに対し安全な応答文が含まれる入力データを抽出し、
抽出した入力データを、前記攻撃対象ごと分類し、
分類された各入力データを利用して、汎用有害性対応対話モデルとしてベース対話モデルを追加学習し、
前記汎用有害性対応対話モデルを、当該攻撃対象に分類された入力データを利用して追加学習することで、攻撃対象ごとに攻撃対象対応対話モデルを生成する
対話システム。 The dialogue system according to claim 3,
The server includes a model management unit that creates the plurality of interaction models,
The model management department includes:
Executing annotation on the input data input from the input unit using a hazard evaluation model,
Extracting input data that includes a safe response sentence to harmful input data from the input data input from the input section,
The extracted input data is classified according to the attack target, and
Using each classified input data, the base interaction model is additionally trained as a general-purpose hazard response interaction model,
A dialogue system that generates an attack target compatible dialogue model for each attack target by additionally learning the general-purpose harmfulness compatible dialogue model using input data classified into the attack target.
前記応答選択部は、
入力データによる攻撃対象ごとに有害か否かを判定する複数の有害性評価モデルを使用して前記複数の対話モデルが出力した応答文の有害性スコアを算出し、
算出された有害性スコアが所定の閾値未満、かつ、最も低い応答文を選択する
対話システム。 The dialogue system according to claim 1,
The response selection section includes:
Calculating the harm score of the response sentences output by the plurality of dialogue models using a plurality of harm evaluation models that determine whether each attack target based on input data is harmful;
A dialogue system that selects a response sentence whose calculated harm score is less than a predetermined threshold and the lowest.
前記サーバは、
前記複数の応答文の攻撃対象ごとの有害性スコアを管理する有害性スコアテーブルと、
攻撃対象ごとの有害性スコアの閾値と重み係数を管理する閾値、重み係数管理テーブルとを、記憶する記憶デバイスを有し、
前記応答選択部は、
攻撃対象ごとに前記有害性スコアテーブルの有害性スコアと前記閾値、重み係数管理テーブルの閾値を比較することで、応答文の有害性を判断し、
有害性の判断で安全な応答文の内、攻撃対象ごとの重み係数に基づいて、最適な応答文を選択する
対話システム。 The dialogue system according to claim 5,
The server is
a toxicity score table for managing toxicity scores for each attack target of the plurality of response sentences;
It has a storage device that stores thresholds and weighting coefficient management tables for managing harmfulness score thresholds and weighting coefficients for each attack target,
The response selection section includes:
Determine the harmfulness of the response sentence by comparing the harmfulness score of the harmfulness score table with the threshold value and the threshold value of the weighting coefficient management table for each attack target,
A dialogue system that selects the optimal response sentence from among safe response sentences based on the weighting coefficient for each attack target.
前記複数の対話モデルは、
入力データによる攻撃対象をカテゴリーとして分類し、前記カテゴリーを複数混合した混合カテゴリーで分類された有害な入力データと該入力データに対する安全な応答文で学習されたものである
対話システム。 The dialogue system according to claim 4,
The plurality of interaction models are:
A dialogue system that classifies attack targets based on input data into categories, and learns from harmful input data classified into a mixed category that is a mixture of a plurality of the categories and safe responses to the input data.
前記入力部は、
前記複数の対話モデルに含まれる対話モデルのうち、使用する攻撃対象対応対話モデルを指定し、
前記モデル管理部は、指定された攻撃対象対応対話モデルを使用して入力データに対する応答文を生成する
対話システム。 The dialogue system according to claim 7,
The input section is
Specifying an attack target response interaction model to be used from among the interaction models included in the plurality of interaction models,
The model management unit is a dialogue system that generates a response sentence to input data using a designated attack target correspondence dialogue model.
前記入力デバイスにより入力された入力データによる攻撃対象ごとに、有害な入力データに対し安全な応答文を出力するよう学習され、前記入力データに対し、それぞれが応答文を生成する複数の対話モデルと
複数の応答文から所定の基準に基づいて応答文を選択して、前記出力デバイスに出力する応答選択部と、を備える
対話装置。 An interaction device having an input device that receives input data and an output device that outputs a response sentence,
A plurality of interaction models each of which is trained to output a safe response sentence to harmful input data for each attack target using the input data input by the input device, and each generates a response sentence in response to the input data. An interaction device comprising: a response selection unit that selects a response sentence from a plurality of response sentences based on a predetermined criterion and outputs the selected response sentence to the output device.
前記対話システムの複数の対話モデルは、
有害な入力データに対し安全な応答文を出力するよう学習されたものであり、
前記複数の対話モデルは、入力された入力データによる攻撃対象ごとに、前記入力データに対し、それぞれが応答文を生成し、
前記複数の対話モデルのそれぞれの応答文から、所定の基準に基づいて応答文を選択して出力する
対話方法。 A dialogue method using a dialogue system comprising an input part and an output part,
The plurality of dialogue models of the dialogue system are:
It has been trained to output safe responses to harmful input data,
Each of the plurality of interaction models generates a response sentence to the input data for each attack target based on the input data, and
A dialogue method that selects and outputs a response sentence based on a predetermined criterion from response sentences of each of the plurality of dialogue models.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022079113A JP2023167720A (en) | 2022-05-12 | 2022-05-12 | Dialogue device, dialogue system, and dialogue method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022079113A JP2023167720A (en) | 2022-05-12 | 2022-05-12 | Dialogue device, dialogue system, and dialogue method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023167720A true JP2023167720A (en) | 2023-11-24 |
Family
ID=88838285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022079113A Pending JP2023167720A (en) | 2022-05-12 | 2022-05-12 | Dialogue device, dialogue system, and dialogue method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023167720A (en) |
-
2022
- 2022-05-12 JP JP2022079113A patent/JP2023167720A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Rudkowsky et al. | More than bags of words: Sentiment analysis with word embeddings | |
US10460748B2 (en) | Conversational interface determining lexical personality score for response generation with synonym replacement | |
US10936664B2 (en) | Dialogue system and computer program therefor | |
US10878816B2 (en) | Persona-based conversational interface personalization using social network preferences | |
Shah et al. | Early depression detection from social network using deep learning techniques | |
CN111386520A (en) | Constructing incoherent nodes by overlaying on a basic knowledge graph | |
JP2021197133A (en) | Meaning matching method, device, electronic apparatus, storage medium, and computer program | |
US20170169355A1 (en) | Ground Truth Improvement Via Machine Learned Similar Passage Detection | |
WO2019159986A1 (en) | Information provision device, information provision method, and program | |
WO2021014249A1 (en) | Natural language response in machine assisted agents | |
CN112287085B (en) | Semantic matching method, system, equipment and storage medium | |
US20220147713A1 (en) | Social bias mitigation in textual models | |
JP2020135135A (en) | Dialog content creation assisting method and system | |
JP2021047817A (en) | Output device and output program | |
CN112579733A (en) | Rule matching method, rule matching device, storage medium and electronic equipment | |
JP2021022211A (en) | Inquiry response support device, inquiry response support method, program and recording medium | |
CN113360001A (en) | Input text processing method and device, electronic equipment and storage medium | |
Saha et al. | Emoji prediction using emerging machine learning classifiers for text-based communication | |
KR102507809B1 (en) | Artificial intelligence dialogue system for psychotherapy through consensus formation | |
JP2023167720A (en) | Dialogue device, dialogue system, and dialogue method | |
US11045340B2 (en) | Adding accessibility properties to a software application | |
JP2021512384A (en) | Quantum superposition and entanglement of social emotions and natural language generation | |
Herbert et al. | Comparative analysis of intelligent personal agent performance | |
JP7403023B1 (en) | Writing support system, writing support method and program | |
Dissanayake et al. | Enhancing conversational ai model performance and explainability for sinhala-english bilingual speakers |