JP7672655B2 - Learning device, learning method, and learning program - Google Patents
Learning device, learning method, and learning program Download PDFInfo
- Publication number
- JP7672655B2 JP7672655B2 JP2022114304A JP2022114304A JP7672655B2 JP 7672655 B2 JP7672655 B2 JP 7672655B2 JP 2022114304 A JP2022114304 A JP 2022114304A JP 2022114304 A JP2022114304 A JP 2022114304A JP 7672655 B2 JP7672655 B2 JP 7672655B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- learning
- intermediate output
- clean
- cnn
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Image Analysis (AREA)
Description
本発明は、学習装置、学習方法及び学習プログラムに関する。 The present invention relates to a learning device, a learning method, and a learning program.
近年、機械学習技術、特に、畳み込みニューラルネットワーク(Convolutional Neural Network:CNN)を用いた、画像内の被写体の識別や検出、領域分割等の技術の精度向上が著しい。これらの機械学習技術を用いた、各種業務における目視工程の自動化を推進する技術が注目を集めている。 In recent years, there has been a remarkable improvement in the accuracy of machine learning techniques, particularly techniques using convolutional neural networks (CNNs), for identifying and detecting subjects in images, and for segmenting areas. Technologies that use these machine learning techniques to promote the automation of visual inspection processes in various business processes are attracting attention.
例えば、撮像された画像を処理することで業務の目視工程自動化を推進していく場合、CNNの画像処理は、目視工程を行っている人間の直感に沿った処理であることが望ましい。CNNの画像処理は、例えば、画像識別の際に識別対象に多少のノイズ等が付与されていても、識別結果は不変である、などの性質をもっていることが望ましい。 For example, when automating the visual inspection process of a business by processing captured images, it is desirable for the CNN image processing to be processing that is in line with the intuition of the person performing the visual inspection process. It is desirable for the CNN image processing to have a property such that, for example, the classification results remain unchanged even if some noise, etc. is added to the classification target during image classification.
CNNは、人間の視覚構造と類似する機構を持つモデルとして知られており、上記のようなノイズに対しても人間と同様の不変性を持つと考えられてきた。 CNN is known as a model with a mechanism similar to the human visual structure, and has been thought to have the same invariance to noise as humans.
しかしながら、近年、CNNの画像処理は人間が知覚できないような微小なノイズに対して不変性を有さないことが明らかになってきた。特に、敵対的摂動と呼ばれる脆弱性攻撃は、人間はほとんど感知できない微小なノイズでありながらも、何も対策を講じていない場合、CNNの画像識別をほぼ100%の確率で誤らせること、すなわち、人間から見れば犬が映っているのにも関わらず車と識別する、といったことを可能にすることが明らかになっている。 However, in recent years, it has become clear that CNN image processing is not invariant to minute noise that humans cannot perceive. In particular, it has become clear that a vulnerability attack called adversarial perturbation can cause CNN to make image classification errors with almost 100% probability, even when the noise is so minute that humans cannot perceive it, if no countermeasures are taken. In other words, it can make CNN identify an image as a car even though it appears to be a dog from a human perspective.
このような人間の直感と異なる敵対的摂動に対するCNNの挙動は、実用上大きな課題となり得る。したがって、敵対的摂動に対してロバストなCNNモデルを構築することは、CNNの実用上、重要な課題である。 The behavior of CNNs in response to such adversarial perturbations that differ from human intuition can be a major practical challenge. Therefore, building a CNN model that is robust against adversarial perturbations is an important challenge for the practical use of CNNs.
ここで、敵対的摂動による攻撃に対してロバストなCNNを構築する手法として、様々な手法が提案されてきた。しかしながら、これらの多くの手法は、後に開発された新たな攻撃手法に対して、脆弱性が発見されている。 Here, various methods have been proposed to build CNNs that are robust against attacks using adversarial perturbations. However, many of these methods have been found to be vulnerable to new attack methods that were developed later.
ただし、ロバストなCNNを構築する手法のうち、敵対的学習(非特許文献1)と呼ばれる手法は、最新の攻撃手法に対しても、大きく識別精度を落とすことが無く、ロバストなCNNモデルを作成するための方法論として知られている。 However, among the methods for building a robust CNN, a method called adversarial learning (Non-Patent Document 1) is known as a methodology for creating a robust CNN model without significantly reducing classification accuracy even against the latest attack methods.
敵対的学習は、学習を行うCNNモデルを最大限攻撃する敵対的摂動を作りだし、その摂動が加えられた画像を正しく識別できるように学習を行う。敵対的学習は、この学習を繰り返し行うことによって、ロバストなCNNモデルを構築するというものである。 Adversarial learning creates adversarial perturbations that attack the CNN model to the maximum extent possible, and trains the model to correctly identify images to which the perturbations have been added. By repeating this learning process, adversarial learning builds a robust CNN model.
敵対的学習は、ロバスト性を高めるという目的に対しては、経験的に有効な手法であるのに対し、敵対的摂動が適用されていない画像(以下、クリーン画像)に対する識別精度が、クリーン画像のみを学習したCNN(以下、通常学習CNN)よりも大幅に低いという課題がある。 While adversarial learning has been empirically proven to be an effective method for increasing robustness, it has the problem that its classification accuracy for images to which no adversarial perturbation has been applied (hereafter, clean images) is significantly lower than that of a CNN trained only on clean images (hereafter, normal training CNN).
例えば、CIFAR-10という画像データセットにおいてWideResNet-34-10というアーキテクチャを採用した場合、通常CNNモデルは通常画像に対して95%程度の精度を実現するが、敵対的学習を行ったモデルは85%程度の精度となる。敵対的学習を行ったモデルは、通常CNNモデルよりも、10ポイントもの精度低下が起こる。 For example, when using the WideResNet-34-10 architecture on the CIFAR-10 image dataset, a normal CNN model achieves around 95% accuracy for normal images, while a model that has undergone adversarial learning achieves around 85% accuracy. The model that has undergone adversarial learning is 10 points less accurate than a normal CNN model.
悪意のある第三者からの敵対的摂動による攻撃に対するロバスト性の向上は重要な課題である一方、通常画像の精度も実用上は非常に重要である。このため、ロバスト性を高めるために、通常画像の精度を大きく低下させることは、実用上好ましくない。 While improving robustness against attacks by adversarial perturbations from malicious third parties is an important issue, the accuracy of normal images is also very important in practical terms. For this reason, significantly reducing the accuracy of normal images in order to increase robustness is not desirable in practical terms.
本発明は、上記に鑑みてなされたものであって、クリーン画像への精度を保持しながら、敵対的学習によるロバスト性を高めた画像識別モデルを提供する学習装置、学習方法及び学習プログラムを提供することを目的とする。 The present invention has been made in consideration of the above, and aims to provide a learning device, a learning method, and a learning program that provide an image recognition model that has improved robustness through adversarial learning while maintaining accuracy for clean images.
上述した課題を解決し、目的を達成するために、本発明に係る学習装置は、正解ラベルが付された第1のクリーン画像を基に摂動を生成し、生成した摂動を、前記第1のクリーン画像に重畳した重畳画像を生成する生成部と、複数のクリーン画像を学習データとして画像識別を学習した第1のNN(Neural Network)を用いて、前記第1のクリーン画像に対して画像識別を行い、前記第1のNNの中間出力を第1の中間出力として出力する第1の画像識別部と、前記第1のNNのモデルパラメータが初期パラメータとして設定された第2のNNを用いて、前記重畳画像に対して画像識別を行い、前記第2のNNの中間出力を第2の中間出力として出力する第2の画像識別部と、前記第2の画像識別部による前記重畳画像に対する画像識別結果と前記第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、前記第1の中間出力と前記第2の中間出力との差分が小さくなるように、前記第2のNNのパラメータを最適化することによって、前記第2のNNの学習を実行する学習部と、を有することを特徴とする。 In order to solve the above-mentioned problems and achieve the object, the learning device according to the present invention has a generation unit that generates a perturbation based on a first clean image to which a correct answer label is attached and generates a superimposed image by superimposing the generated perturbation on the first clean image; a first image discrimination unit that performs image discrimination on the first clean image using a first NN (Neural Network) that has learned image discrimination using a plurality of clean images as learning data and outputs an intermediate output of the first NN as a first intermediate output; a second image discrimination unit that performs image discrimination on the superimposed image using a second NN in which model parameters of the first NN are set as initial parameters and outputs an intermediate output of the second NN as a second intermediate output; and a learning unit that executes learning of the second NN by optimizing parameters of the second NN so that the difference between the image discrimination result for the superimposed image by the second image discrimination unit and the correct answer label of the first clean image is small and the difference between the first intermediate output and the second intermediate output is small.
本発明によれば、クリーン画像への精度を保持しながら、敵対的学習によるロバスト性を高めた画像識別モデルを提供することができる。 The present invention provides an image recognition model that maintains accuracy for clean images while improving robustness through adversarial learning.
以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。 One embodiment of the present invention will be described in detail below with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the drawings, the same parts are denoted by the same reference numerals.
[実施の形態1]
実施の形態1では、敵対的摂動が重畳されていない画像(以下、クリーン画像)に対する画像識別精度を保持しながら、敵対的学習によるロバスト性を高めたCNN(Convolutional Neural Network)の学習について説明する。CNNは、画像識別モデルである。
[First embodiment]
In the first embodiment, a description will be given of learning of a Convolutional Neural Network (CNN) that has improved robustness through adversarial learning while maintaining image classification accuracy for an image not superimposed with adversarial perturbation (hereinafter, a clean image). A CNN is an image classification model.
図1は、正解ラベルが付されたクリーン画像のみを学習したCNN(以下、通常学習CNN)(第1のNN)と、敵対的学習(Adversarial Training:AT)を行ったCNNとにおける中間層の出力を説明する図である。図1は、CIFAR-10のデータセットを使用し、WideResNet28-10の27層目の表現を用いた調査結果である。 Figure 1 is a diagram explaining the output of the intermediate layers in a CNN trained only on clean images with correct labels (hereinafter referred to as a normal training CNN) (first NN) and a CNN that has undergone adversarial training (AT). Figure 1 shows the results of a survey using the CIFAR-10 dataset and the 27th layer representation of WideResNet28-10.
図1に示すように、通常学習CNNモデルによって得られる中間層の出力(特徴表現)(図1の(1))と、敵対的学習を行ったCNNモデルにおいて得られる中間層の出力とは、Cos類似度で0.2546程度しか一致せず、大きく異なることがわかった。 As shown in Figure 1, the output of the intermediate layer (feature representation) obtained by the normal learning CNN model (Figure 1 (1)) and the output of the intermediate layer obtained by the CNN model that has undergone adversarial learning only matched at about 0.2546 in terms of Cos similarity, indicating a large difference.
この結果は、通常学習CNNでうまく行えていた特徴抽出が、ATを行ったCNNモデルでは行えなくなり、大幅な精度低下が起こることを示唆している。実施の形態1では、ATにおいて、通常学習時に獲得するクリーン画像に対する特徴表現と同等の特徴表現を獲得できるように、言い換えると、通常学習CNNと同じような特徴抽出を行えるように、制約を加える。 This result suggests that feature extraction that was successful with a normal training CNN is no longer possible with a CNN model that has undergone AT, resulting in a significant drop in accuracy. In the first embodiment, constraints are imposed so that AT can acquire feature representations equivalent to those for clean images acquired during normal training, in other words, so that feature extraction similar to that of a normal training CNN can be performed.
図2は、実施の形態1における学習方法を説明する図である。実施の形態1では、正解ラベルが付されたクリーン画像xclean(x)に、敵対的摂動δを重畳した敵対的画像xadv(x+δ)(重畳画像)の学習の際、敵対的摂動δの大きさに基づくカリキュラム学習を行う(図2の(1))。言い換えると、実施の形態1では、敵対的摂動δの大きさが段階的に上がるように敵対的摂動δを生成することで、敵対的画像xadvに対するAT-CNN(第2のNN)のカリキュラム学習を行う。 2 is a diagram for explaining a learning method in the first embodiment. In the first embodiment, when learning an adversarial image x adv (x+δ) (superimposed image) in which an adversarial perturbation δ is superimposed on a clean image x clean (x) with a correct answer label, curriculum learning based on the magnitude of the adversarial perturbation δ is performed ((1) in FIG. 2). In other words, in the first embodiment, the adversarial perturbation δ is generated so that the magnitude of the adversarial perturbation δ increases stepwise, thereby performing curriculum learning of an AT-CNN (second NN) for the adversarial image x adv .
例えば、損失関数として、式(1)を用いて、AT-CNNのパラメータの最適化を行う。 For example, we use equation (1) as the loss function to optimize the parameters of AT-CNN.
ここで、f(θ,x+δ)は、(x+δ)(敵対的画像xadv)が入力された際のAT-CNN(モデルパラメータθ)が出力するラベルを表す。式(1)は、AT-CNNが出力するラベルと、クリーン画像xclean(x)に付された正解ラベルとの誤差を示す損失関数である。 Here, f(θ, x+δ) represents the label output by AT-CNN (model parameter θ) when (x+δ) (adversarial image x adv ) is input. Equation (1) is a loss function that indicates the error between the label output by AT-CNN and the correct label attached to the clean image x clean (x).
そして、式(1)をテーラー展開すると、式(2)のように近似できる。 Then, by performing a Taylor expansion on equation (1), we can approximate it as equation (2).
式(2)に示すように、右辺の第1項は、クリーン画像xが入力された際のAT-CNNが出力するラベルと、当該クリーン画像の正解ラベルyとの誤差を示す損失関数である。右辺の第1項は、クリーン画像に対する識別結果とクリーン画像の正解ラベルとの誤差を示す項である。 As shown in equation (2), the first term on the right-hand side is a loss function that indicates the error between the label output by AT-CNN when a clean image x is input and the correct label y of the clean image. The first term on the right-hand side is a term that indicates the error between the classification result for the clean image and the correct label of the clean image.
そして、式(2)の右辺の第2項以降は、敵対的摂動δに関する項であり、クリーン画像に対する識別結果とクリーン画像の正解ラベルとの誤差に対する影響度を示すものといえる。言い換えると、式(2)の右辺の第2項以降の影響の大きさは、敵対的摂動δによって支配されており、ATに特異な項といえる。 The second and subsequent terms on the right-hand side of equation (2) are terms related to the adversarial perturbation δ, and can be said to indicate the degree of influence on the error between the classification result for the clean image and the correct label of the clean image. In other words, the magnitude of the influence of the second and subsequent terms on the right-hand side of equation (2) is dominated by the adversarial perturbation δ, and can be said to be terms specific to AT.
そして、実施の形態1では、敵対的摂動δの大きさ|δ|∞によるカリキュラム学習を行う。言い換えると、実施の形態1では、大きさ0(δ=0は通常学習と同値)から、徐々に|δ|∞を大きくするという制約を設ける。すなわち、実施の形態1では、式(2)の右辺の第2項以降における、敵対的摂動δのクリーン画像に対する識別結果とクリーン画像の正解ラベルとの誤差に対する影響度が段階的に上がるように敵対的摂動δを生成する。 In the first embodiment, curriculum learning is performed with the magnitude |δ| ∞ of the adversarial perturbation δ. In other words, in the first embodiment, a constraint is imposed that |δ| ∞ is gradually increased from the magnitude 0 (δ=0 is the same value as normal learning). That is, in the first embodiment, the adversarial perturbation δ is generated so that the influence of the adversarial perturbation δ on the error between the classification result for the clean image and the correct label of the clean image in the second and subsequent terms on the right side of the formula (2) increases stepwise.
これによって、実施の形態1では、敵対的画像xadvに対するAT-CNN(第2のNN)の敵対的摂動δによる影響度に対する段階的な学習を実行させることで、カリキュラム学習を行う。 As a result, in the first embodiment, curriculum learning is performed by executing step-by-step learning of the influence of the adversarial perturbation δ of the AT-CNN (second NN) on the adversarial image x adv .
[学習装置]
次に、実施の形態1に係る学習装置について説明する。図3は、実施の形態1に係る学習装置の構成の一例を模式的に示す図である。
[Learning device]
Next, a description will be given of the learning device according to embodiment 1. Fig. 3 is a diagram illustrating an example of the configuration of the learning device according to embodiment 1.
実施の形態に係る学習装置10は、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)、CPU(Central Processing Unit)等を含むコンピュータ等に所定のプログラムが読み込まれて、CPUが所定のプログラムを実行することで実現される。また、学習装置10は、ネットワーク等を介して接続された他の装置との間で、各種情報を送受信する通信インタフェースを有する。学習装置10は、ワークステーションやパソコン等の汎用コンピュータで実現される。
The
学習装置10は、図3に示すように、画像記憶部11、初期化部12、敵対的摂動生成部13(生成部)、画像識別部14、最適化部15(学習部)及びスケジュール部16(制御部)を有する。
As shown in FIG. 3, the
画像記憶部11は、クリーン画像と、このクリーン画像の被写体のカテゴリを示す正解ラベルとの組を、複数記憶する。 The image storage unit 11 stores multiple pairs of clean images and correct labels that indicate the category of the subject of the clean images.
初期化部12は、画像識別モデルであるCNN141の初期パラメータを保持する。初期パラメータは、クリーン画像を学習データとして画像識別を予め学習したCNN(第1のNN)のモデルパラメータである。なお、初期パラメータは、クリーン画像を適切に識別できるモデルのモデルパラメータであれば足りる。 The initialization unit 12 holds the initial parameters of the CNN 141, which is an image recognition model. The initial parameters are model parameters of a CNN (first NN) that has previously learned image recognition using clean images as learning data. Note that the initial parameters need only be model parameters of a model that can appropriately recognize clean images.
敵対的摂動生成部13は、処理対象として、画像記憶部11から出力されたクリーン画像(第1のクリーン画像)を基に敵対的摂動(摂動)を生成し、生成した敵対的摂動を、第1のクリーン画像に重畳した重畳画像を生成する。 The adversarial perturbation generation unit 13 generates an adversarial perturbation (perturbation) based on the clean image (first clean image) output from the image storage unit 11 as the processing target, and generates a superimposed image by superimposing the generated adversarial perturbation on the first clean image.
敵対的摂動生成部13は、スケジュール部16によるスケジュール結果、最適化部15が最適化したCNN141(後述)のモデルパラメータ、第1のクリーン画像、及び、第1のクリーン画像の正解ラベルを基に、第1のクリーン画像への敵対的摂動を生成する。敵対的摂動生成部13は、生成した重畳画像を、敵対的画像として画像識別部14へ出力する。 The adversarial perturbation generation unit 13 generates an adversarial perturbation for the first clean image based on the schedule result by the schedule unit 16, the model parameters of the CNN 141 (described later) optimized by the optimization unit 15, the first clean image, and the ground truth label of the first clean image. The adversarial perturbation generation unit 13 outputs the generated superimposed image to the image classification unit 14 as an adversarial image.
スケジュール結果は、敵対的摂動の大きさがCNN141の学習段階に応じて段階的に上がるように、敵対的摂動を生成させるように設定される。スケジュール結果は、例えば、敵対的摂動の摂動のノルムなどのパラメータを制御する制御情報である。スケジュール結果の制御対象は、CNN141の特徴表現学習を大きく損ねないようにするパラメータであれば摂動のノルムに限らない。 The schedule result is set to generate adversarial perturbations so that the magnitude of the adversarial perturbations increases stepwise according to the learning stage of CNN141. The schedule result is, for example, control information that controls parameters such as the perturbation norm of the adversarial perturbation. The control target of the schedule result is not limited to the perturbation norm as long as it is a parameter that does not significantly impair the feature representation learning of CNN141.
画像識別部14は、敵対的摂動生成部13から、識別対象の敵対的画像を受け付け、CNN141を用いて、敵対的画像に対して画像識別を行う。まず、学習開始時には、CNN141には、クリーン画像を学習データとして画像識別を予め学習したCNNのモデルパラメータが初期パラメータとして設定される。そして、学習が進むと、CNN141には、最適化部15が最適化したCNN141のモデルパラメータが設定される。画像識別部14は、得られた出力(画像識別結果)をモデル出力として最適化部15に出力する。 The image classification unit 14 receives the adversarial image to be classified from the adversarial perturbation generation unit 13, and performs image classification on the adversarial image using the CNN 141. First, at the start of learning, the model parameters of a CNN that has previously learned image classification using clean images as training data are set as initial parameters in the CNN 141. Then, as learning progresses, the model parameters of the CNN 141 optimized by the optimization unit 15 are set in the CNN 141. The image classification unit 14 outputs the obtained output (image classification result) to the optimization unit 15 as a model output.
最適化部15は、モデル出力と正解ラベルとを基に、CNN141の評価と、CNN141のモデルパラメータの最適化を行う。最適化部15は、敵対的画像に対するモデル出力が、第1のクリーン画像の正解ラベルに近づくようにCNN141のモデルパラメータを最適化することによって、CNN141の学習を実行する。 The optimization unit 15 evaluates the CNN 141 and optimizes the model parameters of the CNN 141 based on the model output and the correct label. The optimization unit 15 optimizes the model parameters of the CNN 141 so that the model output for the adversarial image approaches the correct label of the first clean image, thereby performing learning of the CNN 141.
最適化部15部は、前述の式(2)の損失関数を用いて、CNN141のパラメータを最適化する。式(2)は、前述したように、第1のクリーン画像に対する識別結果と第1のクリーン画像の正解ラベルとの誤差を示す項と、この誤差に対する敵対的摂動の影響度を示す項とを有する。最適化部15は、スケジュール部16の制御によって、CNN141の、第1のクリーン画像に対する識別結果と第1のクリーン画像の正解ラベルとの誤差に対する敵対的摂動の影響度に対する段階的な学習を行う。 The optimization unit 15 optimizes the parameters of the CNN 141 using the loss function of the above-mentioned formula (2). As described above, formula (2) has a term indicating the error between the classification result for the first clean image and the correct label of the first clean image, and a term indicating the influence of adversarial perturbation on this error. Under the control of the schedule unit 16, the optimization unit 15 performs step-by-step learning of the influence of adversarial perturbation on the error between the classification result for the first clean image of the CNN 141 and the correct label of the first clean image.
最適化部15は、CNN141の評価結果をスケジュール部16に出力する。最適化部15は、最適化後のCNN141のモデルパラメータを、敵対的摂動生成部13と画像識別部14とに出力する。 The optimization unit 15 outputs the evaluation results of the CNN 141 to the schedule unit 16. The optimization unit 15 outputs the model parameters of the optimized CNN 141 to the adversarial perturbation generation unit 13 and the image classification unit 14.
スケジュール部16は、CNN141の評価結果を基に、敵対的摂動生成部13が生成する敵対的摂動の生成パラメータを決定する。スケジュール部16は、決定した生成パラメータを、スケジュール結果として、敵対的摂動生成部13に出力する。 The scheduler 16 determines the generation parameters of the adversarial perturbation generated by the adversarial perturbation generator 13 based on the evaluation results of the CNN 141. The scheduler 16 outputs the determined generation parameters to the adversarial perturbation generator 13 as the schedule result.
スケジュール部16は、敵対的摂動生成部13に、敵対的摂動の大きさが段階的に上がるように、敵対的摂動を生成させる。スケジュール部16は、敵対的摂動の大きさがCNN141の学習段階に応じて段階的に上がるように、敵対的摂動生成部13に敵対的摂動を生成させ、最適化部15に、CNNの、第1のクリーン画像に対する識別結果と第1のクリーン画像の正解ラベルとの誤差に対する敵対的摂動の影響度に対する段階的な学習を実行させる。 The scheduler 16 causes the adversarial perturbation generator 13 to generate the adversarial perturbation so that the magnitude of the adversarial perturbation increases stepwise. The scheduler 16 causes the adversarial perturbation generator 13 to generate the adversarial perturbation so that the magnitude of the adversarial perturbation increases stepwise according to the learning stage of the CNN 141, and causes the optimizer 15 to perform stepwise learning on the influence of the adversarial perturbation on the error between the classification result of the CNN for the first clean image and the correct label of the first clean image.
スケジュール部16は、学習を終了すると判定した場合には、最適化部15において最適化されたCNN141のモデルパラメータを学習済みパラメータとして出力する。 When the schedule unit 16 determines that learning is to be terminated, it outputs the model parameters of the CNN 141 optimized by the optimization unit 15 as learned parameters.
[学習処理]
次に、実施の形態1に係る学習処理について説明する。図4は、実施の形態1に係る学習処理の処理手順を示すフローチャートである。
[Learning process]
Next, a description will be given of the learning process according to the embodiment 1. Fig. 4 is a flowchart showing the processing procedure of the learning process according to the embodiment 1.
図4に示すように、学習装置10では、まず、初期化部12が、CNN141のパラメータ初期化のため、CNN141の初期パラメータを、敵対的摂動生成部13及び画像識別部14に出力する(ステップS1)。
As shown in FIG. 4, in the
学習装置10は、画像記憶部11の中から、1組の第1のクリーン画像と、この第1のクリーン画像に対応する正解ラベルとを取り出し、第1のクリーン画像と正解ラベルとを敵対的摂動生成部13に送信し、正解ラベルを最適化部15へ送信する(ステップS2)。
The
敵対的摂動生成部13は、敵対的画像生成処理を行う(ステップS3)。敵対的画像は、第1のクリーン画像に敵対的摂動生を重畳した画像である。 The adversarial perturbation generation unit 13 performs an adversarial image generation process (step S3). The adversarial image is an image in which the adversarial perturbation is superimposed on the first clean image.
画像識別部14は、CNN141を用いて、敵対的摂動生成部13が生成した敵対的画像に対する画像識別処理を行う(ステップS4)。 The image classification unit 14 uses the CNN 141 to perform image classification processing on the adversarial image generated by the adversarial perturbation generation unit 13 (step S4).
最適化部15は、モデル出力と正解ラベルとを基に、CNN141の評価と、CNN141のモデルパラメータの最適化を行う最適化処理を行う(ステップS5)。 The optimization unit 15 performs an optimization process to evaluate the CNN 141 and optimize the model parameters of the CNN 141 based on the model output and the correct label (step S5).
スケジュール部16は、CNN141の評価結果を基に、敵対的摂動生成部13が生成する敵対的摂動の大きさがCNN141の学習段階に応じて段階的に上がるように、敵対的摂動の生成パラメータを決定するスケジュール処理を行う(ステップS6)。 Based on the evaluation results of CNN141, the scheduler 16 performs a schedule process to determine the generation parameters of the adversarial perturbation so that the magnitude of the adversarial perturbation generated by the adversarial perturbation generator 13 increases stepwise according to the learning stage of CNN141 (step S6).
学習装置10は、学習処理を終了するか否かを判定する(ステップS7)。学習処理を終了しないと判定した場合(ステップS7:No)、学習装置10では、ステップS2に戻り、CNN141の学習を継続する。学習処理を終了すると判定した場合(ステップS7:Yes)、学習装置10は、スケジュール部16を介して、最適化後のCNN141のモデルパラメータを学習済みパラメータとして取得する(ステップS8)。
The
[敵対的画像生成処理]
次に、敵対的画像生成処理(ステップS3)について説明する。図5は、図4に示す敵対的画像生成処理の処理手順を示すフローチャートである。
[Adversarial image generation processing]
Next, the adversarial image generation process (step S3) will be described with reference to a flowchart shown in FIG.
まず、敵対的摂動生成部13は、学習の開始時か否かを判定する(ステップS11)。 First, the adversarial perturbation generator 13 determines whether or not it is the start of learning (step S11).
学習の開始時の場合(ステップS11:Yes)、敵対的摂動生成部13は、初期化部12から初期パラメータを取得する(ステップS12)。初期パラメータは、クリーン画像を学習データとして画像識別を予め学習したCNNのモデルパラメータであるが、クリーン画像を適切に識別できるモデルのモデルパラメータであれば足りる。敵対的摂動生成部13は、スケジュール結果を初期化する(ステップS13)。 When learning starts (step S11: Yes), the adversarial perturbation generator 13 obtains initial parameters from the initialization unit 12 (step S12). The initial parameters are model parameters of a CNN that has previously learned image recognition using clean images as training data, but any model parameters of a model that can appropriately recognize clean images will suffice. The adversarial perturbation generator 13 initializes the schedule result (step S13).
学習の開始時ではない場合(ステップS11:No)、敵対的摂動生成部13は、スケジュール部16からスケジュール結果を取得する(ステップS14)。スケジュール結果は、敵対的摂動の摂動のノルムなどのパラメータを制御する制御情報であるが、CNN141の特徴表現学習を大きく損ねないようにするパラメータであれば摂動のノルムに限らない。敵対的摂動生成部13は、最適化部15から最適化後のCNN141のモデルパラメータを取得し(ステップS15)、以降、画像識別パラメータとして用いる。 If it is not the start of learning (step S11: No), the adversarial perturbation generator 13 obtains a schedule result from the scheduler 16 (step S14). The schedule result is control information that controls parameters such as the perturbation norm of the adversarial perturbation, but is not limited to the perturbation norm as long as the parameters do not significantly impair the feature representation learning of the CNN 141. The adversarial perturbation generator 13 obtains the model parameters of the optimized CNN 141 from the optimizer 15 (step S15), and thereafter uses them as image identification parameters.
敵対的摂動生成部13は、画像記憶部11から、処理対象の第1のクリーン画像と、該第1のクリーン画像の正解ラベルとを取得する(ステップS16)。 The adversarial perturbation generator 13 obtains the first clean image to be processed and the correct label of the first clean image from the image storage unit 11 (step S16).
敵対的摂動生成部13は、スケジュール結果、第1のクリーン画像の正解ラベル、第1のクリーン画像、及び、ステップS12またはステップS15において取得したCNN141のモデルパラメータを基に、敵対的摂動を生成する(ステップS17)。ここで、敵対的摂動の生成として、正解ラベルに対する損失を最大化させるような手法を用いることが一般的である。また、敵対的摂動の生成手法として、Projected Gradient Descent(非特許文献1)を用いることを想定しているが、適切に敵対的摂動を生成できるのであれば、他の手法を用いてもよい。 The adversarial perturbation generator 13 generates an adversarial perturbation based on the schedule result, the ground truth label of the first clean image, the first clean image, and the model parameters of the CNN 141 acquired in step S12 or step S15 (step S17). Here, a method that maximizes the loss for the ground truth label is generally used to generate the adversarial perturbation. In addition, it is assumed that Projected Gradient Descent (Non-Patent Document 1) is used as a method for generating the adversarial perturbation, but other methods may be used as long as they can generate the adversarial perturbation appropriately.
敵対的摂動生成部13は、第1のクリーン画像に、生成した敵対的摂動を重畳し、敵対的画像として画像識別部14へ出力する(ステップS18)。 The adversarial perturbation generation unit 13 superimposes the generated adversarial perturbation on the first clean image and outputs it to the image classification unit 14 as an adversarial image (step S18).
[画像識別処理]
次に、画像識別処理(ステップS4)について説明する。図6は、図4に示す画像識別処理の処理手順を示すフローチャートである。
[Image Identification Processing]
Next, the image identification process (step S4) will be described with reference to a flowchart shown in FIG.
図6に示すように、画像識別部14は、学習の開始時か否かを判定する(ステップS21)。 As shown in FIG. 6, the image identification unit 14 determines whether or not learning has started (step S21).
学習の開始時の場合(ステップS21:Yes)、画像識別部14は、初期化部12から初期パラメータを取得する(ステップS22)。この初期パラメータは、ステップS12において敵対的摂動生成部13が取得した初期パラメータと同様のものであることを想定しているが、異なるパラメータであっても、類似の効果を得ることができる。 When learning starts (step S21: Yes), the image classification unit 14 acquires initial parameters from the initialization unit 12 (step S22). These initial parameters are assumed to be similar to the initial parameters acquired by the adversarial perturbation generation unit 13 in step S12, but similar effects can be obtained even if the parameters are different.
学習の開始時ではない場合(ステップS21:No)、画像識別部14は、最適化部15から最適化後のCNN141のモデルパラメータを取得し(ステップS23)、以降、画像識別パラメータとして用いる。 If it is not the start of learning (step S21: No), the image identification unit 14 obtains the optimized model parameters of the CNN 141 from the optimization unit 15 (step S23) and uses them as image identification parameters thereafter.
画像識別部14は、敵対的摂動生成部13からステップS18の処理によって出力された敵対的画像を取得する(ステップS24)。画像識別部14は、敵対的画像に対して、最適化後のCNN141のモデルパラメータに基づく画像識別を適用する(ステップS25)。画像識別部14は、ステップS22またはステップS23において取得したモデルパラメータが設定されたCNN141を用いて、敵対的画像に対して、画像識別処理を実行する。 The image identification unit 14 acquires the adversarial image output by the processing of step S18 from the adversarial perturbation generation unit 13 (step S24). The image identification unit 14 applies image identification based on the model parameters of the optimized CNN 141 to the adversarial image (step S25). The image identification unit 14 executes image identification processing on the adversarial image using the CNN 141 to which the model parameters acquired in step S22 or step S23 are set.
画像識別部14は、ステップS25の処理によって得られた出力分布をモデル出力として最適化部15へ出力する(ステップS26)。 The image identification unit 14 outputs the output distribution obtained by the processing of step S25 to the optimization unit 15 as a model output (step S26).
[最適化処理]
次に、最適化処理(ステップS5)について説明する。図7は、図4に示す最適化処理の処理手順を示すフローチャートである。
[Optimization process]
Next, the optimization process (step S5) will be described with reference to the flowchart of FIG.
図7に示すように、最適化部15は、学習の開始時か否かを判定する(ステップS31)。 As shown in FIG. 7, the optimization unit 15 determines whether or not learning has started (step S31).
学習の開始時の場合(ステップS31:Yes)、最適化部15は、初期化部12から初期パラメータを取得する(ステップS32)。 If learning has started (step S31: Yes), the optimization unit 15 obtains initial parameters from the initialization unit 12 (step S32).
学習の開始時ではない場合(ステップS31:No)、または、ステップS32終了後、最適化部15は、画像記憶部11から、処理対象の第1のクリーン画像の正解ラベルを取得する(ステップS33)。最適化部15は、画像識別部14から、モデル出力を出力する(ステップS34)。 If it is not the start of learning (step S31: No), or after step S32 is completed, the optimization unit 15 acquires the correct label of the first clean image to be processed from the image storage unit 11 (step S33). The optimization unit 15 outputs the model output from the image classification unit 14 (step S34).
最適化部15は、モデル出力xと正解ラベルyとの差分が小さくなるように、CNN141のモデルパラメータを最適化し、最適化後パラメータとして出力する(ステップS35)。最適化部15は、式(2)に示す損失関数を使用して、パラメータを最適化する。 The optimization unit 15 optimizes the model parameters of the CNN 141 so as to reduce the difference between the model output x and the correct label y, and outputs the optimized parameters (step S35). The optimization unit 15 optimizes the parameters using the loss function shown in equation (2).
また、最適化部15は、モデル出力xと正解ラベルyとの差分を小さくするような画像識別ロスによって画像識別パラメータを最適化し、最適化後パラメータを出力してもよい。なお、この画像識別ロスは、式(3)に示す交差エントロピ等が一般に用いられるが、所望の識別タスクにおいて適切な目的関数であれば、平均二乗誤差などでも同様の効果を奏する。 The optimization unit 15 may also optimize the image classification parameters using an image classification loss that reduces the difference between the model output x and the correct label y, and output the optimized parameters. Note that, for this image classification loss, the cross entropy shown in formula (3) or the like is generally used, but the mean squared error or the like can also have a similar effect as long as it is an appropriate objective function for the desired classification task.
最適化部15は、モデル出力がどの程度正解ラベルに近いか評価し、評価結果を出力する(ステップS36)。この評価には、モデル出力のargmaxを取った結果と正解ラベルとが一致しているか否か、などのほか、適切な評価指標であればどのような指標を用いてもよい。 The optimization unit 15 evaluates how close the model output is to the correct label, and outputs the evaluation result (step S36). This evaluation may be performed using any appropriate evaluation index, such as whether or not the result of taking the argmax of the model output matches the correct label.
[スケジュール処理]
次に、スケジュール処理(ステップS6)について説明する。図8は、図4に示すスケジュール処理の処理手順を示すフローチャートである。
[Schedule Processing]
Next, the schedule process (step S6) will be described with reference to a flow chart shown in FIG.
図8に示すように、スケジュール部16は、最適化部15がステップS36において記出力した評価結果を取得する(ステップS41)。スケジュール部16は、ステップS41において取得した評価結果が基準値以上であるか否かを判定する(ステップS42)。 As shown in FIG. 8, the schedule unit 16 acquires the evaluation result output by the optimization unit 15 in step S36 (step S41). The schedule unit 16 determines whether the evaluation result acquired in step S41 is equal to or greater than a reference value (step S42).
評価結果が基準値以上である場合(ステップS42:Yes)、スケジュール部16は、所定の終了条件を基に、CNN141の学習を終了するか否かを判定する(ステップS43)。学習の終了条件は、例えば、敵対的摂動を生成するパラメータが所望の値まで到達している場合、CNN141のパラメータの更新回数が所定の回数に到達した場合、パラメータ更新量が所定の閾値以下となった場合、最適化部15が算出した損失が所定の閾値以下となった場合、などである。 If the evaluation result is equal to or greater than the reference value (step S42: Yes), the schedule unit 16 determines whether or not to terminate the learning of the CNN 141 based on a predetermined termination condition (step S43). The termination condition for the learning is, for example, when the parameters generating the adversarial perturbation reach a desired value, when the number of updates of the parameters of the CNN 141 reaches a predetermined number, when the amount of parameter updates falls below a predetermined threshold, when the loss calculated by the optimization unit 15 falls below a predetermined threshold, etc.
スケジュール部16が、CNN141の学習を終了すると判定した場合(ステップS43:Yes)、学習装置10は、CNN141の学習を終了する。
If the schedule unit 16 determines that the learning of CNN 141 is to be terminated (step S43: Yes), the
スケジュール部16は、CNN141の学習を終了しないと判定した場合(ステップS43:No)、これまで用いていたパラメータを更新した新たな敵対的摂動生成のためのパラメータをスケジュール結果として敵対的摂動生成部13へ出力する(ステップS44)。 If the scheduler 16 determines that the learning of the CNN 141 is not to be terminated (step S43: No), it outputs parameters for generating new adversarial perturbations, which are updated from the parameters used up to that point, as the schedule result to the adversarial perturbation generator 13 (step S44).
CNN141に敵対的摂動による影響度を段階的に学習させるために、敵対的摂動は、学習段階に応じて、段階的に大きくなるように設定されている。このため、スケジュール部16は、例えば、検証対象の敵対的画像に対する画像識別の精度が10epoch飽和したら、敵対的摂動の摂動のノルムを、現段階から、現段階の次の段階の大きさに増加させたスケジュール結果を出力する。 In order to allow CNN 141 to learn the degree of influence of the adversarial perturbation in stages, the adversarial perturbation is set to become larger in stages according to the learning stage. For this reason, when the accuracy of image classification for the adversarial image to be verified saturates for 10 epochs, for example, the schedule unit 16 outputs a schedule result in which the norm of the perturbation of the adversarial perturbation is increased from the current stage to the size of the stage next to the current stage.
評価結果が基準値未満である場合(ステップS42:No)、スケジュール部16は、敵対的摂動の生成に関して、現状のパラメータを維持するようなスケジュール結果を敵対的摂動生成部13へ出力する(ステップS45)。 If the evaluation result is less than the reference value (step S42: No), the scheduler 16 outputs a schedule result for generating the adversarial perturbation to the adversarial perturbation generator 13 that maintains the current parameters (step S45).
[実施の形態1の効果]
このように、実施の形態1では、クリーン画像を学習済みである通常CNNから特徴表現が大きく外れないように、敵対的摂動の大きさを段階的に大きくするという制約を加えて、CNN141の学習を行う。
[Effects of the First Embodiment]
In this way, in the first embodiment, the CNN 141 is trained with the constraint that the magnitude of the adversarial perturbation is gradually increased so that the feature representation does not deviate significantly from that of a normal CNN that has already trained on clean images.
これによって、実施の形態1では、CNN141に敵対的摂動による影響度を段階的に学習させることで、クリーン画像への精度を保持しながら、敵対的学習によるロバスト性を高めた画像識別モデルを提供することができる。 As a result, in embodiment 1, by having CNN 141 gradually learn the degree of influence of adversarial perturbation, it is possible to provide an image recognition model that maintains accuracy for clean images while improving robustness through adversarial learning.
[実施の形態1の変形例]
また、敵対的摂動生成部13は、敵対的摂動の生成において、Most confusing attackを適用してもよい。図9は、図4に示す敵対的画像生成処理の他の処理手順を示すフローチャートである。
[Modification of the first embodiment]
Moreover, the adversarial perturbation generation unit 13 may apply a most confusing attack in generating the adversarial perturbation. Fig. 9 is a flowchart showing another processing procedure of the adversarial image generation processing shown in Fig. 4 .
図9のステップS51~ステップS56は、図5に示すステップS11~ステップS16と同じ処理である。 Steps S51 to S56 in FIG. 9 are the same processes as steps S11 to S16 shown in FIG. 5.
敵対的摂動生成部13は、第1のクリーン画像を、ステップS55において取得した最適化後のモデルパラメータに基づくCNNを用いて画像識別処理を行い、その出力結果から、第1のクリーン画像の正解ラベル以外で最も出力値が大きい(Most confusing)カテゴリを探索する(ステップS57)。なお、敵対的摂動生成部13は、最適化後のモデルパラメータに基づくCNNを用いた第1のクリーン画像に対する画像識別結果を取得すれば足りるため、このCNNは、敵対的摂動生成部13が有する構成に限らず、他の構成要素が有していてもよい。 The adversarial perturbation generator 13 performs image classification processing on the first clean image using a CNN based on the optimized model parameters obtained in step S55, and searches for the most confusing category other than the correct label of the first clean image from the output result (step S57). Note that since it is sufficient for the adversarial perturbation generator 13 to obtain an image classification result for the first clean image using a CNN based on the optimized model parameters, this CNN is not limited to a configuration possessed by the adversarial perturbation generator 13, and may be possessed by another component.
敵対的摂動生成部13は、スケジュール結果、第1のクリーン画像、ステップS57において取得したMost confusingカテゴリ、CNN141のモデルパラメータを基に敵対的摂動を作成する(ステップS58)。この際、敵対的摂動生成部13は、Most confusingカテゴリに対する損失が最も小さくなるように敵対的摂動を生成する。生成手法として、Projected Gradient Descent(非特許文献1)を用いることを想定しているが、適切に敵対的摂動を生成できるのであれば、他の手法を用いてもよい。 The adversarial perturbation generator 13 creates adversarial perturbations based on the schedule results, the first clean image, the Most confusing category acquired in step S57, and the model parameters of the CNN 141 (step S58). At this time, the adversarial perturbation generator 13 generates the adversarial perturbations so as to minimize the loss for the Most confusing category. As a generation method, it is assumed that Projected Gradient Descent (Non-Patent Document 1) will be used, but other methods may be used as long as they can generate appropriate adversarial perturbations.
図9に示すステップS59は、図5に示すステップS18と同じ処理である。 Step S59 shown in FIG. 9 is the same process as step S18 shown in FIG. 5.
Most confusingカテゴリは、正解ラベル以外で最も高い確信度を示すクラスであるため、このMost confusingカテゴリを基に生成した敵対的摂動は、最も近い決定境界のデータ点に対応するため、第1のクリーン画像に重畳しても、第1のクリーン画像の特徴表現を大きく変えないような攻撃となる。例えば、図5に示す処理手順にて生成した敵対的摂動画像と第1のクリーン画像との特徴表現とのcos類似度が、0.3896であるのに対し、Most confusingカテゴリを基に生成した敵対的画像と第1のクリーン画像との特徴表現のcos類似度は、0.4485と近くなる。 The Most confusing category is the class that shows the highest confidence level other than the correct label, so the adversarial perturbation generated based on this Most confusing category corresponds to the data point of the closest decision boundary, and therefore, even if it is superimposed on the first clean image, it is an attack that does not significantly change the feature representation of the first clean image. For example, while the cosine similarity between the feature representation of the adversarial perturbation image generated by the processing procedure shown in Figure 5 and the first clean image is 0.3896, the cosine similarity between the feature representation of the adversarial image generated based on the Most confusing category and the first clean image is close to 0.4485.
実施の形態1の変形例によれば、Most confusingカテゴリを基に生成した敵対的画像をCNN141に学習させることで、敵対的摂動による影響度のより段階的な学習を実現することができる。 According to a modification of the first embodiment, by having the CNN 141 learn adversarial images generated based on the most confusing category, it is possible to realize more gradual learning of the degree of influence of adversarial perturbation.
[実施の形態2]
次に、実施の形態2について説明する。図10は、実施の形態2における学習方法を説明する図である。
[Embodiment 2]
Next, a description will be given of a second embodiment of the present invention. Fig. 10 is a diagram for explaining a learning method in the second embodiment of the present invention.
実施の形態2では、通常学習CNN(第1のNN)の特徴表現から、AT-CNN(第2のNN)の特徴表現が変わらないように制約をかけることで、AT-CNNが、通常学習CNNと異なる特徴表現を獲得しないようにする。 In the second embodiment, by imposing constraints so that the feature representation of the AT-CNN (second NN) does not change from the feature representation of the normal training CNN (first NN), the AT-CNN is prevented from acquiring feature representations different from those of the normal training CNN.
具体的には、実施の形態2では、AT-CNNの学習として、通常学習CNNを教師とした知識蒸留を行う(図10の(1))。ここで、CNNの出力層からの知識蒸留は、正則化効果のみである。このため、実施の形態2では、中間層の出力を直接的に制約することで、AT-CNNが通常学習CNNと同じような特徴抽出を行えるように学習を実行する。実施の形態2では、制約の損失関数として、例えば、cos類似度を用いて、学習を実行する。 Specifically, in the second embodiment, knowledge distillation is performed for learning the AT-CNN using a normal learning CNN as a teacher ((1) in FIG. 10). Here, knowledge distillation from the output layer of the CNN has only a regularization effect. For this reason, in the second embodiment, learning is performed so that the AT-CNN can perform feature extraction similar to that of a normal learning CNN by directly constraining the output of the intermediate layer. In the second embodiment, learning is performed using, for example, cos similarity as the loss function for constraints.
[学習装置]
次に、実施の形態2に係る学習装置について説明する。図11は、実施の形態2に係る学習装置の構成の一例を模式的に示す図である。
[Learning device]
Next, a description will be given of a learning device according to embodiment 2. Fig. 11 is a diagram illustrating an example of the configuration of the learning device according to embodiment 2.
図11に示すように、実施の形態2に係る学習装置210は、図3に示す学習装置10と比して、スケジュール部16を削除した構成を有する。そして、学習装置210は、学習装置10と比して、画像識別部14及び最適化部15に代えて画像識別部214(第2の画像識別部)及び最適化部215を有する。学習装置210は、さらに、原画像識別部216(第1の画像識別部)を有する。
As shown in FIG. 11, the
原画像識別部216は、複数のクリーン画像を学習データとして画像識別を学習した第1のCNN2161(第1のNN)を用いて、第1のクリーン画像に対して画像識別を行う。原画像識別部216は、第1のCNN2161の中間出力を、原画像中間出力(第1の中間出力)として、最適化部215に出力する。なお、中間出力とは、第1のCNN2161の最終層ではない階層の処理結果の数値を想定しているが、画像識別のための適切な特徴表現であれば他の出力でもよい。
The original image classification unit 216 performs image classification on the first clean image using a first CNN 2161 (first NN) that has learned image classification using multiple clean images as training data. The original image classification unit 216 outputs the intermediate output of the
画像識別部214は、学習対象の第2のCNN2141を有し、画像識別部14と同様の機能を有する。第2のCNN2141は、第1のCNN2161のモデルパラメータが初期パラメータとして設定される。画像識別部214は、第2のCNN2141のモデル出力とともに、第2のCNN2141の中間出力(第2の中間出力)を最適化部15に出力する。中間出力は、原画像中間出力の処理階層と同階層の処理結果の数値である。また、中間出力は、原画像中間出力と同様に、画像識別のための適切な特徴表現であれば他の出力でもよい。
The
最適化部215は、画像識別部214による敵対的画像に対する画像識別結果と第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、原画像中間出力と第2のCNN2141の中間出力との差分が小さくなるように、第2のCNN2141のパラメータを最適化することによって、第2のCNN2141の学習を実行する。
The
最適化部215は、式(4)に示すように、第1の損失関数L1と第2の損失関数L2との重みづけ和である損失関数Lを用いて、第2のCNN2141のパラメータを最適化する。
The
式(4)のうち、第1の損失関数L1は、画像識別部214による敵対的画像に対する画像識別結果と第1のクリーン画像の正解ラベルとの差分を示す損失関数である。第2の損失関数L2は、原画像中間出力と第2のCNN2141の中間出力との差分を示す損失関数である。αは、ハイパーパラメータである。
In formula (4), the first loss function L1 is a loss function indicating the difference between the image classification result for the adversarial image by the
[学習処理]
次に、実施の形態2に係る学習処理について説明する。図12は、実施の形態2に係る学習処理の処理手順を示すフローチャートである。
[Learning process]
Next, a description will be given of the learning process according to the embodiment 2. Fig. 12 is a flowchart showing the processing procedure of the learning process according to the embodiment 2.
図12に示すステップS201~ステップS203は、図4に示すステップS1~ステップS3と同じ処理である。なお、ステップS203において、敵対的摂動生成部13は、Most confusing attack(図9)を適用して敵対的摂動を生成してもよい。 Steps S201 to S203 shown in FIG. 12 are the same processes as steps S1 to S3 shown in FIG. 4. Note that in step S203, the adversarial perturbation generator 13 may generate adversarial perturbations by applying the Most confusing attack (FIG. 9).
画像識別部214は、第2のCNN2141を用いて、敵対的摂動生成部13が生成した敵対的画像に対する画像識別処理を行い(ステップS204)、モデル出力及び中間出力を最適化部215に出力する。
The
原画像識別部216は、第1のCNN2161を用いて、第1のクリーン画像に対して画像識別を行う原画像識別処理を行い(ステップS205)、原画像中間出力を最適化部215に出力する。
The original image classification unit 216 uses the
最適化部215は、画像識別部214による敵対的画像に対する画像識別結果と第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、原画像中間出力と第2のCNN2141の中間出力との差分が小さくなるように、第2のCNN2141のパラメータを最適化する最適化処理を行う(ステップS206)。
The
ステップS207及びステップS208は、図4に示すステップS7及びステップS8と同じ処理である。 Steps S207 and S208 are the same processes as steps S7 and S8 shown in FIG. 4.
[画像識別処理]
次に、画像識別処理(ステップS204)について説明する。図13は、図12に示す画像識別処理の処理手順を示すフローチャートである。
[Image Identification Processing]
Next, the image identification process (step S204) will be described with reference to a flowchart shown in FIG.
図13に示すステップS211~ステップS215は、図6に示すステップS21~ステップS25と同じ処理である。画像識別部214は、ステップS215の処理によって得られたモデル出力と、第2のCNN2141の中間出力を最適化部15に出力する(ステップS216)。
Steps S211 to S215 shown in FIG. 13 are the same processes as steps S21 to S25 shown in FIG. 6. The
[原画像識別処理]
次に、原画像識別処理(ステップS205)について説明する。図14は、図12に示す原画像識別処理の処理手順を示すフローチャートである。
[Original image identification process]
Next, the original image identification process (step S205) will be described with reference to a flowchart shown in FIG.
原画像識別部216は、学習の開始時か否かを判定する(ステップS221)。学習の開始時の場合(ステップS221:Yes)、原画像識別部216は、初期化部12から初期パラメータを取得する(ステップS222)。 The original image identification unit 216 determines whether or not it is the start of learning (step S221). If it is the start of learning (step S221: Yes), the original image identification unit 216 acquires initial parameters from the initialization unit 12 (step S222).
学習の開始時ではない場合(ステップS221:No)、または、ステップS222終了後、原画像識別部216は、第1のクリーン画像を取得し(ステップS223)、クリーン画像に対して、モデルパラメータ(初期化パラメータ)に基づく画像識別を適用する(ステップS224)。ステップS224において、原画像識別部216は、第1のCNN2161を用いて、第1のクリーン画像に対して画像識別を行う。
If it is not the start of learning (step S221: No), or after step S222 is completed, the original image classification unit 216 acquires a first clean image (step S223) and applies image classification based on the model parameters (initialization parameters) to the clean image (step S224). In step S224, the original image classification unit 216 performs image classification on the first clean image using the
原画像識別部216は、第1のCNN2161の中間出力を、原画像中間出力として、最適化部215に出力する(ステップS225)。
The original image identification unit 216 outputs the intermediate output of the
[最適化処理]
次に、最適化処理(ステップS206)について説明する。図15は、図12に示す最適化処理の処理手順を示すフローチャートである。
[Optimization process]
Next, the optimization process (step S206) will be described with reference to a flowchart shown in FIG.
図15に示すステップS231~ステップS233は、図7に示すステップS31~ステップS33と同じ処理である。最適化部15は、画像識別部214からモデル出力と中間出力とを取得し(ステップS234)、原画像識別部216から原画像中間出力を取得
する(ステップS235)。
Steps S231 to S233 shown in Fig. 15 are the same processes as steps S31 to S33 shown in Fig. 7. The optimization unit 15 obtains the model output and intermediate output from the image classification unit 214 (step S234), and obtains the original image intermediate output from the original image classification unit 216 (step S235).
そして、最適化部215は、画像識別部214から出力されたモデル出力と第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、原画像中間出力と第2のCNN2141の中間出力との差分が小さくなるように、第2のCNN2141のモデルパラメータを最適化し、最適化後パラメータとして、敵対的摂動生成部13及び画像識別部214に出力する(ステップS236)。
Then, the
なお、最適化部215は、式(4)に示すような、モデル出力xと正解ラベルyとの差分を小さくするような画像識別ロスと、第2のCNN2141の中間出力と原画像中間出力との差分を小さくするような中間出力ロスとによって画像識別パラメータを最適化し、最適化後パラメータを出力すればよい。
The
なお、画像識別ロスは、式(4)に示す交差エントロピ等が一般に用いられるが、所望の識別タスクにおいて適切な目的関数であれば、平均二乗誤差などでも同様の効果を奏する。中間出力ロスも最小二乗誤差関数やコサイン距離関数を想定しているが、適切な目的関数であればよい。 For image classification loss, cross entropy shown in equation (4) is generally used, but mean squared error or other functions can also have a similar effect as long as they are an appropriate objective function for the desired classification task. The intermediate output loss is also assumed to be a least squared error function or a cosine distance function, but any appropriate objective function will do.
最適化部215は、モデル出力がどの程度正解ラベルに近いか評価し、評価結果を出力する(ステップS237)。この評価には、モデル出力のargmaxを取った結果と正解ラベルとが一致しているか否か、などのほか、適切な評価指標であればどのような指標を用いてもよい。
The
[実施の形態2の効果]
このように、実施の形態2では、第1のCNN2161特徴表現から、第2のCNN2141の特徴表現が変わらないように、中間層の出力を直接的に制約することによって、クリーン画像への精度を保持しながら、敵対的学習によるロバスト性を高めた画像識別モデルを提供することができる。
[Effects of the second embodiment]
In this way, in the second embodiment, by directly constraining the output of the intermediate layer so that the feature representation of the second CNN 2141 does not change from the feature representation of the
[実施の形態3]
次に、実施の形態3について説明する。実施の形態3は、実施の形態1と実施の形態2との組み合わせた場合について説明する。
[Embodiment 3]
Next, a description will be given of a third embodiment. In the third embodiment, a combination of the first and second embodiments will be described.
図16は、実施の形態3に係る学習装置の構成の一例を模式的に示す図である。図16に示すように、実施の形態3に係る学習装置310は、図3に示す学習装置10と比して、原画像識別部216をさらに有する構成を有する。そして、学習装置310は、図3に示す学習装置10と比して画像識別部14及び最適化部15に代えて、画像識別部214及び最適化部215を有する。
Figure 16 is a diagram showing a schematic example of the configuration of a learning device according to embodiment 3. As shown in Figure 16, compared to the
図17は、実施の形態3に係る学習処理の処理手順を示すフローチャートである。図17に示すステップS301~ステップS303は、図4に示すステップS1~ステップS3と同じ処理である。なお、ステップS303において、敵対的摂動生成部13は、Most confusing attack(図9)を適用して敵対的摂動を生成してもよい。 Fig. 17 is a flowchart showing the processing steps of the learning process according to the third embodiment. Steps S301 to S303 shown in Fig. 17 are the same processes as steps S1 to S3 shown in Fig. 4. Note that in step S303, the adversarial perturbation generator 13 may generate adversarial perturbations by applying the Most confusing attack (Fig. 9).
図17に示すステップS304~ステップS306は、図12に示すステップS204~ステップS206と同じ処理である。図17に示すステップS307~ステップS309は、図4に示すステップS6~ステップS8と同じ処理である。 Steps S304 to S306 shown in FIG. 17 are the same processes as steps S204 to S206 shown in FIG. 12. Steps S307 to S309 shown in FIG. 17 are the same processes as steps S6 to S8 shown in FIG. 4.
この実施の形態3に示すように、敵対的摂動の大きさが段階的に上がるように敵対的摂動を生成させるカリキュラム学習を行いながら、画像識別部214による敵対的画像に対する画像識別結果と第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、第2のCNN2141の中間出力と原画像中間出力との差分が小さくなるように、第2のCNN2141のパラメータを最適化してもよい。前記第2のNNの学習を実行する。
As shown in this third embodiment, while performing curriculum learning to generate adversarial perturbations such that the magnitude of the adversarial perturbations increases stepwise, the parameters of the second CNN 2141 may be optimized so that the difference between the image classification result for the adversarial image by the
[評価結果]
実施の形態1~3において学習したCNN141、第2のCNN2141の画像識別性能を評価した結果を表1に示す。比較として、クリーン画像のみを学習したCNN(Standard)と、敵対的画像のみを学習したCNN(AT)の評価結果も示す。Cleanは、クリーン画像に対する結果である。FGSM,BIM(7),PGC(20),CW(20)は、敵対的画像の生成手法である。
[Evaluation Results]
Table 1 shows the results of evaluating the image classification performance of the CNN141 and the second CNN2141 trained in the first to third embodiments. For comparison, the evaluation results of a CNN (Standard) trained only on clean images and a CNN (AT) trained only on adversarial images are also shown. Clean is the result for clean images. FGSM, BIM (7), PGC (20), and CW (20) are methods for generating adversarial images.
表1に示すように、実施の形態1~3に係る学習方法を用いて学習したCNN141、第2のCNN2141は、いずれも、クリーン画像に対し、敵対的画像のみを学習したCNN(AT)よりも、高い画像識別精度を示す。そして、実施の形態1~3に係る学習方法を用いて学習したCNN141、第2のCNN2141は、いずれも、敵対的画像に対し、クリーン画像のみを学習したCNN(Standard)及び敵対的画像のみを学習したCNN(AT)よりも、高い画像識別精度を示す。このため、実施の形態1~3に係る学習方法を用いることで、クリーン画像への精度を保持しながら、敵対的学習によるロバスト性をより高めた画像識別モデルを実現できることが分かった。 As shown in Table 1, CNN141 and the second CNN2141 trained using the learning methods according to the first to third embodiments both show higher image classification accuracy for clean images than the CNN (AT) that has trained only on adversarial images. And, CNN141 and the second CNN2141 trained using the learning methods according to the first to third embodiments both show higher image classification accuracy for adversarial images than the CNN (Standard) that has trained only on clean images and the CNN (AT) that has trained only on adversarial images. Therefore, it was found that by using the learning methods according to the first to third embodiments, it is possible to realize an image classification model that maintains accuracy for clean images while improving robustness through adversarial learning.
さらに、実施の形態3に係る学習方法を用いて学習した第2のCNN2141は、実施の形態1,2に係る学習方法を用いて学習したCNN141、第2のCNN2141と比して、クリーン画像及び敵対的画像のいずれについても、高い画像識別精度を示す。このため、実施の形態3のように、カリキュラム学習と、中間層の出力を直接的に制約する知識蒸留の組み合わることで、クリーン画像への精度を保持しながら、敵対的学習によるロバスト性をより高めた画像識別モデルを実現できることが分かった。 Furthermore, the second CNN2141 trained using the learning method according to embodiment 3 exhibits higher image recognition accuracy for both clean and adversarial images compared to the CNN141 and the second CNN2141 trained using the learning methods according to embodiments 1 and 2. Therefore, it was found that by combining curriculum learning and knowledge distillation, which directly constrains the output of the intermediate layer, as in embodiment 3, it is possible to realize an image recognition model that maintains accuracy for clean images while improving robustness through adversarial learning.
本実施の形態に係る学習装置は、非特許文献1に記載のような従来の学習方法に対して特定の改善を提供するものであり、画像識別に係る技術分野の向上を示すものである。 The learning device according to this embodiment provides certain improvements over conventional learning methods such as those described in Non-Patent Document 1, and represents an advancement in the technical field of image recognition.
[実施の形態のシステム構成について]
学習装置10,210,310の各構成要素は機能概念的なものであり、必ずしも物理的に図示のように構成されていることを要しない。すなわち、学習装置10,210,310の機能の分散及び統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散または統合して構成することができる。
[System Configuration of the Embodiment]
Each component of the
また、学習装置10,210,310においておこなわれる各処理は、全部または任意の一部が、CPU、GPU(Graphics Processing Unit)、及び、CPU、GPUにより解析実行されるプログラムにて実現されてもよい。また、学習装置10,210,310においておこなわれる各処理は、ワイヤードロジックによるハードウェアとして実現されてもよい。
Furthermore, each process performed in the
また、実施の形態において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的に行うこともできる。もしくは、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。この他、上述及び図示の処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて適宜変更することができる。 Furthermore, among the processes described in the embodiments, all or part of the processes described as being performed automatically can be performed manually. Alternatively, all or part of the processes described as being performed manually can be performed automatically using a known method. In addition, the information including the processing procedures, control procedures, specific names, various data, and parameters described above and illustrated in the drawings can be changed as appropriate unless otherwise specified.
[プログラム]
図18は、プログラムが実行されることにより、学習装置10,210,310が実現されるコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。
[program]
18 is a diagram showing an example of a computer in which a program is executed to realize the
メモリ1010は、ROM1011及びRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。
The memory 1010 includes a ROM 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard
ハードディスクドライブ1090は、例えば、OS(Operating System)1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、学習装置10,210,310の各処理を規定するプログラムは、コンピュータ1000により実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、学習装置10,210,310における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSD(Solid State Drive)により代替されてもよい。
The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an
また、上述した実施の形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。
The setting data used in the processing of the above-described embodiment is stored as program data 1094, for example, in memory 1010 or hard disk drive 1090. Then, the CPU 1020 reads the
なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
The
以上の実施形態に関し、更に以下の付記を開示する。 The following notes are further provided with respect to the above embodiment.
(付記項1)
メモリと、
前記メモリに接続された少なくとも1つのプロセッサと、
を含み、
前記プロセッサは、
正解ラベルが付された第1のクリーン画像を基に摂動を生成し、生成した摂動を、前記第1のクリーン画像に重畳した重畳画像を生成し、
複数のクリーン画像を学習データとして画像識別を学習した第1のNN(Neural Network)を用いて、前記第1のクリーン画像に対して画像識別を行い、前記第1のNNの中間出力を第1の中間出力として出力し、
前記第1のNNのモデルパラメータが初期パラメータとして設定された第2のNNを用いて、前記重畳画像に対して画像識別を行い、前記第2のNNの中間出力を第2の中間出力として出力し、
前記重畳画像に対する画像識別結果と前記第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、前記第1の中間出力と前記第2の中間出力との差分が小さくなるように、前記第2のNNのパラメータを最適化することによって、前記第2のNNの学習を実行する
学習装置。
(Additional Note 1)
Memory,
at least one processor coupled to the memory;
Including,
The processor,
A perturbation is generated based on a first clean image to which a correct answer label is attached, and a superimposed image is generated by superimposing the generated perturbation on the first clean image;
performing image classification on the first clean image using a first NN (Neural Network) that has learned image classification using a plurality of clean images as training data, and outputting an intermediate output of the first NN as a first intermediate output;
performing image classification on the superimposed image using a second NN in which the model parameters of the first NN are set as initial parameters, and outputting an intermediate output of the second NN as a second intermediate output;
A learning device that performs learning of the second NN by optimizing parameters of the second NN so that a difference between an image classification result for the superimposed image and a correct label of the first clean image is reduced, and a difference between the first intermediate output and the second intermediate output is reduced.
(付記項2)
付記項1に記載の学習装置であって、
前記学習することは、前記第2の画像識別部による前記重畳画像に対する画像識別結果と前記第1のクリーン画像の正解ラベルとの差分を示す第1の損失関数と、前記第1の中間出力と前記第2の中間出力との差分を示す第2の損失関数との重みづけ和である損失関数を用いて、前記第2のNNのパラメータを最適化する
学習装置。
(Additional Note 2)
The learning device according to claim 1,
The learning device optimizes parameters of the second NN using a loss function that is a weighted sum of a first loss function indicating the difference between an image classification result for the superimposed image by the second image classification unit and a correct label of the first clean image, and a second loss function indicating the difference between the first intermediate output and the second intermediate output.
(付記項3)
付記項1に記載の学習装置であって、
前記生成することは、前記第1のクリーン画像に対する画像識別結果から、正解ラベル以外で最も出力値が大きいカテゴリを探索し、探索したカテゴリに対する損失が最も小さくなるように前記摂動を生成する
学習装置。
(Additional Note 3)
The learning device according to claim 1,
The generating step searches for a category other than a correct label that has the largest output value from an image classification result for the first clean image, and generates the perturbation so as to minimize a loss for the searched category.
(付記項5)
コンピュータを付記項1~3に記載の学習装置として機能させるための学習プログラムを格納した記憶媒体。
(Additional Note 5)
A storage medium storing a learning program for causing a computer to function as the learning device described in appendix 1 to 3.
以上、本発明者によってなされた発明を適用した実施の形態について説明したが、本実施の形態による本発明の開示の一部をなす記述及び図面により本発明は限定されることはない。すなわち、本実施の形態に基づいて当業者等によりなされる他の実施の形態、実施例及び運用技術等は全て本発明の範疇に含まれる。 The above describes an embodiment of the invention made by the inventor, but the present invention is not limited to the description and drawings that form part of the disclosure of the present invention according to this embodiment. In other words, other embodiments, examples, operational techniques, etc. made by those skilled in the art based on this embodiment are all included in the scope of the present invention.
10,210,310 学習装置
11 画像記憶部
12 初期化部
13 敵対的摂動生成部
14,214 画像識別部
15,215 最適化部
16 スケジュール部
141 CNN
216 原画像識別部
2141 第2のCNN
2161 第1のCNN
10, 210, 310 Learning device 11 Image storage unit 12 Initialization unit 13 Adversarial
216 Original image identification unit 2141 Second CNN
2161 CNN 1
Claims (5)
複数のクリーン画像を学習データとして画像識別を学習した第1のNN(Neural Network)を用いて、前記第1のクリーン画像に対して画像識別を行い、前記第1のNNの中間出力を第1の中間出力として出力する第1の画像識別部と、
前記第1のNNのモデルパラメータが初期パラメータとして設定された第2のNNを用いて、前記重畳画像に対して画像識別を行い、前記第2のNNの中間出力を第2の中間出力として出力する第2の画像識別部と、
前記第2の画像識別部による前記重畳画像に対する画像識別結果と前記第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、前記第1の中間出力と前記第2の中間出力との差分が小さくなるように、前記第2のNNのパラメータを最適化することによって、前記第2のNNの学習を実行する学習部と、
を有することを特徴とする学習装置。 A generating unit that generates a perturbation based on a first clean image to which a correct answer label is attached, and generates a superimposed image by superimposing the generated perturbation on the first clean image;
A first image classification unit that performs image classification on the first clean image using a first NN (Neural Network) that has learned image classification using a plurality of clean images as learning data, and outputs an intermediate output of the first NN as a first intermediate output;
a second image classification unit that performs image classification on the superimposed image using a second NN in which model parameters of the first NN are set as initial parameters, and outputs an intermediate output of the second NN as a second intermediate output;
a learning unit that executes learning of the second NN by optimizing parameters of the second NN so that a difference between an image classification result for the superimposed image by the second image classification unit and a correct label of the first clean image is reduced, and a difference between the first intermediate output and the second intermediate output is reduced;
A learning device comprising:
正解ラベルが付された第1のクリーン画像を基に摂動を生成し、生成した摂動を、前記第1のクリーン画像に重畳した重畳画像を生成する工程と、
複数のクリーン画像を学習データとして画像識別を学習した第1のNN(Neural Network)を用いて、前記第1のクリーン画像に対して画像識別を行い、前記第1のNNの中間出力を第1の中間出力として出力する工程と、
前記第1のNNのモデルパラメータが初期パラメータとして設定された第2のNNを用いて、前記重畳画像に対して画像識別を行い、前記第2のNNの中間出力を第2の中間出力として出力する工程と、
前記重畳画像に対する画像識別結果と前記第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、前記第1の中間出力と前記第2の中間出力との差分が小さくなるように、前記第2のNNのパラメータを最適化することによって、前記第2のNNの学習を実行する工程と、
を含んだことを特徴とする学習方法。 A learning method executed by a learning device, comprising:
generating a perturbation based on a first clean image to which a correct answer label has been added, and generating a superimposed image by superimposing the generated perturbation on the first clean image;
performing image classification on the first cleaned image using a first neural network (NN) that has learned image classification using a plurality of cleaned images as training data, and outputting an intermediate output of the first NN as a first intermediate output;
performing image classification on the superimposed image using a second NN in which model parameters of the first NN are set as initial parameters, and outputting an intermediate output of the second NN as a second intermediate output;
Optimizing parameters of the second NN so that a difference between an image classification result for the superimposed image and a correct label of the first clean image is reduced, and a difference between the first intermediate output and the second intermediate output is reduced, thereby executing learning of the second NN;
A learning method comprising:
複数のクリーン画像を学習データとして画像識別を学習した第1のNN(Neural Network)を用いて、前記第1のクリーン画像に対して画像識別を行い、前記第1のNNの中間出力を第1の中間出力として出力するステップと、
前記第1のNNのモデルパラメータが初期パラメータとして設定された第2のNNを用いて、前記重畳画像に対して画像識別を行い、前記第2のNNの中間出力を第2の中間出力として出力するステップと、
前記重畳画像に対する画像識別結果と前記第1のクリーン画像の正解ラベルとの差分が小さくなり、かつ、前記第1の中間出力と前記第2の中間出力との差分が小さくなるように、前記第2のNNのパラメータを最適化することによって、前記第2のNNの学習を実行するステップと、
をコンピュータに実行させるための学習プログラム。 A step of generating a perturbation based on a first clean image to which a correct answer label is attached, and generating a superimposed image by superimposing the generated perturbation on the first clean image;
performing image classification on the first cleaned image using a first NN (Neural Network) that has learned image classification using a plurality of cleaned images as training data, and outputting an intermediate output of the first NN as a first intermediate output;
performing image classification on the superimposed image using a second NN in which model parameters of the first NN are set as initial parameters, and outputting an intermediate output of the second NN as a second intermediate output;
Optimizing parameters of the second NN so that a difference between an image classification result for the superimposed image and a correct label of the first clean image is reduced, and a difference between the first intermediate output and the second intermediate output is reduced, thereby executing learning of the second NN;
A learning program for a computer to execute the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022114304A JP7672655B2 (en) | 2022-07-15 | 2022-07-15 | Learning device, learning method, and learning program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022114304A JP7672655B2 (en) | 2022-07-15 | 2022-07-15 | Learning device, learning method, and learning program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2024011942A JP2024011942A (en) | 2024-01-25 |
| JP7672655B2 true JP7672655B2 (en) | 2025-05-08 |
Family
ID=89621966
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022114304A Active JP7672655B2 (en) | 2022-07-15 | 2022-07-15 | Learning device, learning method, and learning program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7672655B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025253522A1 (en) * | 2024-06-04 | 2025-12-11 | Ntt株式会社 | Training device, training method, and program |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021170332A (en) | 2020-04-14 | 2021-10-28 | ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh | Equipment and methods for training classifiers and equipment and methods for assessing the robustness of classifiers |
-
2022
- 2022-07-15 JP JP2022114304A patent/JP7672655B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021170332A (en) | 2020-04-14 | 2021-10-28 | ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh | Equipment and methods for training classifiers and equipment and methods for assessing the robustness of classifiers |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2024011942A (en) | 2024-01-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Le Bras et al. | Adversarial filters of dataset biases | |
| Cisse et al. | Houdini: Fooling deep structured prediction models | |
| US11443178B2 (en) | Deep neural network hardening framework | |
| Cisse et al. | Houdini: Fooling deep structured visual and speech recognition models with adversarial examples | |
| JP7483751B2 (en) | Training machine learning models using unsupervised data augmentation | |
| US10803398B2 (en) | Apparatus and method for information processing | |
| US9740966B1 (en) | Tagging similar images using neural network | |
| US8620837B2 (en) | Determination of a basis for a new domain model based on a plurality of learned models | |
| US20200134455A1 (en) | Apparatus and method for training deep learning model | |
| CN114330588B (en) | Picture classification method, picture classification model training method and related devices | |
| CN116982089A (en) | Methods and systems for image semantic enhancement | |
| US20210365719A1 (en) | System and method for few-shot learning | |
| JP7626132B2 (en) | Learning device, generation method, inference device, inference method, and program | |
| JP7669810B2 (en) | Information processing program, information processing method, and information processing device | |
| KR102413588B1 (en) | Object recognition model recommendation method, system and computer program according to training data | |
| US20240220776A1 (en) | Non-transitory computer-readable recording medium storing machine learning program, machine learning method, and information processing apparatus | |
| WO2023093346A1 (en) | Exogenous feature-based model ownership verification method and apparatus | |
| CN120449892B (en) | Emotion recognition method, system, terminal and storage medium based on federated multimodal global diffusion model | |
| CN116541507A (en) | Visual question-answering method and system based on dynamic semantic graph neural network | |
| AU2021356255A1 (en) | Action-object recognition in cluttered video scenes using text | |
| JP7672655B2 (en) | Learning device, learning method, and learning program | |
| US11182415B2 (en) | Vectorization of documents | |
| CN116049371B (en) | A visual question answering method and device based on regularization and dual learning | |
| JP7720592B2 (en) | Learning device, learning method, and learning program | |
| JP7264272B2 (en) | Detection method, detection program and detection device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20220719 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240718 |
|
| TRDD | Decision of grant or rejection written | ||
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20250314 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250318 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250414 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7672655 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |