JP7485028B2 - Learning device, method and program - Google Patents
Learning device, method and program Download PDFInfo
- Publication number
- JP7485028B2 JP7485028B2 JP2022529205A JP2022529205A JP7485028B2 JP 7485028 B2 JP7485028 B2 JP 7485028B2 JP 2022529205 A JP2022529205 A JP 2022529205A JP 2022529205 A JP2022529205 A JP 2022529205A JP 7485028 B2 JP7485028 B2 JP 7485028B2
- Authority
- JP
- Japan
- Prior art keywords
- feature
- source data
- features
- domain
- cos
- 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
- 238000000034 method Methods 0.000 title claims description 42
- 238000004364 calculation method Methods 0.000 claims description 59
- 230000006870 function Effects 0.000 claims description 47
- 238000009826 distribution Methods 0.000 claims description 39
- 238000013500 data storage Methods 0.000 claims description 37
- 238000010606 normalization Methods 0.000 claims description 21
- 238000012545 processing Methods 0.000 description 19
- 230000008569 process Effects 0.000 description 16
- 239000013598 vector Substances 0.000 description 14
- 230000006978 adaptation Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 5
- 230000001815 facial effect Effects 0.000 description 3
- 230000008921 facial expression Effects 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 238000011144 upstream manufacturing Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Image Analysis (AREA)
Description
本発明は、ドメインバイアスが大きい画像データセット間において効果的に教師なしドメイン適応の学習をする技術に関する。 The present invention relates to a technique for effectively learning unsupervised domain adaptation between image datasets with large domain bias.
一般的に機械学習において、学習に用いたデータセットと異なるドメイン分布を持つ(ドメインバイアスのある)データセットで推論を行うと精度が低下する問題がある。また、目的タスクのラベルが豊富に収集できないようなケースも発生する。これに対し、教師なしドメイン適応の技術が提案されている。 In general, machine learning has a problem in that accuracy decreases when inference is performed on a dataset that has a different domain distribution (domain bias) from the dataset used for learning. There are also cases where it is not possible to collect a large number of labels for the target task. In response to this problem, unsupervised domain adaptation technology has been proposed.
教師なしドメイン適応とは、ラベルを持つソースデータとラベルを持たない(教師なし)ターゲットデータ間にあるドメインバイアスを解消することで、ターゲットデータにおいて効果的な推論を可能にする手法である。例えばクラス分類問題では、クラスラベルを持つソースデータと、クラスラベルを持たないターゲットデータと、データがターゲット、ソースのどちらに属しているかを示すドメインラベルとを用いて、ソースとターゲットの特徴分布が等しくなるように学習する。これにより、目的のタスクにおいてクラスラベルがない状況でも、クラスラベルが豊富にある別のデータを活用することで、目的タスクで精度の高い推論が可能となる。教師なしドメイン適応の代表的な方法として敵対的ドメイン適応が挙げられる(例えば、非特許文献1参照。)。この手法はクラス分類の学習とドメイン分類の学習を同時に学習する際に、ドメイン学習側の最初のレイヤーとして、誤差逆伝搬時に勾配を反転させるレイヤー(勾配反転レイヤー)を導入する。これによりソースデータとターゲットデータのドメインの分類がしにくくなり、かつ、クラスが分類できる特徴を学習でき、ドメインに依存しない特徴の学習が可能となる。Unsupervised domain adaptation is a method that enables effective inference in target data by eliminating the domain bias between source data with a label and unlabeled (unsupervised) target data. For example, in a class classification problem, source data with a class label, target data without a class label, and a domain label indicating whether the data belongs to the target or source are used to learn so that the feature distributions of the source and target are equal. As a result, even in a situation where there is no class label for the target task, highly accurate inference for the target task is possible by utilizing other data with abundant class labels. A representative method of unsupervised domain adaptation is adversarial domain adaptation (see, for example, Non-Patent Document 1). In this method, when learning class classification and learning domain classification simultaneously, a layer that inverts the gradient during error backpropagation (gradient inversion layer) is introduced as the first layer on the domain learning side. This makes it difficult to classify the domains of source data and target data, and makes it possible to learn features that can classify classes, and to learn features that are independent of the domain.
しかし、従来の敵対的ドメイン適応手法では、ドメインを構成する要素が多様かつ複雑な問題では効果的に学習できない問題がある。例えば、人間の表情分類タスクを考えると、人間の顔画像に関する変化的な要素は、人種や年齢、表情の作り方、顔の向きや、撮影照明環境など多岐にわたる。これらの多種多様な変化的要素を均一な分布でデータを集めることは困難であり、自ずとデータセットには強烈なドメインバイアスが発生する。例えば、人間の表情データセットを作る場合にインターネットで収集する方法が挙げられるが、収集する際の検索キーワードの言語によって、人種のドメインが発生する。また、例えばWEBカメラを使ったデータ収集では、一般的には室内照明環境下での撮影が行われるので、撮影環境のドメインバイアスが発生する。このように例えば顔画像などの多種多様な変化的要素を持つタスクを学習する場合には、より強烈なドメインバイアスが発生する問題がある。However, conventional adversarial domain adaptation methods have a problem in that they cannot effectively learn problems in which the elements that make up the domain are diverse and complex. For example, when considering a task of classifying human facial expressions, the variables related to human facial images are diverse, including race, age, how to make expressions, facial orientation, and the shooting lighting environment. It is difficult to collect data on these diverse variables with a uniform distribution, and strong domain bias naturally occurs in the dataset. For example, when creating a human facial expression dataset, there is a method of collecting data from the Internet, but a racial domain occurs depending on the language of the search keywords used when collecting data. In addition, for example, when collecting data using a web camera, the image is generally taken under an indoor lighting environment, so a domain bias of the shooting environment occurs. In this way, when learning a task with a wide variety of variables, such as face images, there is a problem of even stronger domain bias.
本発明は、教師なしドメイン適応の学習を従来よりも高精度に行うことができる学習装置、方法及びプログラムを提供することを目的とする。 The present invention aims to provide a learning device, method, and program that can perform unsupervised domain adaptation learning with higher accuracy than conventional methods.
この発明の一態様による学習装置は、ソースデータは、画像、その画像に対応するクラスラベル及びドメインラベルであり、複数のソースデータが記憶されているソースデータ記憶部と、ターゲットデータは、画像及びその画像に対応するドメインラベルであり、複数のターゲットデータが記憶されているターゲットデータ記憶部と、画像を入力としてその入力された画像の特徴を出力する前段ネットワークを用いて、ソースデータ記憶部から読み込んだソースデータの画像の特徴であるソースデータ特徴と、ターゲットデータ記憶部から読み込んだターゲットデータの特徴であるターゲットデータ特徴とを得る前段ネットワーク部と、ソースデータ特徴を入力としてその入力されたソースデータ特徴が属するクラスの確率分布を出力するクラス分類ネットワークを用いて、得られたソースデータ特徴に対応する確率分布を計算し、計算された確率分布と、ソースデータ記憶部から読み込んだ、得られたソースデータ特徴に対応するソースデータのクラスラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前段ネットワーク及びクラス分類ネットワークのパラメータを誤差逆伝搬法により更新するクラス分類ネットワーク部と、ソースデータ特徴又はターゲット特徴を入力として、その入力されたソースデータ特徴又はターゲット特徴が属するドメインの確率分布を計算するドメイン分類ネットワークを用いて、得られたソースデータ特徴又は得られたターゲット特徴に対応する確率分布を計算し、計算された確率分布と、ソースデータ記憶部から読み込んだ得られたソースデータ特徴に対応するソースデータのドメインラベル又はターゲットデータ記憶部から読み込んだ得られたターゲットデータ特徴に対応するターゲットデータのドメインラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前段ネットワーク及びドメイン分類ネットワークのパラメータを誤差逆伝搬法により更新するドメイン分類ネットワーク部と、を含み、ドメイン分類ネットワークは、ドメイン分類ネットワークのファーストレイヤーとして、ドメイン分類ネットワーク部で誤差逆伝搬法によりパラメータを更新する際に勾配の符号を反転する勾配反転レイヤーを含み、ドメイン分類ネットワーク部で計算される確率分布は、角度空間で計算されたソフトマックス値でありドメイン分類ネットワーク部は、(a)得られたソースデータ特徴又は得られたターゲット特徴を用いて、ドメイン分類ネットワークの中の、最後のレイヤーである角度ソフトマックスレイヤー以外のレイヤーの計算を行うことで、得られたソースデータ特徴に対応する中間特徴rs又は得られたターゲット特徴に対応する中間特徴rtを得るドメイン分類ネットワーク中間計算部と、(b)(i)得られたソースデータ特徴に対応する中間特徴rs又は得られたターゲットデータ特徴に対応する中間特徴rtを用いて、正規化済み特徴rs/||rs||又は正規化済み特徴はrt/||rt||を計算する特徴正規化部と、(ii)角度ソフトマックスレイヤーのパラメータz0又はz1を用いて、正規化済みパラメータz0/||z0||又は正規化済みパラメータz1/||z1||を計算するパラメータ正規化部と、(iii)Tは転置を意味するとして、計算された正規化済み特徴がターゲットデータ特徴に対応する正規化済み特徴rt/||rt||である場合、式(1),式(2)により定義される、ターゲットデータ特徴に対応する内積計算済み特徴(cos pt, cos ps)を計算し、計算された正規化済み特徴がソースデータ特徴に対応する正規化済み特徴rs/||rs||である場合、式(3),式(4)により定義される、ソースデータ特徴に対応する内積計算済み特徴(cos pt, cos ps)を計算する内積計算部と、
角度空間でのソフトマックス計算を行うことで、教師なしドメイン適応の学習を従来よりも高精度に行うことができる。 By performing softmax calculations in angle space, unsupervised domain adaptation learning can be performed with higher accuracy than before.
以下、本発明の実施の形態について詳細に説明する。なお、図面中において同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。The following describes in detail an embodiment of the present invention. Note that components having the same functions in the drawings are given the same numbers and duplicated explanations are omitted.
[学習装置及び方法]
学習装置及び方法の処理は一般的な深層学習の学習フェーズ(ネットワークへのデータ入力、ネットワークでの演算、損失関数の計算、パラメータの更新)に相当する。
[Learning device and method]
The processing of the learning device and method corresponds to the general learning phase of deep learning (inputting data into the network, performing operations on the network, calculating the loss function, and updating parameters).
以下、学習装置の各構成部について説明する。 Below, each component of the learning device is explained.
学習装置は、図1に示すように、ソースデータ記憶部1、ターゲットデータ記憶部2、前段ネットワーク部3、クラス分類ネットワーク部4、ドメイン分類ネットワーク部5を例えば備えている。As shown in Figure 1, the learning device, for example, includes a source data memory unit 1, a target data memory unit 2, a front-stage network unit 3, a class
学習方法は、学習装置の各構成部が、以下に説明する及び図4に示すステップS3からステップS5の処理を行うことにより例えば実現される。ステップS3からステップS5の処理は、ソースデータ記憶部1及びターゲットデータ記憶部2に記憶されているソースデータ及びターゲットデータのそれぞれについて少なくとも行われる。また、ステップS3からステップS5の処理は、所定の収束条件を満たすまで繰り返し行われてもよい。The learning method is realized, for example, by each component of the learning device performing the processes from step S3 to step S5 described below and shown in FIG. 4. The processes from step S3 to step S5 are performed at least for each of the source data and target data stored in the source data storage unit 1 and the target data storage unit 2. Furthermore, the processes from step S3 to step S5 may be repeated until a predetermined convergence condition is satisfied.
<ソースデータ記憶部1>
ソースデータ記憶部1には、複数のソースデータが記憶されている。
<Source data storage unit 1>
The source data storage unit 1 stores a plurality of source data.
ソースデータは、画像、その画像に対応するクラスラベル及びドメインラベルである。画像をx、クラスラベルをy、ドメインラベルをdとすると、ソースデータの集合Dsは、以下のように表すことができる。
ターゲットデータ記憶部2には、複数のターゲットデータが記憶されている。
The source data is an image, a class label corresponding to the image, and a domain label. If the image is x, the class label is y, and the domain label is d, the set of source data D s can be expressed as follows:
The target data storage unit 2 stores a plurality of target data.
ターゲットデータは、画像及びその画像に対応するドメインラベルである。ターゲットデータの集合Dtは、以下のように表すことができる。
前段ネットワーク部3には、ソースデータ記憶部1から読み込んだソースデータの画像と、ターゲットデータ記憶部2から読み込んだターゲットデータの画像とが入力される。
The target data is an image and its corresponding domain label. The set of target data Dt can be expressed as follows:
The front-stage network unit 3 receives as input the source data image read from the source data storage unit 1 and the target data image read from the target data storage unit 2 .
前段ネットワーク部3は、入力された画像をベクトルに変換する。すなわち、前段ネットワーク部3は、入力されたソースデータの画像をベクトルに変換してソースデータ特徴とし、入力されたターゲットデータの画像をベクトルに変換してターゲットデータ特徴とする(ステップS3)。これらのベクトルは、例えば1024次元など多次元で構成される。The front-stage network unit 3 converts the input image into a vector. That is, the front-stage network unit 3 converts the input source data image into a vector to set it as a source data feature, and converts the input target data image into a vector to set it as a target data feature (step S3). These vectors are multidimensional, for example, 1024-dimensional.
生成されたソースデータ特徴は、クラス分類ネットワーク部4及びドメイン分類ネットワーク部5に出力される。生成されたターゲットデータ特徴は、ドメイン分類ネットワーク部5に出力される。The generated source data features are output to the class
前段ネットワーク部3では、入力された画像をベクトルに変換するネットワークである前段ネットワークを用いて計算が行われる。前段ネットワークは、例えば一般的なCNNレイヤー、Poolingレイヤー、Fully Connectedレイヤーを持ち、これらを多層に積み重ねたもので構成される。 In the pre-stage network unit 3, calculations are performed using a pre-stage network, which is a network that converts the input image into a vector. The pre-stage network has, for example, a general CNN layer, a pooling layer, and a fully connected layer, and is composed of these stacked in multiple layers.
例えば1回の学習(1バッチ)で、32個のソースデータの画像及び32個のターゲットデータの画像の計64個の画像のそれぞれのベクトルが生成される。For example, in one training session (one batch), vectors are generated for each of 32 source data images and 32 target data images, for a total of 64 images.
なお、前段ネットワークの各レイヤーはパラメータを持つものがある。これらのパラメータは、後述するクラス分類ネットワーク部4及びドメイン分類ネットワーク部5で算される損失関数の値を最小化するように誤差逆伝搬法により更新される。
Note that each layer of the upstream network has parameters. These parameters are updated by the backpropagation method so as to minimize the value of the loss function calculated by the class
<クラス分類ネットワーク部4>
クラス分類ネットワーク部4には、前段ネットワーク部3で得られたソースデータ特徴及びソースデータ記憶部1から読み込んだソースデータのクラスラベルが入力される。
<
The source data features obtained by the pre-stage network unit 3 and the class labels of the source data read from the source data storage unit 1 are input to the
クラス分類ネットワーク部4は、まず、クラス分類ネットワークを用いて、前段ネットワーク部3で得られたソースデータ特徴に対応する確率分布を計算する。クラス分類ネットワークは、ソースデータ特徴を入力とし、クラスの確率分布に変換するネットワークであり、例えばFully Connectedレイヤーを多層に積み重ねたもので構成される。クラス分類ネットワークの最終レイヤーでは、活性化関数にソフトマックス関数を例えば用いて、確率分布が計算される。
The
また、クラス分類ネットワーク部4は、この確率分布を用いて損失関数の値を計算し、この損失関数の値を最小化するように、誤差逆伝搬を行い、前段ネットワーク部3で用いられる前段ネットワーク及びクラス分類ネットワーク部4で用いられるクラス分類ネットワークが有する各レイヤーのパラメータを更新する。損失関数の値の具体的な計算手順としては、例えば最終レイヤーで計算した確率分布と入力のソースデータクラスラベルとを用いてクロスエントロピーで損失関数の値を計算する手順を用いることができる。
Furthermore, the
このようにして、クラス分類ネットワーク部4は、クラス分類ネットワークを用いて、前段ネットワーク部3の計算で得られたソースデータ特徴に対応する確率分布を計算し、計算された確率分布と、ソースデータ記憶部1から読み込んだ、前段ネットワーク部3の計算で得られたソースデータ特徴に対応するソースデータのクラスラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前段ネットワーク及びクラス分類ネットワークのパラメータを誤差逆伝搬法により更新する(ステップS4)。In this way, the class
<ドメイン分類ネットワーク部5>
ドメイン分類ネットワーク部5には、前段ネットワーク部3で得られたソースデータ特徴及びターゲット特徴が入力される。
<Domain
The source data features and target features obtained in the previous-stage network section 3 are input to the domain
また、ソースデータ特徴が入力される場合には、ソースデータ記憶部1から読み込んだドメインラベルがドメイン分類ネットワーク部5に更に入力される。また、ターゲットデータ特徴が入力される場合には、ターゲットデータ記憶部2から読み込んだドメインラベルがドメイン分類ネットワーク部5に更に入力される。In addition, when source data features are input, the domain label read from the source data storage unit 1 is further input to the domain
ドメイン分類ネットワーク部5は、まず、ドメイン分類ネットワークを用いて、前段ネットワーク部3で得られたソースデータ特徴又はターゲット特徴に対応する確率分布を計算する。この確率分布は、角度空間で計算されるソフトマックス値である。この計算は、後述するドメイン分類ネットワーク中間計算部51及び角度ソフトマックスレイヤー部52で行われる。The domain
ドメイン分類ネットワークは、ドメイン分類ネットワークの最初のレイヤーとして、ドメイン分類ネットワーク部5で誤差逆伝搬法によりパラメータを更新する際に勾配の符号を反転する勾配反転レイヤーを含む。勾配反転レイヤーは、誤差逆伝搬法によりパラメータを更新する際に、勾配の符号がプラスの場合はマイナス、勾配の符号がプラスの場合はマイナスにする。勾配反転レイヤーにより、ドメインを分類しにくくするように学習をすることができる。また、ドメイン分類ネットワークは、ドメイン分類ネットワークの最後のレイヤーとして、角度空間でソフトマックス値を計算するための角度ソフトマックスレイヤーを含む。ドメイン分類ネットワークの中の、勾配反転レイヤー及び角度ソフトマックスレイヤー以外のレイヤーは、例えば複数のFully Connectedレイヤーの積み重ねたもので構成される。
The domain classification network includes, as the first layer of the domain classification network, a gradient inversion layer that inverts the sign of the gradient when updating parameters by backpropagation in the domain
また、ドメイン分類ネットワーク部5は、この確率分布を用いて損失関数の値を計算し、この損失関数の値を最小化するように、誤差逆伝搬を行い、前段ネットワーク部3で用いられる前段ネットワーク及びドメイン分類ネットワーク部5で用いられるドメイン分類ネットワークが有する各レイヤーのパラメータを更新する。後述するように、損失関数の値の計算はクロスエントロピー損失関数計算部53で行われ、パラメータの更新はパラメータ更新部54で行われる。
In addition, the domain
以下、ドメイン分類ネットワーク部5の処理の例について説明する。ドメイン分類ネットワーク部5は、図2に例示するように、ドメイン分類ネットワーク中間計算部51、角度ソフトマックスレイヤー部52、クロスエントロピー損失関数計算部53及びパラメータ更新部54を備えている。Below, we will explain an example of the processing of the domain
<<ドメイン分類ネットワーク中間計算部51>>
ドメイン分類ネットワーク中間計算部51には、前段ネットワーク部3で得られたソースデータ特徴又はターゲットデータ特徴が入力される。
<<Domain classification network
The source data features or target data features obtained in the pre-stage network section 3 are input to the domain classification network
ドメイン分類ネットワーク中間計算部51は、ソースデータ特徴又はターゲットデータ特徴を用いて、ドメイン分類ネットワークの中の、最後のレイヤーである角度ソフトマックスレイヤー以外のレイヤーの計算(言い換えれば、角度ソフトマックスレイヤーに入力される値の計算)を行うことで中間特徴を得る。得られた中間特徴は、角度ソフトマックスレイヤー部52に出力される。The domain classification network
ドメイン分類ネットワーク中間計算部51にソースデータ特徴が入力された場合には、入力されたソースデータ特徴に対応する中間特徴が得られる。When source data features are input to the domain classification network
ドメイン分類ネットワーク中間計算部51にターゲットデータ特徴が入力された場合には、入力されたターゲットデータ特徴に対応する中間特徴が得られる。When target data features are input to the domain classification network
<<角度ソフトマックスレイヤー部52>>
角度ソフトマックスレイヤー部52には、ドメイン分類ネットワーク中間計算部51で得られた中間特徴と、ソースデータ記憶部1からの読み込んだソースデータのドメインラベル又はターゲットデータ記憶部2から読み込んだターゲットデータドメインラベルとが入力される。
<<Angle
The angle
角度ソフトマックスレイヤー部52に入力された中間特徴がソースデータ特徴に対応するものである場合には、角度ソフトマックスレイヤー部52にはソースデータのドメインラベルが入力される。角度ソフトマックスレイヤー部52に入力された中間特徴がターゲットデータ特徴に対応するものである場合には、角度ソフトマックスレイヤー部52にはターゲットデータのドメインラベルが入力される。If the intermediate features input to the angle
角度ソフトマックスレイヤー部52及びその各部は、これらの入力されたドメインラベルに基づいて、ソースデータ特徴とターゲットデータ特徴のどちらに対応する処理を行うのかを判断することができる。すなわち、入力されたドメインラベルがソースドメインに対応する場合には、言い換えれば、入力された中間特徴の正解ドメインがソースドメインである場合には、角度ソフトマックスレイヤー部52及びその各部は、ソースデータ特徴に対応する処理を行う。また、入力されたドメインラベルがターゲットドメインに対応する場合には、言い換えれば、入力された中間特徴の正解ドメインがターゲットドメインである場合には、角度ソフトマックスレイヤー部52及びその各部は、ターゲットデータ特徴に対応する処理を行う。Based on these input domain labels, the angle
角度ソフトマックスレイヤー部52は、入力された中間特徴を用いて、ドメイン分類ネットワークの中の角度ソフトマックスレイヤーの計算を行うことで、入力された中間特徴に対応する角度ソフトマックス値を得る。得られた角度ソフトマックス値は、確率分布でもある。得られた角度ソフトマックス値は、パラメータ更新部54に出力される。The angular
角度ソフトマックスレイヤー部52の処理の例の詳細については、後述する。
A detailed example of the processing of the angle
<<クロスエントロピー損失関数計算部53>>
クロスエントロピー損失関数計算部53には、角度ソフトマックスレイヤー部52で得られた角度ソフトマックス値と、ソースデータのドメインラベル又はターゲットデータのドメインラベルとが入力される。
<<Cross-entropy loss
The cross-entropy loss
クロスエントロピー損失関数計算部53に入力された中間特徴がソースデータ特徴に対応するものである場合には、クロスエントロピー損失関数計算部53にはソースデータのドメインラベルが入力される。クロスエントロピー損失関数計算部53に入力された中間特徴がターゲットデータ特徴に対応するものである場合には、クロスエントロピー損失関数計算部53にはターゲットデータのドメインラベルが入力される。
If the intermediate features input to the cross-entropy loss
クロスエントロピー損失関数計算部53は、角度ソフトマックス値と、ターゲットデータのドメインラベル又はソースデータのドメインラベルとを用いて、クロスエントロピーの計算を行い、損失関数の値であるドメイン誤差を得る。得られた損失関数の値は、パラメータ更新部54に出力される。The cross-entropy loss
<<パラメータ更新部54>>
パラメータ更新部54には、クロスエントロピー損失関数計算部53で計算された損失関数の値が入力される。
<<
The
パラメータ更新部54は、損失関数の値を用いて、誤差逆伝搬法により、前段ネットワーク及びドメイン分類ネットワークが有する各レイヤーのパラメータを更新する。The
先に述べたように、ドメイン分類ネットワークは、ドメイン分類ネットワークの最初のレイヤーとして、誤差逆伝搬法によりパラメータを更新する際に勾配の符号を反転する勾配反転レイヤーを含む。このため、パラメータ更新部54でのパラメータの更新において、ドメイン分類ネットワークの最初のレイヤー(勾配反転レイヤー)に対応する処理を行う際には、勾配の符号(勾配反転レイヤーに入力されるベクトルの各成分の符号)が反転される。As mentioned above, the domain classification network includes, as the first layer of the domain classification network, a gradient inversion layer that inverts the sign of the gradient when updating parameters by the backpropagation method. Therefore, when performing processing corresponding to the first layer (gradient inversion layer) of the domain classification network in updating parameters in the
このようにして、ドメイン分類ネットワーク部5は、ソースデータ特徴又はターゲット特徴を入力として、その入力されたソースデータ特徴又はターゲット特徴が属するドメインの確率分布を計算するドメイン分類ネットワークを用いて、前段ネットワーク部3で得られたソースデータ特徴又はターゲット特徴に対応する確率分布を計算し、計算された確率分布と、ソースデータ記憶部1から読み込んだ前記得られたソースデータ特徴に対応するソースデータのドメインラベル又はターゲットデータ記憶部2から読み込んだ前記得られたターゲットデータ特徴に対応するターゲットデータのドメインラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前段ネットワーク及びドメイン分類ネットワークのパラメータを誤差逆伝搬法により更新する(ステップS5)。In this way, the domain
以下、角度ソフトマックスレイヤー部52の処理の例について説明する。角度ソフトマックスレイヤー部52は、図3に例示するように、特徴正規化部521、パラメータ正規化部522、内積計算部523、マージン追加部524、スケーリング部525及びソフトマックス計算部526を備えている。Below, we will explain an example of the processing of the angle
<<<特徴正規化部521>>>
特徴正規化部521には、ドメイン分類ネットワーク中間計算部51で得られた中間特徴が入力される。
<<<
The intermediate features obtained by the domain classification network
特徴正規化部521は、中間特徴のL2正規化を行うことで、正規化済み特徴を得る。得られた正規化済み特徴は、内積計算部523に出力される。L2正規化はベクトルの長さを1に正規化する処理であり、ベクトルをベクトルの長さで除算することで求まる。The
中間特徴が、ソースデータ特徴に対応する場合と、ターゲットデータ特徴に対応する場合とがある。ソースデータ特徴に対応する中間特徴をrsと表記し、ターゲットデータ特徴に対応する中間特徴をrtと表記する。 The intermediate features may correspond to source data features or target data features. The intermediate features corresponding to the source data features are denoted as r s , and the intermediate features corresponding to the target data features are denoted as r t .
中間特徴がソースデータ特徴に対応するものである場合、言い換えれば、正解ドメインがソースドメインである場合、正規化済み特徴はrs/||rs||と表記することができる。中間特徴がターゲットデータ特徴に対応するものである場合、言い換えれば、正解ドメインがターゲットドメインである場合、正規化済み特徴はrt/||rt||と表記することができる。 If the intermediate features correspond to the source data features, i.e., the ground truth domain is the source domain, the normalized features can be written as r s /||r s || If the intermediate features correspond to the target data features, i.e., the ground truth domain is the target domain, the normalized features can be written as r t /||r t ||
<<<パラメータ正規化部522>>>
パラメータ正規化部522には、角度ソフトマックスレイヤーのパラメータが入力される。
<<<
The
パラメータ正規化部522は、角度ソフトマックスレイヤーのパラメータのL2正規化を行い、正規化済みパラメータを得る。得られた正規化済みパラメータは、内積計算部523に出力される。The
角度ソフトマックスレイヤーのパラメータには、後述するcos ptを計算するためのパラメータz0と、後述するcos psを計算するためのパラメータz1とがある。 The parameters of the angular softmax layer include a parameter z0 for calculating cos p t , which will be described later, and a parameter z1 for calculating cos p s , which will be described later.
角度ソフトマックスレイヤーのパラメータがz0である場合、正規化済みパラメータはz0/||z0||と表記することができる。角度ソフトマックスレイヤーのパラメータがz1である場合、正規化済みパラメータはz1/||z1||と表記することができる。 If the parameter of the angular softmax layer is z0 , the normalized parameter can be written as z0 /|| z0 ||. If the parameter of the angular softmax layer is z1 , the normalized parameter can be written as z1 /|| z1 ||.
<<<内積計算部523>>>
内積計算部523には、特徴正規化部521で得られた正規化済み特徴と、パラメータ正規化部522で得られた正規化済みパラメータとが入力される。
<<<Inner
The inner
内積計算部523は、ベクトルである正規化済み特徴と、ベクトルである正規化済みパラメータとの内積を計算することで、内積計算済み特徴を得る。得られた内積計算済み特徴は、マージン追加部524に出力される。The inner
入力された正規化済み特徴がターゲットデータ特徴に対応する正規化済み特徴rt/||rt||である場合、言い換えれば、正解ドメインがターゲットドメインである場合、内積計算部523は、以下の式により定義されるcos ptとcos psとを計算する。ここで、Tは転置を意味する。以下の式により定義されるcos pt, cos psから構成されるベクトル(cos pt, cos ps)が、正解ドメインがターゲットドメインの場合の内積計算済み特徴である。
マージン追加部524には、内積計算部523で計算された内積計算済み特徴が入力される。
When the input normalized feature is a normalized feature r t /||r t || corresponding to the target data feature, in other words, when the correct domain is the target domain, the inner
The
入力された内積計算済み特徴がターゲットデータ特徴に対応する場合、言い換えれば、正解ドメインがターゲットドメインである場合、マージン追加部524は、内積計算済み特徴の中のcos ptにマージンを追加する。例えば、マージン追加部524は、マージンmが追加されたcos ptとして、cos(pt+m)の値を計算する。この場合、内積計算済み特徴の中のcos psにはマージンは追加されない。この場合、マージン追加部524は、マージン追加済み特徴である(cos(pt+m), cos ps)をスケーリング部525に出力する。
If the input dot-product-calculated feature corresponds to the target data feature, in other words, if the correct domain is the target domain, the
入力された内積計算済み特徴がソースデータ特徴に対応する場合、言い換えれば、正解ドメインがソースドメインである場合、マージン追加部524は、内積計算済み特徴の中のcos psにマージンを追加する。例えば、マージン追加部524は、マージンmが追加されたcos psとして、cos(ps+m)の値を計算する。この場合、内積計算済み特徴の中のcos ptにはマージンは追加されない。この場合、マージン追加部524は、マージン追加済み特徴である(cos pt, cos(ps+m))をスケーリング部525に出力する。
When the input dot-product-calculated feature corresponds to the source data feature, in other words, when the correct domain is the source domain, the
なお、mは所定のマージンパラメータである。マージンパラメータmは、0でもよいし、任意の値であってもよい。 Note that m is a predetermined margin parameter. The margin parameter m may be 0 or any other value.
マージン追加の処理により、ドメインの識別をより正確に行うことができる。なお、マージン追加部524の処理は行われなくてもよい。The margin addition process allows for more accurate domain identification. Note that the process of the
<<<スケーリング部525>>>
スケーリング部525には、マージン追加部524で得られたマージン追加済み特徴が入力される。
<<<
The
スケーリング部525は、マージン追加済み特徴に対して、スケーリング処理を行い、スケーリング済み特徴を得る。得られたスケーリング済み特徴は、ソフトマックス計算部526に出力される。The
入力されたマージン追加済み特徴がターゲットデータ特徴に対応する場合には、言い換えれば、正解ドメインがターゲットドメインである場合には、スケーリング部525は、例えば、(s・cos(pt+m), s・cos ps)をスケーリング済み特徴とする。
When the input margin-added feature corresponds to the target data feature, in other words, when the correct domain is the target domain, the
入力されたマージン追加済み特徴がソースデータ特徴に対応する場合には、言い換えれば、正解ドメインがソースドメインである場合には、スケーリング部525は、(s・cos pt, s・cos(ps+m))をスケーリング済み特徴とする。
If the input margin-added features correspond to the source data features, in other words, if the ground truth domain is the source domain, the
なお、sは所定のスケーリングパラメータであり、例えば1≦s≦100である。 Note that s is a predetermined scaling parameter, for example 1≦s≦100.
<<<ソフトマックス計算部526>>>
ソフトマックス計算部526には、スケーリング部525で得られたスケーリング済み特徴が入力される。
<<<
The
ソフトマックス計算部526は、スケーリング済み特徴に基づいてソフトマックス計算をし、角度ソフトマックス値を得る。得られた角度ソフトマックス値は、クロスエントロピー損失関数計算部53に出力される。ソフトマックス計算としては、一般的なソフトマックスが用いられる。The
例えば、正解ドメインがターゲットドメインの場合、入力されるスケーリング済み特徴は、(s・cos(pt+m), s・cos ps)となる。このスケーリング済み特徴(s・cos(pt+m), s・cos ps)に基づいて、ターゲットドメインに対応するソフトマックス値は以下のように計算される。
また、正解ドメインがソースドメインの場合、ターゲットドメインに対応するソフトマックス値は以下になる。入力されるスケーリング済み特徴は、(s・cos pt, s・cos(ps+m))となる。このスケーリング済み特徴(s・cos pt, s・cos(ps+m))に基づいて、ターゲットドメインに対応するソフトマックス値は以下のように計算される。
このように、角度空間でのソフトマックス計算を行うことで、教師なしドメイン適応の学習を従来よりも高精度に行うことができる。 In this way, by performing softmax calculations in angle space, unsupervised domain adaptation learning can be performed with higher accuracy than before.
従来の敵対的ドメイン適応では、ドメイン学習側の最終レイヤーはソフトマックスで計算を行っていた。これに対し、上記の実施形態のように、顔識別タスクなど学習が困難な分類タスクにおいて効果がでている角度空間でのソフトマックス計算(例えば、参考文献1参照。)をドメイン学習側の最終レイヤーに導入する。In conventional adversarial domain adaptation, the final layer on the domain learning side performs calculations using softmax. In contrast, as in the above embodiment, softmax calculations in angle space (see, for example, Reference 1), which have been effective in classification tasks that are difficult to learn, such as face identification tasks, are introduced to the final layer on the domain learning side.
〔参考文献1〕J. Deng, J. Guo, N. Xue, and S. Zafeiriou, “ArcFace: Additive angular margin loss for deep face recognition”, In CVPR, 2019
従来のソフトマックス計算よりも効果的に分類タスクを学習できる能力を持つ角度ソフトマックス計算を、敵対的学習の機構に導入することで、よりドメインが分類しにくい学習が行うことができる。
[Reference 1] J. Deng, J. Guo, N. Xue, and S. Zafeiriou, “ArcFace: Additive angular margin loss for deep face recognition”, In CVPR, 2019
By introducing angular softmax calculation, which has the ability to learn classification tasks more effectively than conventional softmax calculation, into the mechanism of adversarial learning, it is possible to learn domains that are more difficult to classify.
上記の実施形態により、例えば、顔画像などの多種多様な変化的要素を含むデータセット間においても、高精度な教師なしドメイン適応が行え、ターゲットタスクに効果的な分類モデルを構築できる。 The above embodiment enables highly accurate unsupervised domain adaptation, even between datasets containing a wide variety of variable elements, such as facial images, and enables the construction of classification models that are effective for the target task.
[変形例]
以上、本発明の実施の形態について説明したが、具体的な構成は、これらの実施の形態に限られるものではなく、本発明の趣旨を逸脱しない範囲で適宜設計の変更等があっても、本発明に含まれることはいうまでもない。
[Variations]
Although the embodiments of the present invention have been described above, the specific configurations are not limited to these embodiments, and it goes without saying that appropriate design changes, etc., are included in the present invention as long as they do not deviate from the spirit of the present invention.
実施の形態において説明した各種の処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。例えば、クラス分類ネットワーク部4によるステップS4の処理と、ドメイン分類ネットワーク部5によるステップS5の処理とは並列的に行われてもよい。The various processes described in the embodiments may be executed not only in chronological order according to the order described, but also in parallel or individually depending on the processing capacity of the device executing the processes or as necessary. For example, the process of step S4 by the class
また、学習装置の構成部間のデータのやり取りは直接行われてもよいし、図示していない記憶部を介して行われてもよい。 In addition, data exchange between components of the learning device may be performed directly or via a memory unit not shown.
[プログラム、記録媒体]
上述した各装置の各部の処理をコンピュータにより実現してもよく、この場合は各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムを図5に示すコンピュータの記憶部1020に読み込ませ、演算処理部1010、入力部1030、出力部1040などに動作させることにより、上記各装置における各種の処理機能がコンピュータ上で実現される。
[Programs, recording media]
The processing of each unit of each of the above-mentioned devices may be realized by a computer, in which case the processing contents of the functions that each device should have are described by a program. Then, by loading this program into the
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体は、例えば、非一時的な記録媒体であり、具体的には、磁気記録装置、光ディスク、等である。 The program describing this processing content can be recorded on a computer-readable recording medium. A computer-readable recording medium is, for example, a non-transitory recording medium, specifically, a magnetic recording device, an optical disk, etc.
また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD-ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 This program may be distributed, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, this program may be distributed by storing it in a storage device of a server computer and transferring the program from the server computer to other computers via a network.
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の非一時的な記憶装置である補助記録部1050に格納する。そして、処理の実行時、このコンピュータは、自己の非一時的な記憶装置である補助記録部1050に格納されたプログラムを記憶部1020に読み込み、読み込んだプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを記憶部1020に読み込み、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。A computer that executes such a program, for example, first stores the program recorded on a portable recording medium or the program transferred from a server computer in its own non-transient storage device, the
また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。 In addition, in this embodiment, the device is configured by executing a specific program on a computer, but at least a portion of the processing content may be realized by hardware.
その他、この発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。Needless to say, other modifications may be made without departing from the spirit of this invention.
Claims (3)
ターゲットデータは、画像及びその画像に対応するドメインラベルであり、複数のターゲットデータが記憶されているターゲットデータ記憶部と、
画像を入力としてその入力された画像の特徴を出力する前段ネットワークを用いて、前記ソースデータ記憶部から読み込んだソースデータの画像の特徴であるソースデータ特徴と、前記ターゲットデータ記憶部から読み込んだターゲットデータの特徴であるターゲットデータ特徴とを得る前段ネットワーク部と、
ソースデータ特徴を入力としてその入力されたソースデータ特徴が属するクラスの確率分布を出力するクラス分類ネットワークを用いて、前記得られたソースデータ特徴に対応する確率分布を計算し、計算された確率分布と、前記ソースデータ記憶部から読み込んだ、前記得られたソースデータ特徴に対応するソースデータのクラスラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前記前段ネットワーク及び前記クラス分類ネットワークのパラメータを誤差逆伝搬法により更新するクラス分類ネットワーク部と、
ソースデータ特徴又はターゲット特徴を入力として、その入力されたソースデータ特徴又はターゲット特徴が属するドメインの確率分布を計算するドメイン分類ネットワークを用いて、前記得られたソースデータ特徴又は前記得られたターゲット特徴に対応する確率分布を計算し、計算された確率分布と、前記ソースデータ記憶部から読み込んだ前記得られたソースデータ特徴に対応するソースデータのドメインラベル又は前記ターゲットデータ記憶部から読み込んだ前記得られたターゲットデータ特徴に対応するターゲットデータのドメインラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前記前段ネットワーク及び前記ドメイン分類ネットワークのパラメータを誤差逆伝搬法により更新するドメイン分類ネットワーク部と、を含み、
前記ドメイン分類ネットワークは、前記ドメイン分類ネットワークのファーストレイヤーとして、前記ドメイン分類ネットワーク部で誤差逆伝搬法によりパラメータを更新する際に勾配の符号を反転する勾配反転レイヤーを含み、
前記ドメイン分類ネットワーク部で計算される確率分布は、角度空間で計算されたソフトマックス値であり、
前記ドメイン分類ネットワーク部は、
(a)前記得られたソースデータ特徴又は前記得られたターゲット特徴を用いて、前記ドメイン分類ネットワークの中の、最後のレイヤーである角度ソフトマックスレイヤー以外のレイヤーの計算を行うことで、前記得られたソースデータ特徴に対応する中間特徴rs又は前記得られたターゲット特徴に対応する中間特徴rtを得るドメイン分類ネットワーク中間計算部と、
(b)(i)前記得られたソースデータ特徴に対応する中間特徴rs又は前記得られたターゲットデータ特徴に対応する中間特徴rtを用いて、正規化済み特徴rs/||rs||又は正規化済み特徴はrt/||rt||を計算する特徴正規化部と、(ii)前記角度ソフトマックスレイヤーのパラメータz0又はz1を用いて、正規化済みパラメータz0/||z0||又は正規化済みパラメータz1/||z1||を計算するパラメータ正規化部と、(iii)Tは転置を意味するとして、計算された正規化済み特徴がターゲットデータ特徴に対応する正規化済み特徴rt/||rt||である場合、式(1),式(2)により定義される、ターゲットデータ特徴に対応する内積計算済み特徴(cos pt, cos ps)を計算し、計算された正規化済み特徴がソースデータ特徴に対応する正規化済み特徴rs/||rs||である場合、式(3),式(4)により定義される、ソースデータ特徴に対応する内積計算済み特徴(cos pt, cos ps)を計算する内積計算部と、
学習装置。 The source data is an image, a class label and a domain label corresponding to the image, and a source data storage unit in which a plurality of source data are stored;
The target data is an image and a domain label corresponding to the image, and a target data storage unit in which a plurality of target data are stored;
a front-stage network unit that obtains source data features that are features of the image of the source data read from the source data storage unit and target data features that are features of the target data read from the target data storage unit, using a front-stage network that receives an image as an input and outputs features of the input image;
a classification network unit that uses a classification network that receives source data features as input and outputs a probability distribution of a class to which the input source data features belong to, calculates a probability distribution corresponding to the obtained source data features, calculates a value of a loss function using the calculated probability distribution and a class label of source data that corresponds to the obtained source data features and that is read from the source data storage unit, and updates parameters of the front-stage network and the classification network by an error backpropagation method so as to minimize the value of the calculated loss function;
a domain classification network unit that uses a source data feature or a target feature as an input to calculate a probability distribution of a domain to which the input source data feature or target feature belongs, calculates a probability distribution corresponding to the obtained source data feature or the obtained target feature, calculates a value of a loss function using the calculated probability distribution and a domain label of source data corresponding to the obtained source data feature read from the source data storage unit or a domain label of target data corresponding to the obtained target data feature read from the target data storage unit, and updates parameters of the front-stage network and the domain classification network by an error backpropagation method so as to minimize the value of the calculated loss function,
The domain classification network includes, as a first layer of the domain classification network, a gradient inversion layer that inverts the sign of a gradient when updating parameters by the backpropagation method in the domain classification network section;
The probability distribution calculated by the domain classification network unit is a softmax value calculated in an angle space,
The domain classification network unit includes:
(a) a domain classification network intermediate calculation unit that uses the obtained source data features or the obtained target features to perform calculations of layers other than the final layer, an angular softmax layer, in the domain classification network to obtain intermediate features r s corresponding to the obtained source data features or intermediate features r t corresponding to the obtained target features;
(b) (i) a feature normalization unit that calculates a normalized feature r s /||r s || or a normalized feature r t /||r t || using the intermediate feature r s corresponding to the obtained source data feature or the intermediate feature r t corresponding to the obtained target data feature; (ii) a parameter normalization unit that calculates a normalized parameter z 0 /||z 0 || or a normalized parameter z 1 /||z 1 || using a parameter z 0 or z 1 of the angular softmax layer; and (iii) a dot product calculated feature (cos p t , cos p s ) corresponding to the target data feature defined by equations (1) and (2) where T means transpose, and the calculated normalized feature is a normalized feature r s / ||r s corresponding to the source data feature . if ||, an inner product calculation unit calculates inner product-calculated features (cos p t , cos p s ) corresponding to the source data features defined by equations (3) and (4);
Learning device.
ターゲットデータ記憶部には、ターゲットデータは、画像及びその画像に対応するドメインラベルであり、複数のターゲットデータが記憶されているとし、
前段ネットワーク部が、画像を入力としてその入力された画像の特徴を出力する前段ネットワークを用いて、前記ソースデータ記憶部から読み込んだソースデータの画像の特徴であるソースデータ特徴と、前記ターゲットデータ記憶部から読み込んだターゲットデータの特徴であるターゲットデータ特徴とを得る前段ネットワークステップと、
クラス分類ネットワーク部が、ソースデータ特徴を入力としてその入力されたソースデータ特徴が属するクラスの確率分布を出力するクラス分類ネットワークを用いて、前記得られたソースデータ特徴に対応する確率分布を計算し、計算された確率分布と、前記ソースデータ記憶部から読み込んだ、前記得られたソースデータ特徴に対応するソースデータのクラスラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前記前段ネットワーク及び前記クラス分類ネットワークのパラメータを誤差逆伝搬法により更新するクラス分類ネットワークステップと、
ドメイン分類ネットワーク部が、ソースデータ特徴又はターゲット特徴を入力として、その入力されたソースデータ特徴又はターゲット特徴が属するドメインの確率分布を計算するドメイン分類ネットワークを用いて、前記得られたソースデータ特徴又は前記得られたターゲット特徴に対応する確率分布を計算し、計算された確率分布と、前記ソースデータ記憶部から読み込んだ前記得られたソースデータ特徴に対応するソースデータのドメインラベル又は前記ターゲットデータ記憶部から読み込んだ前記得られたターゲットデータ特徴に対応するターゲットデータのドメインラベルとを用いて、損失関数の値を計算し、計算された損失関数の値を最小化するように、前記前段ネットワーク及び前記ドメイン分類ネットワークのパラメータを誤差逆伝搬法により更新するドメイン分類ネットワークステップと、を含み、
前記ドメイン分類ネットワークは、前記ドメイン分類ネットワークのファーストレイヤーとして、前記ドメイン分類ネットワーク部で誤差逆伝搬法によりパラメータを更新する際に勾配の符号を反転する勾配反転レイヤーを含み、
前記ドメイン分類ネットワーク部で計算される確率分布は、角度空間で計算されたソフトマックス値であり、
前記ドメイン分類ネットワークステップは、
(a)ドメイン分類ネットワーク中間計算部が、前記得られたソースデータ特徴又は前記得られたターゲット特徴を用いて、前記ドメイン分類ネットワークの中の、最後のレイヤーである角度ソフトマックスレイヤー以外のレイヤーの計算を行うことで、前記得られたソースデータ特徴に対応する中間特徴rs又は前記得られたターゲット特徴に対応する中間特徴rtを得るドメイン分類ネットワーク中間計算ステップと、
(b)(i)特徴正規化部が、前記得られたソースデータ特徴に対応する中間特徴rs又は前記得られたターゲットデータ特徴に対応する中間特徴rtを用いて、正規化済み特徴rs/||rs||又は正規化済み特徴はrt/||rt||を計算する特徴正規化ステップと、(ii)パラメータ正規化部が、前記角度ソフトマックスレイヤーのパラメータz0又はz1を用いて、正規化済みパラメータz0/||z0||又は正規化済みパラメータz1/||z1||を計算するパラメータ正規化ステップと、(iii)内積計算部が、Tは転置を意味するとして、計算された正規化済み特徴がターゲットデータ特徴に対応する正規化済み特徴rt/||rt||である場合、式(1),式(2)により定義される、ターゲットデータ特徴に対応する内積計算済み特徴(cos pt, cos ps)を計算し、計算された正規化済み特徴がソースデータ特徴に対応する正規化済み特徴rs/||rs||である場合、式(3),式(4)により定義される、ソースデータ特徴に対応する内積計算済み特徴(cos pt, cos ps)を計算する内積計算ステップと、
学習方法。 The source data storage unit stores a plurality of source data, each of which is an image, a class label corresponding to the image, and a domain label;
The target data storage unit stores a plurality of target data, each of which is an image and a domain label corresponding to the image;
a front-stage network step in which a front-stage network unit obtains source data features, which are features of the image of the source data read from the source data storage unit, and target data features, which are features of the target data read from the target data storage unit, using a front-stage network that receives an image as an input and outputs features of the input image;
a classification network step in which a classification network unit calculates a probability distribution corresponding to the obtained source data features using a classification network that receives source data features as input and outputs a probability distribution of a class to which the input source data features belong, calculates a value of a loss function using the calculated probability distribution and a class label of source data that corresponds to the obtained source data features and that is read from the source data storage unit, and updates parameters of the front-stage network and the classification network by an error backpropagation method so as to minimize the value of the calculated loss function;
a domain classification network step in which a domain classification network unit uses a domain classification network that calculates a probability distribution of a domain to which the input source data feature or target feature belongs by inputting a source data feature or a target feature, calculates a probability distribution corresponding to the obtained source data feature or the obtained target feature, calculates a value of a loss function using the calculated probability distribution and a domain label of source data corresponding to the obtained source data feature read from the source data storage unit or a domain label of target data corresponding to the obtained target data feature read from the target data storage unit, and updates parameters of the front-stage network and the domain classification network by an error backpropagation method so as to minimize the value of the calculated loss function;
The domain classification network includes, as a first layer of the domain classification network, a gradient inversion layer that inverts the sign of a gradient when updating parameters by the backpropagation method in the domain classification network section;
The probability distribution calculated by the domain classification network unit is a softmax value calculated in an angle space,
The domain classification network step includes:
(a) a domain classification network intermediate calculation step in which a domain classification network intermediate calculation unit uses the obtained source data features or the obtained target features to perform calculations of layers other than the final layer, the angle softmax layer, in the domain classification network to obtain intermediate features r s corresponding to the obtained source data features or intermediate features r t corresponding to the obtained target features;
(b) (i) a feature normalization step in which a feature normalization unit calculates a normalized feature r s /||r s || or a normalized feature r t /||r t || using an intermediate feature r s corresponding to the obtained source data feature or an intermediate feature r t corresponding to the obtained target data feature; (ii) a parameter normalization step in which a parameter normalization unit calculates a normalized parameter z 0 /||z 0 || or a normalized parameter z 1 /||z 1 || using a parameter z 0 or z 1 of the angular softmax layer; and (iii) an inner product calculation unit calculates an inner product calculated feature (cos p t , cos p s ) corresponding to the target data feature defined by equations (1) and (2), where T means transpose, when the calculated normalized feature is a normalized feature r t / ||r t || corresponding to the target data feature, and the calculated normalized feature is a normalized feature r s /||r s corresponding to the source data feature . if ||, a dot product calculation step of calculating dot product calculated features (cos p t , cos p s ) corresponding to the source data features defined by equations (3) and (4);
How to learn.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2020/021880 WO2021245822A1 (en) | 2020-06-03 | 2020-06-03 | Learning device, method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2021245822A1 JPWO2021245822A1 (en) | 2021-12-09 |
JP7485028B2 true JP7485028B2 (en) | 2024-05-16 |
Family
ID=78831002
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022529205A Active JP7485028B2 (en) | 2020-06-03 | 2020-06-03 | Learning device, method and program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7485028B2 (en) |
WO (1) | WO2021245822A1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019159889A (en) | 2018-03-14 | 2019-09-19 | オムロン株式会社 | Defect inspection device, defect inspection method, and program thereof |
-
2020
- 2020-06-03 JP JP2022529205A patent/JP7485028B2/en active Active
- 2020-06-03 WO PCT/JP2020/021880 patent/WO2021245822A1/en active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019159889A (en) | 2018-03-14 | 2019-09-19 | オムロン株式会社 | Defect inspection device, defect inspection method, and program thereof |
Non-Patent Citations (4)
Title |
---|
DENG, Jiankang et al.,ArcFace: Additive Angular Margin Loss for Deep Face Recognition,Proeeding of the IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR),2019年,pp.4690-4699 |
WANG, Feng et al.,Additive Margin Softmax for Face Verification,IEEE Signal Processing Letters,2018年,Volume 25, Issue 7,pp.926-930 |
WANG, Hao et al.,CosFace: Large Margin Cosine Loss for Deep Face Recognition,Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition(CVPR),2018年,pp.5265-5274 |
YAROSLAV, Ganin et al.,Unsupervised Domain Adaptation by Backpropagation,ICML'15: Proceedings of the 32nd International Conference on Machine Learning,2015年,Vol 37.,pp.1180-1189 |
Also Published As
Publication number | Publication date |
---|---|
JPWO2021245822A1 (en) | 2021-12-09 |
WO2021245822A1 (en) | 2021-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10803591B2 (en) | 3D segmentation with exponential logarithmic loss for highly unbalanced object sizes | |
Kadam et al. | Review and analysis of zero, one and few shot learning approaches | |
US20200334520A1 (en) | Multi-task machine learning architectures and training procedures | |
US20190378037A1 (en) | Systems and Methods for Evaluating a Loss Function or a Gradient of a Loss Function via Dual Decomposition | |
KR102100368B1 (en) | Effective quantum RAM architecture for quantum database | |
US11681913B2 (en) | Method and system with neural network model updating | |
JP7070653B2 (en) | Learning devices, speech recognition ranking estimators, their methods, and programs | |
US20240185025A1 (en) | Flexible Parameter Sharing for Multi-Task Learning | |
JP7331937B2 (en) | ROBUST LEARNING DEVICE, ROBUST LEARNING METHOD, PROGRAM AND STORAGE DEVICE | |
Krak et al. | Analysis of deep learning methods in adaptation to the small data problem solving | |
Jadon et al. | Hands-on one-shot learning with python: Learn to implement fast and accurate deep learning models with fewer training samples using pytorch | |
Sahito et al. | Semi-supervised learning using Siamese networks | |
Zheng et al. | L1-norm Laplacian support vector machine for data reduction in semi-supervised learning | |
Liu et al. | A unified framework of surrogate loss by refactoring and interpolation | |
Kärkkäinen | On the role of Taylor’s formula in machine learning | |
JP7485028B2 (en) | Learning device, method and program | |
US11568303B2 (en) | Electronic apparatus and control method thereof | |
Chaturvedi et al. | Analyzing the performance of novel activation functions on deep learning architectures | |
Zhou et al. | A multi-classification classifier based on variational quantum computation | |
Czarnowski et al. | Cluster-based instance selection for the imbalanced data classification | |
US20220366188A1 (en) | Parameterized neighborhood memory adaptation | |
Julian | Deep learning with pytorch quick start guide: learn to train and deploy neural network models in Python | |
Ketkar et al. | Introduction to Machine Learning and Deep Learning | |
Chauhan et al. | Multi-label classifier for protein sequence using heuristic-based deep convolution neural network | |
Grégoire et al. | Sample-level weighting for multi-task learning with auxiliary tasks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221004 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230905 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231101 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231219 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240207 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240402 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240415 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7485028 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |