JP7179714B2 - Explanation device, explanation method and explanation program - Google Patents
Explanation device, explanation method and explanation program Download PDFInfo
- Publication number
- JP7179714B2 JP7179714B2 JP2019239168A JP2019239168A JP7179714B2 JP 7179714 B2 JP7179714 B2 JP 7179714B2 JP 2019239168 A JP2019239168 A JP 2019239168A JP 2019239168 A JP2019239168 A JP 2019239168A JP 7179714 B2 JP7179714 B2 JP 7179714B2
- Authority
- JP
- Japan
- Prior art keywords
- word
- link
- importance
- value
- words
- 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.)
- Active
Links
Images
Landscapes
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、機械学習モデルによる分類結果の根拠を説明するための装置、方法及びプログラムに関する。 The present invention relates to an apparatus, method, and program for explaining the basis of classification results by machine learning models.
従来、例えば文章の内容がポジティブな内容であるかネガティブな内容であるかのような分類を行う際に、機械学習モデルを用いた分類手法が提供されている。ところが、機械学習モデルによる分類の仕組みは目に見えないため、分類結果から分類の要因を推測することは難しい。
そこで、分類結果に対して、分類の要因となった重要な要素を示すための手法が提案されている(例えば、非特許文献1~4参照)。
Conventionally, a classification method using a machine learning model has been provided for classifying, for example, whether the content of a sentence is positive or negative. However, because the mechanism of classification by a machine learning model is invisible, it is difficult to infer the classification factors from the classification results.
Therefore, methods have been proposed for indicating important factors that have contributed to the classification in the classification results (see, for example, Non-Patent
しかしながら、従来の手法では、単語それぞれの重要度は提供されるものの、単語の位置及び順序が考慮されないために、単語の組み合わせを根拠とする説明はできなかった。非特許文献4では文法的な関係性も考慮されるが、文法モデルに依存しており、柔軟性が不足していた。
However, although the conventional method provides the degree of importance of each word, it does not consider the position and order of the words, so it is not possible to provide an explanation based on the combination of words. Although grammatical relationships are also taken into account in Non-Patent
本発明は、機械学習モデルによる分類結果の根拠を適切に出力できる説明装置、説明方法及び説明プログラムを提供することを目的とする。 SUMMARY OF THE INVENTION An object of the present invention is to provide an explanation device, an explanation method, and an explanation program capable of appropriately outputting the grounds of classification results by a machine learning model.
本発明に係る説明装置は、連続した二つの単語の並びを固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である分類の予測値を、前記二つの単語の並びを示すリンク毎に、リンク別予測値として複数取得するリンク別予測値生成部と、一つの単語の位置を固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である分類の予測値を、前記単語毎に、単語別予測値として複数取得する単語別予測値生成部と、前記リンク毎に、前記リンク別予測値の相対的な大きさに基づいてリンク重要度を算出するリンク重要度算出部と、前記単語毎に、前記単語別予測値の相対的な大きさに基づいて単語重要度を算出する単語重要度算出部と、前記リンク重要度及び前記単語重要度に基づいて、連続した二つ以上の単語からなるコンポーネントを選択するコンポーネント選択部と、前記コンポーネントに関わる前記リンク重要度及び前記単語重要度に基づいて、当該コンポーネントの重要度を算出するコンポーネント重要度算出部と、を備える。 The explanation device according to the present invention inputs a text in which two consecutive words are randomly rearranged into a machine learning model after fixing the arrangement of two consecutive words, and calculates the classification prediction value as the result of inputting the text into the machine learning model. A link-by-link prediction value generator that obtains multiple prediction values by link for each link that indicates a sequence of two words, and a text in which the position of one word is fixed and other words are randomly rearranged. A word-by-word prediction value generating unit that obtains a plurality of classification prediction values, which are the results of inputting to the learning model, as word-by-word prediction values for each word, and a relative magnitude of the link-by-link prediction value for each link. a link importance calculation unit for calculating the link importance based on the degree of importance of the word; a word importance calculation unit for calculating the word importance based on the relative magnitude of the word-by-word prediction value for each word; a component selection unit that selects a component consisting of two or more consecutive words based on the link importance and the word importance; and a component importance calculation unit that calculates the importance.
前記リンク重要度算出部は、前記リンク重要度として、前記リンク別予測値の、前記リンク毎の平均値と全体の平均値との差分を正規化した値を算出し、前記単語重要度算出部は、前記単語重要度として、前記単語別予測値の、前記単語毎の平均値と全体の平均値との差分を正規化した値を算出してもよい。 The link importance calculation unit calculates, as the link importance, a value obtained by normalizing the difference between the average value for each link and the overall average value of the predicted values for each link, and the word importance calculation unit may calculate, as the word importance, a value obtained by normalizing the difference between the average value for each word and the overall average value of the word-by-word prediction values.
前記リンク重要度算出部は、前記リンク毎の平均値が前記全体の平均値以上である場合に、前記差分に対して、前記リンク別予測値のうち全体の平均値以上の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出し、前記リンク毎の平均値が前記全体の平均値未満である場合に、前記差分に対して、前記リンク別予測値のうち全体の平均値未満の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出し、前記単語重要度算出部は、前記単語毎の平均値が前記全体の平均値以上である場合に、前記差分に対して、前記単語別予測値のうち全体の平均値以上の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出し、前記単語毎の平均値が前記全体の平均値未満である場合に、前記差分に対して、前記単語別予測値のうち全体の平均値未満の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出してもよい。 When the average value for each link is equal to or greater than the overall average value, the link importance calculation unit calculates the standard deviation of the predicted value for each link that is equal to or greater than the overall average value for the difference. After dividing, a value obtained by multiplying the overall standard deviation is calculated, and if the average value for each link is less than the overall average value, the average of the link-specific predicted values for the difference After dividing by the standard deviation of the value less than the value, the value obtained by multiplying the overall standard deviation is calculated, and the word importance calculation unit calculates, when the average value for each word is equal to or greater than the overall average value, After dividing the difference by the standard deviation of the values above the overall average among the word-specific prediction values, the value obtained by multiplying the overall standard deviation is calculated, and the average value for each word is the overall value. If it is less than the average value, the difference may be divided by the standard deviation of the word-by-word prediction values that are less than the overall average value, and then multiplied by the overall standard deviation to calculate a value. .
前記コンポーネント選択部は、前記リンク重要度が当該リンクで関係づけられた二つの単語の前記単語重要度の平均を超えている場合に、当該リンクを前記コンポーネントの一部として選択してもよい。 The component selector may select the link as part of the component if the link importance exceeds an average of the word importance of two words related by the link.
前記コンポーネント選択部は、前記リンク重要度と、当該リンクで関係づけられた二つの単語の前記単語重要度の平均との合計が閾値を超えている場合に、当該リンクを前記コンポーネントの一部として選択してもよい。 The component selection unit selects the link as part of the component when the sum of the link importance and the average of the word importance of two words related by the link exceeds a threshold. You may choose.
前記説明装置は、前記コンポーネント、及び当該コンポーネントに含まれない単語のそれぞれを単位として、算出された重要度を出力する出力部を備えてもよい。 The explanation device may include an output unit that outputs the importance calculated for each of the components and words not included in the components.
本発明に係る説明方法は、連続した二つの単語の並びを固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である分類の予測値を、前記二つの単語の並びを示すリンク毎に、リンク別予測値として複数取得するリンク別予測値生成ステップと、一つの単語の位置を固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である分類の予測値を、前記単語毎に、単語別予測値として複数取得する単語別予測値生成ステップと、前記リンク毎に、前記リンク別予測値の相対的な大きさに基づいてリンク重要度を算出するリンク重要度算出ステップと、前記単語毎に、前記単語別予測値の相対的な大きさに基づいて単語重要度を算出する単語重要度算出ステップと、前記リンク重要度及び前記単語重要度に基づいて、連続した二つ以上の単語からなるコンポーネントを選択するコンポーネント選択ステップと、前記コンポーネントに関わる前記リンク重要度及び前記単語重要度に基づいて、当該コンポーネントの重要度を算出するコンポーネント重要度算出ステップと、をコンピュータが実行する。 In the explanation method according to the present invention, after fixing the sequence of two consecutive words, a text in which other words are randomly rearranged is input to a machine learning model, and the prediction value of the classification is calculated as the above two words. A link-by-link prediction value generation step of obtaining multiple prediction values by link for each link that indicates a sequence of two words, and a text in which the position of one word is fixed and other words are randomly rearranged are machine-generated. A word-by-word predicted value generation step of obtaining a plurality of predicted values of the classification that are the results of inputting to the learning model as word-by-word predicted values for each of the words; a link importance calculation step of calculating a link importance based on the degree of importance of each word; a word importance calculation step of calculating a word importance based on the relative magnitude of the word-by-word prediction value for each word; a component selection step of selecting a component consisting of two or more consecutive words based on the link importance and the word importance; and a component importance calculating step of calculating the importance.
本発明に係る説明プログラムは、前記説明装置としてコンピュータを機能させるためのものである。 An explanation program according to the present invention is for causing a computer to function as the explanation device.
本発明によれば、機械学習モデルによる分類結果の根拠を適切に出力できる。 ADVANTAGE OF THE INVENTION According to this invention, the basis of the classification result by a machine-learning model can be output appropriately.
以下、本発明の実施形態の一例について説明する。
本実施形態における説明方法では、学習済みの機械学習モデルに入力されたテキストの分類結果に対して、テキストの要素毎に重要度の値を割り当てることにより、この結果が導出された根拠が説明される。
この説明方法では、モデルの種類は限定されず、学習済みのモデルに対して出力結果の根拠を事後に説明することができる。
An example of an embodiment of the present invention will be described below.
In the explanation method of the present embodiment, by assigning an importance value to each text element for the classification result of the text input to the trained machine learning model, the basis for deriving this result is explained. be.
In this explanation method, the type of model is not limited, and the grounds for the output result can be explained after the fact for a trained model.
図1は、本実施形態における説明方法による提示例を従来の手法と比較して示す図である。
ポジティブ又はネガティブの意味解析を行う機械学習モデルでは、例えば、「This movie is not bad」という入力テキストに対して、従来は、各単語「This」、「movie」、「is」、「not」、「bad」に対して重要度が計算されていた。この例では、「not」に対して「Medium-importance - negative」という説明が、「bad」に対して「High-importance - negative」という説明がされ、他の単語に比べて重要であることが示されている。
FIG. 1 is a diagram showing a presentation example according to the explanation method of this embodiment in comparison with a conventional method.
In a machine learning model that performs positive or negative semantic analysis, for example, for an input text "This movie is not bad", each word "This", "movie", "is", "not", Importance was calculated for "bad". In this example, ``not'' is explained as ``Medium-importance-negative'', and ``bad'' is explained as ``High-importance-negative''. It is shown.
ところが、「not bad」という単語の並びは、意味的にはポジティブであり、機械学習モデルによる分類結果もポジティブとなる。
本実施形態では、複数の単語からなるコンポーネントを導入し、コンポーネントの単位での重要度が提示される。この例では、「not bad」に対して、「High-importance - positive」という説明がされている。
However, the sequence of words "not bad" is semantically positive, and the classification result by the machine learning model is also positive.
In this embodiment, a component consisting of a plurality of words is introduced, and the importance of each component is presented. In this example, "high-importance-positive" is given for "not bad".
本実施形態では、テキストを複数の単語に分割した際に、連続する単語間の関係をリンクと呼び、後述の手法により重要と判定された一つ以上のリンクで関係付けられた複数の単語がコンポーネントを構成する。 In this embodiment, when a text is divided into a plurality of words, the relationship between consecutive words is called a link, and a plurality of words related by one or more links determined to be important by a method described later are configure components;
図2は、本実施形態における説明装置1の機能構成を示す図である。
説明装置1は、サーバ装置又はパーソナルコンピュータ等の情報処理装置(コンピュータ)であり、制御部10及び記憶部20の他、各種データの入出力デバイス及び通信デバイス等を備える。
FIG. 2 is a diagram showing the functional configuration of the
The
制御部10は、説明装置1の全体を制御する部分であり、記憶部20に記憶された各種プログラムを適宜読み出して実行することにより、本実施形態における各機能を実現する。制御部10は、CPUであってよい。
The
記憶部20は、ハードウェア群を説明装置1として機能させるための各種プログラム、及び各種データ等の記憶領域であり、ROM、RAM、フラッシュメモリ又はハードディスクドライブ(HDD)等であってよい。具体的には、記憶部20は、本実施形態の各機能を制御部10に実行させるためのプログラム(説明プログラム)、及び対象の機械学習モデル等を記憶する。
The
制御部10は、リンク別予測値生成部11と、単語別予測値生成部12と、リンク重要度算出部13と、単語重要度算出部14と、コンポーネント選択部15と、コンポーネント重要度算出部16と、出力部17とを備える。説明装置1は、これらの機能部により、機械学習モデルによる分類結果を説明する情報を生成し、ユーザに提供する。
The
リンク別予測値生成部11は、学習済みの機械学習モデルに入力されたテキストについて、連続した二つの単語の並びを固定した上で、他の単語がランダムに再配置されたテキストを同一の機械学習モデルに入力した結果である分類の予測値を、二つの単語の並びを示すリンク毎に、リンク別予測値として複数取得する。
The link-by-link prediction
単語別予測値生成部12は、一つの単語の位置を固定した上で、他の単語がランダムに再配置されたテキストを同一の機械学習モデルに入力した結果である分類の予測値を、単語毎に、単語別予測値として複数取得する。
The word-by-word prediction
ここで、ポジティブ又はネガティブ等の予測値は、数値で出力されることとし、例えば、ポジティブであればプラスの値でその度合いを示し、ネガティブであればマイナスの値でその度合いを示すものであってよい。 Here, the predicted value such as positive or negative is output as a numerical value. For example, if it is positive, the degree is indicated by a positive value, and if it is negative, the degree is indicated by a negative value. you can
リンク重要度算出部13は、リンク毎に、リンク別予測値の相対的な大きさに基づいてリンク重要度を算出する。すなわち、リンクを維持して再配置されたテキストによる予測値の絶対値が相対的に大きい場合、元のテキストの分類結果に対してこのリンクが大きく貢献していると考えられるため、重要度が大きく算出される。
The
例えば、リンク重要度算出部13は、リンク重要度として、リンク別予測値の、リンク毎の平均値と全体の平均値との差分を正規化した値を算出する。
具体的には、リンク重要度算出部13は、リンク毎の平均値が全体の平均値以上である場合に、差分に対して、リンク別予測値のうち全体の平均値以上の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出する。同様に、リンク重要度算出部13は、リンク毎の平均値が全体の平均値未満である場合に、差分に対して、リンク別予測値のうち全体の平均値未満の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出する。
For example, the
Specifically, when the average value for each link is equal to or greater than the overall average value, the link
単語重要度算出部14は、単語毎に、単語別予測値の相対的な大きさに基づいて単語重要度を算出する。すなわち、単語の位置を維持して再配置されたテキストによる予測値の絶対値が相対的に大きい場合、元のテキストの分類結果に対してこの単語が大きく貢献していると考えられるため、重要度が大きく算出される。
The word
例えば、単語重要度算出部14は、単語重要度として、単語別予測値の、単語毎の平均値と全体の平均値との差分を正規化した値を算出する。
具体的には、単語重要度算出部14は、単語毎の平均値が全体の平均値以上である場合に、差分に対して、単語別予測値のうち全体の平均値以上の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出する。同様に、単語重要度算出部14は、単語毎の平均値が全体の平均値未満である場合に、差分に対して、単語別予測値のうち全体の平均値未満の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出する。
For example, the word
Specifically, when the average value for each word is equal to or greater than the overall average value, the word
コンポーネント選択部15は、リンク重要度及び単語重要度に基づいて、連続した二つ以上の単語からなるコンポーネントを選択する。
具体的には、コンポーネント選択部は、例えば、あるリンクのリンク重要度がこのリンクで関係づけられた二つの単語の単語重要度の平均を超えている場合に、このリンクをコンポーネントの一部として選択する。
また、コンポーネント選択部15は、例えば、あるリンクのリンク重要度と、このリンクで関係づけられた二つの単語の単語重要度の平均との合計が閾値を超えている場合に、このリンクをコンポーネントの一部として選択する。
The
Specifically, the component selector selects a link as part of a component if, for example, the link importance of a link exceeds the average of the word importance of two words related by this link. select.
For example, when the sum of the link importance of a certain link and the average of the word importance of two words related by this link exceeds a threshold, the
ここで、一つのリンクが選択されると、このリンクで関係付けられた二つの単語からなるコンポーネントが構成され、連続する二つのリンクが選択されると、これらのリンクで関係付けられた三つの単語からなるコンポーネントが構成される。このように、コンポーネントは、二つ以上の連続した単語から構成される。 Here, when a link is selected, a component consisting of two words related by this link is constructed, and when two consecutive links are selected, three words related by these links are constructed. Components consisting of words are constructed. Thus, a component consists of two or more consecutive words.
コンポーネント重要度算出部16は、コンポーネントに関わるリンク重要度及び単語重要度に基づいて、このコンポーネントの重要度を算出する。
The
出力部17は、選択されたコンポーネント、及びいずれのコンポーネントにも含まれない単語のそれぞれを単位として、算出された重要度をディスプレイ等に出力することにより、ユーザに提示する。
The
次に、説明装置1による処理の内容を詳述する。
図3~7は、本実施形態における説明装置1による処理の流れを例示するフローチャートである。
Next, the contents of processing by the
3 to 7 are flowcharts illustrating the flow of processing by the
予め、機械学習モデルによる予測値を格納するための配列LinkPred及びLinkHashmap[Key]が用意される。ただし、Keyは、元のテキストにおけるリンクの順番を示すインデックスであり、テキストの単語数nに対して、Key=0,1,…,n-2である。
同様に、配列FeaturePred及びFeatureHashmap[Key]が用意される。ただし、Keyは、元のテキストにおける単語の順番を示すインデックスであり、テキストの単語数nに対して、Key=0,1,…,n-1である。
Arrays LinkPred and LinkHashmap[Key] for storing values predicted by the machine learning model are prepared in advance. However, Key is an index indicating the order of links in the original text, and Key=0, 1, .
Similarly, arrays FeaturePred and FeatureHashmap[Key] are provided. However, Key is an index indicating the order of words in the original text, and Key=0, 1, .
また、パラメータとして、リンク別予測値のサンプルを取得するためのループ回数、及び単語別予測値のサンプルを取得するためのループ回数がそれぞれ、ユーザから指定される。 As parameters, the user designates the number of loops for acquiring the samples of the prediction values for each link and the number of loops for acquiring the samples of the prediction values for each word.
ステップS1において、リンク別予測値生成部11は、元のテキストに含まれるリンクを順に一つ選択する。選択されたリンクのインデックスをiとする。
ステップS2において、リンク別予測値生成部11は、予めパラメータにより指定されたループ回数だけ以下のステップS3~S4を繰り返し実行する。
In step S1, the link-by-link
In step S2, the link-by-link predicted
ステップS3において、リンク別予測値生成部11は、ステップS1で選択されたリンクにより関係付けられた二つの単語の並びを固定し、他の単語をランダムに再配置したテキストを生成する。
例えば、「this movie is not bad」に対して、インデックスi=3のリンク、すなわち「not bad」という単語の並びが固定されると、「not bad this is movie」、「movie not bad is this」等のテキストが生成される。
In step S3, the link-by-link
For example, for "this movie is not bad", if the link with index i=3, that is, the string of words "not bad" is fixed, then "not bad this is movie", "movie not bad is this" text is generated.
ステップS4において、リンク別予測値生成部11は、ステップS3で生成されたテキストを機械学習モデルに入力し、出力をリンク別予測値として取得する。
このリンク別予測値は、LinkPred及びLinkHashmap[i]に格納される。
In step S4, the link-by-link predicted
This predicted value for each link is stored in LinkPred and LinkHashmap[i].
ステップS5において、リンク別予測値生成部11は、全てのリンクを選択したか否かを判定する。この判定がYESの場合、処理はステップS6に移り、判定がNOの場合、処理はステップS1に移る。
In step S5, the link-by-link predicted
ステップS6において、単語別予測値生成部12は、元のテキストに含まれる単語を順に一つ選択する。選択された単語のインデックスをiとする。
ステップS7において、単語別予測値生成部12は、予めパラメータにより指定されたループ回数だけ以下のステップS8~S9を繰り返し実行する。
In step S6, the word-by-word
In step S7, the word-by-word
ステップS8において、単語別予測値生成部12は、ステップS6で選択された単語の位置を固定し、他の単語をランダムに再配置したテキストを生成する。
例えば、「this movie is not bad」に対して、インデックスi=3の単語「not」という単語の位置が固定されると、「movie is bad not this」、「bad this is not movie」等のテキストが生成される。
In step S8, the word-by-word
For example, for "this movie is not bad", if the position of the word "not" with index i=3 is fixed, the text "movie is bad not this", "bad this is not movie", etc. is generated.
ステップS9において、単語別予測値生成部12は、ステップS8で生成されたテキストを機械学習モデルに入力し、出力を単語別予測値として取得する。
この単語別予測値は、FeaturePred及びFeatureHashmap[i]に格納される。
In step S9, the word-by-word predicted
This word-by-word prediction value is stored in FeaturePred and FeatureHashmap[i].
ステップS10において、単語別予測値生成部12は、全ての単語を選択したか否かを判定する。この判定がYESの場合、処理はステップS11に移り、判定がNOの場合、処理はステップS6に移る。
In step S10, the word-by-word
ステップS11において、リンク重要度算出部13は、LinkPredに格納されたリンク別予測値のうち、平均値未満の値の分散Lvar、及び平均値以上の値の分散Uvarをそれぞれ算出する。
In step S11, the link
ステップS12において、リンク重要度算出部13は、元のテキストに含まれるリンクを順に一つ選択する。選択されたリンクのインデックスをiとする。
ステップS13において、リンク重要度算出部13は、LinkHashmap[i]に含まれる予測値の平均値がLinkPredに含まれる予測値の平均値より小さいか否かを判定する。この判定がYESの場合、処理はステップS14に移り、判定がNOの場合、処理はステップS15に移る。
In step S12, the
In step S13, the link
ステップS14において、リンク重要度算出部13は、インデックスがiのリンクの重みを、Lvarを用いて、
ステップS15において、リンク重要度算出部13は、インデックスがiのリンクの重みを、Uvarを用いて、
ステップS16において、リンク重要度算出部13は、全てのリンクを選択したか否かを判定する。この判定がYESの場合、処理はステップS17に移り、判定がNOの場合、処理はステップS12に移る。
In step S16, the
ステップS17において、単語重要度算出部14は、FeaturePredに格納された単語別予測値のうち、平均値未満の値の分散Lvar、及び平均値以上の値の分散Uvarをそれぞれ算出する。
In step S17, the word
ステップS18において、単語重要度算出部14は、元のテキストに含まれる単語を順に一つ選択する。選択された単語のインデックスをiとする。
ステップS19において、単語重要度算出部14は、FeatureHashmap[i]に含まれる予測値の平均値がFeaturePredに含まれる予測値の平均値より小さいか否かを判定する。この判定がYESの場合、処理はステップS20に移り、判定がNOの場合、処理はステップS21に移る。
In step S18, the
In step S19, the
ステップS20において、単語重要度算出部14は、インデックスがiの単語の重みを、Lvarを用いて、
ステップS21において、単語重要度算出部14は、インデックスがiの単語の重みを、Uvarを用いて、
ステップS22において、単語重要度算出部14は、全ての単語を選択したか否かを判定する。この判定がYESの場合、処理はステップS23に移り、判定がNOの場合、処理はステップS18に移る。
In step S22, the
ステップS23において、コンポーネント選択部15は、元のテキストに含まれるリンクを順に一つ選択する。選択されたリンクのインデックスをiとする。
In step S23, the
ステップS24において、コンポーネント選択部15は、インデックスがiのリンクで関係付けられている両側の二つの単語、すなわち、インデックスがi及びi+1の単語それぞれの重要度の絶対値の平均値を算出する。
In step S24, the
ここで、インデックスがiの単語の重要度は、前述した単語の重みFeatureWeight「i」に、FeaturePredに格納された単語別予測値の全体の標準偏差FeatureDevを乗じた値である。
また、単語の重要度と同様に、インデックスがiのリンクの重要度についても、前述したリンクの重みLinkWeight「i」に、LinkPredに格納されたリンク別予測値の全体の標準偏差LinkDevを乗じた値と定義する。
Here, the importance of a word with an index of i is a value obtained by multiplying the word weight FeatureWeight "i" described above by the overall standard deviation FeatureDev of the word-by-word prediction values stored in FeaturePred.
As with the importance of words, the importance of a link with an index of i is obtained by multiplying the above-mentioned link weight LinkWeight "i" by the overall standard deviation LinkDev of the predicted values for each link stored in LinkPred. defined as a value.
ステップS25において、コンポーネント選択部15は、インデックスがiのリンクの重要度の絶対値がステップS24で算出された平均値より大きいか否かを判定する。この判定がYESの場合、すなわち、
abs(LinkWeight[i])×LinkDev>mean(abs(FeatureWeight[i]),abs(FeatureWeight[i+1]))×FeatureDev
の場合、処理はステップS27に移り、判定がNOの場合、処理はステップS26に移る。
In step S25, the
abs(LinkWeight[i])*LinkDev>mean(abs(FeatureWeight[i]), abs(FeatureWeight[i+1]))*FeatureDev
If , the process moves to step S27, and if the determination is NO, the process moves to step S26.
ステップS26において、コンポーネント選択部15は、インデックスがiのリンクの重要度と、このリンクで関係付けられている二つの単語、すなわち、インデックスがi及びi+1の単語それぞれの重要度の平均値との和の絶対値が閾値より大きいか否かを判定する。
例えば、コンポーネント選択部15は、Linkweight及びFeatureWeightのそれぞれに標準偏差LinkDev及びFeatureDevを加算した値を用いて、
abs(mean(FeatureWeight[i],FeatureWeight[i+1])×FeatureDev+LinkWeight[i]×LinkDev)>LinkDev×(LinkDev+abs(mean(LinkWeight)))+FeatureDev×(FeatureDev+abs(mean(FeatureWeight)))
が成り立つか否かを判定する。この判定がYESの場合、処理はステップS27に移り、判定がNOの場合、処理はステップS28に移る。
In step S26, the
For example, the
abs(mean(FeatureWeight[i], FeatureWeight[i+1])*FeatureDev+LinkWeight[i]*LinkDev)>LinkDev*(LinkDev+abs(mean(LinkWeight)))+FeatureDev*(FeatureDev+abs(FeatureWeight)(FeatureWeight)(FeatureDev)
is established. If the determination is YES, the process moves to step S27, and if the determination is NO, the process moves to step S28.
ステップS27において、コンポーネント選択部15は、インデックスがiのリンクが重要と判断し、コンポーネントを構成するリンクとして記憶する。
In step S27, the
ステップS28において、コンポーネント選択部15は、全てのリンクを選択したか否かを判定する。この判定がYESの場合、処理はステップS29に移り、判定がNOの場合、処理はステップS23に移る。
In step S28, the
ステップS29において、コンポーネント選択部15は、ステップS27で記憶された重要なリンクにより関係付けられた複数の連続した単語をコンポーネントとして選択する。このとき、重要なリンクが連続している場合、三つ以上の単語からなるコンポーネントが選択される。
In step S29, the
ステップS30において、コンポーネント重要度算出部16は、ステップS29において選択されたコンポーネントのそれぞれに対して、例えば、次式により重要度Iを算出する。
また、Eは、コンポーネントの両端の単語とその外側とを関係付けるリンクのインデックス集合である。|E|は、Eの要素数を示し、コンポーネントがテキストの始め又は終わりに位置する場合は1となり、その他の場合は2となる。
In step S30, the
Also, E is an index set of links that relate the words at both ends of the component to the outside thereof. |E| indicates the number of elements in E and is 1 if the component is located at the beginning or end of the text, 2 otherwise.
ステップS31において、出力部は、選択されたコンポーネント、及びコンポーネントに含まれない単語のそれぞれを、算出された重要度と共に分けて表示することでユーザに提示する。これにより、機械学習モデルによる分類結果の根拠として、入力テキストを構成する重要な単語又はコンポーネントが示される。 In step S31, the output unit presents the selected component and words not included in the component to the user by separately displaying them together with the calculated importance. This indicates the important words or components that make up the input text as the basis for the classification results of the machine learning model.
本実施形態によれば、説明装置1は、連続した二つの単語の並びを固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果であるリンク別予測値と、一つの単語の位置を固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である単語別予測値とを取得する。そして、説明装置1は、リンク別予測値の相対的な大きさ及び単語別予測値の相対的な大きさに基づいて算出されるリンク重要度及び単語重要度に基づいて、連続した二つ以上の単語からなるコンポーネントを選択し、リンク重要度及び前記単語重要度に基づいて、コンポーネントの重要度を算出する。
According to the present embodiment, the
したがって、説明装置1は、固定された単語又はリンクを共通して持つ複数のテキストを用いて予測値のサンプルを収集することにより、この単語又はリンクの分類結果への貢献度合いを示す重要度を算出できる。そして、リンクの重要度が算出されることにより、複数の単語から構成されるコンポーネントが発見され、さらに、このコンポーネントの重要度が算出される。
この結果、説明装置1は、どのように動作しているか分からないブラックボックスである機械学習モデルに対して、テキストの分類結果の根拠として、単一の単語の重要度と共に、複合して意味を持つコンポーネントの重要度を示すことができ、機械学習モデルによる分類結果の根拠を適切に出力できる。
Therefore, the
As a result, the
また、説明装置1は、リンク又は単語の重要度として、収集した予測値のリンク又は単語毎の平均値と全体の平均値との差分を正規化して算出する。
これにより、説明装置1は、予測値の分布による影響を抑制し、適切にリンク及び単語を評価できる。
In addition, the
As a result, the
このとき、説明装置1は、リンク又は単語の重要度として、リンク又は単語毎の予測値の平均値が全体の平均値以上であるか、又は平均値未満であるかによって、差分をそれぞれの範囲での標準偏差で除した後、全体の標準偏差を乗じて正規化する。これにより、説明装置1は、ポジティブ又はネガティブ等の両分類における重要度を適切に評価できる。
At this time, the
説明装置1は、リンク重要度がこのリンクで関係づけられた二つの単語の単語重要度の平均を超えている場合に、このリンクを重要と判断し、コンポーネントの一部として選択する。
単語を固定するよりも、リンクを固定した際の重要度が大きく算出されていることから、リンクで示される単語の並びが重要であることは明らかであり、説明装置1は、このようなリンクを含むコンポーネントを適切に選択できる。
The
Since the degree of importance when the link is fixed is calculated to be higher than when the word is fixed, it is clear that the order of the words indicated by the link is important. can appropriately select components that contain
説明装置1は、リンク重要度と、このリンクで関係づけられた二つの単語の単語重要度の平均との合計が閾値を超えている場合に、このリンクをコンポーネントの一部として選択する。
リンク及び単語の全体としての重要度が所定以上となれば、この組み合わせとしてのコンポーネントが重要であることは明らかであり、説明装置1は、このようなコンポーネントを適切に選択できる。
The
If the overall importance of the link and word exceeds a predetermined level, it is clear that the component as this combination is important, and the
説明装置1は、選択されたコンポーネント、及びいずれのコンポーネントにも含まれない単語のそれぞれを単位として、算出された重要度をディスプレイに表示する等して出力する。これにより、説明装置1は、機械学習モデルによる分類結果の根拠として、重要なコンポーネントと、単独で重要な単語とを分かりやすく適切にユーザに提示することができる。
The
以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述した実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Moreover, the effects described in the above-described embodiments are merely enumerations of the most suitable effects produced by the present invention, and the effects of the present invention are not limited to those described in the embodiments.
説明装置1によるリスク説明方法は、ソフトウェアにより実現される。ソフトウェアによって実現される場合には、このソフトウェアを構成するプログラムが、情報処理装置(コンピュータ)にインストールされる。また、これらのプログラムは、CD-ROMのようなリムーバブルメディアに記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。さらに、これらのプログラムは、ダウンロードされることなくネットワークを介したWebサービスとしてユーザのコンピュータに提供されてもよい。
The risk explanation method by the
1 説明装置
10 制御部
11 リンク別予測値生成部
12 単語別予測値生成部
13 リンク重要度算出部
14 単語重要度算出部
15 コンポーネント選択部
16 コンポーネント重要度算出部
17 出力部
20 記憶部
1
Claims (8)
一つの単語の位置を固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である分類の予測値を、前記単語毎に、単語別予測値として複数取得する単語別予測値生成部と、
前記リンク毎に、前記リンク別予測値の相対的な大きさに基づいてリンク重要度を算出するリンク重要度算出部と、
前記単語毎に、前記単語別予測値の相対的な大きさに基づいて単語重要度を算出する単語重要度算出部と、
前記リンク重要度及び前記単語重要度に基づいて、連続した二つ以上の単語からなるコンポーネントを選択するコンポーネント選択部と、
前記コンポーネントに関わる前記リンク重要度及び前記単語重要度に基づいて、当該コンポーネントの重要度を算出するコンポーネント重要度算出部と、を備える説明装置。 After fixing the sequence of two consecutive words, the prediction value of the classification, which is the result of inputting the text in which other words are randomly rearranged into the machine learning model, is calculated for each link that indicates the sequence of the two words. a prediction value generation unit for each link that acquires multiple prediction values for each link;
After fixing the position of one word, a text in which other words are randomly rearranged is input to a machine learning model, and a plurality of classification prediction values are obtained for each word as word-specific prediction values. a word-by-word prediction value generator that
a link importance calculation unit that calculates a link importance based on the relative magnitude of the link-by-link predicted value for each of the links;
a word importance calculation unit for calculating a word importance based on the relative magnitude of the word-by-word prediction value for each word;
a component selection unit that selects a component consisting of two or more consecutive words based on the link importance and the word importance;
and a component importance calculator that calculates the importance of the component based on the link importance and the word importance related to the component.
前記単語重要度算出部は、前記単語重要度として、前記単語別予測値の、前記単語毎の平均値と全体の平均値との差分を正規化した値を算出する請求項1に記載の説明装置。 The link importance calculation unit calculates, as the link importance, a value obtained by normalizing the difference between the average value for each link and the overall average value of the predicted values for each link,
2. The explanation according to claim 1, wherein the word importance calculation unit calculates, as the word importance, a value obtained by normalizing a difference between the average value for each word and the overall average value of the word-by-word prediction values. Device.
前記リンク毎の平均値が前記全体の平均値以上である場合に、前記差分に対して、前記リンク別予測値のうち全体の平均値以上の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出し、
前記リンク毎の平均値が前記全体の平均値未満である場合に、前記差分に対して、前記リンク別予測値のうち全体の平均値未満の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出し、
前記単語重要度算出部は、
前記単語毎の平均値が前記全体の平均値以上である場合に、前記差分に対して、前記単語別予測値のうち全体の平均値以上の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出し、
前記単語毎の平均値が前記全体の平均値未満である場合に、前記差分に対して、前記単語別予測値のうち全体の平均値未満の値の標準偏差で除した後、全体の標準偏差を乗じた値を算出する請求項2に記載の説明装置。 The link importance calculation unit
When the average value for each link is greater than or equal to the overall average value, the difference is divided by the standard deviation of the values greater than or equal to the overall average value among the link-specific prediction values, and then the overall standard deviation Calculate the value multiplied by
When the average value for each link is less than the overall average value, the difference is divided by the standard deviation of the values less than the overall average value among the link-specific predicted values, and then the overall standard deviation Calculate the value multiplied by
The word importance calculation unit
When the average value for each word is greater than or equal to the overall average value, the difference is divided by the standard deviation of the word-specific prediction value greater than or equal to the overall average value, and then the overall standard deviation Calculate the value multiplied by
When the average value for each word is less than the overall average value, the difference is divided by the standard deviation of the word-specific prediction value that is less than the overall average value, and then the overall standard deviation 3. The explanation device according to claim 2, wherein the value obtained by multiplying the .
一つの単語の位置を固定した上で、他の単語がランダムに再配置されたテキストを機械学習モデルに入力した結果である分類の予測値を、前記単語毎に、単語別予測値として複数取得する単語別予測値生成ステップと、
前記リンク毎に、前記リンク別予測値の相対的な大きさに基づいてリンク重要度を算出するリンク重要度算出ステップと、
前記単語毎に、前記単語別予測値の相対的な大きさに基づいて単語重要度を算出する単語重要度算出ステップと、
前記リンク重要度及び前記単語重要度に基づいて、連続した二つ以上の単語からなるコンポーネントを選択するコンポーネント選択ステップと、
前記コンポーネントに関わる前記リンク重要度及び前記単語重要度に基づいて、当該コンポーネントの重要度を算出するコンポーネント重要度算出ステップと、をコンピュータが実行する説明方法。 After fixing the sequence of two consecutive words, the prediction value of the classification, which is the result of inputting the text in which other words are randomly rearranged into the machine learning model, is calculated for each link that indicates the sequence of the two words. a predicted value generation step for each link that acquires a plurality of predicted values for each link;
After fixing the position of one word, a text in which other words are randomly rearranged is input to a machine learning model, and a plurality of classification prediction values are obtained for each word as word-specific prediction values. a word-by-word prediction value generation step for
a link importance calculation step of calculating a link importance based on the relative magnitude of the link-by-link predicted value for each of the links;
a word importance calculation step of calculating word importance based on the relative magnitude of the word-by-word prediction value for each word;
a component selection step of selecting a component consisting of two or more consecutive words based on the link importance and the word importance;
and a component importance calculating step of calculating the importance of the component based on the link importance and the word importance related to the component.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019239168A JP7179714B2 (en) | 2019-12-27 | 2019-12-27 | Explanation device, explanation method and explanation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019239168A JP7179714B2 (en) | 2019-12-27 | 2019-12-27 | Explanation device, explanation method and explanation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2021108012A JP2021108012A (en) | 2021-07-29 |
| JP7179714B2 true JP7179714B2 (en) | 2022-11-29 |
Family
ID=76968244
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019239168A Active JP7179714B2 (en) | 2019-12-27 | 2019-12-27 | Explanation device, explanation method and explanation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7179714B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2023183312A (en) * | 2022-06-15 | 2023-12-27 | 株式会社日立製作所 | Text generation device and text generation method |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012088853A (en) | 2010-10-18 | 2012-05-10 | Nippon Telegr & Teleph Corp <Ntt> | Document classification device and program |
| JP2018194881A (en) | 2017-05-12 | 2018-12-06 | 株式会社日立製作所 | Document classification system and document classification method |
-
2019
- 2019-12-27 JP JP2019239168A patent/JP7179714B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2012088853A (en) | 2010-10-18 | 2012-05-10 | Nippon Telegr & Teleph Corp <Ntt> | Document classification device and program |
| JP2018194881A (en) | 2017-05-12 | 2018-12-06 | 株式会社日立製作所 | Document classification system and document classification method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2021108012A (en) | 2021-07-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Koh et al. | An empirical survey on long document summarization: Datasets, models, and metrics | |
| de la Torre-López et al. | Artificial intelligence to automate the systematic review of scientific literature | |
| Li et al. | Pseudo relevance feedback with deep language models and dense retrievers: Successes and pitfalls | |
| Zhou et al. | A machine learning approach to customer needs analysis for product ecosystems | |
| Moreno et al. | Talmud: transfer learning for multiple domains | |
| Foithong et al. | Feature subset selection wrapper based on mutual information and rough sets | |
| Thornton et al. | Auto-WEKA: Combined selection and hyperparameter optimization of classification algorithms | |
| US11288453B1 (en) | Key-word identification | |
| Ding et al. | Decision support for personalized cloud service selection through multi-attribute trustworthiness evaluation | |
| Song et al. | Hierarchical context enabled recurrent neural network for recommendation | |
| Lebret | Word embeddings for natural language processing | |
| JP2025003667A (en) | How content is categorized | |
| Geng et al. | The impact of large language models in academia: from writing to speaking | |
| Guàrdia-Sebaoun et al. | Latent trajectory modeling: A light and efficient way to introduce time in recommender systems | |
| US20170309194A1 (en) | Personalized learning based on functional summarization | |
| Dalip et al. | Quality assessment of collaborative content with minimal information | |
| US20220004717A1 (en) | Method and system for enhancing document reliability to enable given document to receive higher reliability from reader | |
| Malberg et al. | FELIX: Automatic and interpretable feature engineering using llms | |
| O’Riain et al. | Effects of expertise assessment on the quality of task routing in human computation | |
| CN114036944A (en) | Method and apparatus for multi-label classification of text data | |
| JP7179714B2 (en) | Explanation device, explanation method and explanation program | |
| Zhang et al. | Generalization error bounds for two-stage recommender systems with tree structure | |
| JP6899973B2 (en) | Semantic relationship learning device, semantic relationship learning method, and semantic relationship learning program | |
| JPWO2015040860A1 (en) | Classification dictionary generation device, classification dictionary generation method, and program | |
| Darraz et al. | Detecting trending products through moving average and sentiment analysis |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211130 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221028 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20221108 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221116 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7179714 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |