JP2023176750A - Learning apparatus, learning method, and learning program - Google Patents
Learning apparatus, learning method, and learning program Download PDFInfo
- Publication number
- JP2023176750A JP2023176750A JP2022089193A JP2022089193A JP2023176750A JP 2023176750 A JP2023176750 A JP 2023176750A JP 2022089193 A JP2022089193 A JP 2022089193A JP 2022089193 A JP2022089193 A JP 2022089193A JP 2023176750 A JP2023176750 A JP 2023176750A
- Authority
- JP
- Japan
- Prior art keywords
- image
- learning
- vae
- latent variable
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000012545 processing Methods 0.000 claims abstract description 22
- 239000013598 vector Substances 0.000 claims description 14
- 238000012986 modification Methods 0.000 claims description 13
- 230000004048 modification Effects 0.000 claims description 13
- 230000006870 function Effects 0.000 claims description 10
- 238000013459 approach Methods 0.000 claims description 6
- 238000005457 optimization Methods 0.000 claims description 6
- 238000012935 Averaging Methods 0.000 claims description 3
- 238000012549 training Methods 0.000 abstract description 22
- 238000010586 diagram Methods 0.000 description 16
- 238000012800 visualization Methods 0.000 description 5
- 230000006978 adaptation Effects 0.000 description 4
- 238000013136 deep learning model Methods 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Abstract
Description
本発明は、学習装置、学習方法及び学習プログラムに関する。 The present invention relates to a learning device, a learning method, and a learning program.
Adversarial Exampleとは、あるデータに対して人が認知できない、かつ、作為的な微小の摂動を加えることで作成される、深層学習の出力を撹乱することを目的とした敵対的な入力サンプルのことである。Adversarial Exampleは主に深層学習による画像分類問題の分野にて、議論されていたが、昨今では様々な分野におけるAdversarial Exampleの存在が指摘されている。 An adversarial example is an adversarial input sample that is created by adding a small artificial perturbation to certain data that cannot be perceived by humans, and is intended to disrupt the output of deep learning. It is. Adversarial examples were mainly discussed in the field of image classification problems using deep learning, but recently the existence of adversarial examples in various fields has been pointed out.
VAE(Variational AutoEncoder)は、エンコーダとデコーダの二つのモデルからなる深層学習アーキテクチャである。VAEは、入力データをエンコーダにより低次元の潜在変数に落とし込んだ後、デコーダにより潜在変数から入力データを復元するように学習を行うことで、データの生成分布を学習する。このため、VAEは、正常データの生成分布を学習して、それから外れたものを判別する異常検知に利用される。また、VAEが変換する潜在変数にはデータを復元するために重要な特徴量が含まれるため、VAEが変換する特徴量は、様々な機械学習タスクに利用される。 VAE (Variational AutoEncoder) is a deep learning architecture consisting of two models: an encoder and a decoder. VAE learns the data generation distribution by converting input data into low-dimensional latent variables using an encoder, and then performing learning to restore the input data from the latent variables using a decoder. For this reason, VAE is used for abnormality detection, which learns the generation distribution of normal data and discriminates data that deviates from it. Furthermore, since the latent variables transformed by VAE include features important for restoring data, the features transformed by VAE are used for various machine learning tasks.
ここで、VAEに対するAdversarial Exampleの脅威が示唆されている。VAEに対するAdversarial Exampleは、入力データに対し摂動(ノイズ)を載せることで、潜在変数やデコーダから再構成されるデータを任意のデータのものにする攻撃である。VAEは、微小かつ作為的なノイズを入力データに載せるAdversarial Exampleに対し、脆弱であり、その出力を撹乱されるという課題があった。具体的には、この攻撃により、VAEを使用する異常検知器が騙されたり、VAEが抽出した特徴量を利用する様々なDown Stream タスクの信頼性が脅威に晒されたりしている。 Here, the threat of Adversarial Example to VAE is suggested. An adversarial example against VAE is an attack that makes the data reconstructed from latent variables and decoders arbitrary data by adding perturbation (noise) to the input data. VAE is vulnerable to adversarial examples that add minute and artificial noise to input data, and the problem is that the output is disturbed. Specifically, this attack has tricked anomaly detectors that use VAE, and has threatened the reliability of various Down Stream tasks that utilize features extracted by VAE.
本発明は、上記に鑑みてなされたものであって、Adversarial Exampleに対して頑健なVAEを実現する学習装置、学習方法及び学習プログラムを提供することを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to provide a learning device, a learning method, and a learning program that realize a robust VAE for Adversarial Examples.
上述した課題を解決し、目的を達成するために、学習装置は、入力画像を低次元の潜在変数に変換するエンコーダと、潜在変数から入力画像を再構成して出力画像として出力するデコーダとを有するVAEを用いて推定を行う推定部と、それぞれクラスラベルが付された画像群から、オリジナル画像を選択し、画像群から任意のターゲット画像をランダムに選択する選択部と、ターゲット画像からノイズを生成する生成部と、オリジナル画像にノイズを加えた加工画像を生成する加工部と、オリジナル画像のクラスラベルを教師ラベルとし、加工画像を学習データとしてVAEの学習を実行する学習部と、有することを特徴とする。 In order to solve the above-mentioned problems and achieve the objectives, the learning device includes an encoder that converts an input image into a low-dimensional latent variable, and a decoder that reconstructs the input image from the latent variables and outputs it as an output image. an estimation unit that performs estimation using VAE, a selection unit that selects an original image from a group of images each with a class label and randomly selects an arbitrary target image from the image group, and a selection unit that removes noise from the target image. A processing unit that generates a processed image by adding noise to the original image; and a learning unit that uses the class label of the original image as a teacher label and executes VAE learning using the processed image as learning data. It is characterized by
本発明によれば、Adversarial Exampleに対して頑健なVAEを実現する。 According to the present invention, robust VAE is realized for Adversarial Examples.
以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。なお、以下では、ベクトルまたは行列であるAに対し、“^A”と記載する場合は「“A”の直上に“^”が記された記号」と同じであるとする。 Hereinafter, one embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the description of the drawings, the same parts are denoted by the same reference numerals. In addition, in the following, when A, which is a vector or a matrix, is written as "^A", it is assumed that it is the same as "a symbol with "^" written directly above "A"".
[実施の形態1]
本実施の形態では、データにノイズを加えることでVAEに誤判定させるAdversarial Exampleに対し、VAEへのAdversarial Training(非特許文献2)の適応を最適化した学習方法を提案する。Adversarial Trainingは、学習データとしてAdversarial Exampleを用いて、モデルを学習する方法である。
[Embodiment 1]
In this embodiment, we propose a learning method that optimizes the adaptation of Adversarial Training (Non-Patent Document 2) to VAE for an Adversarial Example that causes VAE to make a false judgment by adding noise to data. Adversarial Training is a method of learning a model using Adversarial Examples as training data.
[記号]
表1に実施の形態で使用する各記号の詳細を示す。
[symbol]
Table 1 shows details of each symbol used in the embodiment.
[VAE]
VAEについて説明する。図1は、VAEの概要を説明する図である。図1に示すように、VAEは、エンコーダとデコーダとの二つのモデルによって構成されている。エンコーダは、入力画像xを低次元の潜在変数zに圧縮し、デコーダは、潜在変数zから入力画像xを再構成する。デコーダは、再構成した画像を出力画像^xとして出力する。
[VAE]
VAE will be explained. FIG. 1 is a diagram illustrating an overview of VAE. As shown in FIG. 1, VAE is composed of two models: an encoder and a decoder. The encoder compresses the input image x into low-dimensional latent variables z, and the decoder reconstructs the input image x from the latent variables z. The decoder outputs the reconstructed image as an output image ^x.
これにより、VAEはデータの生成分布p(x)を学習する。VAEの学習に用いられる従来の最適化関数を式(1)に示す。従来、式(1)を用いてエンコーダ及びデコーダのモデルパラメータを最適化されていた。 Thereby, the VAE learns the data generation distribution p(x). A conventional optimization function used for VAE learning is shown in equation (1). Conventionally, model parameters of encoders and decoders have been optimized using equation (1).
[VAEに対するAdversarial Example]
VAEに対するAdversarial Exampleは、図1で示した入力画像xに対して作為的なノイズを載せることで、潜在変数や出力画像を任意のターゲット画像のものに変更してしまう攻撃である。図2は、VAEに対するAdversarial Exampleを説明する図である。
[Adversarial Example for VAE]
An adversarial example against VAE is an attack in which the latent variables and output image are changed to those of an arbitrary target image by adding artificial noise to the input image x shown in FIG. FIG. 2 is a diagram illustrating an Adversarial Example for VAE.
図2に示すように、この攻撃は、入力画像であるKL(Kullback-Leibler)オリジナル画像(以降、オリジナル画像)xの潜在変数とターゲット画像xtの潜在変数とをKLダイバージェンスによって近づけるようなノイズ(Adversarial Perturbation)dを生成することで行われる。 As shown in Figure 2, this attack uses noise that brings the latent variables of the KL (Kullback-Leibler) original image (hereinafter referred to as the original image), which is the input image, closer to the latent variables of the target image xt by KL divergence. (Adversarial Perturbation) This is done by generating d.
この攻撃の概要を式(2)に示す。 An outline of this attack is shown in equation (2).
そして、この攻撃では、ノイズdをオリジナル画像xに加えた画像xadvをVAEの入力とする。言い換えると、この攻撃では、ターゲット画像xtと潜在変数の差が大きいオリジナル画像xではなく、ターゲット画像xtと潜在変数の差が小さい画像xadvをVAEに入力し、VAEからターゲット画像xtに近い画像xadv_recが出力されるようにする。この攻撃により、VAEを使用する異常検知器の誤検出が起こるほか、VAEが抽出した特徴量を利用する様々なDown Stream タスクの信頼性が脅威に晒される。 In this attack, an image x adv obtained by adding noise d to the original image x is input to the VAE. In other words, in this attack, instead of the original image x with a large difference between the target image x t and the latent variable, an image x adv with a small difference between the target image x t and the latent variable is input to the VAE, and the target image x t is input from the VAE. An image x adv_rec close to . This attack not only causes false positives in anomaly detectors that use VAE, but also threatens the reliability of various Down Stream tasks that utilize features extracted by VAE.
[学習装置]
次に、実施の形態1に係る学習装置について説明する。実施の形態1に係る学習装置は、データにノイズを加えることでVAEに誤判定させるAdversarial Exampleに対し、VAEへのAdversarial Trainingの適応を最適化した学習方法を実行することで、Adversarial Exampleに対して頑健なVAEを実現する。
[Learning device]
Next, a learning device according to
図3は、実施の形態1に係る学習装置の構成の一例を模式的に示す図である。実施の形態1に係る学習装置10は、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)、CPU(Central Processing Unit)等を含むコンピュータ等に所定のプログラムが読み込まれて、CPUが所定のプログラムを実行することで実現される。また、学習装置10は、ネットワーク等を介して接続された他の装置との間で、各種情報を送受信する通信インタフェースを有する。 FIG. 3 is a diagram schematically showing an example of the configuration of the learning device according to the first embodiment. In the learning device 10 according to the first embodiment, a predetermined program is loaded into a computer or the like including, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a CPU (Central Processing Unit), etc., and the CPU executes a predetermined program. This is achieved by running the program. Further, the learning device 10 has a communication interface for transmitting and receiving various information with other devices connected via a network or the like.
実施の形態1に係る学習装置10は、画像データセット11、選択部12、ノイズ生成部13、加工部14、推定部15及び学習部16を有する。
The learning device 10 according to the first embodiment includes an
推定部15は、VAE151を用いて、入力画像xを基に所定の情報を推定する。VAE151は、図1に示すように、入力画像xを低次元の潜在変数zに変換するエンコーダと、潜在変数zから入力画像を再構成し、再構成した画像を出力画像^xとして出力するデコーダとを有する。VAE151のエンコーダのモデルパラメータφと、デコーダのモデルパラメータθとは、学習部16(後述)による学習の実行により、Adversarial Exampleに対し頑健となるように最適化される。
The
画像データセット11は、それぞれクラスラベルが付された画像群である。画像データセット11は、例えば、「0」~「9」の手書き数字の画像とラベルとがセットになったMNIST(Modified National Institute of Standards and Technology)データセット([online],[令和4年2月16日検索],インターネット<URL:https://arxiv.org/abs/1706.06083>)である。
The
選択部12は、画像データセット11から、オリジナル画像xと、任意のターゲット画像xtとを選択する。選択部12は、任意のターゲット画像xtをランダムに選択する。
選択部12は、例えば、「3」の手書き数字の画像をオリジナル画像xとして選択し、「3」以外の手書き数字のいずれかの画像をランダムにターゲット画像xtとして選択する。オリジナル画像xは、VAE151に再構成させたい画像である。ターゲット画像xtは、Adversarial Exampleのターゲットである。ターゲット画像xtは、Adversarial Exampleが、VAE151の潜在変数や出力画像を、オリジナル画像のものから変更させたい画像である。
The
For example, the
ノイズ生成部13は、オリジナル画像x及びターゲット画像xtからノイズdを生成する。ノイズ生成部13は、入力画像xに対し、入力画像xの潜在変数zがターゲット画像xtを入力したときの潜在変数zに近づけるように、入力画像xのピクセルを操作し、ノイズを生成する。具体的には、ノイズ生成部13は、式(2)を最適化することによって、ノイズdを生成する。
The
加工部14は、オリジナル画像xに、ノイズdを加えた加工画像x+dを生成する。加工画像x+dは、VAE151学習用のAdversarial Exampleとなる。
The
学習部16は、オリジナル画像xのクラスラベルを教師ラベルとし、加工部14が生成した加工画像x+dを学習データとしてVAE151の学習を実行する。学習装置10は、Adversarial Exampleを生成し、生成したAdversarial Exampleを学習データとして、VAE151の学習を行う。学習部16は、加工画像x+dがVAE151に入力されても、VAE151からオリジナル画像xに近い画像が出力されるように、VAEの学習を実行する。学習部16は、パラメータ更新部161と、終了判定部162とを有する。
The
パラメータ更新部161は、オリジナル画像xのクラスラベルを教師ラベルとし、加工画像x+dを学習データとして、VAE151の学習を実行する。パラメータ更新部2161は、加工画像x+dを入力し、オリジナル画像xを出力するように、エンコーダのモデルパラメータφとデコーダのモデルパラメータθを更新する。パラメータ更新部161は、式(3)を用いてエンコーダのモデルパラメータφとデコーダのモデルパラメータθを最適化する。ここで、dは、ランダムなターゲット画像xtに対して生成される。
The parameter update unit 161 executes learning of the
終了判定部162は、所定の終了条件を満たす場合、VAE151の学習処理を終了する。終了条件は、例えば、損失が所定の閾値以下となった場合、パラメータの更新回数が所定の回数に到達した場合、パラメータ更新量が所定の閾値以下となった場合などである。
The termination determination unit 162 terminates the learning process of the
[学習処理]
次に、学習装置10が実行する学習方法処理手順について説明する。図4は、実施の形態1に係る学習方法の処理手順を示すフローチャートである。
[Learning process]
Next, the learning method processing procedure executed by the learning device 10 will be explained. FIG. 4 is a flowchart showing the processing procedure of the learning method according to the first embodiment.
図4に示すように、学習装置10では、選択部12が、画像データセット11から、オリジナル画像xと、任意のターゲット画像xtとを選択する(ステップS1)。ノイズ生成部13は、オリジナル画像x及びターゲット画像xtからノイズdを生成する(ステップS2)。加工部14は、オリジナル画像xに、ノイズdを加えた加工画像x+dを生成する(ステップS3)。
As shown in FIG. 4, in the learning device 10, the
学習部16は、加工画像x+dをVAE151に入力し、推定部15に、再構成した画像を推定させる(ステップS4)。学習部16は、式(3)を用いてエンコーダのモデルパラメータφとデコーダのモデルパラメータθを更新する(ステップS5)。
The
そして、学習部16は、所定の終了条件を満たすか否かを判定する(ステップS6)。所定の終了条件を満たしていない場合(ステップS6:No)、学習装置10は、ステップS1に戻る。学習装置10は、ステップS1~ステップS5の処理を所定の終了条件を満たすまで繰り返し、VAE151を訓練する。所定の終了条件を満たした場合(ステップS6:Yes)、学習装置10は、VAE151の学習処理を終了する。
The
[実施の形態1の効果]
実施の形態1では、VAEのAdversarial Trainingに適したAdversarial Exampleの生成し、VAEの学習を行った。Adversarial Trainingは、学習データとしてAdversarial Exampleを用いて、モデルを学習する方法である。
[Effects of Embodiment 1]
In the first embodiment, an Adversarial Example suitable for VAE Adversarial Training was generated and VAE learning was performed. Adversarial Training is a method of learning a model using Adversarial Examples as training data.
一般的に、従来のAdversarial Trainingに用いられるAdversarial Exampleは、non-target attackによって作成された。non-target attackは、モデルの誤差関数の値が悪くなるようにAdversarial Exampleを作成するものである。すなわち、一般的にAdversarial Trainingは、モデルの誤差関数を悪化させるようなノイズを、入力データに載せるものである。 Generally, Adversarial Examples used in conventional Adversarial Training are created using non-target attacks. A non-target attack is one that creates an adversarial example so that the value of the model's error function becomes worse. That is, in general, adversarial training adds noise to input data that worsens the error function of the model.
これに対し、VAEに対するAdversarial Exampleは、ターゲットとなるターゲット画像があり、このターゲット画像をVAEに再構成させる攻撃である。言い換えると、VAEに対するAdversarial Exampleは、あるターゲット画像に対して元の入力画像を近づけるように入力画像にノイズを載せ、VAEにおける潜在変数や出力画像を、そのターゲット画像のものに変更させてしまう攻撃である。このため、VAEに対するAdversarial Exampleは、従来のnon-target attackによって作成されるAdversarial Exampleと大きく乖離しており、そのまま適用すると問題設定のずれがあった。 On the other hand, the Adversarial Example against VAE is an attack in which there is a target image and the VAE is made to reconstruct this target image. In other words, an adversarial example for VAE is an attack that adds noise to the input image so that the original input image approaches a certain target image, and changes the latent variables and output image in VAE to those of the target image. It is. For this reason, the Adversarial Example for VAE differs greatly from the Adversarial Example created by conventional non-target attacks, and if applied as is, there would be a deviation in problem setting.
そこで、実施の形態1では、、毎回ターゲット画像をランダムに選択し、選択したターゲット画像に近づけるように、入力画像に、ターゲット画像から生成したノイズを載せるという加工を行う。これによって、実施の形態1では、VAEに適したAdversarial Exampleを作成し、Adversarial Exampleに対するVAE151のAdversarial Trainingを実現した。
Therefore, in the first embodiment, a target image is randomly selected each time, and noise generated from the target image is added to the input image so that it approaches the selected target image. As a result, in the first embodiment, an Adversarial Example suitable for VAE was created, and Adversarial Training of the
そして、実施の形態1では、Adversarial Trainingに用いるAdversarial Exampleを、毎回ターゲット画像をランダムに選んで生成する。これによって、実施の形態では、幅広い攻撃のバリエーションに対応できるように、攻撃のバリエーションに合わせて幅広くノイズを生成して、VAEの学習を行った。 In the first embodiment, an Adversarial Example used for Adversarial Training is generated by randomly selecting a target image each time. As a result, in the embodiment, in order to be able to deal with a wide range of attack variations, VAE learning is performed by generating a wide range of noises in accordance with the attack variations.
これまで、VAEに対するAdversarial Exampleの脅威は知られているが、それに対する防御方法はなかった。実施の形態1では、VAEに対してAdversarial Trainingを適応することができ、Adversarial Exampleに対して剛健なVAEを実現することが可能である。 Until now, the threat of Adversarial Example to VAE was known, but there was no way to protect against it. In the first embodiment, Adversarial Training can be applied to VAE, and robust VAE can be realized for Adversarial Example.
[実施の形態2]
図5は、通常のVAEモデルと、実施の形態1にかかる学習方法を用いてAdversarial Trainingを行ったVAEモデルとの潜在変数空間の可視化図である。図5は、VAEの潜在変数空間を2次元に落とし込み、さらにクラスラベルごとにデータをマークの違いで分けしたものである。図5が示すように、潜在変数空間において、Adversarial Trainingを行ったVAEモデルは、従来の通常のモデルと比して、同じ傾向のデータが集まり、違う傾向のデータとは異なるように学習されていることがわかる。実施の形態2では、これに着目し、VAEが変換した潜在変数を基に、異なるクラス間で潜在変数空間の距離をさらに離すようにVAEの学習を実行する。
[Embodiment 2]
FIG. 5 is a visualization diagram of the latent variable space of a normal VAE model and a VAE model that has been subjected to adversarial training using the learning method according to the first embodiment. Figure 5 shows the latent variable space of VAE reduced to two dimensions, and the data is further divided by mark for each class label. As shown in Figure 5, in the latent variable space, the VAE model that has undergone Adversarial Training is different from the conventional normal model in that data with the same tendency is collected and data with different trends is trained differently. I know that there is. In the second embodiment, focusing on this, VAE learning is performed to further increase the distance in the latent variable space between different classes based on the latent variables transformed by VAE.
[学習装置]
図6は、実施の形態2に係る学習装置の構成の一例を模式的に示す図である。実施の形態2に係る学習装置210は、図3に示す学習装置10と比して、修正部212をさらに有する。また、学習装置210は、図3に示す学習部16に代えて、学習部16を有する。
[Learning device]
FIG. 6 is a diagram schematically showing an example of the configuration of a learning device according to the second embodiment. The learning device 210 according to the second embodiment further includes a modification unit 212, unlike the learning device 10 shown in FIG. Further, the learning device 210 includes a
修正部212は、異なるクラス間で潜在変数空間の距離をさらに離すようにVAE151の学習を実行するために、式(4)のように潜在変数空間を確率分布p´(z)に近づけるように式(3)の最適化関数を修正する。
In order to execute learning of the
修正部212は、まず、式(1)を用いて学習済みの通常のVAEが出力する潜在変数ベクトルを取得し、取得した潜在変数ベクトルをクラスごとに平均したベクトルを取得する。潜在変数ベクトルの取得対象であるVAEは、潜在変数の事前分布pθ(z)を標準ガウス分布として学習した学習済みのVAEであれば、推定部15のVAE151であってもよいし、他の装置で学習されたVAEであってもよい。
The modification unit 212 first obtains a latent variable vector output by a trained normal VAE using equation (1), and obtains a vector obtained by averaging the obtained latent variable vectors for each class. The VAE from which the latent variable vector is acquired may be the
修正部212は、取得した潜在変数ベクトルをクラスごとに平均したベクトルを計算する。修正部212は、取得した潜在変数ベクトルを基に、クラスごとに、潜在変数の平均ベクトルを計算する。修正部212は、式(4)のように、クラスごとに平均したベクトルをα倍したベクトルを平均とした分散1のガウス分布を、該クラスのp´(z)に設定する。つまり、p´(z)は、クラスごとに異なる確率分布となる。なお、特に言及がない場合、α=2とする。 The modification unit 212 calculates a vector obtained by averaging the acquired latent variable vectors for each class. The modification unit 212 calculates the average vector of latent variables for each class based on the acquired latent variable vector. The modification unit 212 sets p'(z) of the class to a Gaussian distribution with a variance of 1, in which the average vector for each class is multiplied by α, as shown in Equation (4). In other words, p'(z) has a different probability distribution for each class. Note that unless otherwise specified, α=2.
このように、修正部212は、クラスごとにp´(z)を設定する。すなわち、修正部212は、式(3)を、画像のクラスごとに、潜在変数の事前分布pθ(z)の平均を変えるような処理を行った最適化関数(式(4))に修正する。 In this way, the modification unit 212 sets p'(z) for each class. That is, the modification unit 212 modifies equation (3) into an optimization function (formula (4)) that performs processing to change the average of the prior distribution p θ (z) of the latent variables for each class of images. do.
学習部216では、パラメータ更新部2161は、修正部212によって修正された式(4)を用いて、VAE151のエンコーダのモデルパラメータφとデコーダのモデルパラメータθを更新する。
In the
[学習処理]
次に、学習装置210が実行する学習方法処理手順について説明する。図7は、実施の形態2に係る学習方法の処理手順を示すフローチャートである。
[Learning process]
Next, the learning method processing procedure executed by the learning device 210 will be described. FIG. 7 is a flowchart showing the processing procedure of the learning method according to the second embodiment.
図7に示すように、修正部212は、異なるクラス間で潜在変数空間の距離をさらに離すようにVAE151の学習を実行するために、潜在変数空間を確率分布p´(z)に近づけるように、式(4)のように最適化関数を修正する(ステップS11)。
As shown in FIG. 7, the modification unit 212 executes learning of the
ステップS12~ステップS15は、図4に示すステップS1~ステップS4と同じ処理である。パラメータ更新部2161は、修正部212によって修正された式(4)を用いて、VAE151のエンコーダのモデルパラメータφとデコーダのモデルパラメータθを更新する(ステップS16)。ステップS17は、図4に示すステップS6と同じ処理である。
Steps S12 to S15 are the same processes as steps S1 to S4 shown in FIG. The
[検証実験]
実施の形態1,2において学習したVAEを実際に検証した。表2は、検証実験に使用するデータセット及び攻撃手法を示す。
[Verification experiment]
The VAE learned in
検証実験では、実施の形態1,2に係る学習方法を用いて学習を行ったVAE151のAdversarial Exampleに対する耐性を検証した。前述したように、VAEに対するAdversarial Exampleによって、再構成画像は元の画像と異なる任意のものに変換されてしまう。
In the verification experiment, the resistance of the
式(1)を用いて学習を行った通常のVAE、実施の形態1に係る学習方法を用いて合学習を行ったVAE、及び、実施の形態2に係る学習方法を用いて学習を行ったVAEについて、再構成画像の画像分類における精度を測定した。モデルが脆弱であれば再構成画像は元々のラベルとは違う画像になっているために分類精度は低下し、頑健であれば再構成画像は入力画像と同一となっているために真のラベル通りに分類することができる。実験結果を表3に示す。
A normal VAE trained using equation (1), a VAE trained using the learning method according to
表3に示すように、実施の形態1で説明したAdversarial Trainingを行うことで、通常のVAEよりも、分類精度を向上させることができた。また、実施の形態2で説明したように、異なるクラス間で、潜在変数の距離を離すように学習したVAEがもっとも良い精度を示した。
As shown in Table 3, by performing the Adversarial Training described in
[潜在変数空間の可視化]
図8は、通常のVAEモデルと、実施の形態1,2に係る学習方法を用いてAdversarial Trainingを行ったVAEモデルとの潜在変数空間の可視化図である。
[Visualization of latent variable space]
FIG. 8 is a visualization diagram of the latent variable space of a normal VAE model and a VAE model that has undergone adversarial training using the learning methods according to the first and second embodiments.
図8に示すように、実施の形態2に係る学習方法を用いてAdversarial Trainingを行ったVAEモデルでは、実施の形態1に係る学習方法を用いてAdversarial Trainingを行ったVAEモデルにおける潜在変数空間と比して、データの潜在変数がクラスごとに離れている。したがって、実施の形態2にかかる学習方法を用いてAdversarial Trainingをすることで、データの潜在変数をクラスごとに分離することができ、分類精度の向上を図ることができる。
As shown in FIG. 8, the latent variable space of the VAE model that underwent Adversarial Training using the learning method according to Embodiment 2 is different from that of the VAE model that underwent Adversarial Training using the learning method according to
[実施の形態2の効果]
このように、実施の形態2では、異なるクラス間で潜在変数の距離を離すように学習を行うことによって、Adversarial Exampleに対して、さらに頑健なVAEを実現することが可能である。
[Effects of Embodiment 2]
In this way, in the second embodiment, by performing learning to increase the distance of latent variables between different classes, it is possible to realize a more robust VAE for the Adversarial Example.
[適用例]
図9は、実施の形態1,2に係る学習方法を用いて学習したVAEの標識分類システムへの適応を示す図である。
[Application example]
FIG. 9 is a diagram showing adaptation of VAE learned using the learning methods according to
自動運転車では、道路上の標識を車載カメラによって撮影し、認識することで車体の制御に活用している。この際、車載カメラによって取り込まれた標識の画像データは、VAEを含む深層学習モデルを用いた画像分類システムによって、画像データがどの標識なのか分類される。ここで、標識分類システム中の深層学習モデルに対してAdversarial Example攻撃が行われると、間違った標識情報を認識させられ、それを基に車体が制御されることで、事故等につながるリスクがある。 Self-driving cars use on-board cameras to photograph and recognize road signs, which are then used to control the vehicle. At this time, the image data of the sign captured by the in-vehicle camera is classified as to which sign the image data is by an image classification system using a deep learning model including VAE. If an Adversarial Example attack is carried out against the deep learning model in the traffic sign classification system, it will cause the wrong traffic sign information to be recognized and the vehicle will be controlled based on that information, which could lead to an accident. .
したがって、特徴量抽出機能として、実施の形態1,2に係る学習方法を用いて学習したVAEを組み込むことで、このようなリスクを防ぐことが可能である。実施の形態1,2に係る学習方法を用いて学習したVAEを組み込むことによって、Adversarial Exampleの影響を受けずに、本来の認識したかった標識画像の特徴を適正に抽出することが可能である。これによって、標識を分類する深層学習モデルに対してAdversarial Exampleの影響を防ぐことができる。
Therefore, such a risk can be prevented by incorporating VAE learned using the learning method according to
[実施の形態のシステム構成について]
学習装置10,210の各構成要素は機能概念的なものであり、必ずしも物理的に図示のように構成されていることを要しない。すなわち、学習装置10,210の機能の分散及び統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散または統合して構成することができる。
[About the system configuration of the embodiment]
Each component of the learning devices 10, 210 is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distributing and integrating the functions of the learning devices 10 and 210 is not limited to what is shown in the drawings, and all or part of them can be functionally or It can be physically distributed or integrated.
また、学習装置10,210においておこなわれる各処理は、全部または任意の一部が、CPU、GPU(Graphics Processing Unit)、及び、CPU、GPUにより解析実行されるプログラムにて実現されてもよい。また、学習装置10,210においておこなわれる各処理は、ワイヤードロジックによるハードウェアとして実現されてもよい。 Further, each process performed in the learning devices 10 and 210 may be implemented in whole or in part by a CPU, a GPU (Graphics Processing Unit), or a program that is analyzed and executed by the CPU or GPU. Moreover, each process performed in the learning devices 10 and 210 may be realized as hardware using wired logic.
また、実施の形態において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的に行うこともできる。もしくは、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。この他、上述及び図示の処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて適宜変更することができる。 Furthermore, among the processes described in the embodiments, all or part of the processes described as being performed automatically can also be performed manually. Alternatively, all or part of the processes described as being performed manually can also be performed automatically using known methods. In addition, the information including the processing procedures, control procedures, specific names, and various data and parameters described above and illustrated can be changed as appropriate, unless otherwise specified.
[プログラム]
図7は、プログラムが実行されることにより、学習装置10,210が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
[program]
FIG. 7 is a diagram showing an example of a computer on which the learning device 10, 210 is realized by executing a program.
メモリ1010は、ROM1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。
Memory 1010 includes ROM 1011 and
ハードディスクドライブ1090は、例えば、OS(Operating System)1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、学習装置10,210の各処理を規定するプログラムは、コンピュータ1000により実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、学習装置10,210における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSD(Solid State Drive)により代替されてもよい。
The hard disk drive 1090 stores, for example, an OS (Operating System) 1091,
また、上述した実施の形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。
Further, the setting data used in the processing of the embodiment described above is stored as program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads out the
なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
Note that the
以上、本発明者によってなされた発明を適用した実施の形態について説明したが、本実施の形態による本発明の開示の一部をなす記述及び図面により本発明は限定されることはない。すなわち、本実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれる。 Although the embodiments applying the invention made by the present inventor have been described above, the present invention is not limited to the description and drawings that form part of the disclosure of the present invention according to the present embodiments. That is, all other embodiments, examples, operational techniques, etc. made by those skilled in the art based on this embodiment are included in the scope of the present invention.
10,210 学習装置
11 画像データセット
12 選択部
13 ノイズ生成部
14 加工部
15 推定部
16,216 学習部
151 VAE
161,2161 パラメータ更新部
162 終了判定部
212 修正部
10,210
161, 2161 Parameter update unit 162 End determination unit 212 Modification unit
Claims (7)
それぞれクラスラベルが付された画像群からオリジナル画像を選択し、前記画像群から任意のターゲット画像をランダムに選択する選択部と、
前記ターゲット画像からノイズを生成する生成部と、
前記オリジナル画像に前記ノイズを加えた加工画像を生成する加工部と、
前記オリジナル画像のクラスラベルを教師ラベルとし、前記加工画像を学習データとして前記VAEの学習を実行する学習部と、
有することを特徴とする学習装置。 an estimating unit that performs estimation using a VAE (Variational AutoEncoder) having an encoder that converts an input image into a low-dimensional latent variable, and a decoder that reconstructs the input image from the latent variable and outputs it as an output image;
a selection unit that selects an original image from a group of images each assigned a class label, and randomly selects an arbitrary target image from the group of images;
a generation unit that generates noise from the target image;
a processing unit that generates a processed image by adding the noise to the original image;
a learning unit that executes the VAE learning using the class label of the original image as a teacher label and the processed image as learning data;
A learning device characterized by having:
それぞれクラスラベルが付された画像群からオリジナル画像を選択し、前記画像群から任意のターゲット画像をランダムに選択する工程と、
前記ターゲット画像からノイズを生成する工程と、
前記オリジナル画像に前記ノイズを加えた加工画像を生成する工程と、
前記オリジナル画像のクラスラベルを教師ラベルとし、前記加工画像を学習データとして、入力画像を低次元の潜在変数に変換するエンコーダと前記潜在変数から前記入力画像を再構成して出力画像として出力するデコーダとを有するVAE(Variational AutoEncoder)の学習を実行する工程と、
を含んだことを特徴とする学習方法。 A learning method executed by a learning device, comprising:
selecting an original image from a group of images each assigned a class label, and randomly selecting an arbitrary target image from the group of images;
generating noise from the target image;
generating a processed image by adding the noise to the original image;
An encoder that converts an input image into a low-dimensional latent variable using the class label of the original image as a teacher label and the processed image as learning data, and a decoder that reconstructs the input image from the latent variable and outputs it as an output image. A step of executing learning of VAE (Variational AutoEncoder) having
A learning method characterized by including.
前記ターゲット画像からノイズを生成するステップと、
前記オリジナル画像に前記ノイズを加えた加工画像を生成するステップと、
前記オリジナル画像のクラスラベルを教師ラベルとし、前記加工画像を学習データとして、入力画像を低次元の潜在変数に変換するエンコーダと前記潜在変数から前記入力画像を再構成して出力画像として出力するデコーダとを有するVAE(Variational AutoEncoder)の学習を実行するステップと、
をコンピュータに実行させるための学習プログラム。 selecting an original image from a group of images each assigned a class label, and randomly selecting an arbitrary target image from the group of images;
generating noise from the target image;
generating a processed image by adding the noise to the original image;
An encoder that converts an input image into a low-dimensional latent variable using the class label of the original image as a teacher label and the processed image as learning data, and a decoder that reconstructs the input image from the latent variable and outputs it as an output image. a step of performing learning of VAE (Variational AutoEncoder) having
A learning program for making a computer execute
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022089193A JP2023176750A (en) | 2022-05-31 | 2022-05-31 | Learning apparatus, learning method, and learning program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022089193A JP2023176750A (en) | 2022-05-31 | 2022-05-31 | Learning apparatus, learning method, and learning program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023176750A true JP2023176750A (en) | 2023-12-13 |
Family
ID=89122817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022089193A Pending JP2023176750A (en) | 2022-05-31 | 2022-05-31 | Learning apparatus, learning method, and learning program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023176750A (en) |
-
2022
- 2022-05-31 JP JP2022089193A patent/JP2023176750A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lerch-Hostalot et al. | Unsupervised steganalysis based on artificial training sets | |
Lazarescu et al. | Using multiple windows to track concept drift | |
CN110472594B (en) | Target tracking method, information insertion method and equipment | |
WO2022142450A1 (en) | Methods and apparatuses for image segmentation model training and for image segmentation | |
Jia et al. | Robust tracking against adversarial attacks | |
CN111652290B (en) | Method and device for detecting countermeasure sample | |
US20180232604A1 (en) | Unsupervised Learning Techniques for Temporal Difference Models | |
JP6158882B2 (en) | Generating device, generating method, and generating program | |
US11379576B2 (en) | Identification of database intrusion by changes in data tables | |
US20210089891A1 (en) | Deep reinforcement learning based method for surreptitiously generating signals to fool a recurrent neural network | |
CN113408558A (en) | Method, apparatus, device and medium for model verification | |
Mao et al. | Gap++: Learning to generate target-conditioned adversarial examples | |
Duan et al. | Mask-guided noise restriction adversarial attacks for image classification | |
CN112084887A (en) | Attention mechanism-based self-adaptive video classification method and system | |
US20230049479A1 (en) | Computer-implemented method for accelerating convergence in the training of generative adversarial networks (gan) to generate synthetic network traffic, and computer programs of same | |
JP7176590B2 (en) | Image processing device, image processing method, and program | |
CN110581857B (en) | Virtual execution malicious software detection method and system | |
CN112801186A (en) | Verification image generation method, device and equipment | |
JP2023176750A (en) | Learning apparatus, learning method, and learning program | |
JP6214073B2 (en) | Generating device, generating method, and generating program | |
Hashemi et al. | Runtime monitoring for out-of-distribution detection in object detection neural networks | |
CN111695526B (en) | Network model generation method, pedestrian re-recognition method and device | |
US10832407B2 (en) | Training a neural network adapter | |
WO2022076802A1 (en) | Distortion-based filtering for image classification | |
CN114912568A (en) | Method, apparatus and computer-readable storage medium for data processing |