Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7175244B2 - Classification device, learning device, classification method and program - Google Patents
[go: Go Back, main page]

JP7175244B2 - Classification device, learning device, classification method and program - Google Patents

Classification device, learning device, classification method and program Download PDF

Info

Publication number
JP7175244B2
JP7175244B2 JP2019140113A JP2019140113A JP7175244B2 JP 7175244 B2 JP7175244 B2 JP 7175244B2 JP 2019140113 A JP2019140113 A JP 2019140113A JP 2019140113 A JP2019140113 A JP 2019140113A JP 7175244 B2 JP7175244 B2 JP 7175244B2
Authority
JP
Japan
Prior art keywords
document data
word
text
classification
calculation unit
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
Application number
JP2019140113A
Other languages
Japanese (ja)
Other versions
JP2021022317A (en
Inventor
ソン ホアン コック グエン
フン タオ トラン
晋作 清本
清良 披田野
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.)
KDDI Corp
Original Assignee
KDDI Corp
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 KDDI Corp filed Critical KDDI Corp
Priority to JP2019140113A priority Critical patent/JP7175244B2/en
Publication of JP2021022317A publication Critical patent/JP2021022317A/en
Application granted granted Critical
Publication of JP7175244B2 publication Critical patent/JP7175244B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Description

本発明は、敵対的テキストを検出するための装置に関する。 The present invention relates to a device for detecting hostile text.

従来、機械学習に基づく分類システムが利用されているが、このような分類システムに対して、敵対的テキストを使用して誤分類を誘発する攻撃が知られている。攻撃者は、元の意味を保持した上でコンピュータにより生成された敵対的テキストを使用する。このような敵対的テキストは、質疑応答、感情分析等のAIシステムを欺き、例えば、否定的なラベルから肯定的なラベルへ結果を変えるといった誤分類を誘発する。
したがって、分類システムに入力されるテキストの中から、コンピュータにより生成された敵対的テキストを検出する方法が望まれている。例えば、非特許文献1~7において、コンピュータにより生成されたテキストを検出する方法が提案されている。
Conventionally, classification systems based on machine learning have been utilized, and attacks against such classification systems using hostile text to induce misclassification are known. The attacker uses computer-generated adversarial text while preserving the original meaning. Such adversarial text fools AI systems such as Q&A, sentiment analysis, etc., and induces misclassification, eg changing results from negative to positive labels.
Therefore, a method for detecting hostile computer-generated text in text input to a classification system is desired. For example, Non-Patent Documents 1-7 propose methods for detecting computer-generated text.

Hoang-Quoc Nguyen-Son, Tran Phuong Thao, Seira Hidano, and Shinsaku Kiyomoto, “Detecting machine-translated paragraphs by matching similar words”. In: the 20th International Conference on Computational Linguistics and Intelligent Text Processing (CICLING), 2019.Hoang-Quoc Nguyen-Son, Tran Phuong Thao, Seira Hidano, and Shinsaku Kiyomoto, "Detecting machine-translated paragraphs by matching similar words". In: the 20th International Conference on Computational Linguistics and Intelligent Text Processing (CICLING), 2019. Hoang-Quoc Nguyen-Son, Huy H. Nguyen, Ngoc-Dung T. Tieu, Junichi Yamagishi, and Isao Echizen, “Identifying computer-generated paragraphs using coherence and fluency features”. In: the 32nd Pacific Asia Conference on Language, Information and Computation (PACLIC), 2018.Hoang-Quoc Nguyen-Son, Huy H.; Nguyen, Ngoc-Dung T.; Tieu, Junichi Yamagishi, and Isao Echizen, "Identifying computer-generated paragraphs using coherence and fluency features". In: the 32nd Pacific Asia Conference on Language, Information and Computation (PACLIC), 2018. Hoang-Quoc Nguyen-Son and Isao Echizen, “Detecting computer-generated text using fluency and noise features”. In: the 15th International Conference of the Pacific Association for Computational Linguistics (PACLING), pp. 288-300, 2017.Hoang-Quoc Nguyen-Son and Isao Echizen, "Detecting computer-generated text using fluency and noise features". In: the 15th International Conference of the Pacific Association for Computational Linguistics (PACLING), pp. 288-300, 2017. Roee Aharoni, Moshe Koppel, and Yoav Goldberg, “Automatic detection of machine translated text and translation quality estimation”. In: the 52nd Annual Meeting of the Association for Computational Linguistics (ACL), pp. 289-295, 2014.Roee Aharoni, Moshe Koppel, and Yoav Goldberg, "Automatic detection of machine translated text and translation quality estimation". In: the 52nd Annual Meeting of the Association for Computational Linguistics (ACL), pp. 289-295, 2014. Hoang-Quoc Nguyen-Son, Ngoc-Dung T. Tieu, Huy H. Nguyen, Junichi Yamagishi, and Isao Echizen, “Identifying computer-generated text using statistical analysis”. In: the Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), pp. 123-130, 2017.Hoang-Quoc Nguyen-Son, Ngoc-Dung T.; Tieu, Huy H.; Nguyen, Junichi Yamagishi, and Isao Echizen, “Identifying computer-generated text using statistical analysis”. In: the Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), pp. 123-130, 2017. Cyril Labbe and Dominique Labbe, “Duplicate and fake publications in the scientific literature: how many SCIgen papers in computer science?”. In: Scientometrics, Springer, volume 94, issue 1, pp. 379-396, 2013.Cyril Labbe and Dominique Labbe, "Duplicate and fake publications in the scientific literature: how many SCIgen papers in computer science?". In: Scientific, Springer, volume 94, issue 1, pp. 379-396, 2013. Yitong Li, Rui Wang, and Hai Zhai, “A machine learning method to distinguish machine translation from human translation”. In: the 29th Pacific Asia Conference on Language, Information and Computation (PACLIC), pp. 354-360, 2015.Yitong Li, Rui Wang, and Hai Zhai, "A machine learning method to distinguish machine translation from human translation". In: the 29th Pacific Asia Conference on Language, Information and Computation (PACLIC), pp. 354-360, 2015.

しかしながら、従来の検出方法は、いずれも、検出可能なテキストが限定的であり、近年の深層学習を用いた強力な敵対的テキストを精度良く検出することは難しかった。 However, all conventional detection methods are limited in detectable text, and it has been difficult to accurately detect powerful adversarial text using recent deep learning.

本発明は、敵対的テキストを精度良く検出できる分類装置、学習装置、分類方法及びプログラムを提供することを目的とする。 An object of the present invention is to provide a classifying device, a learning device, a classifying method, and a program capable of accurately detecting hostile text.

本発明に係る分類装置は、文書データを単語に分割し、当該単語のそれぞれに品詞タグを付与するタグ付け部と、前記文書データ毎に、前記単語の組み合わせについて、当該単語のそれぞれに定義された単語ベクトルの間の距離を算出する距離算出部と、前記文書データ、及び前記品詞タグの組み合わせ毎に、前記単語ベクトル間の距離に関する統計量を、特徴量の一つとして算出する特徴量算出部と、前記特徴量を入力とし、予め敵対的テキストであるか否かがラベル付けされた文書データにより学習されたモデルにより、分類結果を出力する分類部と、を備える。 The classification device according to the present invention includes: a tagging unit that divides document data into words and assigns part-of-speech tags to each of the words; a distance calculation unit that calculates the distance between the word vectors, and a feature amount calculator that calculates, as one feature amount, a statistic amount related to the distance between the word vectors for each combination of the document data and the part-of-speech tag. and a classifying unit for outputting a classification result using a model learned from document data that receives the feature quantity as input and is pre-labeled as to whether or not it is hostile text.

前記特徴量算出部は、前記単語ベクトル間の距離のうち、閾値を超える値を除いた統計量を、前記特徴量の一つとして算出してもよい。 The feature amount calculation unit may calculate, as one of the feature amounts, a statistic excluding a value exceeding a threshold among the distances between the word vectors.

前記分類装置は、前記文書データに含まれる単語それぞれのコーパスにおける出現頻度を取得する頻度取得部を備え、前記特徴量算出部は、前記文書データ、及び前記品詞タグ毎に、前記出現頻度に関する統計量を、前記特徴量の一つとして算出してもよい。 The classification device includes a frequency acquisition unit that acquires an appearance frequency in a corpus of each word included in the document data. quantity may be calculated as one of the feature quantities.

前記特徴量算出部は、前記文書データの中で、同一単語が連続するフレーズの出現回数を、当該フレーズの長さ毎に前記特徴量の一つとして算出してもよい。 The feature amount calculation unit may calculate, as one of the feature amounts, the number of occurrences of phrases in which the same word continues in the document data for each length of the phrase.

前記特徴量算出部は、前記文書データにおける文の長さを、前記特徴量の一つとして算出してもよい。 The feature amount calculation unit may calculate the length of a sentence in the document data as one of the feature amounts.

前記特徴量算出部は、前記文書データにおけるNグラムを、前記特徴量の一つとして算出してもよい。 The feature amount calculation unit may calculate an N-gram in the document data as one of the feature amounts.

本発明に係る学習装置は、文書データを単語に分割し、当該単語のそれぞれに品詞タグを付与するタグ付け部と、前記文書データ毎に、前記単語の組み合わせについて、当該単語のそれぞれに定義された単語ベクトルの間の距離を算出する距離算出部と、前記文書データ、及び前記品詞タグの組み合わせ毎に、前記単語ベクトル間の距離に関する統計量を、特徴量の一つとして算出する特徴量算出部と、前記特徴量を入力とし、予めラベル付けされている敵対的テキストであるか否かの区分を学習したモデルを生成する学習部と、を備える。 A learning device according to the present invention includes: a tagging unit that divides document data into words and assigns part-of-speech tags to each of the words; a distance calculation unit that calculates the distance between the word vectors, and a feature amount calculator that calculates, as one feature amount, a statistic amount related to the distance between the word vectors for each combination of the document data and the part-of-speech tag. and a learning unit that receives the feature quantity as an input and generates a model that has learned whether or not the text is pre-labeled adversarial text.

前記学習部は、複数の学習アルゴリズムにより複数の前記モデルを生成し、前記区分の出力精度に関する評価が最も高いモデルを選別してもよい。 The learning unit may generate a plurality of models using a plurality of learning algorithms, and select a model with the highest evaluation regarding output accuracy of the segment.

本発明に係る分類方法は、文書データを単語に分割し、当該単語のそれぞれに品詞タグを付与するタグ付けステップと、前記文書データ毎に、前記単語の組み合わせについて、当該単語のそれぞれに定義された単語ベクトルの間の距離を算出する距離算出ステップと、前記文書データ、及び前記品詞タグの組み合わせ毎に、前記単語ベクトル間の距離に関する統計量を、特徴量の一つとして算出する特徴量算出ステップと、前記特徴量を入力とし、予め敵対的テキストであるか否かがラベル付けされた文書データにより学習されたモデルにより、分類結果を出力する分類ステップと、をコンピュータが実行する。 A classification method according to the present invention includes a tagging step of dividing document data into words and assigning part-of-speech tags to each of the words; a feature quantity calculation step of calculating a statistic relating to the distance between the word vectors as one feature quantity for each combination of the document data and the part-of-speech tag; and a classification step of outputting a classification result using a model learned from document data that is pre-labeled as to whether or not it is hostile text using the feature quantity as an input.

本発明に係る分類プログラムは、前記分類装置としてコンピュータを機能させるためのものである。 A classification program according to the present invention is for causing a computer to function as the classification device.

本発明に係る学習プログラムは、前記学習装置としてコンピュータを機能させるためのものである。 A learning program according to the present invention is for causing a computer to function as the learning device.

本発明によれば、敵対的テキストを精度良く検出できる。 According to the present invention, hostile text can be detected with high accuracy.

実施形態における敵対的テキストを、人間が作成したテキストと比較して例示する図である。FIG. 4 illustrates an example of hostile text in comparison to human-generated text; 実施形態における分類装置の機能構成を示す図である。It is a figure which shows the functional structure of the classification device in embodiment. 実施形態における品詞タグの種類を例示する図である。It is a figure which illustrates the kind of part-of-speech tag in embodiment. 実施形態における人間が作成したテキストに対するタグ付けと単語間の距離を例示する図である。FIG. 4 illustrates tagging and inter-word distance for human-generated text in an embodiment; 実施形態における敵対的テキストに対するタグ付けと単語間の距離を例示する図である。FIG. 4 illustrates tagging and inter-word distance for adversarial text in an embodiment; 実施形態における人間が作成したテキストについて、単語間の距離をグループに分配した結果を例示する図である。FIG. 5 is a diagram illustrating results of distributing distances between words to groups for human-created text in the embodiment; 実施形態における敵対的テキストについて、単語間の距離をグループに分配した結果を例示する図である。FIG. 5 is a diagram illustrating the result of distributing distances between words to groups for adversarial text in an embodiment; 実施形態における人間が作成したテキストについて、単語の類似度に関する特徴量として、平均及び分散を算出した結果を例示する図である。FIG. 10 is a diagram illustrating results of calculating an average and a variance as feature amounts related to word similarity for texts created by humans according to the embodiment; 実施形態における敵対的テキストについて、単語の類似度に関する特徴量として、平均及び分散を算出した結果を例示する図である。FIG. 10 is a diagram illustrating the result of calculating the mean and variance as a feature amount related to word similarity for hostile texts according to the embodiment; 実施形態における人間が作成したテキストについて、使用されている各単語のコーパス内での出現頻度を例示する図である。FIG. 4 is a diagram illustrating the frequency of occurrence of each word used within the corpus for human-generated text in an embodiment; 実施形態における敵対的テキストについて、使用されている各単語のコーパス内での出現頻度を例示する図である。FIG. 5 is a diagram illustrating the frequency of occurrence of each word used in the corpus for adversarial text in an embodiment; 実施形態における人間が作成したテキストについて、単語の頻度をグループに分配した結果を例示する図である。FIG. 5 is a diagram illustrating the results of distributing word frequencies to groups for human-generated text in an embodiment; 実施形態における敵対的テキストについて、単語の頻度をグループに分配した結果を例示する図である。FIG. 5 is a diagram illustrating the results of distributing word frequencies to groups for adversarial text in an embodiment; 実施形態における人間が作成したテキストについて、単語の頻度に関する特徴量として、平均及び分散を算出した結果を例示する図である。FIG. 10 is a diagram illustrating results of calculating an average and a variance as feature amounts relating to word frequency for texts created by humans according to the embodiment; 実施形態における敵対的テキストについて、単語の頻度に関する特徴量として、平均及び分散を算出した結果を例示する図である。FIG. 10 is a diagram illustrating the result of calculating the mean and variance as a feature quantity related to word frequency for hostile texts in the embodiment; 実施形態における分類方法の評価実験の結果を示す図である。It is a figure which shows the result of the evaluation experiment of the classification method in embodiment.

以下、本発明の実施形態の一例について説明する。
本実施形態における分類方法により、コンピュータ(機械)で作成された敵対的テキストと、人間が作成したテキストとが分類される。
An example of an embodiment of the present invention will be described below.
The classification method in this embodiment classifies computer (machine)-generated adversarial texts and human-generated texts.

本実施形態では、敵対的テキストに関する次の特徴が利用される。すなわち、敵対的テキストは、人間が作成したテキストと同じ意味を持つが、一般的に、人間が作成したテキストでは、敵対的テキストよりも適切で分かりやすい言葉が用いられている。 In this embodiment, the following features of adversarial text are utilized. That is, adversarial text has the same meaning as human-generated text, but human-generated text generally uses more appropriate and understandable language than adversarial text.

図1は、敵対的テキストを、人間が作成したテキストと比較して例示する図である。
なお、例示した2つのテキストの下線部分は、互いを比較した際に特徴的な箇所を示している。これら2つのテキストは、同じ意味として解釈されるが、AIを用いた感情分析による分類結果は、人間が作成したテキストAが「ポジティブ」なのに対して、敵対的テキストBは「ネガティブ」と分類される。
FIG. 1 is a diagram illustrating adversarial text compared to human-generated text.
Note that the underlined portions of the two illustrated texts indicate the characteristic points when compared with each other. These two texts are interpreted as having the same meaning, but the result of classification by sentiment analysis using AI is that human-made text A is classified as “positive,” while hostile text B is classified as “negative.” be.

ここで、テキストAの「features」及び「movie」という単語は、テキストB「attributes」及び「film」という単語よりも文脈に適しているが、それぞれ同義語である。また、敵対的テキストは、人間が作成したテキストよりも単純な時制を使用する傾向がある。例えば、テキストAの「has balanced」(現在完了形)は、テキストBの「balances」(現在形)よりも複雑だが、より適切な表現である。人間が作成したテキストは、適切な単語及び時制を使用することで、より首尾一貫したものになっている。
このような特徴は、後述する単語の類似度により学習される。
Here, the words "features" and "movie" in Text A are synonymous, although they are more contextually appropriate than the words "attributes" and "film" in Text B, respectively. Also, adversarial texts tend to use simpler tenses than human-made texts. For example, "has balanced" (present perfect tense) in Text A is more complex than "balances" (present tense) in Text B, but is a better representation. Human-generated text has become more coherent through the use of appropriate words and tenses.
Such features are learned from word similarity, which will be described later.

また、テキストAの「fit their roles」及び「the plot come to life」というフレーズは、テキストBの「have good jobs」及び「the story come alike」というフレーズよりも、人間が使用する傾向がある。一方、敵対的テキストに見られるありふれた語句は、他の一般的な文章でも頻繁に使われている。
このような特徴は、後述する単語の頻度により学習される。
Also, the phrases "fit their roles" and "the plot come to life" in Text A are more likely to be used by humans than the phrases "have good jobs" and "the story come alike" in Text B. On the other hand, common phrases found in adversarial texts are also frequently used in other common sentences.
Such features are learned from word frequencies, which will be described later.

さらに、敵対的テキストは、深層学習における最適化問題のために、テキストBの「very very」のように、単語が重複したフレーズを含む場合がある。
このような特徴は、後述する単語の重複度により学習される。
In addition, adversarial texts may contain phrases with duplicated words, such as "very very" in text B, due to optimization problems in deep learning.
Such features are learned from the degree of redundancy of words, which will be described later.

図2は、分類装置1の機能構成を示す図である。
分類装置1(分類装置、学習装置)は、サーバ装置又はパーソナルコンピュータ等の情報処理装置(コンピュータ)であり、制御部10及び記憶部20の他、各種データの入出力デバイス及び通信デバイス等を備える。
FIG. 2 is a diagram showing the functional configuration of the classification device 1. As shown in FIG.
The classification device 1 (classification device, learning device) is an information processing device (computer) such as a server device or a personal computer, and includes a control unit 10 and a storage unit 20, as well as various data input/output devices and communication devices. .

制御部10は、分類装置1の全体を制御する部分であり、記憶部20に記憶された各種プログラムを適宜読み出して実行することにより、本実施形態における各機能を実現する。制御部10は、CPUであってよい。 The control unit 10 is a part that controls the entire classification device 1, and implements each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 20. FIG. The control unit 10 may be a CPU.

記憶部20は、ハードウェア群を分類装置1として機能させるための各種プログラム、及び各種データ等の記憶領域であり、ROM、RAM、フラッシュメモリ又はハードディスクドライブ(HDD)等であってよい。具体的には、記憶部20は、本実施形態の各機能を制御部10に実行させるためのプログラムの他、辞書データ21、コーパス22、学習モデル23等を記憶する。 The storage unit 20 is a storage area for various programs and various data for causing the hardware group to function as the classification device 1, and may be a ROM, RAM, flash memory, hard disk drive (HDD), or the like. Specifically, the storage unit 20 stores dictionary data 21, a corpus 22, a learning model 23, etc., in addition to a program for causing the control unit 10 to execute each function of the present embodiment.

制御部10は、入力部11と、タグ付け部12と、距離算出部13と、頻度取得部14と、特徴量算出部15と、学習部16と、分類部17とを備える。制御部10は、これらの機能部により、機械により作成された敵対的テキストと、人間により作成されたテキストとを分類する学習モデル23を生成し、新たな文書データを、敵対的テキストであるか、人間により作成されたテキストであるかに分類して結果を出力する。 The control unit 10 includes an input unit 11 , a tagging unit 12 , a distance calculation unit 13 , a frequency acquisition unit 14 , a feature amount calculation unit 15 , a learning unit 16 and a classification unit 17 . Using these functional units, the control unit 10 generates a learning model 23 that classifies hostile texts created by machines and texts created by humans, and classifies new document data as hostile texts. , and output the results by classifying them as human-generated text.

入力部11は、学習モデル23の訓練データ、又は学習モデル23による分類対象として、文書データ(テキスト)の入力を受け付ける。 The input unit 11 receives input of document data (text) as training data for the learning model 23 or classification targets by the learning model 23 .

タグ付け部12は、入力された文書データのそれぞれを単語に分割し、これらの単語のそれぞれに品詞タグを付与する。
品詞タグを付与するためには、既存の形態素解析の手法が利用可能である。このとき、日本語又は英語等の言語に応じた品詞が定義された辞書データ21が参照される。
なお、辞書データ21は、分類装置1とは別の装置に記憶されていてもよいし、例えば、インターネット等を経由してアクセス可能な公開データベースに記憶されていてもよい。
The tagging unit 12 divides each of the input document data into words and gives part-of-speech tags to each of these words.
Existing morphological analysis methods can be used to add part-of-speech tags. At this time, the dictionary data 21 in which the part of speech corresponding to the language such as Japanese or English is defined is referred to.
Note that the dictionary data 21 may be stored in a device other than the classification device 1, or may be stored in a public database accessible via the Internet or the like.

図3は、品詞タグの種類を例示する図である。
ここでは、英語の文書データを処理する場合を例に、分解された単語に付与する45種類の品詞(POS tag)と、その意味とを示している。
タグ付け部12は、入力された複数の文書データのそれぞれに対して、文書データを構成する全ての単語について、これら45種類の品詞タグのいずれかを付与する。例えば、前述のテキストAに含まれる名詞「Christmas」、「movie」等には、品詞タグ「NN」が付与され、副詞「Almost」には、品詞タグ「RB」が付与される。
FIG. 3 is a diagram illustrating types of part-of-speech tags.
Here, 45 kinds of parts of speech (POS tags) given to decomposed words and their meanings are shown, taking the case of processing English document data as an example.
The tagging unit 12 assigns one of these 45 types of part-of-speech tags to each of a plurality of input document data for all words forming the document data. For example, the nouns "Christmas", "movie", etc. included in the above text A are given the part-of-speech tag "NN", and the adverb "Almost" is given the part-of-speech tag "RB".

距離算出部13は、文書データ毎に、単語の組み合わせについて、単語のそれぞれに定義された単語ベクトル間の距離を算出する。
各単語に固有の多次元(例えば300次元)の単語ベクトルは、大量のデータセットに基づいて学習され、単語間の相対的な距離の近さによって意味の類似性又は関連性が示されるデータである。単語ベクトルは、予めコーパス22に格納されている。
なお、コーパス22は、分類装置1とは別の装置に記憶されていてもよいし、例えば、インターネット等を経由してアクセス可能な公開データベースに記憶されていてもよい。
The distance calculation unit 13 calculates the distance between word vectors defined for each word for each word combination for each document data.
Multi-dimensional (e.g., 300-dimensional) word vectors unique to each word are learned based on large datasets, and data in which semantic similarity or relevance is indicated by the relative closeness between words. be. Word vectors are stored in the corpus 22 in advance.
The corpus 22 may be stored in a device other than the classification device 1, or may be stored in a public database accessible via the Internet or the like.

距離算出部13は、例えば、次の計算式によりユークリッド距離dを算出する。ここで、p及びqは、2つの単語を、p及びqは、n次元の単語ベクトルのi(1≦i≦n)番目の要素を示す。

Figure 0007175244000001
The distance calculator 13 calculates the Euclidean distance d by, for example, the following formula. Here, p and q denote two words, and p i and q i denote the i (1≤i≤n) element of the n-dimensional word vector.
Figure 0007175244000001

頻度取得部14は、文書データに含まれる単語それぞれのコーパス22における出現頻度、例えば出現回数を取得する。
なお、頻度取得部14は、距離算出部13が参照するコーパス22とは異なるコーパスを参照してもよい。
The frequency acquisition unit 14 acquires the appearance frequency, for example, the number of appearances, of each word included in the document data in the corpus 22 .
Note that the frequency acquisition unit 14 may refer to a corpus different from the corpus 22 to which the distance calculation unit 13 refers.

特徴量算出部15は、学習モデル23への入力として、次に示す(1)~(5)の特徴量を算出する。 The feature amount calculation unit 15 calculates the following feature amounts (1) to (5) as inputs to the learning model 23 .

(1)単語の類似度
特徴量算出部15は、文書データ、及び品詞タグの組み合わせ毎に、単語ベクトル間の距離に関する統計量を、特徴量の一つである単語の類似度として算出する。
統計量は、例えば、次の計算式により算出される平均(mean)又は分散(variance)の少なくともいずれかを含んでよい。ここで、a(1≦i≦n)は、グループに含まれるn個のデータのi番目を示す。

Figure 0007175244000002
(1) Word Similarity The feature amount calculation unit 15 calculates a statistic regarding the distance between word vectors as a word similarity, which is one of the feature amounts, for each combination of document data and part-of-speech tags.
The statistic may include at least one of mean or variance calculated by the following formula, for example. Here, a i (1≦i≦n) indicates the i-th data of n data included in the group.
Figure 0007175244000002

(2)単語の頻度
特徴量算出部15は、文書データ、及び品詞タグ毎に、コーパス22における出現頻度に関する統計量を、特徴量の一つである単語の頻度として算出する。
統計量は、単語の類似度と同様に、平均又は分散の少なくともいずれかを含んでよい。
(2) Word Frequency The feature amount calculation unit 15 calculates a statistic amount related to the appearance frequency in the corpus 22 as the word frequency, which is one of the feature amounts, for each document data and part-of-speech tag.
Statistics, like word similarity, may include mean and/or variance.

(3)単語の重複度
特徴量算出部15は、文書データの中で、同一の単語が連続するフレーズの出現回数を、フレーズの長さ(例えば、1~4)毎に特徴量の一つである単語の重複度として算出する。
(3) Word Redundancy The feature amount calculation unit 15 calculates the number of occurrences of phrases in which the same word continues in the document data as one feature amount for each phrase length (for example, 1 to 4). is calculated as the degree of duplication of the word.

(4)文の長さ
特徴量算出部15は、文書データにおける文の長さを、特徴量の一つとして算出する。
(4) Length of Sentence The feature amount calculation unit 15 calculates the length of a sentence in document data as one of the feature amounts.

(5)Nグラム
特徴量算出部15は、文書データにおけるNグラムを、特徴量の一つとして算出する。
(5) N-gram The feature amount calculation unit 15 calculates N-grams in the document data as one of the feature amounts.

学習部16は、これらの特徴量を入力とし、予め文書データ(訓練データ)にラベル付けされている敵対的テキストであるか否かの区分を分類するための学習モデル23を生成する。
学習モデル23を生成する手法は、ロジスティック回帰、線形分類器、確率的勾配降下法によるサポートベクタマシン、逐次最小問題最適化法によるサポートベクタマシン等、各種の学習アルゴリズムから適宜選択されてよい。
また、学習部16は、複数の学習アルゴリズムにより複数の学習モデルを生成してもよく、この場合、出力精度が高いモデル、あるいは、高精度と低エラー率を両立させるモデル等、所定の評価が最も高い学習モデル23が選別されてよい。
The learning unit 16 receives these feature amounts as input and generates a learning model 23 for classifying whether the document data (training data) is pre-labeled hostile text or not.
A method for generating the learning model 23 may be appropriately selected from various learning algorithms such as logistic regression, linear classifier, support vector machine by stochastic gradient descent, and support vector machine by iterative minimum problem optimization.
In addition, the learning unit 16 may generate a plurality of learning models using a plurality of learning algorithms. In this case, a model with high output accuracy, a model that achieves both high accuracy and low error rate, and the like. The highest learned model 23 may be selected.

分類部17は、分類対象の文書データが入力された際に、前述の特徴量算出部15により算出された特徴量を入力とし、学習モデル23により、分類結果を出力する。 When the document data to be classified is input, the classification unit 17 receives the feature amount calculated by the feature amount calculation unit 15 and outputs the classification result by the learning model 23 .

次に、前述の特徴量それぞれの算出方法について詳述する。
なお、文の長さについては、例えば前述の非特許文献7に、Nグラムについては、例えば前述の非特許文献3及び4において提案されているように、既存の技術を適用可能である。
Next, a detailed description will be given of a method for calculating each of the above feature amounts.
It should be noted that existing techniques can be applied to the sentence length, for example, as proposed in Non-Patent Document 7, and to N-grams, as proposed in Non-Patent Documents 3 and 4, for example.

[単語の類似度]
人間が作成したテキストの単語は、敵対的テキストの単語よりも適切に使用されているため、両者でテキスト内の単語の類似度に違いが表れる。
[Word similarity]
The words in the human-generated text are better used than the words in the adversarial text, so the similarity of the words in the texts differs between the two.

