Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7647934B2 - DETECTION METHOD, DETECTION APPARATUS, AND PROGRAM - Google Patents
[go: Go Back, main page]

JP7647934B2 - DETECTION METHOD, DETECTION APPARATUS, AND PROGRAM - Google Patents

DETECTION METHOD, DETECTION APPARATUS, AND PROGRAM Download PDF

Info

Publication number
JP7647934B2
JP7647934B2 JP2023567442A JP2023567442A JP7647934B2 JP 7647934 B2 JP7647934 B2 JP 7647934B2 JP 2023567442 A JP2023567442 A JP 2023567442A JP 2023567442 A JP2023567442 A JP 2023567442A JP 7647934 B2 JP7647934 B2 JP 7647934B2
Authority
JP
Japan
Prior art keywords
data
task
distribution
model
learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2023567442A
Other languages
Japanese (ja)
Other versions
JPWO2023112264A1 (en
Inventor
具治 岩田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Publication of JPWO2023112264A1 publication Critical patent/JPWO2023112264A1/ja
Application granted granted Critical
Publication of JP7647934B2 publication Critical patent/JP7647934B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)

Description

本発明は、検出方法、検出装置、及びプログラムに関する。 The present invention relates to a detection method, a detection device, and a program.

機械学習モデルによりクラスの予測(又はクラスの分類)を行う場合、学習データにないクラスのデータに関する予測は大きく間違えることが多い。このため、学習データにないクラスのデータを検出する手法である分布外データ検出手法(例えば、非特許文献1)は重要である。分布外データ検出手法により、大きく間違える可能性があるデータを検出し、そのデータを別途処理することが可能になる。これ以外にも、分布外データ検出手法では、異常なデータを検出したり、収集したデータの品質を確認したりすることも可能である。When predicting classes (or classifying classes) using a machine learning model, predictions for data of classes not included in the training data are often significantly inaccurate. For this reason, out-of-distribution data detection techniques (e.g., Non-Patent Document 1), which are techniques for detecting data of classes not included in the training data, are important. Out-of-distribution data detection techniques make it possible to detect data that may be significantly inaccurate and process that data separately. In addition, out-of-distribution data detection techniques can also detect abnormal data and check the quality of collected data.

Liang, Shiyu, Yixuan Li, and R. Srikant. "Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks." International Conference on Learning Representations. 2018.Liang, Shiyu, Yixuan Li, and R. Srikant. "Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks." International Conference on Learning Representations. 2018.

しかしながら、従来の分布外データ検出手法では、大量の学習データが必要であるという問題がある。However, conventional out-of-distribution data detection methods have the problem that they require large amounts of training data.

本発明の一実施形態は、上記の点に鑑みてなされたもので、分布外データを高精度に検出することを目的とする。 One embodiment of the present invention has been made in consideration of the above points, and aims to detect out-of-distribution data with high accuracy.

上記目的を達成するため、一実施形態に係る検出方法は、目的とするタスクである目的タスクを含む複数のタスクの学習データで構成される第1の学習データ集合を用いて、前記複数のタスクで共通の機械学習モデルである共通モデルを学習するメタ学習手順と、学習済みの前記共通モデルと、前記目的タスクの学習データで構成される第2の学習データ集合と、前記目的タスクの機械学習モデルである目的タスク特化モデルとを用いて、前記第2の学習データ集合に含まれる学習データには付与されていないラベルのデータを分布外データとして検出する検出手順と、をコンピュータが実行する。In order to achieve the above-mentioned objective, a detection method according to one embodiment includes a meta-learning procedure in which a first training data set consisting of training data for a plurality of tasks including a target task, which is a desired task, is used to learn a common model, which is a machine learning model common to the plurality of tasks, and a detection procedure in which a computer executes the meta-learning procedure in which a first training data set consisting of training data for the target task is used to learn a common model, which is a machine learning model common to the plurality of tasks, and a detection procedure in which a computer executes the detection procedure in which a label not assigned to the training data included in the second training data set is used as out-of-distribution data, using the trained common model, a second training data set consisting of training data for the target task, and a target task-specific model, which is a machine learning model for the target task.

分布外データを高精度に検出することができる。 Out-of-distribution data can be detected with high accuracy.

本実施形態に係る検出装置のハードウェア構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of a hardware configuration of a detection device according to the present embodiment. 本実施形態に係る検出装置の機能構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of a functional configuration of a detection device according to the present embodiment. 本実施形態に係るメタ学習処理の一例を示すフローチャートである。13 is a flowchart illustrating an example of a meta-learning process according to the present embodiment. 本実施形態に係る検出処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of a detection process according to the present embodiment.

以下、本発明の一実施形態について説明する。本実施形態では、目的のタスク(以下、目的タスクともいう。)の学習データが少量しかない場合であっても、目的タスクにおける分布外データを高精度に検出することができる検出装置10について説明する。ここで、学習データとは、事例の特徴量と、その特徴量がどのクラスに属するかを表すラベルとの組で表されるデータのことである。 An embodiment of the present invention will be described below. In this embodiment, a detection device 10 will be described that can detect out-of-distribution data in a target task with high accuracy even when there is only a small amount of training data for the target task. Here, training data refers to data represented as a pair of features of an example and a label indicating which class the features belong to.

本実施形態に係る検出装置10には、目的タスクを含む複数のタスクの学習データを用いてメタ学習を行うメタ学習時と、目的タスクのデータ(特徴量)が与えられた場合にその特徴量が分布外データであるか否かを判定する検出時とが存在する。The detection device 10 of this embodiment has a meta-learning time in which meta-learning is performed using learning data of multiple tasks including the target task, and a detection time in which, when data (feature) of the target task is given, it is determined whether the feature is out-of-distribution data.

