JP2020106880A - Information processing apparatus, model generation method and program - Google Patents
Information processing apparatus, model generation method and program Download PDFInfo
- Publication number
- JP2020106880A JP2020106880A JP2018241970A JP2018241970A JP2020106880A JP 2020106880 A JP2020106880 A JP 2020106880A JP 2018241970 A JP2018241970 A JP 2018241970A JP 2018241970 A JP2018241970 A JP 2018241970A JP 2020106880 A JP2020106880 A JP 2020106880A
- Authority
- JP
- Japan
- Prior art keywords
- data
- feature
- learning
- expression
- character
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本開示は、機械学習のための学習データの作成方法に関する。 The present disclosure relates to a method of creating learning data for machine learning.
従来、高精度で自動的に単語に対する意味タグ付けを行なうためのモデルを構築することを目的として、各単語に意味タグと文法タグとが付された学習用コーパス中の単語に関するコンテキスト系の特徴関数及び依存性特徴関数を抽出するプロセスと、オントロジーからオントロジー特徴関数を抽出するプロセスと、これら特徴関数の各々に関し、学習用コーパス中の各単語に対し算出される特徴関数の値の統計に基づき特徴関数の相互情報量を算出し、情報量の大きな特徴関数を選択する特徴選択プロセスと、選択された特徴関数に関して学習用コーパス中の各単語に対し得られた特徴関数の値の統計に基づき、入力文中の各単語に対し得られる特徴関数の値に基づき、当該単語に対して各意味タグが付与される尤度を与える統計的モデルを算出するプロセスと、を含むモデル構築装置が提案されている(特許文献1を参照)。 Conventionally, for the purpose of constructing a model for automatically and highly semantically tagging words, the features of the context system for words in a learning corpus in which each word is given a semantic tag and a grammar tag. The process of extracting the function and the dependency feature function, the process of extracting the ontology feature function from the ontology, and for each of these feature functions, based on the statistics of the value of the feature function calculated for each word in the learning corpus Based on the feature selection process that calculates the mutual information of the feature function and selects the feature function with a large amount of information, and the statistics of the value of the feature function obtained for each word in the learning corpus regarding the selected feature function. , A process of calculating a statistical model that gives the likelihood that each meaning tag is given to the word based on the value of the feature function obtained for each word in the input sentence, and a model building device is proposed. (See Patent Document 1).
また、意味分類付与の精度を向上させることを目的として、特徴重みテーブルが、あらかじめテキストの特徴と意味分類との間の関連性を示す特徴重みとして、語句の後続機能表現と該後続機能表現の係る語句との意味分類の異同を特徴とする重みを保持し、スコア算出部が、入力部で受け付けたテキスト中の注目単語の特徴をキーとして前記テーブルを探索し、該単語に付与する意味分類タグ候補とスコアを算出し、意味分類付与手段が、意味分類タグ候補の系列のうちスコア総和が最大となる系列を選択し、入力テキスト中の各単語に該意味分類タグを付与した意味分類付与結果を出力することが提案されている(特許文献2を参照)。 In addition, for the purpose of improving the accuracy of the semantic classification assignment, the feature weight table is used as a feature weight that indicates the relationship between the text feature and the semantic classification in advance, and the subsequent functional expression of the phrase and the subsequent functional expression A weight that is characterized by the difference in the meaning classification from the relevant phrase is held, and the score calculation unit searches the table using the feature of the word of interest in the text received by the input unit as a key, and the meaning classification given to the word The tag candidate and the score are calculated, and the semantic classification giving means selects the series having the maximum score sum from the series of the semantic classification tag candidates, and gives the semantic classification tag by adding the meaning classification tag to each word in the input text. It has been proposed to output the result (see Patent Document 2).
また、辞書に含まれるが曖昧な単語と辞書に含まれない単語に関する抽出精度を向上させることを目的として、教師データ作成装置に、人手によって作成された辞書データを記憶する記憶部と、タグが付されていない学習対象テキストを入力する入力装置と、辞書データに含まれる単語の意味分類を示す単語意味情報に基づいてタグが付されていない学習対象テキストからタグ付きテキストを作成する処理部とを備えることが提案されている(特許文献3を参照)。 Further, for the purpose of improving the extraction accuracy of a word that is included in the dictionary but is ambiguous and a word that is not included in the dictionary, the teacher data creation device has a storage unit that stores dictionary data created manually and a tag. An input device for inputting unlearned learning target text, and a processing unit for creating tagged text from untagged learning target text based on word meaning information indicating meaning classification of words included in dictionary data. Is proposed (see Patent Document 3).
更に、生物医学および臨床領域における名前付き実体認識タスクのための双方向ロング短期記憶ネットワークを用いた統一されたフレームワークが提案されている(非特許文献1を参照)。 Furthermore, a unified framework using a bidirectional long short-term memory network for named entity recognition tasks in biomedical and clinical areas has been proposed (see Non-Patent Document 1).
従来、抽出用文章データから文字素性について所定の属性を有する表現を抽出する際には、系列(単語列)の各要素(各単語)に適切なラベルを付与する問題である系列ラベリング問題が解かれることが一般的である。そして、そのための抽出用のモデルは、学習用文章データを用いて作成される。 Conventionally, when extracting an expression having a predetermined attribute regarding a character feature from the extraction sentence data, a series labeling problem, which is a problem of assigning an appropriate label to each element (each word) of a series (word string), is solved. It is common to get burned. Then, an extraction model for that purpose is created using the learning text data.
ここで、固有表現抽出を行う際の一般的な素性(特徴量)として、文字素性、文字種素性、品詞素性が用いられるが、学習用文章データ中に、抽出するカテゴリに属する頻出単語があった場合、文字素性の特徴が強く影響して当該頻出単語そのものを過学習してしまうことによって、学習用文章データに含まれない未知語の抽出漏れが起こりやすい抽出用モデルが作成されてしまう。 Here, character features, character type features, and part-of-speech features are used as general features (features) when performing proper expression extraction, but there are frequent words that belong to the category to be extracted in the learning text data. In this case, the feature of the character feature strongly influences and over-learns the frequent word itself, so that an extraction model in which unknown words not included in the learning sentence data are likely to be omitted is created.
本開示は、上記した問題に鑑み、学習モデルの作成において、学習用文章データ中に頻出する表現の過学習を防止することを課題とする。 In view of the above-mentioned problems, the present disclosure aims to prevent over-learning of expressions that frequently appear in learning text data when creating a learning model.
本開示の一例は、文章データから所定の表現を抽出するためのモデルを作成するための情報処理装置であって、学習用文章データを単語に分割し、単語毎に、文字素性を含む複数の素性についての特徴データを設定する特徴生成手段と、前記特徴データにおいて、単語毎にラベルを付すラベル付与手段と、前記学習用文章データ又は前記特徴データに含まれる、文字素性について所定の属性を有する1又は複数の表現を、表現毎に、ランダムに生成された文字列に置換することで、置換済データを生成する置換手段と、前記置換済みデータ及び前記ラベル付与済みの前記特徴データを学習データとして、新たに入力された抽出用文章データから文字素性について所定の属性を有する表現を抽出するためのモデルを作成する学習手段と、を備える情報処理装置である。 One example of the present disclosure is an information processing apparatus for creating a model for extracting a predetermined expression from text data, in which learning text data is divided into words, and each word includes a plurality of character features including character features. Feature generation means for setting feature data about features, label assigning means for labeling each word in the feature data, and predetermined attributes for character features included in the learning text data or the feature data Replacement means for generating replaced data by replacing one or more expressions with a character string randomly generated for each expression, and the replaced data and the labeled feature data are learning data. And a learning unit that creates a model for extracting an expression having a predetermined attribute regarding a character feature from newly input extraction sentence data.
本開示は、情報処理装置、システム、コンピューターによって実行される方法またはコンピューターに実行させるプログラムとして把握することが可能である。また、本開示は、そのようなプログラムをコンピューターその他の装置、機械等が読み取り可能な記録媒体に記録したものとしても把握できる。ここで、コンピューター等が読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的または化学的作用によって蓄積し、コンピューター等から読み取ることができる記録媒体をいう。 The present disclosure can be understood as an information processing device, a system, a method executed by a computer, or a program executed by a computer. Further, the present disclosure can be grasped as such a program recorded on a recording medium readable by a computer or other device, machine, or the like. Here, a computer-readable recording medium is a recording medium that stores information such as data and programs by electrical, magnetic, optical, mechanical, or chemical action and can be read by a computer. Say.
本開示によれば、学習モデルの作成において、学習用文章データ中に頻出する表現の過学習を防止することが可能となる。 According to the present disclosure, it is possible to prevent over-learning of expressions that frequently appear in learning text data when creating a learning model.
以下、本開示に係る情報処理装置、モデル作成方法及びプログラムの実施の形態を、図面に基づいて説明する。但し、以下に説明する実施の形態は、実施形態を例示するものであって、本開示に係る情報処理装置、モデル作成方法及びプログラムを以下に説明する具体的構成に限定するものではない。実施にあたっては、実施の態様に応じた具体的構成が適宜採用され、また、種々の改良や変形が行われてよい。 Hereinafter, embodiments of an information processing device, a model creating method, and a program according to the present disclosure will be described with reference to the drawings. However, the embodiments described below are examples of the embodiments, and the information processing apparatus, the model creating method, and the program according to the present disclosure are not limited to the specific configurations described below. In implementation, a specific configuration according to the embodiment may be appropriately adopted, and various improvements and modifications may be performed.
本実施形態では、本開示に係る情報処理装置、モデル作成方法及びプログラムを、情報処理セキュリティに関する情報を様々な情報源(自然言語)から収集し、収集された情報からマルウェア名称を抽出するためのシステムにおいて実施した場合の実施の形態について説明する。なお、本開示に係る情報処理装置、モデル作成方法及びプログラムは、文章データから所定の属性を有する表現を抽出するための技術について広く用いることが可能であり、本開示の適用対象は、実施形態において示した例に限定されない。例えば、本開示に係る技術は、文章中から、新語が発生し易いカテゴリの名詞を抽出するためのモデルの作成の際に有用である。 In the present embodiment, the information processing apparatus, the model creating method, and the program according to the present disclosure collect information regarding information processing security from various information sources (natural language) and extract a malware name from the collected information. An embodiment when implemented in the system will be described. It should be noted that the information processing device, the model creating method, and the program according to the present disclosure can be widely used for a technique for extracting an expression having a predetermined attribute from text data. It is not limited to the example shown in. For example, the technology according to the present disclosure is useful when creating a model for extracting a noun in a category in which a new word is likely to occur from a sentence.
<システムの構成>
図1は、本実施形態に係るシステム1のハードウェア構成を示す概略図である。本実施形態に係るシステム1は、インターネット上のサーバー(図示は省略する)と通信可能に接続された情報処理装置50を備える。
<System configuration>
FIG. 1 is a schematic diagram showing a hardware configuration of a
情報処理装置50は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、EEPROM(Electrically Erasable and Programmable Read Only Memory)やHDD(Hard Disk Drive)等の記憶装置14、NIC(Network Interface Card)15等の通信ユニット、等を備えるコンピューターである。但し、情報処理装置50の具体的なハードウェア構成に関しては、実施の態様に応じて適宜省略や置換、追加が可能である。また、情報処理装置50は、単一の筐体からなる装置に限定されない。情報処理装置50は、所謂クラウドや分散コンピューティングの技術等を用いた、複数の装置によって実現されてよい。
The
図2は、本実施形態に係る情報処理装置50の機能構成の概略を示す図である。情報処理装置50は、記憶装置14に記録されているプログラムが、RAM13に読み出され、CPU11によって実行されて、情報処理装置50に備えられた各ハードウェアが制御されることで、文章データ取得部21、特徴生成部22、ラベル付与部23、置換部24、学習部25及び抽出部26を備える情報処理装置として機能する。なお、本実施形態及び後述する他の実施形態では、情報処理装置50の備える各機能は、汎用プロセッサであるCPU11によって実行されるが、これらの機能の一部または全部は、1または複数の専用プロセッサによって実行されてもよい。
FIG. 2 is a diagram showing an outline of a functional configuration of the
文章データ取得部21は、インターネットからセキュリティ関連記事を含むページを収集し、当該ページからテキストを抽出して学習用文章データ又は抽出用文章データを取得する。
The text
特徴生成部22は、学習用文章データを単語に分割し、単語毎に、文字素性を含む複数の素性(本実施形態では、文字素性、文字種素性及び品詞素性)についての特徴データを設定する。
The
ラベル付与部23は、特徴データにおいて、単語毎にラベル(本実施形態では、IOB2(Inside,outside,beginning 2)方式のラベル)を付す。
The
置換部24は、学習用文章データ又は特徴データに含まれる、文字素性について所定の属性を有する1又は複数の表現を、表現毎に、ランダムに生成された文字列に置換することで、置換済データを生成する。なお、置換部24は、表現をランダムに生成された文字列に置換する際に、文字素性以外の素性(本実施形態では、品詞素性及び文字種素性)については当該表現と一致する文字列を生成し、置換する。
The
学習部25は、置換済みデータ及びラベル付与済みの特徴データを学習データとして、抽出用文章データから文字素性について所定の属性を有する表現(マルウェア名称等の、新語が発生し易いカテゴリの名詞)を抽出するためのモデルを作成する。
The
抽出部26は、学習部25によって作成されたモデルを用いて、新たに入力された抽出用文章データから文字素性について所定の属性を有する表現を抽出する。
The
<処理の流れ>
次に、本実施形態に係る情報処理装置1によって実行される処理の流れを説明する。なお、以下に説明する処理の具体的な内容および処理順序は、本開示を実施するための一例である。具体的な処理内容および処理順序は、本開示の実施の形態に応じて適宜選択されてよい。
<Process flow>
Next, a flow of processing executed by the
図3は、本実施形態に係る情報処理装置によって実行される処理の全体像を示す図である。情報処理装置50は、学習用のセキュリティ関連記事を外部から取得して学習データを作成し、当該学習データを用いた学習によって抽出モデルを作成する。そして、情報処理装置50は、作成された抽出モデルを用いて、外部から取得された抽出用のセキュリティ関連記事からマルウェア名称を抽出する。以下、フローチャートを用いて、各処理の詳細を説明する。
FIG. 3 is a diagram showing an overall image of processing executed by the information processing apparatus according to the present embodiment. The
図4は、本実施形態に係る学習データ作成処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、マルウェア名称抽出用のモデルを作成するための学習データを作成したい任意のタイミングで実行される。 FIG. 4 is a flowchart showing an outline of the flow of the learning data creation processing according to this embodiment. The process shown in this flowchart is executed at any time when it is desired to create learning data for creating a model for extracting a malware name.
ステップS101では、データ準備処理が実行される。データ準備処理の詳細については、図5を参照して説明する。 In step S101, a data preparation process is executed. Details of the data preparation process will be described with reference to FIG.
図5は、本実施形態に係るデータ準備処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、学習データ作成処理のステップS101及び後述する抽出処理のステップS401に示されたデータ準備処理の詳細を示すものであり、学習データ作成処理のステップS101又は抽出処理のステップS401においてデータ準備処理が呼び出されたことを契機として実行される。 FIG. 5 is a flowchart showing an outline of the flow of data preparation processing according to the present embodiment. The process shown in this flowchart shows the details of the data preparation process shown in step S101 of the learning data creation process and step S401 of the extraction process described later. The process is executed when the data preparation process is called in step S401.
ステップS201及びステップS202では、セキュリティ関連記事が収集され、テキストが抽出される。文章データ取得部21は、インターネットからセキュリティ関連記事を含むHTMLページを収集し(ステップS201)、当該HTMLページからテキスト(ここでは、タグやスクリプト等を除いた、自然言語による文章部分のこと)を抽出する(ステップS202)。その後、処理はステップS203へ進む。
In steps S201 and S202, security related articles are collected and texts are extracted. The text
ステップS203では、データが文単位に分割される。文章データ取得部21は、ステップS202で抽出されたテキストを、所定の文章分割ルールに従って文単位に分割することで、文章データ(学習用文章データ又は抽出用文章データ)を取得する。文章への分割ルールは、テキストの言語によって様々であるため、対象言語に応じて適切な分割ルールが採用されることが好ましい。例えば、当該言語において用いられる句点やピリオド、改行等を基準に分割する方法が採用可能であるが、ここで採用可能な分割ルールは限定されない。その後、本フローチャートに示された処理は終了する。
In step S203, the data is divided for each sentence. The text
説明を図4の学習データ作成処理に戻す。ステップS101のデータ準備処理が完了すると、処理はステップS102へ進む。 The description is returned to the learning data creation process of FIG. When the data preparation process of step S101 is completed, the process proceeds to step S102.
ステップS102では、学習用文章データからマルウェア名称が抽出され、マルウェア名称辞書が作成される。ここで、学習用文章データからマルウェア名称を抽出する処理は、解析プログラムを用いた解析によって行われてもよいし、当該文章を読んだ人間によって行われてもよい。学習用文章データから抽出されたマルウェア名称は、マルウェア名称辞書に登録される。なお、マルウェア名称辞書には、このステップで作成されたものの他、既存の辞書データを用いることも可能である。既存の辞書データのみを用いる場合には、当該ステップは省略されてもよい。その後、処理はステップS103へ進む。 In step S102, the malware name is extracted from the learning text data and a malware name dictionary is created. Here, the process of extracting the malware name from the learning text data may be performed by analysis using an analysis program, or may be performed by a person who has read the text. The malware name extracted from the learning text data is registered in the malware name dictionary. As the malware name dictionary, it is possible to use existing dictionary data other than the one created in this step. If only existing dictionary data is used, this step may be omitted. After that, the process proceeds to step S103.
ステップS103では、特徴生成処理が実行される。特徴生成処理の詳細については、図6を参照して説明する。 In step S103, a feature generation process is executed. Details of the feature generation processing will be described with reference to FIG.
図6は、本実施形態に係る特徴生成処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、学習データ作成処理のステップS103及び後述する抽出処理のステップS402に示された特徴生成処理の詳細を示すものであり、学習データ作成処理のステップS103又は抽出処理のステップS402において特徴生成処理が呼び出されたことを契機として実行される。 FIG. 6 is a flowchart showing an outline of the flow of the feature generation processing according to this embodiment. The process shown in this flowchart shows the details of the feature generation process shown in step S103 of the learning data creation process and step S402 of the extraction process described later. The process is executed when the feature generation process is called in step S402.
ステップS301では、文章データが単語毎に分割される。特徴生成部22は、文章データ(学習用文章データ又は抽出用文章データ)を、所定の単語分割ルールに従って単語に分割する。単語への分割ルールは、文章の言語によって様々であるため、対象言語に応じて適切な分割ルールが採用されることが好ましい。例えば、スペース文字を基準に分割する方法や、文字種を基準に分割する方法、辞書に従って単語を特定し分割する方法、等が採用可能であるが、ここで採用可能な分割ルールは限定されない。その後、処理はステップS302へ進む。
In step S301, the sentence data is divided into words. The
ステップS302及びステップS303では、品詞タグ及び文字種タグが付与される。特徴生成部22は、ステップS301で得られた単語毎に、文字素性を含む複数の素性(本実施形態では、文字素性、文字種素性及び品詞素性)についての特徴データを設定する。
In step S302 and step S303, a part-of-speech tag and a character type tag are added. The
図7は、本実施形態において用いられる特徴データの概要を示す図である。特徴データは、文章中の対象単語毎に作成される。図7に示された特徴データは、対象単語の4つ前から4つ後までの9単語の文字(word)素性、品詞(pos)素性、及び文字種(shape)素性を素性として用いる学習データを表している。 FIG. 7 is a diagram showing an outline of the feature data used in this embodiment. The characteristic data is created for each target word in the sentence. The feature data shown in FIG. 7 is learning data using character (word) features, part-of-speech (pos) features, and character type (shape) features of nine words from four to four after the target word as features. It represents.
特徴データ中の文字素性の列には、文章中の単語がそのまま示されている。ここに示された例では、文章データのうち、対象単語「WannaCry」を中心とした9単語「the global spread of WannaCry confirmed on or after」が抜き出され、単語毎に学習データに格納されている。そして、各単語には、−4から+4までの、対象単語からの相対位置(距離)を示す符号が付されている(図中の最左列を参照)。より具体的には、対象単語は「0」によって示され、対象単語よりも後にある単語は、対象単語からの距離(単語数)によって示され、対象単語よりも前にある単語は、マイナス符号を付けて対象単語からの距離(単語数)によって示される。 In the character feature column in the feature data, the words in the sentence are shown as they are. In the example shown here, 9 words “the global spread of WannaCry confirmed on or after” centered on the target word “WannaCry” are extracted from the sentence data and stored in the learning data for each word. .. Then, each word is assigned a code from -4 to +4, which indicates the relative position (distance) from the target word (see the leftmost column in the drawing). More specifically, the target word is indicated by “0”, the word after the target word is indicated by the distance (the number of words) from the target word, and the word before the target word is a minus sign. Is indicated by the distance from the target word (the number of words).
品詞素性は、単語の品詞を示す素性である。特徴生成部22は、単語と当該単語の品詞の組み合わせとが蓄積された辞書の検索や、文法解析プログラムを用いた解析等によって、各単語の品詞を推定し、各単語に品詞を示す情報を付している。図7に示された例では、DTが限定詞を、JJが形容詞を、NNが単数形名詞を、INが前置詞又は従属接続詞を、NNPが単数形固有名詞を、VBDが過去形動詞を、CCが等位接続詞を示している。本実施形態では、Stanford CoreNLPの英語用品詞タグ付けモデルを用いてタグ付けをしているが、タグ付けに使用される規格は、本開示における例示に限定されない。
The part-of-speech feature is a feature indicating the part-of-speech of a word. The
文字種素性は、単語の形状についての素性であり、大文字X及び小文字xを用いて単語の形状を表している。なお、本実施形態では、対象の単語が5文字以上である場合、最初と最後の2文字についての形状を保持し、それらの間にある文字の形状は1つにまとめて形状を表すこととしている。特徴生成部22は、単語と当該単語の文字種素性の組み合わせとが蓄積された辞書の検索等によって、各単語の文字種素性を特定し、各単語に文字種を示す情報を付している。本実施形態では、文字種情報をStanford CoreNLPのライブラリを用いてタグ付けしているが、タグ付けに使用されるアルゴリズムは、本開示における例示に限定されない。
The character type feature is a feature about the shape of a word, and an uppercase letter X and a lowercase letter x are used to represent the shape of the word. In the present embodiment, when the target word has five or more characters, the shapes of the first and last two characters are retained, and the shapes of the characters between them are collectively represented as one shape. There is. The
特徴データは、文章データ中の各単語について生成される。ステップS302及びステップS303における特徴データの生成が完了すると、本フローチャートに示された処理は終了する。 The characteristic data is generated for each word in the text data. When the generation of the characteristic data in step S302 and step S303 is completed, the process shown in this flowchart ends.
説明を図4の学習データ作成処理に戻す。ステップS103の特徴生成処理が完了すると、処理はステップS104へ進む。 The description is returned to the learning data creation process of FIG. When the feature generation process of step S103 is completed, the process proceeds to step S104.
ステップS104では、辞書に基づく文字列マッチングにより、正解ラベルが付与される。ラベル付与部23は、特徴データにおいて、単語毎にラベル(タグ)を付す。より具体的には、ラベル付与部23は、ステップS301で学習用文章データから抽出された各単語と、ステップS102で作成されたマルウェア名称辞書に登録されているマルウェア名称とを文字列マッチングすることによって、学習用文章データに含まれるマルウェア名称の単語を特定し、特徴データにおいて、マルウェア名称であると特定された単語に、正解ラベルを付す。本実施形態では、IOB2方式に従ってラベルを付し、正解ラベルとして「B−NAME」を用いる例を示しているが(図7を参照)、ラベルにはその他の方式が採用されてもよい。また、本実施形態では、学習用文章データからマルウェア名称の単語を特定するための辞書として、ステップS102において準備されたマルウェア名称辞書が用いられているが、既存の辞書データがマルウェア名称辞書として用いられてもよい。その後、処理はステップS105へ進む。
In step S104, the correct answer label is given by the character string matching based on the dictionary. The
ステップS105では、マルウェア名称がランダムな文字列に置換される。置換部24は、学習用文章データ及び特徴データに含まれる、ステップS104で正解ラベルが付与された表現(本実施形態では、単語)を、表現毎に、ランダムに生成された文字列に置換することで、置換済データを生成する。即ち、置換の対象となる学習用文章データ又は特徴データに同じマルウェア名称が複数回登場している場合、置換部24は、複数回登場したマルウェア名称の夫々を、互いに異なるランダムな文字列に置換する。具体的には、複数回「WannaCry」が登場した場合、置換部24は、1つ目の「WannaCry」は「GpostVrt」に、2つ目の「WannaCry」は「VrettWpo」に、という具合に、夫々異なる文字列に置換する。このため、例えば、「The WannaCry ransomware attack was a May 2017 worldwide cyberattack by the WannaCry ransomware cryptoworm,…」という学習用文章データがあった場合、この文章は、置換によって「The GpostVrt ransomware attack was a May 2017 worldwide cyberattack by the VrettWpo ransomware cryptoworm,…」という文章となる。
In step S105, the malware name is replaced with a random character string. The
また、置換部24は、文字素性以外の素性(本実施形態では、品詞素性及び文字種素性)については当該表現と一致する文字列を生成し、置換する。具体的には、本実施形態では、対象の表現がマルウェア名称(固有名詞)であるため、置換部24は、ランダムな文字列を生成する際に、固有名詞としての文字列を生成する。ここでは、生成されるランダムな文字列が、他の品詞に係る単語や、他の普通名詞等と重複しないように確認されてもよい。また、文字種素性についても、置換部24は、置換対象の文字列の文字種素性と、置換後の文字列の文字種素性とが異ならないような文字列をランダムに生成し、置換する。具体的には、対象表現が「WannaCry」である場合、文字種素性は「XxXxxx」であるため、同じ文字種素性となるように、置換部24は、「GpostVrt」や「VrettWpo」のような文字列を生成する。
Further, the replacing
図8は、本実施形態において用いられる、置換後の特徴データの概要を示す図である。図8に示された置換後の特徴データを参照すると、図7に示された置換前の特徴データと比較して、正解ラベルが付された単語である「WannaCry」が、ランダムな文字列「NvxobOgr」に置換されていることが分かる。また、当該単語が、文字素性について置換されているが、品詞素性(単数形固有名詞)、及び文字種素性(「XxXxxx」)については置換前と同一であることが分かる。 FIG. 8 is a diagram showing an outline of the feature data after replacement, which is used in this embodiment. Referring to the feature data after replacement shown in FIG. 8, as compared with the feature data before replacement shown in FIG. 7, the word “WannaCry”, which is a word labeled with the correct answer, is a random character string “ You can see that it has been replaced with "NvxobOgr". Further, although the word is replaced with respect to the character feature, it can be seen that the part-of-speech feature (singular proper noun) and the character type feature (“XxXxxx”) are the same as before the replacement.
全てのマルウェア名称について置換が完了すると、本フローチャートに示された処理は終了する。 When the replacement is completed for all the malware names, the process shown in this flowchart ends.
上記説明した処理によって学習用文章データが作成されると、学習部25は、置換済み且つラベル付与済みの特徴データ(図8を参照)を学習データとして、文章データからマルウェア名称を抽出するためのモデルを作成する。具体的なモデルの作成方法については、系列ラベリングにおいて用いられるCRF(Conditional Random Fields)等のためのモデルの作成手法を用いてよいため、詳細な説明については省略する。
When the learning text data is created by the processing described above, the
CRFを用いた学習モデルの作成では、素性ベクトルの各要素に対する重みλを最適化することで抽出精度を向上させていく。このため、従来の学習方法では、同じマルウェア名称が頻出すると、当該マルウェア名称の文字素性を過学習(既知のマルウェア名称の文字素性の重みλが過大となる)してしまい、従来の学習方法で作成されたモデルでは、新たなマルウェア名称について抽出漏れが起こるおそれがあった。これに対して、本実施形態において作成されるモデルは、マルウェア名称がランダムな文字列に置換された学習データを用いて作成されたモデルであるため、既知のマルウェア名称の文字素性を過学習する(既知のマルウェア名称の文字素性の重みλが過大となる)ことなく、既知のマルウェア名称の他、辞書にない新たなマルウェア名称についても、抽出漏れを防ぐことが可能なモデルとなる。 In the creation of the learning model using the CRF, the extraction accuracy is improved by optimizing the weight λ for each element of the feature vector. For this reason, in the conventional learning method, if the same malware name appears frequently, the character features of the malware name are over-learned (the weight λ of the character feature of the known malware name is too large). In the created model, there was a risk of omission of extraction for the new malware name. On the other hand, since the model created in the present embodiment is a model created using learning data in which the malware name is replaced with a random character string, overlearning the character features of the known malware name. It becomes a model that can prevent omission of extraction of not only known malware names but also new malware names not in the dictionary without (the character feature weight λ of the known malware name becomes excessive).
図9は、本実施形態に係る抽出処理の流れの概要を示すフローチャートである。本フローチャートに示された処理は、インターネットからマルウェア名称を取得したい任意のタイミングで実行される。 FIG. 9 is a flowchart showing an outline of the flow of the extraction process according to this embodiment. The process shown in this flowchart is executed at any time when it is desired to acquire the malware name from the Internet.
ステップS401及びステップS402では、データ準備処理及び特徴生成処理が実行される。データ準備処理の詳細については、図5を参照して説明した通りであり、特徴生成処理の詳細については、図6を参照して説明した通りであるため、説明を省略する。その後、処理はステップS403へ進む。 In steps S401 and S402, a data preparation process and a feature generation process are executed. The details of the data preparation process have been described with reference to FIG. 5, and the details of the feature generation process have been described with reference to FIG. Then, a process progresses to step S403.
ステップS403では、マルウェア名称が抽出される。抽出部26は、学習部25によって作成されたモデルを用いて、ステップS401で新たに得られた抽出用文章データから、既知のマルウェア名称の他、辞書にない新たなマルウェア名称を抽出する。モデルを用いた表現抽出の具体的な方法については、系列ラベリングにおいて用いられるCRF等のためのモデルを用いた抽出手法を用いてよいため、説明を省略する。その後、本フローチャートに示された処理は終了する。
In step S403, the malware name is extracted. Using the model created by the
<第一のバリエーション>
本開示に係る技術によれば、学習に用いられる学習用文章データ及び特徴データの数を増やし、学習効果を更に向上させることができる。即ち、本実施形態では、学習に用いられるデータは、正解ラベルが付された単語がランダムな文字列に置換されたデータであるため、同じ置換前データについて、異なる文字列へ置換した複数の置換後データを用意することができる。具体的には、ステップS105において、置換部24は、ある学習用文章データ及び特徴データについて、文字列の置換の際に、異なるランダム文字列への置換を行なった複数のデータを作成する。
<First variation>
According to the technique of the present disclosure, the number of learning text data and feature data used for learning can be increased, and the learning effect can be further improved. That is, in the present embodiment, since the data used for learning is the data in which the word with the correct answer is replaced with a random character string, the same pre-replacement data is replaced with a plurality of replacements with different character strings. Later data can be prepared. Specifically, in step S105, the
このため、当該バリエーションでは、置換部24は、1の学習用文章データ又は特徴データについて、ランダムに生成された第一の文字列で表現を置換した第一の置換済データと、ランダムに生成された第二の文字列で表現を置換した第二の置換済データと、を生成する。そして、学習部25は、第一の置換済みデータ及び第二の置換済データを用いて、抽出用のモデルを作成する。
Therefore, in the variation, the
例えば、上述の「the global spread of WannaCry confirmed on or after」を含む学習用文章データ及び特徴データを置換する際に、「WannaCry」を「NvxobOgr」に置換することで「the global spread of NvxobOgr confirmed on or after」とした第一の置換後データと、「WannaCry」を「TrssePnh」に置換することで「the global spread of TrssePnh confirmed on or after」とした第二の置換後データと、という風に、1つの学習用文章データ及び特徴データに基づいて複数の異なる学習用文章データ及び特徴データを用意し、学習に用いさせることが出来る。 For example, when replacing the learning sentence data and feature data including the above "the global spread of WannaCry confirmed on or after", by replacing "WannaCry" with "NvxobOgr", "the global spread of NvxobOgr confirmed on or after, the first post-substitution data, and by replacing the "WannaCry" with "TrssePnh", the second post-substitution data with "the global spread of TrssePnh confirmed on or after", and so on. It is possible to prepare a plurality of different learning text data and characteristic data based on one learning text data and characteristic data and use them for learning.
<第二のバリエーション>
なお、本開示に係る情報処理装置によれば、上述の通り、新たなマルウェア名称について抽出漏れを防ぐ効果が得られるが、一方で、マルウェア名称ではない単語が誤抽出される可能性は残る。このため、本実施形態のバリエーションとして、マルウェア名称ではない単語を辞書登録し、フィルタリングすることが追加で実行されてもよい。
<Second variation>
The information processing apparatus according to the present disclosure has the effect of preventing omission of extraction of a new malware name as described above, but on the other hand, there is a possibility that a word that is not a malware name will be erroneously extracted. Therefore, as a variation of this embodiment, it is possible to additionally register words that are not malware names in a dictionary and perform filtering.
図10は、本バリエーションに係る情報処理装置50bの機能構成の概略を示す図である。当該バリエーションにおいて、情報処理装置50bは、所定の属性を有さない表現(本実施形態では、マルウェア名称ではない単語)を記録する記録部27と、抽出部26によって抽出された表現から、記録部27によって記録されている、所定の属性を有さない表現(本実施形態では、マルウェア名称ではない単語)を除外するフィルタリング部28と、を更に備える。
FIG. 10 is a diagram showing an outline of a functional configuration of the
<効果>
本実施形態に開示されたシステムを用いることによって、ユーザーは、インターネットに存在する大量のセキュリティ関連記事から所定のマルウェアに関する記事を特定する際に、新たなマルウェアに関する記事の抽出漏れを低減させることができる。これは、本開示に係る技術によって、学習モデルの作成において、学習用文章データ中に頻出する表現の過学習を防止することが可能となるためである。本開示の技術は、上記に説明した実施形態に限定されず、文章中から、新語が発生し易いカテゴリの名詞を抽出するためのモデルを作成する際に用いることが出来る。
<Effect>
By using the system disclosed in the present embodiment, the user can reduce extraction omission of articles regarding new malware when identifying articles regarding predetermined malware from a large number of security-related articles existing on the Internet. it can. This is because the technology according to the present disclosure makes it possible to prevent over-learning of expressions that frequently appear in learning text data when creating a learning model. The technology of the present disclosure is not limited to the embodiment described above, and can be used when creating a model for extracting a noun in a category in which a new word is likely to occur from a sentence.
1 システム
50 情報処理装置
1
Claims (12)
学習用文章データを単語に分割し、単語毎に、文字素性を含む複数の素性についての特徴データを設定する特徴生成手段と、
前記特徴データにおいて、単語毎にラベルを付すラベル付与手段と、
前記学習用文章データ又は前記特徴データに含まれる、文字素性について所定の属性を有する1又は複数の表現を、表現毎に、ランダムに生成された文字列に置換することで、置換済データを生成する置換手段と、
前記置換済みデータ及び前記ラベル付与済みの前記特徴データを学習データとして、新たに入力された抽出用文章データから文字素性について所定の属性を有する表現を抽出するためのモデルを作成する学習手段と、
を備える情報処理装置。 An information processing device for creating a model for extracting a predetermined expression from text data,
Feature generation means for dividing the learning sentence data into words, and setting feature data for a plurality of features including character features for each word,
In the characteristic data, a labeling unit that labels each word,
Replaced data is generated by replacing, for each expression, one or a plurality of expressions that have a predetermined attribute regarding the character feature included in the learning text data or the feature data, with a randomly generated character string. Replacement means to
Learning means for creating a model for extracting an expression having a predetermined attribute for a character feature from newly input extraction sentence data, using the replaced data and the labeled feature data as learning data,
An information processing apparatus including.
請求項1に記載の情報処理装置。 The replacement means, when replacing the expression with a randomly generated character string, generates and replaces a character string that matches the expression for features other than character features.
The information processing apparatus according to claim 1.
請求項1又は2に記載の情報処理装置。 The feature generation means sets feature data for a plurality of features further including a character feature, a character type feature, and a part-of-speech feature,
The information processing apparatus according to claim 1.
請求項3に記載の情報処理装置。 The replacement means, when replacing the expression with a randomly generated character string, generates and replaces a character string that matches the target expression with respect to the part-of-speech feature and the character type feature.
The information processing device according to claim 3.
前記学習手段は、前記第一の置換済みデータ及び前記第二の置換済データを用いて前記モデルを作成する、
請求項1から4の何れか一項に記載の情報処理装置。 The replacement means, with respect to one of the learning sentence data or the feature data, first replaced data in which the expression is replaced with a first character string that is randomly generated, and second randomly generated data. A second replaced data in which the expression is replaced with a character string, and
The learning means creates the model using the first replaced data and the second replaced data.
The information processing apparatus according to any one of claims 1 to 4.
請求項1から5の何れか一項に記載の情報処理装置。 The expression having the predetermined attribute is a noun of a category in which a new word is likely to occur,
The information processing apparatus according to any one of claims 1 to 5.
請求項6に記載の情報処理装置。 The expression having the predetermined attribute is a malware name,
The information processing device according to claim 6.
請求項7に記載の情報処理装置。 Further comprising text data acquisition means for collecting pages including security related articles from the Internet, extracting text from the pages, and acquiring the learning text data or the extraction text data.
The information processing device according to claim 7.
請求項1から8の何れか一項に記載の情報処理装置。 Further comprising extraction means for extracting an expression having the predetermined attribute from the extraction sentence data using the model created by the learning means,
The information processing apparatus according to any one of claims 1 to 8.
前記抽出手段によって抽出された表現から、前記記録手段によって記録されている、前記所定の属性を有さない表現を除外するフィルタリング手段と、を更に備える、
請求項9に記載の情報処理装置。 Recording means for recording an expression not having the predetermined attribute,
Filtering means for excluding, from the expressions extracted by the extracting means, expressions that do not have the predetermined attribute, which are recorded by the recording means.
The information processing device according to claim 9.
学習用文章データを単語に分割し、単語毎に、文字素性を含む複数の素性についての特徴データを設定する特徴生成ステップと、
前記特徴データにおいて、単語毎にラベルを付すラベル付与ステップと、
前記学習用文章データ又は前記特徴データに含まれる、文字素性について所定の属性を有する1又は複数の表現を、表現毎に、ランダムに生成された文字列に置換することで、置換済データを生成する置換ステップと、
前記置換済みデータ及び前記ラベル付与済みの前記特徴データを学習データとして、新たに入力された抽出用文章データから文字素性について所定の属性を有する表現を抽出するためのモデルを作成する学習ステップと、
を実行する、モデル作成方法。 A computer for creating a model for extracting a predetermined expression from text data,
A feature generation step of dividing the learning sentence data into words, and setting feature data for a plurality of features including character features for each word,
In the characteristic data, a labeling step of labeling each word,
Replaced data is generated by replacing, for each expression, one or a plurality of expressions that have a predetermined attribute regarding the character feature included in the learning text data or the feature data, with a randomly generated character string. Replacement step,
A learning step of creating a model for extracting an expression having a predetermined attribute for a character feature from newly input extraction sentence data, using the replaced data and the labeled feature data as learning data,
How to create a model.
学習用文章データを単語に分割し、単語毎に、文字素性を含む複数の素性についての特徴データを設定する特徴生成手段と、
前記特徴データにおいて、単語毎にラベルを付すラベル付与手段と、
前記学習用文章データ又は前記特徴データに含まれる、文字素性について所定の属性を有する1又は複数の表現を、表現毎に、ランダムに生成された文字列に置換することで、置換済データを生成する置換手段と、
前記置換済みデータ及び前記ラベル付与済みの前記特徴データを学習データとして、新たに入力された抽出用文章データから文字素性について所定の属性を有する表現を抽出するためのモデルを作成する学習手段と、
として機能させるためのプログラム。
A computer for creating a model for extracting a predetermined expression from text data,
Feature generation means for dividing the learning sentence data into words, and setting feature data for a plurality of features including character features for each word,
In the characteristic data, a labeling unit that labels each word,
Replaced data is generated by replacing, for each expression, one or a plurality of expressions that have a predetermined attribute regarding the character feature included in the learning text data or the feature data, with a randomly generated character string. Replacement means to
Learning means for creating a model for extracting an expression having a predetermined attribute for a character feature from newly input extraction sentence data, using the replaced data and the labeled feature data as learning data,
Program to function as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018241970A JP2020106880A (en) | 2018-12-26 | 2018-12-26 | Information processing apparatus, model generation method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018241970A JP2020106880A (en) | 2018-12-26 | 2018-12-26 | Information processing apparatus, model generation method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020106880A true JP2020106880A (en) | 2020-07-09 |
Family
ID=71449045
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018241970A Pending JP2020106880A (en) | 2018-12-26 | 2018-12-26 | Information processing apparatus, model generation method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020106880A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112883150A (en) * | 2021-01-21 | 2021-06-01 | 平安科技(深圳)有限公司 | Method, device, equipment and storage medium for distinguishing trademark words from general words |
CN113591440A (en) * | 2021-07-29 | 2021-11-02 | 百度在线网络技术(北京)有限公司 | Text processing method and device and electronic equipment |
WO2023144925A1 (en) * | 2022-01-26 | 2023-08-03 | 三菱電機株式会社 | Learning device, estimation device, training method, estimation method, training program, and estimation program |
-
2018
- 2018-12-26 JP JP2018241970A patent/JP2020106880A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112883150A (en) * | 2021-01-21 | 2021-06-01 | 平安科技(深圳)有限公司 | Method, device, equipment and storage medium for distinguishing trademark words from general words |
WO2022156115A1 (en) * | 2021-01-21 | 2022-07-28 | 平安科技(深圳)有限公司 | Trademark term and general term distinguishing method and apparatus, device, and storage medium |
CN112883150B (en) * | 2021-01-21 | 2023-07-25 | 平安科技(深圳)有限公司 | Method, device, equipment and storage medium for distinguishing trademark words from general words |
CN113591440A (en) * | 2021-07-29 | 2021-11-02 | 百度在线网络技术(北京)有限公司 | Text processing method and device and electronic equipment |
WO2023144925A1 (en) * | 2022-01-26 | 2023-08-03 | 三菱電機株式会社 | Learning device, estimation device, training method, estimation method, training program, and estimation program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Arora et al. | Character level embedding with deep convolutional neural network for text normalization of unstructured data for Twitter sentiment analysis | |
JP4961755B2 (en) | Word alignment device, word alignment method, word alignment program | |
US8239349B2 (en) | Extracting data | |
CN112084381A (en) | Event extraction method, system, storage medium and equipment | |
CN107291684B (en) | Word segmentation method and system for language text | |
JP2017138655A (en) | Bilingual corpus creation method, device and program for the same, and machine translation system | |
US11113470B2 (en) | Preserving and processing ambiguity in natural language | |
Sawalha et al. | SALMA: standard Arabic language morphological analysis | |
CN103970798A (en) | Technology for searching and matching data | |
TWI656450B (en) | Method and system for extracting knowledge from Chinese corpus | |
JP2020106880A (en) | Information processing apparatus, model generation method and program | |
CN111666766A (en) | Data processing method, device and equipment | |
CN108763192B (en) | Entity relation extraction method and device for text processing | |
JP4266222B2 (en) | WORD TRANSLATION DEVICE, ITS PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM | |
CN112860896A (en) | Corpus generalization method and man-machine conversation emotion analysis method for industrial field | |
CN113268576A (en) | Deep learning-based department semantic information extraction method and device | |
Vykhovanets et al. | An overview of phonetic encoding algorithms | |
JP2015169947A (en) | Model learning device, morphological analysis device and method | |
Elbarougy et al. | Graph-Based Extractive Arabic Text Summarization Using Multiple Morphological Analyzers. | |
WO2019064137A1 (en) | Extraction of expression for natural language processing | |
Hussain et al. | A technique for perceiving abusive bangla comments | |
Jamro | Sindhi language processing: A survey | |
Dumitrescu et al. | Racai’s natural language processing pipeline for universal dependencies | |
CN115034209A (en) | Text analysis method and device, electronic equipment and storage medium | |
Li et al. | Chinese frame identification using t-crf model |