図4Aは、人間が作成したテキストに対するタグ付けと単語間の距離を例示する図である。
まず、タグ付け部12は、テキスト内の単語に品詞タグを付与する。なお、タグ付けされたラベルは、図中では各単語に対して下付き文字で示している。
続いて、特徴量算出部15は、テキストから単語の組み合わせを抽出し、単語の類似度を示すユークリッド距離を計算する。例えば、人間が作成したテキストAの単語ペア「AlmostRB-ChirstmasNN」の距離1.2は、単語ペア「AlmostRB-isVBZ」の距離3.4よりも近いため、より類似していることを意味している。
FIG. 4A is a diagram illustrating tagging and inter-word distances for human-generated text.
First, the tagging unit 12 gives part-of-speech tags to words in the text. Note that tagged labels are indicated by subscripts for each word in the figure.
Subsequently, the feature amount calculation unit 15 extracts combinations of words from the text and calculates Euclidean distances indicating similarities between the words. For example, the distance 1.2 of the word pair "Almost RB - Chirstmas NN " in the human-generated text A is closer than the distance 3.4 of the word pair "Almost RB - is VBZ ", and therefore more similar. means

図4Bは、敵対的テキストに対するタグ付けと単語間の距離を例示する図である。
敵対的テキストBは、人間が作成したテキストAの場合(図4A)と比較して、全体的に単語間の距離が遠く、単語の類似度が低くなっている。
FIG. 4B is a diagram illustrating tagging and inter-word distance for adversarial text.
In hostile text B, the distance between words is generally longer and the similarity between words is lower than in human-generated text A (FIG. 4A).

ここで、高い類似度ほど、より自然な単語を使用していることを示しているため、特徴量算出部15は、類似度が過度に低い、すなわち距離が閾値αを超える場合に、この値を特徴量算出の際のノイズとして排除してもよい。
この場合、例えば、α=3.0を選択すると、図4A及び図4Bに示すように、取り消し線で示した3.0よりも大きい距離が削除される。削除後の残りの距離についても、敵対的テキストBの方が全体的に大きな値に分布している。
なお、ユークリッド距離を用いた場合、閾値αの値が大きいほど精度の向上が期待できるが、一定の値を超えると精度が下落する場合がある。この閾値は、データセットによって異なるため、学習時に最適値を探索することが好ましい。
Here, a higher similarity indicates that a more natural word is used. may be eliminated as noise when calculating the feature amount.
In this case, for example, if we choose α=3.0, then distances greater than 3.0, shown in strikethrough, are deleted, as shown in FIGS. 4A and 4B. The remaining distance after deletion is also distributed over larger values for hostile text B overall.
When the Euclidean distance is used, the accuracy can be expected to improve as the value of the threshold value α increases, but the accuracy may decrease when the value exceeds a certain value. Since this threshold differs depending on the data set, it is preferable to search for the optimum value during learning.

次に、特徴量算出部15は、算出した距離を、単語間の品詞タグの組み合わせ毎のグループに分配する。
図5A及び5Bは、それぞれ人間が作成したテキスト及び敵対的テキストについて、単語間の距離をグループに分配した結果を例示する図である。
Next, the feature amount calculation unit 15 distributes the calculated distances to groups for each combination of part-of-speech tags between words.
5A and 5B are diagrams illustrating the results of distributing inter-word distances into groups for human-generated text and adversarial text, respectively.

例えば、単語ペア「AlmostRB-ChirstmasNN」の距離1.2は、品詞ペア「RB-NN」のグループに、単語ペア「isVBZ-movieNN」の距離2.7は、品詞ペア「VBZ-NN」のグループに、単語ペア「AlmostRB-attributesNNS」の距離2.9は、品詞ペア「RB-NNS」のグループに、それぞれ分配される。 For example, a distance of 1.2 for the word pair "Almost RB -Christmas NN " is in the group for the part-of-speech pair "RB-NN", and a distance of 2.7 for the word pair "is VBZ -movie NN " is in the group for the part-of-speech pair "VBZ- NN", the distance 2.9 of the word pair "Almost RB -attributes NNS " is distributed to the group of part-of-speech pairs "RB-NNS", respectively.

そして、特徴量算出部15は、各グループ内において、平均及び分散等の統計量を、正規化された特徴量として算出する。
図6A及び6Bは、それぞれ人間が作成したテキスト及び敵対的テキストについて、単語の類似度に関する特徴量として、平均及び分散を算出した結果を例示する図である。
Then, the feature amount calculation unit 15 calculates statistics such as average and variance as normalized feature amounts in each group.
6A and 6B are diagrams exemplifying the results of calculating the mean and variance as feature amounts relating to word similarity for human-created text and adversarial text, respectively.

[単語の頻度]
敵対的テキストでは、慣用句又は流行の語句等よりも、一般的な文章で頻繁に使用されるありふれた単語が選択されることが多い。したがって、人間が作成したテキストと敵対的テキストとでは、両者で使用されている単語のコーパス22内での出現頻度に違いが表れる。
[word frequency]
Adversarial texts often choose common words that are frequently used in common sentences, rather than idiomatic phrases or trendy phrases. Therefore, there is a difference in the frequency of occurrence of words used in the human-generated text and the adversarial text within the corpus 22 .

図7A及び7Bは、それぞれ人間が作成したテキスト及び敵対的テキストについて、使用されている各単語のコーパス22内での出現頻度を例示する図である。
出現頻度は、例えば、コーパス22に出現した回数であってよい。人間が作成したテキストAの場合(図7A)と比べて、敵対的テキストBの場合(図7B)には、各単語の頻度が全体的に高くなっている。
7A and 7B are diagrams illustrating the frequency of occurrence within the corpus 22 of each word used for human-generated text and adversarial text, respectively.
The appearance frequency may be, for example, the number of appearances in the corpus 22 . Compared to human-generated text A (FIG. 7A), the frequency of each word is generally higher for adversarial text B (FIG. 7B).

特徴量算出部15は、入力されたテキストに含まれる各単語のコーパス22内での出現頻度を算出すると、これらの値を、品詞タグ毎のグループに分配する。
図8A及び8Bは、それぞれ人間が作成したテキスト及び敵対的テキストについて、単語の頻度をグループに分配した結果を例示する図である。
After calculating the frequency of appearance of each word contained in the input text within the corpus 22, the feature amount calculation unit 15 distributes these values to groups for each part-of-speech tag.
8A and 8B illustrate the results of distributing word frequencies into groups for human-generated text and adversarial text, respectively.

人間が作成したテキストAからは、例えば、「ChristmasNN」の頻度215及び「movieNN」の頻度327が「NN」グループ分配され、「isVBZ」の頻度572が「VBZ」グループに分配される。また、敵対的テキストBからは、例えば、「balancesVBZ」の頻度672が「VBZ」グループに分配される。 From the human-generated text A, for example, the frequency 215 of "Christmas NN " and the frequency 327 of "movie NN " are distributed to the "NN" group, and the frequency 572 of "is VBZ " is distributed to the "VBZ" group. . Also from adversarial text B, for example, frequency 672 of "balances VBZ " is distributed to the "VBZ" group.

そして、特徴量算出部15は、各グループ内において、平均及び分散等の統計量を、正規化された特徴量として算出する。
図9A及び9Bは、それぞれ人間が作成したテキスト及び敵対的テキストについて、単語の頻度に関する特徴量として、平均及び分散を算出した結果を例示する図である。
Then, the feature amount calculation unit 15 calculates statistics such as average and variance as normalized feature amounts in each group.
9A and 9B are diagrams exemplifying the results of calculating the mean and the variance as feature amounts related to word frequency for human-created text and adversarial text, respectively.