メタ学習時には、各タスクのモデル(以下、タスク特化モデルともいう。)と、各タスクで共通のモデル(以下、共通モデルともいう。)と、メタ学習用の学習データ集合During meta-learning, a model for each task (hereafter also called a task-specific model), a model common to all tasks (hereafter also called a common model), and a learning data set for meta-learning are

Figure 0007647934000001
とが検出装置10に与えられるものとする。ここで、Tはタスク数、Nはt番目のタスクの学習データ数(言い換えれば、t番目のタスクのラベル付き事例数)、xtnはt番目のタスクのn番目の事例の特徴量を表す。また、
Figure 0007647934000001
and are given to the detection device 10. Here, T is the number of tasks, Nt is the number of learning data for the t-th task (in other words, the number of labeled examples for the t-th task), and xtn is the feature amount of the n-th example for the t-th task.

Figure 0007647934000002
はxtnのラベル(クラスラベル)、ctkはt番目のタスクのk番目のクラス、Kはt番目のタスクのクラス数を表す。なお、以下では、D={(xtn,ytn)|n=1,・・・,N}と表記する。また、t番目のタスクを「タスクt」、n番目の事例を「事例n」、k番目のクラスを「クラスk」等とも表記する。
Figure 0007647934000002
represents the label (class label) of xtn , ctk represents the kth class of the tth task, and Kt represents the number of classes of the tth task. In the following, Dt is written as {( xtn , ytn )|n=1,..., Nt }. The tth task is also written as "task t", the nth case as "case n", the kth class as "class k", etc.

検出時には、メタ学習時に学習した共通モデルと、目的タスクt'のタスク特化モデルと、目的タスクt'の学習データ集合Dt'={(xt'n,yt'n)|n=1,・・・,Nt'}と、分布外データであるか否かの判定対象となる特徴量x(又は、そのような判定対象の特徴量の集合{x|n=1,・・・,N}、ただし、Nは特徴量数)とが与えられるものとする。ここで、目的タスクt'の学習データ集合Dt'に含まれる学習データ数Nt'は、比較的少量(すなわち、従来の分布外データ検出手法で必要な学習データ数よりも少量)であることを想定する。 At the time of detection, the common model learned during meta-learning, the task-specific model for the target task t', a training data set D t' = {(x t'n , y t'n )|n=1, ..., N t' } for the target task t', and a feature x to be determined as being out-of-distribution data (or a set of such features to be determined {x n |n=1, ..., N}, where N is the number of features) are given. Here, it is assumed that the number of training data N t' included in the training data set D t' for the target task t' is relatively small (i.e., smaller than the number of training data required by conventional out-of-distribution data detection methods).

なお、各タスク特化モデル(機械学習モデル)としては、そのタスクに応じて任意のモデルが与えられるが、以下では一例として任意の密度分布モデルで与えられることを想定する。 Note that each task-specific model (machine learning model) can be any model depending on the task, but in the following we will assume that it is an arbitrary density distribution model as an example.

<検出装置10のハードウェア構成>
本実施形態に係る検出装置10のハードウェア構成例を図1に示す。図1に示すように、本実施形態に係る検出装置10は、入力装置101と、表示装置102と、外部I/F103と、通信I/F104と、RAM(Random Access Memory)105と、ROM(Read Only Memory)106と、補助記憶装置107と、プロセッサ108とを有する。これらの各ハードウェアは、それぞれがバス109を介して通信可能に接続されている。
<Hardware configuration of detection device 10>
An example of a hardware configuration of the detection device 10 according to the present embodiment is shown in Fig. 1. As shown in Fig. 1, the detection device 10 according to the present embodiment includes an input device 101, a display device 102, an external I/F 103, a communication I/F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Each of these pieces of hardware is connected to each other via a bus 109 so as to be able to communicate with each other.

入力装置101は、例えば、キーボード、マウス、タッチパネル等である。表示装置102は、例えば、ディスプレイ、表示パネル等である。なお、検出装置10は、例えば、入力装置101及び表示装置102のうちの少なくとも一方を有していなくてもよい。The input device 101 is, for example, a keyboard, a mouse, a touch panel, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the detection device 10 does not have to have at least one of the input device 101 and the display device 102, for example.

外部I/F103は、記録媒体103a等の外部装置とのインタフェースである。検出装置10は、外部I/F103を介して、記録媒体103aの読み取りや書き込み等を行うことができる。記録媒体103aとしては、例えば、フレキシブルディスク、CD(Compact Disc)、DVD(Digital Versatile Disk)、SDメモリカード(Secure Digital memory card)、USB(Universal Serial Bus)メモリカード等がある。The external I/F 103 is an interface with an external device such as a recording medium 103a. The detection device 10 can read and write data from and to the recording medium 103a via the external I/F 103. Examples of the recording medium 103a include a flexible disk, a CD (Compact Disc), a DVD (Digital Versatile Disk), a SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.

通信I/F104は、検出装置10を通信ネットワークに接続するためのインタフェースである。RAM105は、プログラムやデータを一時保持する揮発性の半導体メモリ(記憶装置)である。ROM106は、電源を切ってもプログラムやデータを保持することができる不揮発性の半導体メモリ(記憶装置)である。補助記憶装置107は、例えば、HDD(Hard Disk Drive)やSSD(Solid State Drive)等のストレージ装置(記憶装置)である。プロセッサ108は、例えば、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)等の演算装置である。The communication I/F 104 is an interface for connecting the detection device 10 to a communication network. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a storage device (storage device) such as a hard disk drive (HDD) or a solid state drive (SSD). The processor 108 is an arithmetic device such as a central processing unit (CPU) or a graphics processing unit (GPU).

本実施形態に係る検出装置10は、図1に示すハードウェア構成を有することにより、後述するメタ学習処理や検出処理を実現することができる。なお、図1に示すハードウェア構成は一例であって、検出装置10のハードウェア構成はこれに限られるものではない。例えば、検出装置10は、複数の補助記憶装置107や複数のプロセッサ108を有していてもよいし、図示したハードウェア以外の様々なハードウェアを有していてもよい。The detection device 10 according to this embodiment has the hardware configuration shown in Fig. 1, and is therefore capable of implementing the meta-learning process and detection process described below. Note that the hardware configuration shown in Fig. 1 is merely an example, and the hardware configuration of the detection device 10 is not limited thereto. For example, the detection device 10 may have multiple auxiliary storage devices 107 and multiple processors 108, or may have various other hardware besides the hardware shown in the figure.

<検出装置10の機能構成>
本実施形態に係る検出装置10の機能構成例を図2に示す。図2に示すように、本実施形態に係る検出装置10は、メタ学習部201と、適合部202と、終了判定部203と、検出部204とを有する。これら各部は、例えば、検出装置10にインストールされた1以上のプログラムが、プロセッサ108に実行させる処理により実現される。また、本実施形態に係る検出装置10は、記憶部205を有する。記憶部205は、例えば、補助記憶装置107により実現される。なお、記憶部205は、例えば、検出装置10と通信ネットワークを介して接続される記憶装置(データベースサーバ等)により実現されていてもよい。
<Functional configuration of detection device 10>
An example of the functional configuration of the detection device 10 according to this embodiment is shown in Fig. 2. As shown in Fig. 2, the detection device 10 according to this embodiment has a meta-learning unit 201, a matching unit 202, a termination determination unit 203, and a detection unit 204. Each of these units is realized, for example, by a process in which one or more programs installed in the detection device 10 are executed by the processor 108. The detection device 10 according to this embodiment also has a storage unit 205. The storage unit 205 is realized, for example, by the auxiliary storage device 107. Note that the storage unit 205 may be realized, for example, by a storage device (such as a database server) connected to the detection device 10 via a communication network.

メタ学習部201は、メタ学習時に、メタ学習用の学習データ集合Dを用いて、分布外データの検出性能が向上するように、共通モデルを学習する。During meta-learning, the meta-learning unit 201 uses a learning data set D for meta-learning to learn a common model so as to improve the detection performance of out-of-distribution data.

適合部202は、メタ学習時及び検出時のそれぞれで或る学習データ集合(後述するサポート集合)に適合するようにタスク特化モデルを学習する。The adaptation unit 202 trains a task-specific model to adapt to a certain training data set (the support set described later) during both meta-learning and detection.

終了判定部203は、メタ学習時に、共通モデルを学習するための繰り返しに対する終了条件を満たすか否かを判定する。 The termination determination unit 203 determines whether or not a termination condition for the iterations for learning a common model is met during meta-learning.

検出部204は、検出時に、メタ学習時に学習した共通モデルと目的タスクt'のタスク特化モデルとを用いて、分布外データを検出する。At the time of detection, the detection unit 204 detects out-of-distribution data using the common model learned during meta-learning and the task-specific model for the target task t'.

記憶部205は、メタ学習時に、学習対象の共通モデル(及びそのパラメータ)と各タスクのタスク特化モデル(及びそのパラメータ)とメタ学習用の学習データ集合Dとを少なくとも記憶する。また、記憶部205は、検出時に、学習済みの共通モデル(及びそのパラメータ)と目的タスクt'の学習データ集合Dt'と目的タスクt'のタスク特化モデル(及びそのパラメータ)と分布外データであるか否かの判定対象となる特徴量(又はそれらの集合)とを少なくとも記憶する。なお、これら以外にも、記憶部205には、例えば、メタ学習時や検出時における途中の計算結果等といった様々なデータが記憶されてもよい。 The storage unit 205 stores at least the common model (and its parameters) to be learned, the task-specific model (and its parameters) for each task, and the learning data set D for meta-learning during meta-learning. Furthermore, the storage unit 205 stores at least the learned common model (and its parameters), the learning data set D t' for the target task t', the task-specific model (and its parameters) for the target task t', and the feature amount (or a set thereof) to be determined as to whether or not the data is out-of-distribution data during detection. In addition to these, the storage unit 205 may store various data such as intermediate calculation results during meta-learning or detection.

<メタ学習処理>
本実施形態に係るメタ学習処理について、図3を参照しながら説明する。
<Meta-learning process>
The meta-learning process according to this embodiment will be described with reference to FIG.

まず、メタ学習部201は、共通モデルのパラメータΦ(以下、共通モデルパラメータΦともいう。)を初期化する(ステップS101)。なお、共通モデルパラメータΦは任意の手法により初期化(例えば、ランダムに初期化、或る分布に従って初期化等)すればよい。First, the meta-learning unit 201 initializes the parameters Φ of the common model (hereinafter also referred to as the common model parameters Φ) (step S101). The common model parameters Φ may be initialized by any method (for example, random initialization, initialization according to a certain distribution, etc.).

次に、メタ学習部201は、タスクt∈{1,・・・,T}をランダムに選択する(ステップS102)。Next, the meta-learning unit 201 randomly selects a task t ∈ {1, ..., T} (step S102).

次に、メタ学習部201は、上記のステップS102で選択したタスクtのサポート集合S⊂Dをランダムにサンプリングする(ステップS103)。すなわち、メタ学習部201は、上記のステップS102で選択したタスクtの学習データ集合Dからいくつかの学習データ(xtn,ytn)をランダムにサンプリングし、それらの学習データの集合をサポート集合Sとする。なお、学習データのサンプリング数はランダムに決定されてもよいし、予め決められた数であってもよい。 Next, the meta-learning unit 201 randomly samples a support set S ⊂ D t for the task t selected in step S102 (step S103). That is, the meta-learning unit 201 randomly samples some learning data (x tn , y tn ) from the learning data set D t for the task t selected in step S102, and sets the set of these learning data as a support set S. Note that the number of samples of learning data may be determined randomly or may be a predetermined number.

次に、メタ学習部201は、上記のステップS102で選択したタスクtの分布内クエリ集合Qをランダムにサンプリングする(ステップS104)。すなわち、メタ学習部201は、上記のステップS102で選択したタスクtの学習データ集合Dに含まれる特徴量の集合{xtn|n=1,・・・,N}からいくつかの特徴量xtnをランダムにサンプリングし、それらの特徴量の集合を分布内クエリ集合Qとする。なお、特徴量のサンプリング数はランダムに決定されてもよいし、予め決められた数であってもよい。 Next, the meta-learning unit 201 randomly samples the in-distribution query set QI of the task t selected in step S102 above (step S104). That is, the meta-learning unit 201 randomly samples some feature quantities x tn from the set of feature quantities {x tn |n=1, ..., N t } included in the learning data set D t of the task t selected in step S102 above, and sets the set of feature quantities as the in-distribution query set QI . Note that the number of sampled feature quantities may be determined randomly or may be a predetermined number.

次に、メタ学習部201は、上記のステップS102で選択したタスクtの分布外クエリ集合Qをランダムにサンプリングする(ステップS105)。すなわち、メタ学習部201は、上記のステップS102で選択したタスクt以外のタスクの学習データ集合D\Dに含まれる特徴量の集合からいくつかの特徴量をランダムにサンプリングし、それらの特徴量の集合を分布外クエリ集合Qとする。なお、特徴量のサンプリング数はランダムに決定されてもよいし、予め決められた数であってもよい。 Next, the meta-learning unit 201 randomly samples the out-of-distribution query set Q O of the task t selected in step S102 above (step S105). That is, the meta-learning unit 201 randomly samples some features from a set of features included in the learning data set D\D t of a task other than the task t selected in step S102 above, and sets the set of features as the out-of-distribution query set Q O. Note that the number of sampled features may be determined randomly or may be a predetermined number.

次に、適合部202は、上記のステップS103で得られたサポート集合Sに適合するように、上記のステップS102で選択したタスクtのタスク特化モデルのパラメータを推定する(ステップS106)。以下、タスク特化モデルのパラメータをΘとする。なお、タスク特化モデルとして密度分布モデルを想定しているため、そのパラメータは、例えば、最尤推定等により推定することができるが、具体例については後述する。Next, the adaptation unit 202 estimates parameters of the task specific model for the task t selected in step S102 so as to adapt to the support set S obtained in step S103 (step S106). Hereinafter, the parameters of the task specific model are denoted as Θ. Note that since a density distribution model is assumed as the task specific model, the parameters can be estimated, for example, by maximum likelihood estimation, and a specific example will be described later.

次に、メタ学習部201は、上記のステップS102で選択したタスクtのタスク特化モデルを用いて、クエリ集合Q=Q∪Qの分布外スコアを計算する(ステップS107)。 Next, the meta-learning unit 201 calculates the out-of-distribution score for the query set Q=Q I ∪Q O using the task-specific model for the task t selected in step S102 above (step S107).

ここで、サポート集合Sと共通モデルパラメータΦとが与えられたときの特徴量xの分布外スコアをu(x|S;Φ)とする。分布外スコアu(x|S;Φ)は、特徴量xのクラスが、サポート集合Sを構成する各学習データのラベルが表すクラスに含まれていなければ高い値を取り、含まれていれば低い値を取る。後述するように、検出時には、この分布外スコアの値により、与えられた特徴量が分布外データであるか否かを判定する。このような分布外スコアu(x|S;Φ)としては、例えば、潜在空間における負の対数尤度Here, the out-of-distribution score of feature x when the support set S and common model parameters Φ are given is defined as u(x|S;Φ). The out-of-distribution score u(x|S;Φ) takes a high value if the class of feature x is not included in the classes represented by the labels of each training data constituting the support set S, and takes a low value if the class of feature x is included. As will be described later, at the time of detection, the value of this out-of-distribution score is used to determine whether or not a given feature is out-of-distribution data. An example of such an out-of-distribution score u(x|S;Φ) is the negative log-likelihood in the latent space

Figure 0007647934000003
を用いることができる。ここで、fは特徴量空間から潜在空間へ特徴量を写像するニューラルネットワーク、φはそのパラメータである。また、
Figure 0007647934000003
Here, f is a neural network that maps features from the feature space to the latent space, and φ is its parameter.

Figure 0007647934000004
はサポート集合Sに適合したときのタスク特化モデルのパラメータ(つまり、上記のステップS106で推定されたパラメータ)を表す。ニューラルネットワークfのパラメータφは、共通モデルパラメータに含まれる(つまり、φ∈Φである。)。以下、明細書のテキスト中では、推定値を表すハット「^」は記号の直前に記載する。例えば、サポート集合Sに適合したときのタスク特化モデルのパラメータを「^Θ(S;Φ)」と表記する。
Figure 0007647934000004
represents the parameters of the task-specific model when it matches the support set S (i.e., the parameters estimated in step S106 above). The parameter φ of the neural network f is included in the common model parameters (i.e., φ∈Φ). Hereinafter, in the text of the specification, a hat "^" indicating an estimated value is written immediately before the symbol. For example, the parameters of the task-specific model when it matches the support set S will be written as "^Θ(S;Φ)".

したがって、メタ学習部201は、各x∈Qに対して、例えば、上記の式(1)に示す分布外スコアu(x|S;Φ)をそれぞれ計算する。Therefore, for each x∈Q, the meta-learning unit 201 calculates, for example, an out-of-distribution score u(x|S;Φ) as shown in the above equation (1).

ここで、分布外スコアu(x|S;Φ)として負の対数尤度を用いる場合、タスク特化モデルとしては任意の密度分布モデルを用いることができる。このため、例えば、タスク特化モデルとして混合ガウス分布を用いた場合、上記のステップS106において、適合部202は、最尤推定により、以下の式(2)に示すパラメータを計算することができる。Here, when the negative log-likelihood is used as the out-of-distribution score u(x|S;Φ), any density distribution model can be used as the task-specific model. Therefore, for example, when a Gaussian mixture distribution is used as the task-specific model, in step S106 above, the adaptation unit 202 can calculate the parameters shown in the following formula (2) by maximum likelihood estimation.

Figure 0007647934000005
ここで、Sはサポート集合Sの中でクラスkである特徴量の集合、^γ(S)はクラスkの混合比、^μ(S)はクラスkの特徴量の潜在空間における平均、^Σ(S)はクラスkの特徴量の潜在空間における共分散、βはパラメータ、Iは単位行列である。これらの混合比^γ(S)、平均^μ(S)及び共分散^Σ(S)をまとめたものがパラメータ^Θ(S;Φ)、つまり^Θ(S;Φ)={^γ(S),^μ(S),^Σ(S)|k=1,・・・,K}である。なお、混合ガウス分布ではなく、例えば、カーネル密度推定やニューラルネットワークに基づく密度モデル等を用いることも可能である。
Figure 0007647934000005
Here, S k is a set of features of class k in the support set S, ^γ k (S) is the mixture ratio of class k, ^μ k (S) is the average of the features of class k in the latent space, ^Σ k (S) is the covariance of the features of class k in the latent space, β is a parameter, and I is a unit matrix. The mixture ratio ^γ k (S), the average ^μ k (S), and the covariance ^Σ k (S) are combined to form the parameter ^Θ(S;Φ), that is, ^Θ(S;Φ)={^γ k (S), ^μ k (S), ^Σ k (S)|k=1,...,K t }. Note that instead of the mixed Gaussian distribution, it is also possible to use, for example, a density model based on kernel density estimation or a neural network.

次に、メタ学習部201は、上記のステップS107で計算した分布外スコア(つまり、クエリ集合Qに関する分布外スコア)を評価する(ステップS108)。Next, the meta-learning unit 201 evaluates the out-of-distribution score calculated in step S107 above (i.e., the out-of-distribution score for the query set Q) (step S108).

ここで、分布外スコアの評価尺度(言い換えれば、分布外スコアによる分布外データの検出性能を評価する尺度)として、例えば、AUC(Area under the ROC curve)を用いることができる。このとき、クエリ集合Qに関するAUC(より正確には、上記のステップS106で推定されたパラメータ^Θ(S;Φ)と、共通モデルパラメータΦとが与えられたときの、クエリ集合Qに関するAUC)は、Here, for example, the AUC (area under the ROC curve) can be used as an evaluation measure for the out-of-distribution score (in other words, a measure for evaluating the detection performance of out-of-distribution data using the out-of-distribution score). In this case, the AUC for the query set Q (more precisely, the AUC for the query set Q when the parameter ^Θ(S;Φ) estimated in the above step S106 and the common model parameter Φ are given) is

Figure 0007647934000006
と計算することができる。ここで、Nは分布外クエリ集合Qの大きさ(要素数)、Nは分布内クエリ集合Qの大きさ(要素数)を表す。また、I(・)は指示関数であり、Aが真のときI(A)=1、そうでないときI(A)=0を取る。なお、上記の式(3)において、指示関数の代わりに、指示関数をシグモイド関数で近似した微分可能な関数を用いてもよい。
Figure 0007647934000006
Here, N O represents the size (number of elements) of the out-of-distribution query set Q O , and N I represents the size (number of elements) of the in-distribution query set Q I . In addition, I(·) is an indicator function, and I(A)=1 when A is true, and I(A)=0 when not. In addition, in the above formula (3), a differentiable function that approximates the indicator function with a sigmoid function may be used instead of the indicator function.

次に、メタ学習部201は、分布外データの検出性能が向上するように、共通モデルパラメータΦを更新する(ステップS109)。Next, the meta-learning unit 201 updates the common model parameter Φ so as to improve the detection performance of out-of-distribution data (step S109).

例えば、クエリ集合Qに関するAUCの期待値が最大となるように共通モデルパラメータΦを学習する。すなわち、以下の式(4)により共通モデルパラメータΦを学習する。For example, the common model parameters Φ are learned so that the expected value of AUC for the query set Q is maximized. That is, the common model parameters Φ are learned using the following equation (4).

Figure 0007647934000007
ここで、Eは期待値を表す。なお、共通モデルパラメータΦの更新は、例えば、既知の勾配法等により行うことができる。
Figure 0007647934000007
Here, E represents an expectation value. Note that the common model parameter Φ can be updated by, for example, a known gradient method.

次に、終了判定部203は、所定の終了条件を満たすか否かを判定する(ステップS110)。終了条件としては、例えば、ステップS102~ステップS109の繰り返し回数が所定の閾値以上となったこと、最適化対象の目的関数(つまり、上記の式(4)の期待値E)の変化量が所定の閾値以下となったこと、モデル共通パラメータΦの変化量が所定の閾値以下となったこと、等が挙げられる。Next, the termination determination unit 203 determines whether a predetermined termination condition is satisfied (step S110). Examples of the termination condition include the number of repetitions of steps S102 to S109 being equal to or greater than a predetermined threshold, the amount of change in the objective function to be optimized (i.e., the expected value E in the above formula (4)) being equal to or less than a predetermined threshold, the amount of change in the model common parameter Φ being equal to or less than a predetermined threshold, etc.

上記のステップS110で所定の終了条件を満たすと判定されなかった場合は、ステップS102に戻る。これにより、当該終了条件を満たすと判定されるまで、ステップS102~ステップS110が繰り返し実行される。一方で、上記のステップS110で所定の終了条件を満たすと判定された場合は、メタ学習処理を終了する。この場合、学習済み共通モデルが得られたことになる。 If it is not determined in step S110 above that the predetermined termination condition is met, the process returns to step S102. As a result, steps S102 to S110 are repeatedly executed until it is determined that the termination condition is met. On the other hand, if it is determined in step S110 above that the predetermined termination condition is met, the meta-learning process is terminated. In this case, a trained common model has been obtained.

<検出処理>
本実施形態に係る検出処理について、図4を参照しながら説明する。
<Detection process>
The detection process according to this embodiment will be described with reference to FIG.

適合部202は、目的タスクt'の学習データ集合Dt'をサポート集合Sとして、目的タスクt'のタスク特化モデルをサポート集合Sに適合させる(ステップS201)。すなわち、適合部202は、図3のステップS106と同様に、当該サポート集合Sに適合するように、目的タスクt'のタスク特化モデルのパラメータ^Θ(S;Φ)を推定する。ただし、Φは学習済み共通モデルのパラメータである。 The adaptation unit 202 adapts the task-specific model of the target task t' to the support set S by using the training data set D t' of the target task t' as the support set S (step S201). That is, the adaptation unit 202 estimates parameters ^Θ(S;Φ) of the task-specific model of the target task t' so as to adapt to the support set S, similar to step S106 in Fig. 3, where Φ is a parameter of the trained common model.

次に、検出部204は、分布外データであるか否かの判定対象となる特徴量xの分布外スコアu(x|S:Φ)を計算する(ステップS202)。すなわち、検出部204は、例えば、上記の式(1)により分布外スコアu(x|S:Φ)を計算する。なお、分布外データであるか否かの判定対象となる特徴量の集合{x|n=1,・・・,N}が与えられた場合、n=1,・・・,Nに対して分布外スコアu(x|S:Φ)をそれぞれ計算すればよい。 Next, the detection unit 204 calculates the out-of-distribution score u(x|S:Φ) of the feature x to be determined as being out-of-distribution data (step S202). That is, the detection unit 204 calculates the out-of-distribution score u(x|S:Φ), for example, by the above formula (1). Note that when a set of features {x n |n=1, ..., N} to be determined as being out-of-distribution data is given, the out-of-distribution score u(x n |S:Φ) may be calculated for each of n=1, ..., N.

そして、検出部204は、上記のステップS202で計算した分布外スコアから該当の特徴量が分布外データであるか否かを判定する(ステップS203)。具体的には、例えば、分布外スコアu(x|S:Φ)が所定の閾値以上である場合はその特徴量xを分布外データであると判定し、そうでない場合は分布外データでないと判定する。これにより、分布外スコアu(x|S:Φ)が所定の閾値以上である特徴量xが、分布外データと検出される。 Then, the detection unit 204 judges whether the corresponding feature is out-of-distribution data from the out-of-distribution score calculated in step S202 above (step S203). Specifically, for example, if the out-of-distribution score u(x|S:Φ) is equal to or greater than a predetermined threshold, the feature x is judged to be out-of-distribution data, and if not, it is judged not to be out-of-distribution data. As a result, the feature x whose out-of-distribution score u(x|S:Φ) is equal to or greater than a predetermined threshold is detected as out-of-distribution data.

<評価>
手書き文字を用いて、本実施形態に係る検出装置10を評価した結果を以下の表1に示す。
<Evaluation>
The results of evaluating the detection device 10 according to this embodiment using handwritten characters are shown in Table 1 below.

Figure 0007647934000008
上記の表1中において、提案手法が検出装置10である。一方で、既存手法は既存のメタ学習法であるPrototypical networkとした。また、評価指標としてはAUCを用いた。上記の表1に示されるように、本実施形態に係る検出装置10は、既存手法と比べて、高いAUCを達成していることがわかる。
Figure 0007647934000008
In Table 1 above, the proposed method is the detection device 10. On the other hand, the existing method is a prototypical network, which is an existing meta-learning method. In addition, AUC was used as the evaluation index. As shown in Table 1 above, it can be seen that the detection device 10 according to the present embodiment achieves a higher AUC than the existing method.

<まとめ>
以上のように、本実施形態に係る検出装置10は、目的タスクを含む複数のタスクの学習データ集合を用いて、これら複数のタスクで共通の共通モデルのパラメータをメタ学習により学習する。そして、本実施形態に係る検出装置10は、学習済みの共通モデルと、目的タスクの学習データ集合に適合させたタスク特化モデルとを用いて、与えられた特徴量から目的タスクの分布外データを検出することができる。しかも、目的タスクの学習データ集合に少量の学習データしか含まれない場合であっても、既存手法と比較して高精度に分布外データを検出することができる。
<Summary>
As described above, the detection device 10 according to the present embodiment uses a training data set of a plurality of tasks including a target task to learn parameters of a common model common to these plurality of tasks through meta-learning. Then, the detection device 10 according to the present embodiment can detect out-of-distribution data of a target task from given features using the trained common model and a task-specific model adapted to the training data set of the target task. Moreover, even if the training data set of the target task contains only a small amount of training data, it can detect out-of-distribution data with higher accuracy than existing methods.