[単語の重複度]
敵対的テキストが機械により作成される際には、人間が作成する場合には見られないような、同一の単語が連続した重複フレーズが生成される場合がある。したがって、人間が作成したテキストと敵対的テキストとでは、両者で単語の重複度に違いが表れる。
[Word Redundancy]
When adversarial text is machine-generated, it may generate duplicate phrases of identical words that are not found in human-generated text. Therefore, there is a difference in word redundancy between the human-generated text and the adversarial text.

例えば、前述の敵対的テキストBには、単語「very」が2つ連続したフレーズ「very very」が存在する。
特徴量算出部15は、フレーズの長さ、すなわち同一の単語の連続数毎に、このようなフレーズの数を特徴量として算出する。例えば、連続数1(重複なし)から連続数4までのそれぞれについて、フレーズの数が算出される。
For example, in the aforementioned hostile text B, there is a phrase "very very" in which two words "very" are consecutive.
The feature amount calculation unit 15 calculates the number of such phrases as a feature amount for each length of the phrase, that is, the number of continuations of the same word. For example, the number of phrases is calculated for each of the consecutive numbers 1 (no duplication) to the consecutive number 4.

図10は、本実施形態における分類方法の評価実験の結果を示す図である。
評価実験では、まず、公開されたデータセット<https://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip>から、人間が作成したテキストを抽出した。また、既存のシステム<https://github.com/miyyer/scpn>を用いて敵対的テキストを生成した後、所定の感情分析システム<https://nlp.stanford.edu/sentiment/code.html>による分類結果が変化したものを選択した。
FIG. 10 is a diagram showing the results of an evaluation experiment of the classification method according to this embodiment.
In the evaluation experiment, first, a public data set <https://nlp. stanford. edu/sentiment/trainDevTestTrees_PTB. zip> to extract human-generated text. In addition, the existing system <https://github. <https://nlp. stanford. edu/sentiment/code. html> were selected.

また、評価実験では、次の5種類の特徴量を採用した。
・単語の類似度:
45種類の品詞タグの組み合わせの数である1035通りのグループ毎に算出される、単語ベクトル間のユークリッド距離の平均及び分散の値。なお、単語ベクトルを取得するコーパス22として、「GloVe」<https://nlp.stanford.edu/projects/glove/>を用いた。
・単語の頻度:
45種類の品詞タグ毎に算出される、単語の出現回数の平均及び分散の値。なお、出現回数を取得するコーパス22として、「Web1T 5-gram」<https://catalog.ldc.upenn.edu/LDC2006T13>を用いた。
・単語の重複度:
フレーズの長さ1~4毎に算出される、フレーズの出現した数。
・文の長さ:
前述の非特許文献7において提案された特徴量。
・Nグラム
前述の非特許文献3及び4において提案された特徴量。
Also, in the evaluation experiment, the following five types of feature amounts were adopted.
・Word similarity:
Average and variance values of Euclidean distances between word vectors calculated for each of 1035 groups, which are the number of combinations of 45 types of part-of-speech tags. As the corpus 22 from which word vectors are obtained, "GloVe"<https://nlp. stanford. edu/projects/glove/> was used.
・Word frequency:
Values of the average and variance of word appearance counts calculated for each of the 45 types of part-of-speech tags. As the corpus 22 for obtaining the number of appearances, "Web1T 5-gram"<https://catalog. ldc. upen. edu/LDC2006T13> was used.
・Word duplication:
The number of phrase occurrences calculated for each phrase length of 1 to 4.
・Sentence length:
The feature amount proposed in Non-Patent Document 7 mentioned above.
- N-gram The feature value proposed in Non-Patent Documents 3 and 4 mentioned above.

評価実験の結果は、これらのデータを用いて3種類の教師あり学習を行った場合の、分類の精度(Accuracy)及び等価エラー率(Equal Error Rate: EER)を示している。
なお、比較のため、前述の非特許文献1において提案された従来手法による結果も同様に示した。
この評価実験の結果によれば、本実施形態の提案手法は、ロジスティック回帰(学習手法1)、確率的勾配降下法によるサポートベクタマシン(学習手法2)、逐次最小問題最適化法によるサポートベクタマシン(学習手法3)のいずれにおいても、従来手法に比べて精度及び等価エラー率の向上が見られた。
The results of the evaluation experiment show the classification accuracy and equal error rate (EER) when three types of supervised learning are performed using these data.
For comparison, the results of the conventional method proposed in Non-Patent Document 1 are also shown.
According to the results of this evaluation experiment, the proposed method of this embodiment includes logistic regression (learning method 1), support vector machine by stochastic gradient descent (learning method 2), and support vector machine by iterative minimum problem optimization method. In any of (learning method 3), improvements in accuracy and equivalent error rate were observed compared to the conventional method.

本実施形態によれば、分類装置1は、文書データを構成する単語に品詞タグを付与し、品詞タグの組み合わせ毎に単語間の距離の統計量を特徴量として算出する。そして分類装置1は、この特徴量を入力として、敵対的テキストであるか否かの既知の区分に基づいて学習モデル23を生成する。
したがって、分類装置1は、人間が作成したテキストと敵対的テキストとで異なる単語の類似性又は関連性の傾向を、単語の類似度に関する特徴量で表し、適切な学習モデル23を生成できる。
この結果、分類装置1は、文の意味を保持しながら誤分類を引き起こす敵対的テキストを精度良く検出できる。これにより、例えば、商品レビューを解析したり、チャットボットが質問/回答を解析したりする場面において、不都合な敵対的テキストを精度良く除外することができる。
According to the present embodiment, the classification device 1 assigns part-of-speech tags to words forming document data, and calculates the statistic of the distance between words for each combination of part-of-speech tags as a feature amount. The classification device 1 then generates a learning model 23 based on a known classification of whether or not the text is adversarial text, using this feature quantity as an input.
Therefore, the classification device 1 can generate an appropriate learning model 23 by representing the similarity or relationship tendency of different words between the text created by a human and the hostile text as a feature amount related to the degree of word similarity.
As a result, the classifier 1 can accurately detect adversarial text that causes misclassification while preserving the meaning of the sentence. As a result, inconvenient and hostile texts can be excluded with high accuracy, for example, when product reviews are analyzed or chatbots analyze questions/answers.

分類装置1は、単語間の距離のうち、閾値を超える値を統計量の計算から除く。
したがって、分類装置1は、類似度が一定値に満たない、すなわち関連性が低い単語の組み合わせを特徴量に算入するのを防ぎ、敵対的テキストの検出精度を向上できる。
The classification device 1 excludes values exceeding a threshold among the distances between words from the calculation of the statistic.
Therefore, the classification device 1 can prevent a combination of words whose similarity is less than a certain value, that is, a combination of words with low relevance, from being included in the feature amount, and can improve the detection accuracy of the hostile text.

また、分類装置1は、文書データを構成する単語のコーパス22における出現頻度の統計量を、品詞タグ毎に特徴量として算出する。
したがって、分類装置1は、人間が作成したテキストと敵対的テキストとで異なる語句の利用傾向を、単語の頻度に関する特徴量で表すことで、適切な学習モデル23を生成でき、この結果、敵対的テキストを精度良く検出できる。
In addition, the classification device 1 calculates, as a feature amount for each part-of-speech tag, a statistic of the frequency of appearance of the words forming the document data in the corpus 22 .
Therefore, the classification device 1 can generate an appropriate learning model 23 by representing the usage tendency of different words in the human-generated text and the hostile text by the feature amount related to the word frequency. It can detect text with high accuracy.