なお、上記では、与えられた特徴量から目的タスクの分布外データを検出する場合について説明したが、本実施形態に係る検出装置10は、その検出結果から種々の処理を実行してもよい。例えば、分布外データが異常データを表す場合には、例えば、異常となっている機器の停止、他の機器への切り替え等といった制御処理を実行してもよい。Although the above describes the case where out-of-distribution data for a target task is detected from given features, the detection device 10 according to this embodiment may execute various processes based on the detection results. For example, when the out-of-distribution data represents abnormal data, control processes such as stopping the abnormal device or switching to another device may be executed.

本発明は、具体的に開示された上記の実施形態に限られるものではなく、請求の範囲の記載から逸脱することなく、種々の変形や変更、既知の技術との組み合わせ等が可能である。The present invention is not limited to the specifically disclosed embodiments above, and various modifications, variations, and combinations with known technologies are possible without departing from the scope of the claims.

10 検出装置
101 入力装置
102 表示装置
103 外部I/F
103a 記録媒体
104 通信I/F
105 RAM
106 ROM
107 補助記憶装置
108 プロセッサ
109 バス
201 メタ学習部
202 適合部
203 終了判定部
204 検出部
205 記憶部
10 Detection device 101 Input device 102 Display device 103 External I/F
103a Recording medium 104 Communication I/F
105 RAM
106 ROM
107 Auxiliary storage device 108 Processor 109 Bus 201 Meta-learning unit 202 Matching unit 203 End determination unit 204 Detection unit 205 Storage unit

Claims (7)

目的とするタスクである目的タスクを含む複数のタスクの学習データで構成される第1の学習データ集合を用いて、前記複数のタスクで共通の機械学習モデルである共通モデルを学習するメタ学習手順と、
学習済みの前記共通モデルと、前記目的タスクの学習データで構成される第2の学習データ集合と、前記目的タスクの機械学習モデルである目的タスク特化モデルとを用いて、与えられたデータが分布外データであるか否かを判定する判定手順と、
をコンピュータが実行し、
前記判定手順は、
前記データの分布外スコアを計算し、前記分布外スコアが所定の閾値以上である場合は前記データを分布外データであると判定し、前記分布外スコアが前記閾値未満である場合は前記データを分布外データでないと判定する、検出方法。
a meta-learning procedure for learning a common model, which is a machine learning model common to the plurality of tasks, using a first learning data set composed of learning data of a plurality of tasks including a target task that is a target task;
a determination step of determining whether or not given data is out-of-distribution data using the trained common model, a second training data set composed of training data for the target task, and a target task-specific model which is a machine learning model for the target task;
The computer executes
The determination procedure includes:
A detection method comprising: calculating an out-of-distribution score for the data; determining that the data is out-of-distribution data if the out-of-distribution score is equal to or greater than a predetermined threshold; and determining that the data is not out-of-distribution data if the out-of-distribution score is less than the threshold .
前記検出方法には、
前記複数のタスクに含まれる各タスクの学習データを用いて、前記タスクの機械学習モデルであるタスク特化モデルを学習する適合手順が含まれ、
前記メタ学習手順は、
前記複数のタスクから選択した一のタスクの1以上の第1のデータと、前記一のタスク以外のタスクの1以上の第2のデータと、前記一のタスクの学習済みの前記タスク特化モデルとを用いて、前記1以上の第1のデータ及び前記1以上の第2のデータの各々に対する前記分布外スコアを計算し、
前記分布外スコアによる前記分布外データの検出性能が向上するように、前記共通モデルを学習する、請求項1に記載の検出方法。
The detection method includes:
an adaptation step of training a task-specific model, which is a machine learning model of the task, using training data of each task included in the plurality of tasks;
The meta-learning procedure comprises:
calculating the out-of-distribution score for each of the one or more first data and the one or more second data using one or more first data for a task selected from the plurality of tasks, one or more second data for a task other than the one task, and the trained task-specific model for the one task ;
The method of claim 1 , further comprising training the common model such that the out-of-distribution scores improve the performance of detecting the out-of-distribution data.
前記分布外スコアは、潜在空間における負の対数尤度であり、
前記メタ学習手順は、
前記分布外データの検出性能の評価尺度としてAUCの期待値を計算し、
前記AUCの期待値を最大化するように、前記共通モデルを学習する、請求項2に記載の検出方法。
The out-of-distribution score is the negative log-likelihood in the latent space,
The meta-learning procedure comprises:
Calculating the expected AUC as a measure of performance for detecting the out-of-distribution data;
The method of claim 2 , wherein the common model is trained to maximize an expected value of the AUC.
前記タスク特化モデルは所定の密度分布モデルであり、
前記適合手順は、
最尤推定により前記タスク特化モデルのパラメータを推定することで、前記タスク特化モデルを学習する、請求項3に記載の検出方法。
the task specific model is a predetermined density distribution model;
The adaptation procedure comprises:
The method of claim 3 , further comprising training the task-specific model by estimating parameters of the task-specific model by maximum likelihood estimation.
前記適合手順は、
前記第2の学習データ集合を用いて、前記目的タスク特化モデルを学習し、
前記判定手順は、
学習済みの前記目的タスク特化モデルと与えられたデータとを用いて、前記データの前記分布外スコアを計算し、
前記分布外スコアが前記閾値以上である場合、前記データを分布外データであると判定する、請求項2乃至4の何れか一項に記載の検出方法。
The adaptation procedure comprises:
training the target task-specific model using the second training data set;
The determination procedure includes:
Calculating the out-of-distribution score for a given data set using the trained target task-specific model;
The method of claim 2 , further comprising determining that the data is out-of-distribution data if the out- of -distribution score is equal to or greater than the threshold.
目的とするタスクである目的タスクを含む複数のタスクの学習データで構成される第1の学習データ集合を用いて、前記複数のタスクで共通の機械学習モデルである共通モデルを学習するように構成されているメタ学習部と、
学習済みの前記共通モデルと、前記目的タスクの学習データで構成される第2の学習データ集合と、前記目的タスクの機械学習モデルである目的タスク特化モデルとを用いて、与えられたデータが分布外データであるか否かを判定するように構成されている判定部と、
を有し、
前記判定部は、
前記データの分布外スコアを計算し、前記分布外スコアが所定の閾値以上である場合は前記データを分布外データであると判定し、前記分布外スコアが前記閾値未満である場合は前記データを分布外データでないと判定する、検出装置。
a meta-learning unit configured to learn a common model, which is a machine learning model common to the plurality of tasks, using a first learning data set composed of learning data of a plurality of tasks including a target task that is a target task;
a determination unit configured to determine whether or not given data is out-of-distribution data by using the trained common model, a second training data set composed of training data for the target task, and a target task-specific model which is a machine learning model for the target task; and
having
The determination unit is
A detection device that calculates an out-of-distribution score for the data, and determines that the data is out-of-distribution data if the out-of-distribution score is greater than or equal to a predetermined threshold, and determines that the data is not out-of-distribution data if the out-of-distribution score is less than the threshold .
コンピュータに、請求項1乃至5の何れか一項に記載の検出方法を実行させるプログラム。 A program for causing a computer to execute the detection method described in any one of claims 1 to 5.
JP2023567442A 2021-12-16 2021-12-16 DETECTION METHOD, DETECTION APPARATUS, AND PROGRAM Active JP7647934B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/046559 WO2023112264A1 (en) 2021-12-16 2021-12-16 Detection method, detection device, and program