また、分類装置1は、文書データの中で、同一の単語が連続するフレーズの出現回数を、フレーズの長さ毎に特徴量として算出する。
したがって、分類装置1は、敵対的テキストに固有の傾向を単語の重複度に関する特徴量として表すことで、適切な学習モデル23を生成でき、この結果、敵対的テキストを精度良く検出できる。
In addition, the classification device 1 calculates the number of occurrences of phrases in which the same word continues in the document data as a feature amount for each length of the phrase.
Therefore, the classification device 1 can generate an appropriate learning model 23 by representing the tendency specific to the hostile text as a feature amount related to the word redundancy, and as a result, can accurately detect the hostile text.

また、分類装置1は、文の長さ、又はNグラムといった既存の手法で用いられる特徴量を組み合わせることで、より適切な学習モデル23を生成でき、この結果、敵対的テキストを精度良く検出できる。 In addition, the classification device 1 can generate a more appropriate learning model 23 by combining feature quantities used in existing methods, such as sentence length or N-grams, and as a result, can accurately detect hostile text. .

さらに、分類装置1は、複数の学習アルゴリズムを用いて学習モデル23を生成し、精度に関する評価が最も高いものを選別するので、より高精度に敵対的テキストを検出できる。 Furthermore, the classification device 1 generates the learning model 23 using a plurality of learning algorithms and selects the one with the highest accuracy evaluation, so that the hostile text can be detected with higher accuracy.

以上、本発明の実施形態について説明したが、本発明は前述した実施形態に限るものではない。また、前述した実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、実施形態に記載されたものに限定されるものではない。 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文のテキストであることを想定して説明したが、文書データは、複数の文から構成されてもよい。この場合、分類装置1は、1文毎に特徴量の算出、及び学習又は分類を行ってもよいし、全体の特徴量の算出、及び学習又は分類を行ってもよい。 This embodiment has been described on the assumption that the training data and the document data to be detected are text of one sentence, but the document data may consist of a plurality of sentences. In this case, the classification device 1 may calculate and learn or classify the feature quantity for each sentence, or may calculate and learn or classify the feature quantity for the entire sentence.

また、本実施形態では、単語の重複度に関して、出現回数を特徴量としたが、分類装置1は、フレーズの長さ毎の出現回数をその最大値又は総和に基づいて正規化、あるいは、文の数又は長さ等に応じて平均化した統計量を特徴量としてもよい。 In addition, in the present embodiment, the number of appearances is used as a feature quantity for the degree of duplication of words. A statistic averaged according to the number or length of , may be used as a feature.

本実施形態では、文書データとして英語のテキストを例示したが、対象はこれに限られず、日本語を含む他の言語にも同様に適用可能である。 In this embodiment, English text is exemplified as document data, but the target is not limited to this, and can be similarly applied to other languages including Japanese.

分類装置1による学習方法及び分類方法は、ソフトウェアにより実現される。ソフトウェアによって実現される場合には、このソフトウェアを構成するプログラムが、情報処理装置(コンピュータ)にインストールされる。また、これらのプログラムは、CD-ROMのようなリムーバブルメディアに記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。さらに、これらのプログラムは、ダウンロードされることなくネットワークを介したWebサービスとしてユーザのコンピュータに提供されてもよい。 A learning method and a classification method by the classification device 1 are realized by software. When it is implemented by software, a program constituting this software is installed in an information processing device (computer). Further, these programs may be recorded on removable media such as CD-ROMs and distributed to users, or may be distributed by being downloaded to users' computers via a network. Furthermore, these programs may be provided to the user's computer as a web service through the network without being downloaded.

1 分類装置
10 制御部
11 入力部
12 タグ付け部
13 距離算出部
14 頻度取得部
15 特徴量算出部
16 学習部
17 分類部
20 記憶部
21 辞書データ
22 コーパス
23 学習モデル
1 classification device 10 control unit 11 input unit 12 tagging unit 13 distance calculation unit 14 frequency acquisition unit 15 feature amount calculation unit 16 learning unit 17 classification unit 20 storage unit 21 dictionary data 22 corpus 23 learning model

Claims (11)

文書データを単語に分割し、当該単語のそれぞれに品詞タグを付与するタグ付け部と、
前記文書データ毎に、前記単語の組み合わせについて、当該単語のそれぞれに定義された単語ベクトルの間の距離を算出する距離算出部と、
前記文書データそれぞれについて、前記品詞タグの組み合わせ毎のグループに分配した、前記単語ベクトル間の距離に関する統計量を、当該文書データの特徴量の一つとして算出する特徴量算出部と、
前記特徴量を入力とし、予め敵対的テキストであるか否かがラベル付けされた文書データにより学習されたモデルにより、分類結果を出力する分類部と、を備える分類装置。
a tagging unit that divides document data into words and assigns part-of-speech tags to each of the words;
a distance calculation unit that calculates, for each of the document data, a distance between word vectors defined for each of the word combinations for each of the word combinations;
a feature quantity calculation unit for calculating, as one feature quantity of the document data, a statistic relating to the distance between the word vectors distributed to the groups for each combination of the part-of-speech tags for each of the document data ;
a classifying unit that receives the feature amount as an input and outputs a classification result by a model learned from document data that is pre-labeled as to whether or not it is hostile text.
前記特徴量算出部は、前記単語ベクトル間の距離のうち、閾値を超える値を除いた統計量を、前記特徴量の一つとして算出する請求項1に記載の分類装置。 2. The classification apparatus according to claim 1, wherein the feature amount calculation unit calculates, as one of the feature amounts, a statistic amount excluding a value exceeding a threshold among the distances between the word vectors. 前記文書データに含まれる単語それぞれのコーパスにおける出現頻度を取得する頻度取得部を備え、
前記特徴量算出部は、前記文書データそれぞれについて、前記品詞タグ毎のグループに分配した、前記出現頻度に関する統計量を、前記特徴量の一つとして算出する請求項1又は請求項2に記載の分類装置。
A frequency acquisition unit that acquires the frequency of occurrence of each word in the corpus included in the document data,
3. The feature amount calculation unit according to claim 1, wherein the feature amount calculation unit calculates, as one of the feature amounts, a statistic related to the appearance frequency distributed to the groups for each of the part-of-speech tags for each of the document data. Classifier.
前記特徴量算出部は、前記文書データの中で、同一単語が連続するフレーズの出現回数を、当該フレーズの長さ毎に前記特徴量の一つとして算出する請求項1から請求項3のいずれかに記載の分類装置。 4. The feature amount calculation unit according to any one of claims 1 to 3, wherein the feature amount calculation unit calculates, as one of the feature amounts, the number of occurrences of phrases in which the same word is repeated in the document data for each length of the phrase. Classification device according to claim 1. 前記特徴量算出部は、前記文書データにおける文の長さを、前記特徴量の一つとして算出する請求項1から請求項4のいずれかに記載の分類装置。 5. The classification apparatus according to any one of claims 1 to 4, wherein the feature amount calculation unit calculates the length of a sentence in the document data as one of the feature amounts. 前記特徴量算出部は、前記文書データにおけるNグラムを、前記特徴量の一つとして算出する請求項1から請求項5のいずれかに記載の分類装置。 6. The classification apparatus according to claim 1, wherein said feature amount calculation unit calculates N-grams in said document data as one of said feature amounts. 文書データを単語に分割し、当該単語のそれぞれに品詞タグを付与するタグ付け部と、
前記文書データ毎に、前記単語の組み合わせについて、当該単語のそれぞれに定義された単語ベクトルの間の距離を算出する距離算出部と、
前記文書データそれぞれについて、前記品詞タグの組み合わせ毎のグループに分配した、前記単語ベクトル間の距離に関する統計量を、当該文書データの特徴量の一つとして算出する特徴量算出部と、
前記特徴量を入力とし、予めラベル付けされている敵対的テキストであるか否かの区分を学習したモデルを生成する学習部と、を備える学習装置。
a tagging unit that divides document data into words and assigns part-of-speech tags to each of the words;
a distance calculation unit that calculates, for each of the document data, a distance between word vectors defined for each of the word combinations for each of the word combinations;
a feature quantity calculation unit for calculating, as one feature quantity of the document data, a statistic relating to the distance between the word vectors distributed to the groups for each combination of the part-of-speech tags for each of the document data ;
a learning unit that receives the feature amount as an input and generates a model that has learned classification as to whether or not the text is pre-labeled adversarial text.
前記学習部は、複数の学習アルゴリズムにより複数の前記モデルを生成し、前記区分の出力精度に関する評価が最も高いモデルを選別する請求項7に記載の学習装置。 8. The learning device according to claim 7, wherein the learning unit generates a plurality of models using a plurality of learning algorithms, and selects a model with the highest evaluation regarding output accuracy of the division. 文書データを単語に分割し、当該単語のそれぞれに品詞タグを付与するタグ付けステップと、
前記文書データ毎に、前記単語の組み合わせについて、当該単語のそれぞれに定義された単語ベクトルの間の距離を算出する距離算出ステップと、
前記文書データそれぞれについて、前記品詞タグの組み合わせ毎のグループに分配した、前記単語ベクトル間の距離に関する統計量を、当該文書データの特徴量の一つとして算出する特徴量算出ステップと、
前記特徴量を入力とし、予め敵対的テキストであるか否かがラベル付けされた文書データにより学習されたモデルにより、分類結果を出力する分類ステップと、をコンピュータが実行する分類方法。
a tagging step of dividing the document data into words and assigning part-of-speech tags to each of the words;
a distance calculation step of calculating a distance between word vectors defined for each of the word combinations for each of the document data;
a feature quantity calculating step of calculating , for each of the document data, a statistic relating to the distance between the word vectors distributed to groups for each combination of the part-of-speech tags, as one of the feature quantities of the document data ;
A classification method in which a computer executes a classification step of outputting a classification result by using a model learned from document data that is pre-labeled as to whether or not it is adversarial text, using the feature quantity as an input.
請求項1から請求項6のいずれかに記載の分類装置としてコンピュータを機能させるための分類プログラム。 A classification program for causing a computer to function as the classification device according to any one of claims 1 to 6. 請求項7又は請求項8に記載の学習装置としてコンピュータを機能させるための学習プログラム。 A learning program for causing a computer to function as the learning device according to claim 7 or 8.
JP2019140113A 2019-07-30 2019-07-30 Classification device, learning device, classification method and program Active JP7175244B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019140113A JP7175244B2 (en) 2019-07-30 2019-07-30 Classification device, learning device, classification method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019140113A JP7175244B2 (en) 2019-07-30 2019-07-30 Classification device, learning device, classification method and program