Publications (2)

Publication Number Publication Date
JPWO2023112264A1 JPWO2023112264A1 (en) 2023-06-22
JP7647934B2 true JP7647934B2 (en) 2025-03-18

Family

ID=86773871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023567442A Active JP7647934B2 (en) 2021-12-16 2021-12-16 DETECTION METHOD, DETECTION APPARATUS, AND PROGRAM

Country Status (2)

Country Link
JP (1) JP7647934B2 (en)
WO (1) WO2023112264A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113642671A (en) 2021-08-27 2021-11-12 京东科技信息技术有限公司 Semi-supervised meta-learning method and device based on task distribution changes

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113642671A (en) 2021-08-27 2021-11-12 京东科技信息技术有限公司 Semi-supervised meta-learning method and device based on task distribution changes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
REN Jie, et al.,Likelihood Ratios for Out-of-Distribution Detection,In: Proceedings of the 33rd Conference on Neural Information Processing Systems (NeurIPS 2019),[online],2019年,Pages 1-12,[retrieved on 2022.03.04], Retrieved from the Internet: <URL: https://proceedings.neurips.cc/paper/2019/hash/1e79596878b2320cac26dd792a6c51c9-Abstract.html>.

Also Published As

Publication number Publication date
JPWO2023112264A1 (en) 2023-06-22
WO2023112264A1 (en) 2023-06-22

Similar Documents

Publication Publication Date Title
US11526696B2 (en) Model maintenance device, pattern recognition system, model maintenance method, and computer program product
US10216558B1 (en) Predicting drive failures
US20190362242A1 (en) Computing resource-efficient, machine learning-based techniques for measuring an effect of participation in an activity
CN111125658B (en) Method, apparatus, server and storage medium for identifying fraudulent user
JP2009122851A (en) Technique for classifying data
WO2017216980A1 (en) Machine learning device
CN109948735A (en) A multi-label classification method, system, device and storage medium
Shin et al. Probability-enhanced sufficient dimension reduction for binary classification
US20220058312A1 (en) Estimation apparatus, optimization apparatus, estimation method, optimization method, and program
WO2013125482A1 (en) Document evaluation device, document evaluation method, and computer-readable recording medium
JP7207540B2 (en) LEARNING SUPPORT DEVICE, LEARNING SUPPORT METHOD, AND PROGRAM
CN115713658A (en) Sample image label processing method and device and electronic equipment
CN108108769B (en) Data classification method, device and storage medium
CN112464966A (en) Robustness estimation method, data processing method, and information processing apparatus
JP7647934B2 (en) DETECTION METHOD, DETECTION APPARATUS, AND PROGRAM
JP7439923B2 (en) Learning methods, learning devices and programs
CN110297989B (en) Test methods, apparatus, equipment and media for anomaly detection
US20240378500A1 (en) Information processing device, information processing system and information processing method
JP7700501B2 (en) Inference device, inference method, and program
CN114764594B (en) Classification model feature selection method, device and equipment
JP7251643B2 (en) LEARNING DEVICE, LEARNING METHOD AND PROGRAM
JP7505555B2 (en) Learning device, learning method, and program
JP7056804B2 (en) Experience loss estimation system, experience loss estimation method and experience loss estimation program
CN115953639A (en) Electronic device and method for image recognition and for training image recognition models
JP7448023B2 (en) Learning methods, learning devices and programs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240425

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20240701

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20241203

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250123

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250217

R150 Certificate of patent or registration of utility model

Ref document number: 7647934

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