Publications (2)

Publication Number Publication Date
JP2021022317A JP2021022317A (en) 2021-02-18
JP7175244B2 true JP7175244B2 (en) 2022-11-18

Family

ID=74573769

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019140113A Active JP7175244B2 (en) 2019-07-30 2019-07-30 Classification device, learning device, classification method and program

Country Status (1)

Country Link
JP (1) JP7175244B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022235353A1 (en) * 2021-05-07 2022-11-10 Oracle International Corporation Variant inconsistency attack (via) as a simple and effective adversarial attack method
CN117851601B (en) * 2024-02-26 2024-07-16 海纳云物联科技有限公司 Training method, using method, device and medium of event classification model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013196600A (en) 2012-03-22 2013-09-30 Kddi Corp Discussion soundness calculation device, method, and program
JP2018142131A (en) 2017-02-27 2018-09-13 日本放送協会 Information determination model learning device, information determination device, and program thereof
JP2018147288A (en) 2017-03-07 2018-09-20 日本電信電話株式会社 Dialogue destruction feature quantity extraction apparatus, dialogue destruction model learning apparatus, dialogue destructive force estimation apparatus, dialogue destruction feature quantity extraction method, and program
JP2019045984A (en) 2017-08-30 2019-03-22 株式会社日立製作所 Data synthesizer and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013196600A (en) 2012-03-22 2013-09-30 Kddi Corp Discussion soundness calculation device, method, and program
JP2018142131A (en) 2017-02-27 2018-09-13 日本放送協会 Information determination model learning device, information determination device, and program thereof
JP2018147288A (en) 2017-03-07 2018-09-20 日本電信電話株式会社 Dialogue destruction feature quantity extraction apparatus, dialogue destruction model learning apparatus, dialogue destructive force estimation apparatus, dialogue destruction feature quantity extraction method, and program
JP2019045984A (en) 2017-08-30 2019-03-22 株式会社日立製作所 Data synthesizer and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
▲高▼橋 翼,敵対的サンプルの脅威と対策,電子情報通信学会2019年総合大会講演論文集 基礎・境界/NOLTA,日本,般社団法人電子情報通信学会,2019年03月05日,pp. SS-62--SS-63
中西 崇文,人工知能の導入による生産性、効率性の向上、新製品開発への活用 ,第1版,日本,株式会社技術情報協会,2019年03月27日,pp. 369--373

Also Published As

Publication number Publication date
JP2021022317A (en) 2021-02-18

Similar Documents

Publication Publication Date Title
Rintyarna et al. Enhancing the performance of sentiment analysis task on product reviews by handling both local and global context
Haddi et al. The role of text pre-processing in sentiment analysis
Daumé Iii et al. Search-based structured prediction
Röder et al. Exploring the space of topic coherence measures
KR102703923B1 (en) Apparatus and method for learning narrative of document, apparatus and method for generating narrative of document
RU2583716C2 (en) Method of constructing and detection of theme hull structure
Atzeni et al. Using frame-based resources for sentiment analysis within the financial domain
Franco-Salvador et al. Cross-domain polarity classification using a knowledge-enhanced meta-classifier
US12190621B2 (en) Generating weighted contextual themes to guide unsupervised keyphrase relevance models
EP3178018A1 (en) Methods and systems for mapping data items to sparse distributed representations
Mukherjee et al. Author-specific sentiment aggregation for polarity prediction of reviews.
Li et al. Accurate recommendation based on opinion mining
Lim et al. Examining machine learning techniques in business news headline sentiment analysis
Lal et al. A novel approach to text summarisation using topic modelling and noun phrase extraction
JP7175244B2 (en) Classification device, learning device, classification method and program
Nasr Building sentiment analysis model using Graphlab
Castillo et al. Author attribution using a graph based representation
Viswanathan et al. Detection of duplicates in Quora and Twitter corpus
Zhang et al. Multilingual sentence categorization and novelty mining
JP7017533B2 (en) Classification device, learning device, classification method and program
CN110399595B (en) Text information labeling method and related device
Szwed Authorship attribution for polish texts based on part of speech tagging
CN111368068A (en) Short text topic modeling method based on part-of-speech feature and semantic enhancement
Sisodia et al. Performance evaluation of learners for analyzing the hotel customer sentiments based on text reviews
Monir et al. Aratsum: arabic Twitter trend summarization using topic analysis and extractive algorithms

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210624

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220428

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220510

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220609

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: 20221018

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221108

R150 Certificate of patent or registration of utility model

Ref document number: 7175244

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150