JP2023166317A - Machine learning apparatus, machine learning system, machine learning method, and machine learning program - Google Patents
Machine learning apparatus, machine learning system, machine learning method, and machine learning program Download PDFInfo
- Publication number
- JP2023166317A JP2023166317A JP2022112943A JP2022112943A JP2023166317A JP 2023166317 A JP2023166317 A JP 2023166317A JP 2022112943 A JP2022112943 A JP 2022112943A JP 2022112943 A JP2022112943 A JP 2022112943A JP 2023166317 A JP2023166317 A JP 2023166317A
- Authority
- JP
- Japan
- Prior art keywords
- layer
- plaintext
- machine learning
- unit
- processing unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010801 machine learning Methods 0.000 title claims abstract description 203
- 238000012545 processing Methods 0.000 claims abstract description 429
- 238000004364 calculation method Methods 0.000 claims abstract description 295
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 73
- 238000000034 method Methods 0.000 claims abstract description 65
- 230000008569 process Effects 0.000 claims description 55
- 238000004891 communication Methods 0.000 description 53
- 238000010586 diagram Methods 0.000 description 48
- 238000007726 management method Methods 0.000 description 39
- 230000006870 function Effects 0.000 description 25
- 230000000694 effects Effects 0.000 description 7
- 238000011176 pooling Methods 0.000 description 6
- 206010028980 Neoplasm Diseases 0.000 description 5
- 201000011510 cancer Diseases 0.000 description 5
- 238000003745 diagnosis Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 3
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 3
- 238000001914 filtration Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 210000003734 kidney Anatomy 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002250 progressing effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
Description
本開示は、機械学習装置、機械学習システム、機械学習方法、および機械学習プログラムに関する。 The present disclosure relates to a machine learning device, a machine learning system, a machine learning method, and a machine learning program.
近年、畳み込みニューラルネットワークの学習モデルを用いた画像認識により、複雑なデータの分析を高精度に行うことが可能となっている。 In recent years, image recognition using convolutional neural network learning models has made it possible to analyze complex data with high precision.
一方、分析対象が医療画像など個人のプライバシーに直結した機微データである場合は、プライバシー情報を秘匿(暗号化)したまま分析処理を行うことが求められる。 On the other hand, when the subject of analysis is sensitive data that is directly linked to personal privacy, such as medical images, it is necessary to perform analysis processing while keeping the privacy information secret (encrypted).
例えば、特許文献1では、準同型暗号を用いたニューラルネットワークのシステムに関する技術が開示されている。 For example, Patent Document 1 discloses a technology related to a neural network system using homomorphic encryption.
準同型暗号を用いた畳み込みニューラルネットワークにより画像認識を行えば、プライバシー情報を暗号化したまま分析処理を行うことができる。しかしながら、一般的に、準同型暗号を用いた演算は、セキュリティレベルは高いものの、計算量が膨大になってしまい、実用的な計算コストで実行することが難しいという課題があった。 If image recognition is performed using a convolutional neural network using homomorphic encryption, analysis processing can be performed while privacy information remains encrypted. However, in general, although operations using homomorphic encryption have a high security level, they require an enormous amount of calculation, and there is a problem in that it is difficult to perform them at a practical calculation cost.
そこで、本開示は、上記課題を解決すべくなされたものであって、その目的は、ユーザの求める実用的な計算コストとセキュリティレベルに応じた、畳み込みニューラルネットワークを用いた機械学習に関する技術を提供することである。 Therefore, the present disclosure has been made to solve the above problems, and the purpose is to provide a technology related to machine learning using a convolutional neural network that meets the practical calculation cost and security level required by users. It is to be.
上記目的を達成するため、本開示に係る機械学習装置は、画像データを取得するデータ取得部と、画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行う機械学習計算部と、を備え、畳み込みニューラルネットワークは複数の層から構成され、機械学習計算部は、準同型暗号による暗号実行領域において演算する暗号処理部と、平文実行領域において演算する平文処理部と、暗号処理部および平文処理部がアクセス可能な共有メモリと、畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付ける受付部と、を有し、暗号処理部は、入力層から第N層までの演算を実行し、平文処理部は、第(N+1)層から出力層までの演算を実行し、共有メモリは、暗号処理部および平文処理部が実行した演算の結果を記憶する。 In order to achieve the above object, a machine learning device according to the present disclosure includes a data acquisition unit that acquires image data, and a machine learning calculation unit that performs calculation processing using a convolutional neural network based on the image data. , the convolutional neural network is composed of multiple layers, and the machine learning calculation unit includes a cryptographic processing unit that operates in the encryption execution area using homomorphic encryption, a plaintext processing unit that operates in the plaintext execution area, and a cryptographic processing unit and plaintext processing unit. The cryptographic processing unit includes a shared memory that can be accessed by the cryptographic processing unit, and a reception unit that receives layer designation information that designates the Nth layer, which is a layer on the way from the input layer to the output layer of the convolutional neural network. , executes operations from the input layer to the Nth layer, the plaintext processing section executes operations from the (N+1)th layer to the output layer, and the shared memory stores the operations executed by the cryptographic processing section and the plaintext processing section. Remember the results.
また、上記目的を達成するため、本開示に係る機械学習システムは、画像データを取得するデータ取得部と、画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行う機械学習計算部と、を備え、畳み込みニューラルネットワークは複数の層から構成され、機械学習計算部は、準同型暗号による暗号実行領域において演算する暗号処理部と、平文実行領域において演算する平文処理部と、暗号処理部および平文処理部がアクセス可能な共有メモリと、畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付ける受付部と、を有し、暗号処理部は、入力層から第N層までの演算を実行し、平文処理部は、第(N+1)層から出力層までの演算を実行し、共有メモリは、暗号処理部および平文処理部が実行した演算の結果を記憶する。 Further, in order to achieve the above object, a machine learning system according to the present disclosure includes a data acquisition unit that acquires image data, a machine learning calculation unit that performs calculation processing using a convolutional neural network based on the image data, The convolutional neural network is composed of multiple layers, and the machine learning calculation unit includes a cryptographic processing unit that operates in the encryption execution area using homomorphic encryption, a plaintext processing unit that operates in the plaintext execution area, a cryptographic processing unit, and It has a shared memory that can be accessed by the plaintext processing unit, and a reception unit that accepts layer designation information that designates the Nth layer, which is a layer on the way from the input layer to the output layer of the convolutional neural network, and performs cryptographic processing. The section executes operations from the input layer to the Nth layer, the plaintext processing section executes operations from the (N+1)th layer to the output layer, and the shared memory stores the operations executed by the encryption processing section and the plaintext processing section. Store the result of the operation.
また、上記目的を達成するため、本開示に係る機械学習方法は、画像データを取得するステップと、画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行うステップと、を備え、畳み込みニューラルネットワークは複数の層から構成され、畳み込みニューラルネットワークを用いた計算処理を行うステップは、畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付けるステップと、準同型暗号による暗号実行領域において、入力層から第N層までの演算を実行するステップと、平文実行領域において、第(N+1)層から出力層までの演算を実行するステップと、暗号実行領域および平文実行領域からアクセス可能な共有メモリが、暗号実行領域および平文実行領域における演算の結果を記憶するステップと、を有する。 Further, in order to achieve the above object, a machine learning method according to the present disclosure includes a step of acquiring image data, a step of performing calculation processing using a convolutional neural network based on the image data, and a step of performing calculation processing using a convolutional neural network. The network is composed of multiple layers, and the step of performing calculation processing using a convolutional neural network is to input layer specification information that specifies the Nth layer, which is a layer on the way from the input layer to the output layer of the convolutional neural network. a step of accepting, a step of executing operations from the input layer to the Nth layer in the cryptographic execution area using homomorphic encryption, a step of executing operations from the (N+1)th layer to the output layer in the plaintext execution area; A shared memory accessible from the cipher execution area and the plaintext execution area stores results of operations in the cipher execution area and the plaintext execution area.
また、上記目的を達成するため、本開示に係る機械学習プログラムは、制御部と、記憶部と、を備えるコンピュータに実行させる機械学習プログラムであって、制御部が、画像データを取得するステップと、記憶部が、画像データを記憶するステップと、制御部が、記憶部が記憶した画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行うステップと、を備え、畳み込みニューラルネットワークは複数の層から構成され、畳み込みニューラルネットワークを用いた計算処理を行うステップは、制御部が、畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付けるステップと、制御部が、準同型暗号による暗号実行領域において、入力層から第N層までの演算を実行するステップと、制御部が、平文実行領域において、第(N+1)層から出力層までの演算を実行するステップと、を有し、記憶部は、暗号実行領域および平文実行領域からアクセス可能な共有メモリを含み、共有メモリが、暗号実行領域および平文実行領域における演算の結果を記憶するステップ、をさらに有する。 Further, in order to achieve the above object, a machine learning program according to the present disclosure is a machine learning program that is executed by a computer including a control unit and a storage unit, and in which the control unit performs a step of acquiring image data. , the storage unit stores image data, and the control unit performs calculation processing using a convolutional neural network based on the image data stored in the storage unit. In the step of performing calculation processing using a convolutional neural network, which is composed of layers, the control unit receives layer designation information that designates the Nth layer, which is a layer on the way from the input layer to the output layer of the convolutional neural network. a step in which the control unit executes operations from the input layer to the Nth layer in the encryption execution area using homomorphic encryption; and a step in which the control unit executes operations from the (N+1)th layer to the output layer in the plaintext execution area. and the storage unit includes a shared memory that is accessible from the cryptographic execution area and the plaintext execution area, and the shared memory stores the results of the calculations in the cryptographic execution area and the plaintext execution area. The method further includes a step.
本開示によれば、ユーザの求める実用的な計算コストとセキュリティレベルに応じた畳み込みニューラルネットワークを用いた機械学習を実現することができる。 According to the present disclosure, machine learning using a convolutional neural network can be realized in accordance with the practical calculation cost and security level desired by the user.
以下、本開示の実施形態について図面を参照して説明する。実施形態を説明する全図において、共通の構成要素には同一の符号を付し、繰り返しの説明を省略する。なお、以下の実施形態は、特許請求の範囲に記載された本開示の内容を不当に限定するものではない。また、実施形態に示される構成要素のすべてが、本開示の必須の構成要素であるとは限らない。 Embodiments of the present disclosure will be described below with reference to the drawings. In all the figures explaining the embodiments, common components are given the same reference numerals and repeated explanations will be omitted. Note that the following embodiments do not unduly limit the content of the present disclosure described in the claims. Furthermore, not all components shown in the embodiments are essential components of the present disclosure.
<本発明の概要>
近年、畳み込みニューラルネットワークを用いて高精度で画像認識を行うことが可能となり、複雑なデータの分析を行うケースが増加しており、画像認識の対象となる画像データに個人情報等の機微データが含まれる場合は、プライバシーへの配慮が求められる。そこで、畳み込みニューラルネットワークに係る計算過程を、暗号化したまま演算を行うことができる準同型暗号を用いて実行すれば、プライバシーを保護しつつ、画像データの分析処理を行うことができる。
<Summary of the present invention>
In recent years, it has become possible to perform highly accurate image recognition using convolutional neural networks, and the number of cases in which complex data is analyzed is increasing. If such information is included, consideration must be given to privacy. Therefore, if the calculation process related to the convolutional neural network is executed using homomorphic encryption, which allows calculations to be performed while encrypted, image data can be analyzed while protecting privacy.
しかしながら、一般的に、準同型暗号を用いた演算は、セキュリティレベルは高いものの、計算コストが膨大になってしまうという課題がある。そこで、本発明では、当該課題を解決すべく、畳み込みニューラルネットワークを用いた画像認識において、畳み込み演算のフィルタリング処理が繰り返される過程で、画像を目視で識別することが困難になっていくことに着目した。すなわち、本発明では、ユーザが予め定めた計算過程までを、準同型暗号による暗号実行領域において処理し、それ以降の計算過程は平文実行領域において処理を行う。 However, in general, operations using homomorphic encryption have a high security level, but there is a problem in that the calculation cost becomes enormous. Therefore, in order to solve this problem, the present invention focuses on the fact that in image recognition using a convolutional neural network, it becomes difficult to visually identify images as the filtering process of convolution operations is repeated. did. That is, in the present invention, the calculation process up to the one predetermined by the user is processed in the encryption execution area using homomorphic encryption, and the subsequent calculation process is processed in the plaintext execution area.
目視で画像を識別することが困難になる一定の計算過程以降では、平文実行領域において計算を行うことにより、計算過程の画像が第三者に流出したとしても、当該画像を目視で識別することが困難なため、暗号化されていなくても、機微データの内容を第三者に知られることを防ぐことができる。それと同時に、全ての計算過程を準同型暗号による暗号実行領域において実行しないため、計算コストを抑えることができる。 After a certain point in the calculation process where it becomes difficult to visually identify an image, by performing calculations in the plaintext execution area, even if the image of the calculation process is leaked to a third party, it is still possible to visually identify the image. Because it is difficult to do so, it is possible to prevent the contents of sensitive data from being known to a third party even if it is not encrypted. At the same time, since all calculation processes are not performed in the encryption execution area using homomorphic encryption, calculation costs can be suppressed.
<実施形態1>
(機械学習システム1の構成)
図1は、機械学習システム1の全体図である。図1に示すように、本実施形態に係る機械学習システム1は、機械学習装置100と、ユーザによって使用される一つ以上の端末装置200とを備える。
<Embodiment 1>
(Configuration of machine learning system 1)
FIG. 1 is an overall diagram of a machine learning system 1. As shown in FIG. 1, a machine learning system 1 according to the present embodiment includes a machine learning device 100 and one or more terminal devices 200 used by a user.
機械学習装置100と、端末装置200とは、ネットワークNWを介して通信可能に接続される。ネットワークNWは、WAN(Wide Area Network)、LAN(Local Area Network)等から構成されるが、任意のネットワークから構成されてもよい。また、機械学習システム1を構成する装置等は、ネットワークNWを介さず、ローカルに接続されてもよい。機械学習システム1は、ユーザからの入力に基づいて機械学習の学習モデルを構築し、又はユーザからの入力および学習モデルを用いて、機械学習による推論を行う。 Machine learning device 100 and terminal device 200 are communicably connected via network NW. The network NW is composed of a WAN (Wide Area Network), a LAN (Local Area Network), etc., but may be composed of any arbitrary network. Furthermore, the devices constituting the machine learning system 1 may be locally connected without going through the network NW. The machine learning system 1 constructs a learning model for machine learning based on input from a user, or performs inference by machine learning using input from a user and a learning model.
端末装置200は、ユーザからの入力を受け付け、その入力内容を、ネットワークNWを介して機械学習装置100に送信する。また、端末装置200は、機械学習装置100からネットワークNWを介して送信されたデータを受信し、ユーザに提示する。 The terminal device 200 accepts input from the user, and transmits the input content to the machine learning device 100 via the network NW. Furthermore, the terminal device 200 receives data transmitted from the machine learning device 100 via the network NW, and presents the data to the user.
(機械学習装置100のハードウェア構成)
図2は、本実施形態の機械学習装置100のハードウェア構成を示す図である。機械学習装置100は、汎用のコンピュータである。機械学習装置100は、例えば、サーバコンピュータ、据え置き型のPC(Personal Computer)、ラップトップPC等により実現される。
(Hardware configuration of machine learning device 100)
FIG. 2 is a diagram showing the hardware configuration of the machine learning device 100 of this embodiment. Machine learning device 100 is a general-purpose computer. The machine learning device 100 is realized by, for example, a server computer, a stationary PC (Personal Computer), a laptop PC, or the like.
図2に示すように、機械学習装置100は、プロセッサ11と、メモリ12と、ストレージ13と、通信IF14と、入出力IF15と、を備える。 As shown in FIG. 2, the machine learning device 100 includes a processor 11, a memory 12, a storage 13, a communication IF 14, and an input/output IF 15.
プロセッサ11は、プログラムに記述された命令セットを実行するためのハードウェアであり、演算装置、レジスタ、周辺回路などにより構成される。メモリ12は、プログラム、および、プログラム等で処理されるデータ等を一時的に記憶するためのものであり、例えばDRAM(Dynamic Random Access Memory)等の揮発性のメモリにより実現される。メモリ12に記憶されるプログラムは、本発明に係る機械学習を実行するプログラム等である。ストレージ13は、データを保存するための記憶装置であり、例えばフラッシュメモリ、HDD(Hard Disc Drive)、SSD(Solid State Drive)により実現される。通信IF14は、機械学習装置100が外部の装置と通信するため、信号を送受信するためのインタフェースである。入出力IF15は、ユーザからの入力を受け付けるための入力装置、および、ユーザに対し情報を提示するための出力装置とのインタフェースとして機能する。 The processor 11 is hardware for executing a set of instructions written in a program, and is composed of an arithmetic unit, registers, peripheral circuits, and the like. The memory 12 is for temporarily storing programs and data processed by the programs, and is realized by a volatile memory such as DRAM (Dynamic Random Access Memory). The program stored in the memory 12 is a program for executing machine learning according to the present invention. The storage 13 is a storage device for storing data, and is realized by, for example, a flash memory, an HDD (Hard Disc Drive), or an SSD (Solid State Drive). The communication IF 14 is an interface for transmitting and receiving signals so that the machine learning device 100 communicates with an external device. The input/output IF 15 functions as an interface with an input device for receiving input from a user and an output device for presenting information to the user.
なお、端末装置200においても、図2に示したハードウェア構成と同様の構成としてもよい。端末装置200の各構成要素の動作は、上述の機械学習装置100と同様に、メモリ12に記憶されたプログラムに従ったプロセッサ11により実現する。 Note that the terminal device 200 may also have a hardware configuration similar to that shown in FIG. 2 . The operation of each component of the terminal device 200 is realized by the processor 11 according to a program stored in the memory 12, similarly to the machine learning device 100 described above.
(機械学習装置100の機能的構成)
図3は、本実施形態に係る機械学習装置100の機能的構成を示すブロック図である。図3を参照して、実施形態1に係る機械学習装置100の機能的構成について説明する。
(Functional configuration of machine learning device 100)
FIG. 3 is a block diagram showing the functional configuration of the machine learning device 100 according to this embodiment. The functional configuration of the machine learning device 100 according to the first embodiment will be described with reference to FIG. 3.
機械学習装置100は、通信部110と、記憶部120と、制御部130とを備える。 The machine learning device 100 includes a communication section 110, a storage section 120, and a control section 130.
通信部110は、機械学習装置100が他の装置と通信するための処理を行う。ここでいう他の装置とは、ネットワークNWで接続されたPCでもよいし、スマートフォン、タブレットなどの端末である。また、ヘッドマウントディスプレイ等のウェアラブル端末、AR(Augmented Reality)/VR(Virtual Reality)/MR(Mixed Reality)装置等であってもよい。また、他の装置は、入出力装置、例えば、フラッシュメモリやHDD、SSDなどによりデータの入出力を行う装置であってもよい。 The communication unit 110 performs processing for the machine learning device 100 to communicate with other devices. The other devices mentioned here may be PCs connected via the network NW, or terminals such as smartphones and tablets. It may also be a wearable terminal such as a head-mounted display, an AR (Augmented Reality)/VR (Virtual Reality)/MR (Mixed Reality) device, or the like. Further, the other device may be an input/output device, for example, a device that inputs and outputs data using a flash memory, HDD, SSD, or the like.
通信部110は、また、ネットワークNWを介した装置やローカルに接続された装置等と、セキュリティが確保されたセキュアな通信チャネルでデータを送受信する。セキュアな通信チャネルの構築、通信方法は、共通鍵(セッション鍵など)や公開鍵等を用いた周知の技術であるため、説明を省略する。 The communication unit 110 also transmits and receives data to and from devices via the network NW, locally connected devices, and the like through a secure communication channel where security is ensured. The construction of a secure communication channel and the communication method are well-known techniques that use a common key (such as a session key), a public key, etc., and therefore their explanation will be omitted.
記憶部120は、例えば、RAM等の揮発性のメモリ、フラッシュメモリ、HDD、SSD等により構成され、機械学習装置100が利用するデータ、およびプログラムを記憶する。記憶部120は、例えば、後述する暗号処理部1322が暗号実行領域において演算するため、データを暗号化し、又は暗号化されたデータを復号するための鍵を記憶する鍵格納部121、機械学習装置100において使用する学習モデルを記憶する学習モデル格納部122を含む。なお、鍵は、機械学習装置100内で記憶するのではなく、機械学習装置100とネットワークを介して、又は接続される鍵管理装置(不図示)において記憶するようにしてもよい。また、機械学習装置100が、機械学習のために利用した画像データ等は、セキュリティ向上のため、使用後は記憶部120から削除することが好ましい。 The storage unit 120 includes, for example, a volatile memory such as a RAM, a flash memory, an HDD, an SSD, etc., and stores data and programs used by the machine learning device 100. The storage unit 120 includes, for example, a key storage unit 121 that stores keys for encrypting data or decrypting encrypted data in order for a cryptographic processing unit 1322 (described later) to perform calculations in a cryptographic execution area, and a machine learning device. It includes a learning model storage unit 122 that stores learning models used in 100. Note that the key may not be stored within the machine learning device 100, but may be stored via a network with the machine learning device 100 or in a key management device (not shown) connected to the machine learning device 100. Furthermore, it is preferable that image data and the like used by the machine learning device 100 for machine learning be deleted from the storage unit 120 after use to improve security.
鍵格納部121(後述する図4参照)は、暗号処理部1322が暗号実行領域において演算するために、データを暗号化し、又は暗号化されたデータを復号するための鍵を記憶する。鍵格納部121は、例えば、ID、鍵データや、鍵ファイルの保存されている場所のパスを記憶する。IDは、ユーザや、組織など任意のグループ毎に割り当てて鍵を利用する構成としてもよいし、セッション毎に割り当てて鍵を利用する構成としてもよい。 The key storage unit 121 (see FIG. 4 described later) stores a key for encrypting data or decrypting encrypted data in order for the encryption processing unit 1322 to perform calculations in the encryption execution area. The key storage unit 121 stores, for example, an ID, key data, and a path where a key file is stored. An ID may be assigned to each arbitrary group such as a user or an organization, and a key may be used, or a key may be assigned to each session.
学習モデル格納部122(後述する図5参照)は、機械学習装置100において使用する学習モデルを記憶する。学習モデル格納部122は、学習モデルに加え、複数の学習モデルを区別するためのID、学習モデルが適用できる範囲などを示すタグ、画像診断において特定の部位の特定までも可能とする学習モデルか否かの区別、当該学習モデルを用いて計算を行う際の計算コスト(計算量、計算時間、費用、計算資源等を含む。)および計算速度、当該学習モデルを用いて推論を行った場合の精度などを関連付けて記憶してもよい。 The learning model storage unit 122 (see FIG. 5 described later) stores learning models used in the machine learning device 100. The learning model storage unit 122 stores, in addition to learning models, an ID for distinguishing between multiple learning models, a tag indicating the range to which the learning model can be applied, and a learning model that allows identification of a specific part in image diagnosis. the calculation cost (including calculation amount, calculation time, cost, calculation resources, etc.) and calculation speed when performing calculations using the learning model, and the calculation speed when performing inference using the learning model. The information may be stored in association with accuracy or the like.
制御部130は、機械学習装置100のプロセッサが記憶部120に記憶されるプログラムを読み込み、プログラムに含まれる命令を実行することにより実現される。制御部130は、機械学習装置100の動作を制御する。具体的には、制御部130は、データ取得部131と、機械学習計算部132と、受付部1321と、暗号処理部1322と、平文処理部1323と、を含む。 The control unit 130 is realized by the processor of the machine learning device 100 reading a program stored in the storage unit 120 and executing instructions included in the program. The control unit 130 controls the operation of the machine learning device 100. Specifically, the control unit 130 includes a data acquisition unit 131, a machine learning calculation unit 132, a reception unit 1321, a cryptographic processing unit 1322, and a plaintext processing unit 1323.
データ取得部131は、機械学習により学習モデルのパラメータを更新する場面(以下、特に言及する場合を除き、学習モデルを新たに生成する場合も含む。)においては、教師データとなる画像データおよび当該画像データに対するラベルを取得する。「ラベル」は、例えば、画像データが示す対象物の種別を示したり、画像データにおいて特定したい対象物の範囲(位置)を示したりするものを含む。また、データ取得部131は、学習モデルを用いて推論を行う場面においては、推論対象となる画像データを取得する。例えば、ユーザは、端末装置200等において画像データおよびラベルを入力し、データ取得部131は、ネットワークNWを介して、ユーザが入力した画像データおよびラベルを取得する。 In situations where the parameters of a learning model are updated by machine learning (hereinafter, unless otherwise specified, this also includes the case where a new learning model is generated), the data acquisition unit 131 acquires image data that will become teaching data and Get the label for the image data. The "label" includes, for example, something that indicates the type of object indicated by the image data, or indicates the range (position) of the object to be specified in the image data. Further, the data acquisition unit 131 acquires image data to be inferred when inference is performed using a learning model. For example, the user inputs image data and a label on the terminal device 200 or the like, and the data acquisition unit 131 acquires the image data and label input by the user via the network NW.
機械学習計算部132は、データ取得部131において取得した画像データ等に基づいて、畳み込みニューラルネットワークを用いた計算処理を行う。この計算処理は、具体的には、学習モデルのパラメータを更新するための学習、もしくは、取得した画像データ等から学習モデルを用いて行う推論のための計算処理である。なお、畳み込みニューラルネットワークは複数の層から構成される。「層」については、図7および図8(後述)において説明する。 The machine learning calculation unit 132 performs calculation processing using a convolutional neural network based on the image data etc. acquired by the data acquisition unit 131. Specifically, this calculation process is a calculation process for learning to update the parameters of a learning model or for inference using a learning model from acquired image data or the like. Note that a convolutional neural network is composed of multiple layers. The "layer" will be explained in FIG. 7 and FIG. 8 (described later).
機械学習計算部132は、計算処理の過程において、予めユーザから暗号実行領域において演算する範囲を取得しておき、計算処理の過程の一部を準同型暗号による暗号実行領域において演算し、計算処理の過程の一部を平文実行領域において演算する。機械学習計算部132は、具体的には、受付部1321と、暗号処理部1322と、平文処理部1323と、を有する。 In the process of calculation processing, the machine learning calculation unit 132 obtains the range to be calculated in the encryption execution area from the user in advance, calculates a part of the calculation process in the encryption execution area using homomorphic encryption, and performs the calculation process. A part of the process is calculated in the plaintext execution area. Specifically, the machine learning calculation unit 132 includes a reception unit 1321, a cryptographic processing unit 1322, and a plaintext processing unit 1323.
受付部1321は、畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層(ただし、Nは自然数。)を指定する層指定情報を受け付ける。すなわち、層指定情報により第N層が指定されたとき、入力層から第N層までは暗号実行領域において演算し、第(N+1)層から出力層までの演算を平文実行領域において演算する。 The reception unit 1321 receives layer designation information that designates the Nth layer (N is a natural number), which is a layer on the way from the input layer to the output layer of the convolutional neural network. That is, when the Nth layer is designated by the layer designation information, calculations from the input layer to the Nth layer are performed in the cryptographic execution area, and calculations from the (N+1)th layer to the output layer are performed in the plaintext execution area.
受付部1321は、第N層を指定する層指定情報を受け付けるが、ここで取得する層指定情報は、「N」を示す具体的な数字であって、畳み込みニューラルネットワークにおいて、中間層のどの層までを暗号実行領域において演算するかという範囲を示すものである。畳み込みニューラルネットワークは、一般的には、入力層(0層)、中間層(1層~M層)、出力層(M+1層)といった複数の層を有する。ここで、Mは任意の自然数である。このとき、ユーザは、中間層の第N層までを暗号実行領域において演算することを決め、受付部1321は、暗号実行領域において演算を行う境界の層となるNを取得する。 The reception unit 1321 accepts layer designation information that designates the Nth layer, but the layer designation information acquired here is a specific number indicating "N", and which layer of the intermediate layer is selected in the convolutional neural network. This indicates the range of calculations to be performed in the cryptographic execution area. A convolutional neural network generally has multiple layers, such as an input layer (layer 0), an intermediate layer (layers 1 to M), and an output layer (layer M+1). Here, M is an arbitrary natural number. At this time, the user decides to perform calculations up to the Nth layer of the intermediate layer in the cryptographic execution area, and the reception unit 1321 obtains N, which is the boundary layer to perform calculations in the cryptographic execution area.
また、層指定情報は、「N」を示す具体的な数字の他に、「N」を指定することができる情報であってもよい。例えば、ユーザから受け付けた計算コストの条件であってもよい。受付部1321は、層指定情報として、計算コストの条件を受け付けた場合は、その計算コストで実行することができる「N」を算出する。 In addition to a specific number indicating "N", the layer designation information may be information that can designate "N". For example, the condition may be a calculation cost condition accepted from the user. If the reception unit 1321 receives a calculation cost condition as the layer designation information, it calculates "N" that can be executed at the calculation cost.
暗号処理部1322は、準同型暗号による暗号実行領域において演算する機能を有する。暗号処理部1322は、機械学習計算部132における計算処理の過程において、入力層(0層)から中間層のN層までの計算処理を準同型暗号による暗号実行領域において演算する。 The cryptographic processing unit 1322 has a function of performing calculations in the cryptographic execution area using homomorphic cryptography. In the process of calculation processing in the machine learning calculation unit 132, the cryptographic processing unit 1322 performs calculation processing from the input layer (0 layer) to the intermediate layer N in the encryption execution area using homomorphic encryption.
暗号処理部1322は、具体的には、鍵格納部121において管理する暗号化のための鍵(公開鍵)を用いて、データ取得部131が取得した画像データ等を暗号化する。このとき、暗号処理部1322は、暗号化の方法について、暗号化状態のまま演算が可能な準同型暗号方式(Paillier方式等、Lifted-Ellgamal方式、Somewhat Homomorphic Encryption方式、Fully Homomorphic Encryption方式等)を用いる。 Specifically, the cryptographic processing unit 1322 encrypts the image data etc. acquired by the data acquisition unit 131 using the encryption key (public key) managed in the key storage unit 121. At this time, the encryption processing unit 1322 selects a homomorphic encryption method (Paillier method, etc., Lifted-Ellgamal method, Somewhat Homomorphic Encryption method, Fully Homomorphic Encryption method, etc.) that allows calculations in the encrypted state as the encryption method. use
暗号処理部1322は、データ取得部131が取得した画像データ等および機械学習に用いる学習モデルを暗号化し、暗号実行領域において演算する。 The cryptographic processing unit 1322 encrypts the image data etc. acquired by the data acquisition unit 131 and the learning model used for machine learning, and performs calculations in the cryptographic execution area.
暗号処理部1322は、入力層(0層)からユーザの指定した中間層のN層までの計算処理を暗号化実行領域において演算した後、鍵格納部121において管理する復号のための鍵(秘密鍵)を用いて、データを復号する。 The cryptographic processing unit 1322 performs calculation processing from the input layer (0 layer) to the N layer of the intermediate layer designated by the user in the encryption execution area, and then stores the decryption key (secret) managed in the key storage unit 121. key) to decrypt the data.
平文処理部1323は、平文実行領域において演算する機能を有する。平文処理部1323は、暗号処理部1322において演算されたN層までの演算結果を取得し、引き続き(N+1)層から出力層までの演算を平文実行領域において行う。これにより、推論または学習モデルのパラメータの更新を行う。 The plaintext processing unit 1323 has a function of performing calculations in the plaintext execution area. The plaintext processing unit 1323 acquires the results of the calculations up to the N layer calculated in the cryptographic processing unit 1322, and subsequently performs the calculations from the (N+1) layer to the output layer in the plaintext execution area. This updates the parameters of the inference or learning model.
なお、上述した機械学習装置100の機能の一部を、端末装置200が担ってもよい。例えば、予め、機械学習装置100と端末装置200とで、画像データ等を準同型暗号で暗号化するための鍵を共有しておき、端末装置200において、推論や機械学習の対象となる画像データを準同型暗号で暗号化するようにしてもよい。 Note that the terminal device 200 may take on a part of the functions of the machine learning device 100 described above. For example, the machine learning device 100 and the terminal device 200 share a key for encrypting image data etc. using homomorphic encryption in advance, and the terminal device 200 uses the image data to be subjected to inference or machine learning. may be encrypted using homomorphic encryption.
端末装置200は、準同型暗号で暗号化された画像データを機械学習装置100に送信し、機械学習装置100は、通信部110を介して受信した当該画像データを、記憶部120に格納する。そして、データ取得部131は、暗号化された画像データを記憶部120から取得し、暗号処理部1322へ送る。次いで、暗号処理部1322は、暗号化された画像データについて演算を実行する。その際、上述したように暗号処理部1322が演算結果を復号するのに代えて、平文処理部1323が演算結果を復号するようにしてもよい。すなわち、暗号処理部1322では、準同型暗号で暗号化されたデータのみ扱うようにする。このような構成をとることで、機械学習装置100においては、画像データが準同型暗号で暗号化された状態、もしくは、復号されても人間が画像を目視では識別困難な状態であるため、機械学習装置100は、よりセキュリティを高めて、計算処理を実行することができる。 The terminal device 200 transmits image data encrypted using homomorphic encryption to the machine learning device 100, and the machine learning device 100 stores the image data received via the communication unit 110 in the storage unit 120. The data acquisition unit 131 then acquires the encrypted image data from the storage unit 120 and sends it to the encryption processing unit 1322. Next, the cryptographic processing unit 1322 performs calculations on the encrypted image data. At this time, instead of the encryption processing unit 1322 decrypting the calculation result as described above, the plaintext processing unit 1323 may decrypt the calculation result. That is, the cryptographic processing unit 1322 handles only data encrypted using homomorphic encryption. By adopting such a configuration, the machine learning device 100 can prevent image data from being encrypted using homomorphic encryption, or because it is difficult for humans to visually identify the image even after decryption. The learning device 100 can perform calculation processing with higher security.
(データベースの具体例)
図4は、鍵格納部121の一例を示す図である。鍵格納部121は、例えば、ユーザ、セッションなど鍵の利用場面を識別するための「ID」、鍵(公開鍵「key1」および秘密鍵「key2」)の値を、関連付けて記憶する。図4において、「ID」が「0000001」の公開鍵は「0KJFDEMNFS679FDDFHKL…」、秘密鍵は、「2SFSHLJHFSKLJADL7DJLH…」である。同様に、「ID」が「0000002」の公開鍵は「43JFLKEJFDHKLFS3JKLFN…」、秘密鍵は、「FDLK732492SFGKJHKSDH…」であり、「ID」が「0000003」の公開鍵は「JLKJ02SFHL89JLKHJKF897…」、秘密鍵は、「40389439LFKSJFLKJFSLH…」である。なお、図4は、鍵管理の一例であって、鍵の管理方法は、これらに限られない。例えば、鍵と復号権限を持つユーザとを関連付けて記憶してもよい。
(Specific example of database)
FIG. 4 is a diagram showing an example of the key storage unit 121. The key storage unit 121 stores, in association with each other, the values of an "ID" and keys (public key "key1" and private key "key2") for identifying key usage situations such as users and sessions. In FIG. 4, the public key of "ID" is "0000001" is "0KJFDEMNFS679FDDFHKL..." and the private key is "2SFSHLJHFSKLJADL7DJLH...". Similarly, the public key with "ID" is "0000002" is "43JFLKEJFDHKLFS3JKLFN...", the private key is "FDLK732492SFGKJHKSDH...", the public key with "ID" is "0000003" is "JLKJ02SFHL89JLKHJKF897...", and the private key is: It is “40389439LFKSJFLKJFSLH…”. Note that FIG. 4 is an example of key management, and the key management method is not limited to these. For example, a key and a user with decryption authority may be stored in association with each other.
図5は、学習モデル格納部122の一例を示す図である。学習モデル格納部122は、複数の学習モデルを区別するための「ID」、学習モデルが適用できる範囲などを示す「タグ」、画像診断において特定の部位の特定までも可能とする学習モデルか否かの区別する「部位特定」、当該学習モデルを用いて計算を行う際のコスト(計算量)を示す「コスト/MB」、および計算速度を示す「計算速度/Mb」、当該学習モデルを用いて推論を行った場合の精度を示す「精度」、学習モデルのファイル名を示す「ファイル」が関連付けて記憶されている。 FIG. 5 is a diagram showing an example of the learning model storage unit 122. The learning model storage unit 122 stores information such as "ID" for distinguishing between multiple learning models, "tag" indicating the range to which the learning model can be applied, and whether or not the learning model is capable of identifying a specific part in image diagnosis. ``Part identification'' that distinguishes between ``part identification'', ``cost/MB'' that indicates the cost (amount of calculation) when performing calculations using the learning model, and ``calculation speed/Mb'' that indicates the calculation speed, when using the learning model. ``Accuracy'', which indicates the accuracy when inference is performed, and ``File'', which indicates the file name of the learning model, are stored in association with each other.
図5において、「ID」が「0001」の学習モデルは、「タグ」欄が「CT、ガン、腎臓、医療、画像診断」であり、これらの用途に適用可能で、部位特定には対応していないことを示している。また、「コスト」は10円/Mb、「計算速度」は1Mbあたり5'10、「精度」は80%で、学習モデル自身は「0001.json」というファイルに記憶されていることを示している。 In Figure 5, the learning model whose "ID" is "0001" has "CT, cancer, kidney, medical, image diagnosis" in the "tag" field, and is applicable to these uses, but does not support body part identification. It shows that it is not. It also shows that the "cost" is 10 yen/Mb, the "calculation speed" is 5'10 per Mb, the "accuracy" is 80%, and the learning model itself is stored in the file "0001.json". There is.
また、「ID」が「0002」の学習モデルは、「タグ」欄が「CT、ガン、腎臓、医療、画像診断」であり、これらの用途に適用可能で、「部位特定」欄が「〇」であることから、部位特定に対応していることを示している。また、「コスト」は45円/Mb、「計算速度」は1Mbあたり6'00、「精度」は85%で、学習モデル自身は「0002.json」というファイルに記憶されていることを示している。 In addition, the learning model whose "ID" is "0002" has "CT, cancer, kidney, medical, image diagnosis" in the "tag" column and can be applied to these uses, and the "part identification" column has "〇 ”, indicating that it supports site identification. It also shows that the "cost" is 45 yen/Mb, the "calculation speed" is 6'00 per 1 Mb, the "accuracy" is 85%, and the learning model itself is stored in the file "0002.json". There is.
「ID」が「0003」や「0004」についても同様であるので、説明を省略する。なお、学習モデル格納部122は、上述した項目に限らず、学習モデルを適用する組織(会社、部署など)、業界(医療、食品、ECなど)や、所有者等に関連付けて記憶されていてもよい。 The same applies to cases where the "ID" is "0003" or "0004", so the explanation will be omitted. In addition, the learning model storage unit 122 stores not only the above-mentioned items but also information in association with the organization (company, department, etc.) to which the learning model is applied, industry (medical, food, EC, etc.), owner, etc. Good too.
(画像データおよびラベルの具体例)
図6は、ユーザが画像データとラベルを入力するための画面の一例を示す図である。データ取得部131は、ユーザから対象となる画像データの入力を受け付けると、当該画像データを読み込んだ上で、画面401に示すような画像410やファイル情報(ファイル名、ファイル生成日時等)をユーザが操作する端末装置200に表示させる。このとき、データ取得部131は、ユーザからラベルも取得する。画面401において、ユーザは、入力した画像データが「正常」を示すデータか「異常」を示すデータかを選択し、ラベル付けを行う。また、ユーザは、異常部分を示す部位の特定まで行う学習モデルのラベル付けを行う場合には、当該部位の範囲を画面上で指定し、ラベル付けを行う。例えば、図6において、指定された部位特定の範囲は、画像410の斜線部分にて示されている。
(Specific example of image data and label)
FIG. 6 is a diagram showing an example of a screen for the user to input image data and a label. When the data acquisition unit 131 receives input of target image data from the user, it reads the image data and sends the image 410 and file information (file name, file creation date and time, etc.) to the user as shown in the screen 401. is displayed on the terminal device 200 operated by the user. At this time, the data acquisition unit 131 also acquires a label from the user. On screen 401, the user selects whether the input image data is data indicating "normal" or data indicating "abnormal" and labels the image data. Further, when labeling a learning model that includes specifying a region indicating an abnormal part, the user specifies the range of the region on the screen and labels the region. For example, in FIG. 6, the specified range of region identification is indicated by the shaded area of the image 410.
このようにして、データ取得部131は、画像データおよび当該画像データに対するラベルを関連付けた教師データを取得する。そして、機械学習計算部132は、教師データに基づいて、画像データに対するラベルを出力するように畳み込みニューラルネットワークの学習モデルのパラメータを生成(更新)する。ラベルの出力として、例えば、入力した画像データについて、ガンの診断を行う場合、正常を示す画像か異常を示す(ガンの疑い)画像であるかを出力する。また、ガンの疑いがあると出力するときは、その部位特定も出力するようにしてもよい。 In this way, the data acquisition unit 131 acquires image data and teacher data in which a label for the image data is associated. Then, the machine learning calculation unit 132 generates (updates) parameters of the learning model of the convolutional neural network based on the teacher data so as to output a label for the image data. As a label output, for example, when diagnosing cancer with respect to input image data, whether the image indicates normality or abnormality (suspicion of cancer) is outputted. Furthermore, when it is output that cancer is suspected, the location identification may also be output.
なお、推論を行うために画像データの入力のみを行う場合は、ラベル付けは不要であり、画像データの入力のみが行われる。 Note that when only image data is input for inference, labeling is not necessary and only image data is input.
(畳み込みニューラルネットワークの一例)
図7は、一般的な畳み込みニューラルネットワークのモデル概念図である。ニューラルネットワークは、入力層(0層)、中間層(1層からM層)、出力層(M+1層)といった複数の層を有する。機械学習計算部132は、その計算処理過程において、受付部1321が暗号実行領域で演算する範囲の境界(第N層)を示す層指定情報を取得し、暗号処理部1322において暗号実行領域での演算を、平文処理部1323において平文実行領域での演算を行う。
(An example of a convolutional neural network)
FIG. 7 is a conceptual diagram of a general convolutional neural network model. A neural network has multiple layers such as an input layer (layer 0), an intermediate layer (layers 1 to M), and an output layer (layer M+1). In the calculation process, the machine learning calculation unit 132 acquires layer designation information indicating the boundary (Nth layer) of the range in which the reception unit 1321 calculates in the cryptographic execution area, and the cryptographic processing unit 1322 acquires layer designation information indicating the boundary (Nth layer) of the range to be calculated in the cryptographic execution area. The calculation is performed in the plaintext execution area in the plaintext processing unit 1323.
暗号処理部1322は、データ取得部131において取得した画像データ等と選択された学習モデルを、鍵格納部121に記憶する鍵(公開鍵)を用いて準同型暗号で暗号化し、推論または学習モデルのパラメータ更新のための演算を暗号実行領域において行う。具体的には、暗号処理部1322は、0層から中間層の第N層までの演算処理を行う。また、暗号処理部1322は、暗号実行領域における演算結果を、鍵格納部121に記憶する鍵(暗号化した公開鍵と対になる秘密鍵)を用いて復号する。復号した結果は、平文処理部1323へ送ってもよい。なお、暗号実行領域における演算結果を記憶部120に格納する場合は、セキュリティ上、暗号化したまま格納し、平文処理部1323において、演算結果を復号することが好ましい。 The cryptographic processing unit 1322 encrypts the image data etc. acquired by the data acquisition unit 131 and the selected learning model using homomorphic encryption using the key (public key) stored in the key storage unit 121, and performs inference or learning model. The calculation for updating the parameters is performed in the cryptographic execution area. Specifically, the cryptographic processing unit 1322 performs arithmetic processing from the 0th layer to the Nth layer of the intermediate layer. Further, the cryptographic processing unit 1322 decrypts the calculation result in the cryptographic execution area using the key (private key paired with the encrypted public key) stored in the key storage unit 121. The decrypted result may be sent to the plaintext processing unit 1323. Note that when storing the calculation result in the cryptographic execution area in the storage unit 120, it is preferable for security reasons to store the calculation result in an encrypted state and to decrypt the calculation result in the plaintext processing unit 1323.
平文処理部1323は、暗号処理部1322において復号した画像データ等および学習モデルを用いて、第(N+1)層から第(M+1)層までの計算過程について、平文実行領域において演算処理を行う。 The plaintext processing unit 1323 uses the image data etc. decrypted by the cryptographic processing unit 1322 and the learning model to perform arithmetic processing in the plaintext execution area for the calculation processes from the (N+1)th layer to the (M+1)th layer.
図8は、中間層の一例を示した図である。畳み込みニューラルネットワークは、中間層として、一般的に、畳み込み演算を行うための畳み込み層、ReLu層、プーリング層、全結合層などを有する。本発明において、「層」とは、畳み込み層、ReLu層、プーリング層など各層単位を、1層、2層、3層としてもよいし、畳み込み、ReLu、プーリングといった一連の処理を一つの処理単位として1層、2層、3層としてもよい。この場合、例えば、「畳み込み」、「ReLu」、「プーリング」の組み合わせを一層としてもよいし、「畳み込み」、「プーリング」の組み合わせや、「ReLu」、「プーリング」の組み合わせを一層としてもよい。なお、ReLu層は、活性化層の一例であって他の活性化関数を用いてもよい。 FIG. 8 is a diagram showing an example of the intermediate layer. A convolutional neural network generally has a convolution layer, a ReLu layer, a pooling layer, a fully connected layer, etc. for performing a convolution operation as an intermediate layer. In the present invention, the term "layer" refers to each layer such as a convolution layer, ReLu layer, and pooling layer as one layer, two layers, or three layers, or a series of processes such as convolution, ReLu, and pooling as one processing unit. It may be one layer, two layers, or three layers. In this case, for example, the combination of "convolution", "ReLu", and "pooling" may be made into one layer, or the combination of "convolution" and "pooling", or the combination of "ReLu" and "pooling" may be made into one layer. . Note that the ReLu layer is an example of an activation layer, and other activation functions may be used.
なお、畳み込みニューラルネットワークは、一般的に、全結合層を中間層の後半で用いることが多いが、全結合層を暗号化実行領域で演算してもよい。 Note that in a convolutional neural network, a fully connected layer is generally used in the latter half of the intermediate layer, but the fully connected layer may be operated in the encryption execution area.
(処理の流れ)
図9は、機械学習装置100が実行する処理の一例を示すフローチャートである。
(Processing flow)
FIG. 9 is a flowchart illustrating an example of processing executed by the machine learning device 100.
制御部130は、画像データ等のデータ、又は画像データ等のデータおよびラベルを、通信部110を介して、端末装置200から取得する(ステップS101)。 The control unit 130 acquires data such as image data, or data such as image data and a label, from the terminal device 200 via the communication unit 110 (step S101).
制御部130は、暗号実行領域で行う演算と平文実行領域で行う演算との境界となる、第N層を指定する層指定情報を、通信部110を介して、端末装置200から取得する(ステップS102)。 The control unit 130 acquires, from the terminal device 200 via the communication unit 110, layer designation information that specifies the Nth layer, which is the boundary between the calculation performed in the cryptographic execution area and the calculation performed in the plaintext execution area (step S102).
制御部130は、取得した画像等のデータと適用する学習モデルを準同型暗号で暗号化する。そして、0層から第N層までを暗号化実行領域において演算し、その後復号する(ステップS103)。 The control unit 130 encrypts the acquired data such as images and the learning model to be applied using homomorphic encryption. Then, the 0th layer to the Nth layer are calculated in the encryption execution area, and then decrypted (step S103).
制御部130は、ステップS103において復号した演算結果に基づいて、第(N+1)層から出力層までを平文実行領域において演算し、推論又は学習モデルのパラメータの更新を行う。そして、制御部130は、演算結果を記憶部120に格納し、処理を終了する(ステップS104)。 The control unit 130 performs calculations from the (N+1)th layer to the output layer in the plaintext execution area based on the calculation result decoded in step S103, and updates the parameters of the inference or learning model. Then, the control unit 130 stores the calculation result in the storage unit 120, and ends the process (step S104).
(効果の説明)
本実施形態に係る機械学習装置100は、機械学習における演算の一部を暗号化実行領域において、その他の部分を平文実行領域において演算することで、全てを暗号化実行領域において演算する場合と比較して、計算コストを削減し、現実的な時間で演算することを可能にする。
(Explanation of effects)
The machine learning device 100 according to the present embodiment calculates some of the calculations in machine learning in the encryption execution area and other parts in the plaintext execution area, compared to a case where all calculations are performed in the encryption execution area. This reduces computational costs and allows calculations to be performed in a realistic amount of time.
畳み込みニューラルネットワークを用いた機械学習モデルでは、一般的に中間層の処理過程において、畳み込み演算のフィルタリング処理が繰り返されることにより、入力層に入力された画像データは、目視で識別が困難な状態となっていく。すなわち、畳み込み演算を繰り返した後の入力データは、人間によって識別することが困難であるから、暗号化していなくとも情報漏洩のリスクが低い。本実施形態に係る機械学習装置100は、この点に着目し、ユーザが指定した第N層までを暗号化実行領域において演算し、第(N+1)層以降を平文実行領域において演算することで、計算コストの削減と、セキュリティの確保の両立を実現することができる。 In machine learning models using convolutional neural networks, filtering of convolution operations is generally repeated in the processing process of the middle layer, so the image data input to the input layer becomes difficult to visually identify. It's becoming. That is, since it is difficult for humans to identify input data after repeated convolution operations, the risk of information leakage is low even if it is not encrypted. The machine learning device 100 according to the present embodiment focuses on this point, and calculates up to the Nth layer specified by the user in the encryption execution area, and calculates the (N+1)th and subsequent layers in the plaintext execution area. It is possible to reduce calculation costs and ensure security.
<実施形態2>
実施形態1に係る機械学習システム1は、ユーザから層指定情報を取得した後、暗号実行領域および平文実行領域において計算処理を行う。これに対し、実施形態2に係る機械学習システム2は、ユーザが層指定情報を指定する際、入力画像を平文実行領域において計算したときに入力画像が畳み込み演算によりどのように変化するか、また、計算コストがどのように変化するかなどの情報をユーザに提供する。ユーザは、提供された情報を参照して、ユーザが求める計算コストやセキュリティレベルに応じた層指定情報を容易に指定することができるようになる。
<Embodiment 2>
The machine learning system 1 according to the first embodiment performs calculation processing in the encryption execution area and the plaintext execution area after acquiring layer designation information from the user. In contrast, when the user specifies layer specification information, the machine learning system 2 according to the second embodiment calculates how the input image changes due to the convolution operation when the input image is calculated in the plaintext execution domain. , provide users with information such as how computational costs change. The user can refer to the provided information and easily specify layer designation information according to the calculation cost and security level desired by the user.
(機械学習システム2の構成)
図10は、本実施形態に係る機械学習システム2を示す図である。図10に示すように、本実施形態に係る機械学習システム2は、機械学習装置300と、ユーザによって使用される一つ以上の端末装置200と、を備える。機械学習装置300は、第1実施形態に係る機械学習装置100と比較して、提供部3324と、推定部3325と(図11において詳述。)をさらに備える。提供部3324は、ユーザが入力した画像データを平文実行領域において計算した場合にどのように変化するか、また計算コストなどの情報を示すことで、ユーザが暗号実行領域において演算を行う範囲の選択を補助する機能を備える。
(Configuration of machine learning system 2)
FIG. 10 is a diagram showing the machine learning system 2 according to this embodiment. As shown in FIG. 10, the machine learning system 2 according to this embodiment includes a machine learning device 300 and one or more terminal devices 200 used by a user. Compared to the machine learning device 100 according to the first embodiment, the machine learning device 300 further includes a providing section 3324 and an estimating section 3325 (described in detail in FIG. 11). The providing unit 3324 allows the user to select a range in which to perform calculations in the cryptographic execution domain by showing information such as how the image data input by the user changes when calculated in the plaintext execution domain and the calculation cost. Equipped with functions to assist.
(機械学習装置300の機能的構成)
図11は、本実施形態における機械学習装置300の機能的構成を示すブロック図である。機械学習装置300は、通信部110と、記憶部120と、制御部330と、を備える。機械学習装置300における通信部110および記憶部120の機能構成は、機械学習装置100と同様であるため、説明を省略する。
(Functional configuration of machine learning device 300)
FIG. 11 is a block diagram showing the functional configuration of the machine learning device 300 in this embodiment. The machine learning device 300 includes a communication section 110, a storage section 120, and a control section 330. The functional configurations of the communication unit 110 and the storage unit 120 in the machine learning device 300 are the same as those in the machine learning device 100, so the description thereof will be omitted.
制御部330は、機械学習装置300のプロセッサが記憶部120に記憶されるプログラムを読み込み、プログラムに含まれる命令を実行することにより実現される。制御部330は、機械学習装置300の動作を制御する。具体的には、制御部330は、データ取得部131と、機械学習計算部332と、受付部1321と、暗号処理部1322と、平文処理部1323と、提供部3324と、推定部3325と、を含む。制御部330は、提供部3324および推定部3325を備えること以外は、機械学習装置100における制御部130と同様であるため、重複する説明を省略する。 The control unit 330 is realized by the processor of the machine learning device 300 reading a program stored in the storage unit 120 and executing instructions included in the program. The control unit 330 controls the operation of the machine learning device 300. Specifically, the control unit 330 includes a data acquisition unit 131, a machine learning calculation unit 332, a reception unit 1321, an encryption processing unit 1322, a plaintext processing unit 1323, a provision unit 3324, an estimation unit 3325, including. The control unit 330 is the same as the control unit 130 in the machine learning device 100 except that it includes a providing unit 3324 and an estimating unit 3325, so a duplicate description will be omitted.
提供部3324は、データ取得部131において取得するユーザから入力される画像データについて、入力層から出力層までの演算を、平文処理部1323が実行した場合の当該演算に関する平文途中演算情報を提供する。平文途中演算情報とは、入力層から出力層までの途中過程における演算に関する情報であり、平文実行領域における、途中の層で入力又は出力されるデータ、途中の層までにかかる計算時間(および、ここから推定される推論又は学習に係る全時間)、途中の層までにかかる計算量(および、ここから推定される推論又は学習にかかる全計算量)、計算量から算出される料金などを含むものである。平文途中演算情報は、例えば、平文処理部1323が、ユーザから入力される一つの画像データについて入力層から出力層までの演算を実行し、当該演算に関する情報に基づいて算出することができる。平文途中演算情報は、例えば、通信部110を介して、ユーザが利用する端末装置200に送信されてもよいし、機械学習装置100における表示装置(不図示)に表示されてもよい。 The providing unit 3324 provides plaintext intermediate operation information regarding the operation when the plaintext processing unit 1323 executes the operation from the input layer to the output layer on the image data input by the user that is acquired by the data acquisition unit 131. . Plaintext intermediate operation information is information regarding operations during the intermediate process from the input layer to the output layer, and includes data input or output in the intermediate layer in the plaintext execution area, calculation time required up to the intermediate layer (and, This includes the total amount of time required for inference or learning estimated from this), the amount of calculation required up to intermediate layers (and the total amount of calculation required for inference or learning estimated from this), and fees calculated from the amount of calculation. It is something that The plaintext intermediate operation information can be calculated, for example, by the plaintext processing unit 1323 performing an operation from the input layer to the output layer on one piece of image data input by the user, and based on information regarding the operation. The plaintext intermediate calculation information may be transmitted to the terminal device 200 used by the user via the communication unit 110, for example, or may be displayed on a display device (not shown) in the machine learning device 100.
提供部3324は、例えば、平文途中演算情報として、入力層に入力される画像データと、入力層から出力層までの各層に入力されるデータとの情報の差を、ユーザが比較できる態様で提供してもよい。また、提供部3324は、必ずしもユーザが比較できる態様で提供せず、平文途中演算情報として、各層に入力される画像データを提供してもよい。 The providing unit 3324 provides, for example, the difference in information between the image data input to the input layer and the data input to each layer from the input layer to the output layer in a manner that allows the user to compare the information as plain text intermediate calculation information. You may. Further, the providing unit 3324 may provide the image data input to each layer as plain text intermediate calculation information, without necessarily providing the image data in a form that the user can compare.
提供部3324は、畳み込み演算が繰り返されることで目視による識別が困難になることを前提とし、各層に入力される画像データをユーザに提供することで、どの層に入力される画像データまで目視で識別可能かということに関する参考情報(情報の差)を提供し、ときには、比較を行うことにより、暗号化して機械学習を行う必要のある層を判断するための情報を提供する。例えば、サンプルの画像データについて、ある中間層である第1の層と、第1の層より後に処理が実行される第2の層とに入力されるデータのそれぞれをユーザに提示してもよい。これにより、サンプルの画像データが、層の処理によって、どのように変化し、情報の差がでるか、ユーザが比較でき、ユーザが層指定情報を指定するのを支援する。 The providing unit 3324 assumes that visual identification becomes difficult due to repeated convolution operations, and by providing image data input to each layer to the user, the image data input to which layer can be visually identified. It provides reference information (differences in information) regarding whether identification is possible, and sometimes provides information for determining which layers need to be encrypted and subjected to machine learning by performing a comparison. For example, regarding sample image data, the user may be presented with data input into a first layer, which is a certain intermediate layer, and a second layer, which is processed after the first layer. . This allows the user to compare how sample image data changes and differences in information occur due to layer processing, and assists the user in specifying layer designation information.
提供部3324は、入力層から出力層までの全ての入力画像データを提供しなくともよく、入力層から出力層までの複数の所定の層について、暗号処理部1322が演算を行った場合に入力される画像データと、平文処理部1323が演算を行った場合に入力される画像データとを、ユーザが比較できる態様で提供してもよい。このとき、複数の所定の層の選び方については、5層ごとに1層を抽出するなど、周期性をもって選択してもよいし、ランダムに複数の層を抽出してもよい。 The providing unit 3324 does not have to provide all the input image data from the input layer to the output layer, and when the cryptographic processing unit 1322 performs calculations on a plurality of predetermined layers from the input layer to the output layer, The image data inputted when the plaintext processing unit 1323 performs the calculation may be provided in a form that the user can compare. At this time, the plurality of predetermined layers may be selected periodically, such as by extracting one layer out of every five layers, or the plurality of layers may be selected at random.
提供部3324は、さらに、暗号処理部1322が演算を行った場合に、途中の層に入力される画像データに代えて、マスク画像を提供してもよい。すなわち、暗号処理部1322が演算を行った場合に入力される画像データは暗号化されているため、人にとって識別不能なデータであることから、あえてその画像データを提示する必要性に乏しく、代わりにマスク画像を提供することで、人にとって識別不能なデータであることを示してもよい。 The providing unit 3324 may further provide a mask image in place of the image data input to an intermediate layer when the encryption processing unit 1322 performs the calculation. In other words, the image data that is input when the cryptographic processing unit 1322 performs the calculation is encrypted and therefore cannot be identified by humans. By providing a mask image to the data, it may be possible to indicate that the data is indiscernible to humans.
提供部3324は、例えば、入力層から所定の層までを暗号処理部1322が演算し、当該所定の層の次の層から出力層までを平文処理部1323が実行した場合の計算コストを、ユーザが比較できる態様で提供してもよい。提供部3324は、所定の層までを暗号実行領域において演算し、残りを平文実行領域においてに演算した場合の計算時間および/又は計算量などをユーザに提供することで、暗号化して機械学習を行う必要のある層を判断するための情報提供をすることができる。 For example, the providing unit 3324 provides the user with the calculation cost when the encryption processing unit 1322 performs calculations from the input layer to a predetermined layer, and the plaintext processing unit 1323 performs calculations from the layer next to the predetermined layer to the output layer. may be provided in a form that allows for comparison. The providing unit 3324 provides the user with the calculation time and/or amount of calculation when calculating up to a predetermined layer in the encryption execution area and calculating the remaining layers in the plaintext execution area, thereby encrypting and performing machine learning. Information can be provided to determine which layers need to be covered.
提供部3324は、推定部3325(後述)が算出する層指定推定情報を提供してもよい。層指定推定情報は、データ取得部131が取得した画像データに関連するデータと、当該画像データについて指定された層指定情報の相関関係に基づいて算出される情報である。層指定推定情報は、例えば、第N層を具体的に特定する数値であってもよいし、Nの範囲であってもよい。 The providing unit 3324 may provide layer designation estimation information calculated by the estimating unit 3325 (described later). The layer designation estimation information is information calculated based on the correlation between the data related to the image data acquired by the data acquisition unit 131 and the layer designation information specified for the image data. The layer designation estimation information may be, for example, a numerical value that specifically specifies the N-th layer, or may be a range of N.
推定部3325は、データ取得部が取得した画像データに関連するデータと、当該画像データについて指定された層指定情報との相関関係を学習する。画像データに関連するデータとは、画像データを取り扱う業界(医療、食品、EC等)、内容(診断、マーケティング等)、組織、ユーザなどである。推定部3325は、何層目まで暗号化するかを、画像データに関連するデータと相関関係を学習する。そして、推定部3325は、学習した結果、入力される画像データに関連するデータと相関関係にある層指定情報を、層指定推定情報として算出する。上述したように、提供部3324が、推定部3325が算出した層指定推定情報を、平文途中演算情報とともにユーザに提供することで、層指定情報を指定する際の目安となる。これにより、ユーザは層指定情報を容易に指定することができるようになる。 The estimation unit 3325 learns the correlation between the data related to the image data acquired by the data acquisition unit and the layer designation information specified for the image data. Data related to image data includes industries that handle image data (medical, food, EC, etc.), contents (diagnosis, marketing, etc.), organizations, users, and the like. The estimation unit 3325 learns how many layers to encrypt based on data related to image data and the correlation. Then, as a result of the learning, the estimation unit 3325 calculates layer designation information that has a correlation with data related to the input image data as layer designation estimation information. As described above, the providing unit 3324 provides the layer designation estimation information calculated by the estimation unit 3325 to the user together with the plain text intermediate calculation information, thereby providing a guideline for designating the layer designation information. This allows the user to easily specify the layer specification information.
(提供部3324が提供する平文途中演算情報の具体例)
図12は、提供部3324が提供する画面の一例を示す図である。画面402には、平文処理部1323が演算を実行した場合に、計算過程5層の各層に入力される画像データ(「牛」を示す画像)を示しており、ユーザが暗号実行領域において演算を行う範囲を「選択中」であることを示すアイコン412が表示されている。
(Specific example of plaintext intermediate operation information provided by the providing unit 3324)
FIG. 12 is a diagram showing an example of a screen provided by the providing unit 3324. A screen 402 shows image data (an image showing a "cow") that is input to each of the five layers of the calculation process when the plaintext processing unit 1323 executes the calculation. An icon 412 indicating that the range to be performed is "selecting" is displayed.
図12において、「Input」の部分には、ユーザが入力した入力画像が表示される。また、画面402には、平文途中演算情報として、複数の層(計算過程1~5)における入力画像が、表示されている。一般的に、畳み込みニューラルネットワークにおいて、畳み込み演算のフィルタリング処理が繰り返される過程で、入力画像は目視で識別しにくくなるため、深い層における入力画像ほど、識別が困難な画像となっている。例えば、画面402の入力画像(Input)は、牛であり、Inputと計算過程1で示される画像は、目視では、殆ど区別がつかない。一方、計算過程3~5で示される画像は、牛の輪郭がなく、目視では、画像が示す対象物を識別することが困難であることが分かる。 In FIG. 12, the input image input by the user is displayed in the "Input" portion. In addition, input images in a plurality of layers (calculation processes 1 to 5) are displayed on the screen 402 as plain text intermediate calculation information. Generally, in a convolutional neural network, as the filtering process of convolution operations is repeated, the input image becomes difficult to visually identify, so the deeper the input image is in the layer, the more difficult it is to identify the input image. For example, the input image (Input) on the screen 402 is a cow, and the Input and the image shown in calculation process 1 are almost indistinguishable from each other visually. On the other hand, the images shown in calculation steps 3 to 5 do not have the outline of the cow, and it is understood that it is difficult to visually identify the objects shown in the images.
また、画面402には、複数の層に入力される画像データだけではなく、途中の層までを暗号実行領域において演算し、それ以降を平文実行領域において演算した場合の計算時間(「Time」)や費用(「Cost」)も合わせて示されている。例えば、計算過程1に対して、「Time」は「5'36」であり、「Cost」は「$4」である。すなわち、計算過程1までを暗号実行領域において演算し、それ以降を平文実行領域において演算した場合の計算時間は「5'36」、費用は「$4」であることを示している。畳み込みニューラルネットワークにおける処理の層が深くなる(計算過程1から5へ進む)につれて、暗号実行領域において演算する計算量が増加していくため、計算時間や費用も増加していく。なお、図12では、計算コストとして、計算時間や費用が提示されているが、演算にかかる計算量や、計算資源なども計算コストとしてユーザに提示してもよい。 In addition, the screen 402 shows not only the image data input to multiple layers, but also the calculation time ("Time") when the intermediate layers are computed in the encryption execution area and the subsequent ones are computed in the plaintext execution area. and costs (“Cost”) are also shown. For example, for calculation process 1, "Time" is "5'36" and "Cost" is "$4". In other words, it is shown that the calculation time is "5'36" and the cost is "$4" when calculations up to calculation step 1 are performed in the cryptographic execution area and subsequent calculations are performed in the plaintext execution area. As the processing layer in the convolutional neural network becomes deeper (proceeding from calculation process 1 to 5), the amount of calculation to be performed in the cryptographic execution area increases, and therefore calculation time and cost also increase. Note that in FIG. 12, calculation time and expenses are presented as calculation costs, but the amount of calculation required for calculations, calculation resources, etc. may also be presented to the user as calculation costs.
また、ユーザが、ボタン422をクリック等することで、上述の「牛」の入力画像ではなく、別の画像や、プラットフォーム側で予め用意したサンプル画像、情報量の差が示されるイラスト等の画像を入力画像として変更できるようにしてもよい。この場合、これらのサンプル画像に基づいて、平文途中演算情報が提供される。 In addition, by clicking the button 422, the user can select another image, a sample image prepared in advance on the platform side, an illustration showing the difference in the amount of information, etc., instead of the above-mentioned input image of "cow". may be changed as an input image. In this case, plaintext intermediate calculation information is provided based on these sample images.
図13は、提供部3324が提供する画面の一例を示す図である。画面403の領域425には、ユーザが暗号実行領域において演算を行う範囲として「計算過程2」を選択したことが示されている。また、ユーザは、「決定」ボタン413をクリック等することにより「計算過程2」を層指定情報として入力できる。なお、層の指定は、例えば、各計算過程において示されている画像データや、当該画像データの下方に示されているアイコン(図13では鍵アイコン)をクリック等することにより行われてもよいし、キーボードや音声により行われてもよい。 FIG. 13 is a diagram showing an example of a screen provided by the providing unit 3324. An area 425 of the screen 403 indicates that the user has selected "calculation process 2" as the range for performing calculations in the cryptographic execution area. Further, the user can input "calculation process 2" as the layer designation information by clicking the "determination" button 413 or the like. Note that the layer designation may be performed, for example, by clicking on the image data shown in each calculation process or the icon (key icon in FIG. 13) shown below the image data. However, it may also be performed using a keyboard or voice.
図13では、ユーザが選択した層である計算過程2までの層における画像データをマスク画像で示している。ある層までを暗号実行領域において演算する場合、その層までに入力される画像データは暗号化されるため、人による識別は不可能であり、その暗号化された画像データを敢えてユーザに提示する必要性は乏しい。マスク画像によって代替して表示を行うことにより、暗号実行領域における演算を減らすことができる。しかしながら、ユーザが演算結果をイメージしやすくするために、暗号実行領域における演算結果を表示することを妨げるものではない。 In FIG. 13, image data in layers up to calculation process 2, which is the layer selected by the user, is shown as a mask image. When calculating up to a certain layer in the cryptographic execution area, the image data input up to that layer is encrypted, making it impossible for humans to identify it, so the encrypted image data is intentionally presented to the user. There is little need. By displaying the mask image instead, the number of calculations in the encryption execution area can be reduced. However, this does not preclude displaying the calculation results in the cryptographic execution area so that the user can easily visualize the calculation results.
(処理の流れ)
図14は、機械学習装置300が実行する処理の一例を示すフローチャートである。
(Processing flow)
FIG. 14 is a flowchart illustrating an example of processing executed by the machine learning device 300.
制御部130は、画像データ等のデータ、又は画像データ等のデータおよびラベルを、通信部110を介して、端末装置200から取得する(ステップS201)。 The control unit 130 acquires data such as image data, or data such as image data and a label, from the terminal device 200 via the communication unit 110 (step S201).
制御部130は、入力層から出力層までの各層において、平文処理部1323が実行した場合の当該演算に関する平文途中演算情報を、通信部110を介して、端末装置200に提供する(ステップS202)。 The control unit 130 provides the terminal device 200, via the communication unit 110, with plaintext intermediate operation information regarding the operation executed by the plaintext processing unit 1323 in each layer from the input layer to the output layer (step S202). .
制御部130は、暗号実行領域で行う演算と平文実行領域で行う演算との境界となる、第N層を指定する層指定情報を、通信部110を介して、端末装置200から取得する(ステップS203)。 The control unit 130 acquires, from the terminal device 200 via the communication unit 110, layer designation information that specifies the Nth layer, which is the boundary between the calculation performed in the cryptographic execution area and the calculation performed in the plaintext execution area (step S203).
制御部130は、取得した画像等のデータと適用する学習モデルを準同型暗号で暗号化する。そして、0層から第N層までを暗号化実行領域において演算し、その後復号する(ステップS204)。 The control unit 130 encrypts the acquired data such as images and the learning model to be applied using homomorphic encryption. Then, the 0th layer to the Nth layer are calculated in the encryption execution area, and then decrypted (step S204).
制御部130は、ステップS204において復号した演算結果に基づいて、第(N+1)層から出力層までを平文実行領域において演算し、推論又は学習モデルのパラメータの更新を行う。そして、制御部130は、演算結果を記憶部120に格納し、処理を終了する(ステップS205)。 The control unit 130 performs calculations from the (N+1)th layer to the output layer in the plaintext execution area based on the calculation result decoded in step S204, and updates the parameters of the inference or learning model. Then, the control unit 130 stores the calculation result in the storage unit 120, and ends the process (step S205).
(効果の説明)
本実施形態に係る機械学習装置300は、機械学習における演算の一部を暗号実行領域において、その他の部分を平文実行領域において演算することを前提として、入力画像を平文実行領域で処理した場合の、平文途中演算情報をユーザに提供する。平文途中演算情報を参照することにより、ユーザは、ユーザが求める実用的な計算コストや、セキュリティレベルに応じた、境界となる層の選択が可能となる。
(Explanation of effects)
The machine learning device 300 according to the present embodiment assumes that a part of the computation in machine learning is performed in the cryptographic execution domain and the other part is computed in the plaintext execution domain. , provides plaintext intermediate operation information to the user. By referring to the plaintext intermediate calculation information, the user can select a boundary layer according to the practical calculation cost and security level required by the user.
<実施形態3>
実施形態1および実施形態2は、画像を目視で識別することが困難になるまで、畳み込みニューラルネットワークを用いた計算処理の一部を暗号実行領域において行う。これにより、計算過程の画像が第三者に流出したとしても、当該画像を秘匿することができる。一方で、例えば、暗号処理部と平文処理部とが同じ権限で実行可能だとすると、悪意のある第三者が当該権限を奪取したときに、暗号処理部における計算過程の画像に対し、復号のための鍵を用いて入力画像の復元を試みることのおそれがある。
<Embodiment 3>
In Embodiments 1 and 2, part of the calculation process using the convolutional neural network is performed in the cryptographic execution area until it becomes difficult to visually identify the image. Thereby, even if an image of the calculation process is leaked to a third party, the image can be kept secret. On the other hand, for example, if the cryptographic processing unit and the plaintext processing unit can be executed with the same authority, if a malicious third party seizes that authority, the image of the calculation process in the cryptographic processing unit can be decrypted. There is a risk that an attempt will be made to restore the input image using the key.
そこで、実施形態3に係る機械学習装置は、暗号実行領域において演算する暗号処理部と平文実行領域において演算する平文処理部との権限を分けることで、セキュリティを高める。仮に、悪意ある第三者が暗号処理部の権限を奪取しても、平文処理部の権限を有していなければ、復号のための鍵にアクセスできないため、暗号化された画像を復号し、入力画像を認識することは困難である。また、悪意ある第三者が平文処理部の権限を奪取しても、畳み込みニューラルネットワークにおける計算過程は、暗号処理部における処理を経て、平文処理部における処理へと進んでいるため、入力画像の復元はより困難である。 Therefore, the machine learning device according to Embodiment 3 improves security by separating authority between a cryptographic processing unit that performs calculations in the cryptographic execution area and a plaintext processing unit that performs calculations in the plaintext execution area. Even if a malicious third party were to seize the authority of the encryption processing unit, unless they have the authority of the plaintext processing unit, they would not be able to access the decryption key, so they would be unable to decrypt the encrypted image. Recognizing the input image is difficult. Furthermore, even if a malicious third party seizes the authority of the plaintext processing unit, the calculation process in the convolutional neural network proceeds through the encryption processing unit and then to the plaintext processing unit, so the input image Restoration is more difficult.
上記構成を実現するために、本実施形態に係る機械学習装置では、実施形態1または2で述べた機械学習システム1または2で行う処理を1つのコンピュータ上で実行する際に、暗号処理部が実行する処理と、平文処理部が実行する処理との権限を分け、暗号処理部から平文処理部へのデータの受け渡しは共有メモリを介して行う。これにより、ある処理の権限を奪取した悪意ある第三者による他の処理へのアクセスを防止し、悪意ある第三者にハッキングされた場合のセキュリティを高めることができる。 In order to realize the above configuration, in the machine learning device according to the present embodiment, when the processing performed by the machine learning system 1 or 2 described in Embodiment 1 or 2 is executed on one computer, the cryptographic processing unit is Authority is divided between the processing to be executed and the processing executed by the plaintext processing section, and data is transferred from the cryptographic processing section to the plaintext processing section via a shared memory. This prevents a malicious third party who has taken over the authority for one process from accessing other processes, and increases security in the event of hacking by a malicious third party.
また、近年、畳み込みニューラルネットワークを用いた画像処理においては、モデル情報および計算途中の画像から元の画像に復元を試みる研究もされている。このため、たとえ、暗号化された画像や、目視で識別困難な画像であったとしても、計算途中の画像等の流出リスクを減らすことは重要である。本実施形態に係る機械学習装置は、上述のように、暗号処理部から平文処理部へのデータの受け渡しは共有メモリを介して行うため、計算途中における画像流出の可能性を低減させることも可能であり、よりセキュリティに配慮した構成となっている。 Furthermore, in recent years, in image processing using convolutional neural networks, research has been conducted in which attempts are made to restore the original image from model information and images in the middle of calculation. Therefore, even if the image is encrypted or difficult to visually identify, it is important to reduce the risk of leakage of images that are still being calculated. As mentioned above, the machine learning device according to this embodiment transfers data from the encryption processing unit to the plaintext processing unit via the shared memory, so it is also possible to reduce the possibility of image leakage during calculation. The configuration is more security-friendly.
(機械学習装置400の機能的構成)
図15は、本実施形態に係る機械学習装置400の機能的構成を示すブロック図である。図15を参照して、本実施形態に係る機械学習装置400の機能的構成について説明する。なお、実施形態1と共通の構成要素には同一の符号を付し、繰り返しの説明を省略する。
(Functional configuration of machine learning device 400)
FIG. 15 is a block diagram showing the functional configuration of the machine learning device 400 according to this embodiment. The functional configuration of the machine learning device 400 according to this embodiment will be described with reference to FIG. 15. Note that the same components as in Embodiment 1 are given the same reference numerals, and repeated explanations will be omitted.
機械学習装置400は、通信部110と、記憶部120と、制御部430と、を備え、制御部430は、データ取得部131と、共有メモリ431と、機械学習部432とを含む。機械学習部432は、受付部1321と、暗号処理部4322と、平文処理部4323とを有する。 The machine learning device 400 includes a communication unit 110, a storage unit 120, and a control unit 430, and the control unit 430 includes a data acquisition unit 131, a shared memory 431, and a machine learning unit 432. The machine learning section 432 includes a reception section 1321, a cryptographic processing section 4322, and a plaintext processing section 4323.
共有メモリ431は、例えば、揮発性メモリなどであり、暗号処理部4322(後述)および平文処理部4323(後述)がアクセス可能である。暗号処理部4322および平文処理部4323は、実行した演算の結果(データ)を共有メモリ431に記憶させる。また、暗号処理部4322および平文処理部4323が行う演算で必要な鍵やモデル情報などを、データ取得部131が記憶部120から読み出し、共有メモリ431に記憶させてもよい。これにより、機械学習装置400の暗号処理部4322と平文処理部4323は、共有メモリ423を介して、計算過程のデータを共有することができる。 The shared memory 431 is, for example, a volatile memory, and is accessible by a cryptographic processing unit 4322 (described later) and a plaintext processing unit 4323 (described later). The cryptographic processing unit 4322 and the plaintext processing unit 4323 store the results (data) of the executed operations in the shared memory 431. Further, the data acquisition unit 131 may read out keys, model information, etc. necessary for calculations performed by the encryption processing unit 4322 and the plaintext processing unit 4323 from the storage unit 120 and store them in the shared memory 431. Thereby, the encryption processing unit 4322 and the plaintext processing unit 4323 of the machine learning device 400 can share data in the calculation process via the shared memory 423.
暗号処理部4322は、まず、データ取得部131が取得した画像データ等を、鍵格納部121において管理する暗号化のための鍵(公開鍵)を用いて準同型暗号による暗号化を行う。そして、暗号化した画像データ等と、学習モデル格納部122の学習モデルを用いて、入力層(第0層)からユーザの指定した中間層の第N層までの計算処理を暗号化実行領域において演算する。なお、データ取得部131が、準同型暗号によって暗号化された画像データを取得していた場合は、暗号処理部4322による上記暗号化は省略する。 The cryptographic processing unit 4322 first encrypts the image data etc. acquired by the data acquisition unit 131 using homomorphic encryption using the encryption key (public key) managed in the key storage unit 121. Then, using the encrypted image data and the learning model in the learning model storage unit 122, calculation processing from the input layer (0th layer) to the Nth layer of the intermediate layer specified by the user is performed in the encryption execution area. calculate. Note that if the data acquisition unit 131 has acquired image data encrypted by homomorphic encryption, the above-mentioned encryption by the encryption processing unit 4322 is omitted.
また、当該演算の前に、データ取得部131が、鍵格納部121から暗号化のための鍵(公開鍵)、および学習モデル格納部122から入力層から第N層までに関するモデル情報(第1のモデル情報)を読み出し、共有メモリ431に記憶させておいてもよい。暗号処理部4322は、共有メモリ431から鍵やモデル情報を読み出して、演算に用いることにより、処理速度を速めることができる。 In addition, before the calculation, the data acquisition unit 131 receives the encryption key (public key) from the key storage unit 121 and the model information (first model information) may be read out and stored in the shared memory 431. The cryptographic processing unit 4322 can speed up the processing speed by reading out the key and model information from the shared memory 431 and using it in calculations.
次に、暗号処理部4322は、入力層(第0層)から第N層までの演算の結果を、共有メモリ431に記憶させる。このとき、暗号処理部4322は、第N層までの演算の結果だけでなく、入力層(第0層)から第N層までの各層における計算過程の全てのデータ又は、計算過程の一部のデータを共有メモリ431に記憶させてもよい。この際、演算の結果を一時的に外部の記憶装置に出力した後、共有メモリ431に記憶させるようにしてもよい。なお、暗号処理部4322の演算終了後、暗号処理部4322が演算で用いた第1のモデル情報は、共有メモリ431から削除することが望ましい。上述したように、モデル情報および計算途中の画像から元の画像を復元することができる。このため、悪意ある第三者が平文処理部の権限を奪取した場合、モデル情報と計算途中の画像から、元の入力画像の復元を試みるおそれがある。したがって、元の入力画像への復元を困難にするため、モデル情報の一部である第1のモデル情報は、当該演算結果が復号できる者にはアクセスできないようにしておくことが重要である。 Next, the cryptographic processing unit 4322 stores the results of the calculations from the input layer (0th layer) to the Nth layer in the shared memory 431. At this time, the cryptographic processing unit 4322 not only collects the results of the calculations up to the Nth layer, but also all the data of the calculation process in each layer from the input layer (layer 0) to the Nth layer, or a part of the calculation process. The data may be stored in shared memory 431. At this time, the result of the calculation may be temporarily output to an external storage device and then stored in the shared memory 431. Note that after the cryptographic processing unit 4322 completes the computation, it is desirable that the first model information used in the computation by the cryptographic processing unit 4322 be deleted from the shared memory 431. As described above, the original image can be restored from the model information and the image that is currently being calculated. For this reason, if a malicious third party seizes the authority of the plaintext processing unit, there is a risk that the original input image may be attempted to be restored from the model information and the image in the middle of calculation. Therefore, in order to make it difficult to restore the original input image, it is important to make the first model information, which is part of the model information, inaccessible to anyone who can decode the calculation result.
平文処理部4323は、共有メモリ431から、暗号処理部4322が実行した第N層までの演算の結果を取得し、取得した演算の結果に基づいて、第(N+1)層から出力層までの演算を行う。このとき、平文処理部4323は、学習モデル格納部122の学習モデルを用いて、第(N+1)層から出力層までの演算を行う。また、平文処理部4323は、共有メモリ431から取得した暗号処理部4322が実行した第N層までの演算結果を、鍵格納部121において管理する復号のための鍵(秘密鍵)を用いて復号する。 The plaintext processing unit 4323 obtains the results of the calculations up to the Nth layer executed by the encryption processing unit 4322 from the shared memory 431, and performs the calculations from the (N+1)th layer to the output layer based on the obtained calculation results. I do. At this time, the plaintext processing unit 4323 uses the learning model in the learning model storage unit 122 to perform calculations from the (N+1)th layer to the output layer. In addition, the plaintext processing unit 4323 decrypts the calculation results up to the Nth layer obtained by the encryption processing unit 4322 obtained from the shared memory 431 using the decryption key (private key) managed in the key storage unit 121. do.
なお、平文処理部4323が、暗号処理部4322の演算結果を取得する前に、データ取得部131が、鍵格納部121から復号のための鍵(秘密鍵)、および学習モデル格納部122から第(N+1)層から出力層までに関するモデル情報(第2のモデル情報)を読み出し、共有メモリ431に記憶させておいてもよい。平文処理部4323は、共有メモリ431から鍵やモデル情報を読み出して、演算に用いることにより、処理速度を速めることができる。 Note that before the plaintext processing unit 4323 obtains the calculation result of the cryptographic processing unit 4322, the data acquisition unit 131 obtains the decryption key (private key) from the key storage unit 121 and the private key from the learning model storage unit 122. Model information (second model information) regarding the (N+1) layer to the output layer may be read out and stored in the shared memory 431. The plaintext processing unit 4323 can speed up the processing speed by reading out the key and model information from the shared memory 431 and using it in calculations.
また、暗復号で用いる鍵は、処理の都度、または一定期間ごとに使い捨て等して、変更することが望ましい。これにより、元の入力画像や計算途中の画像の復号を困難にし、セキュリティを高めることができる。 Furthermore, it is desirable to change the key used for encryption and decryption by discarding it each time a process is performed or every fixed period of time. This makes it difficult to decode the original input image or the image that is being calculated, thereby increasing security.
平文処理部4323は、第2のモデル情報を用いて、第(N+1)層から出力層までの演算を平文実行領域において行い、これにより推論または学習モデルのパラメータの更新を行う。 The plaintext processing unit 4323 uses the second model information to perform calculations from the (N+1)th layer to the output layer in the plaintext execution area, thereby performing inference or updating parameters of the learning model.
(共有メモリを用いた処理の具体例)
図16は、共有メモリ431に関し、機能ブロック図とハードウェアとの対応関係を示す図である。共有メモリ431は、暗号処理部4322および平文処理部4323のいずれからもアクセス可能な記憶領域である。暗号処理部4322および平文処理部4323は、プロセッサの機能として処理を実行する。また、共有メモリ431は、鍵格納部121において管理する鍵や、暗号処理部4322が実行した演算の結果および平文処理部4323が実行した演算の結果を記憶する。
(Specific example of processing using shared memory)
FIG. 16 is a diagram showing a correspondence relationship between a functional block diagram and hardware regarding the shared memory 431. The shared memory 431 is a storage area that can be accessed from both the encryption processing unit 4322 and the plaintext processing unit 4323. The cryptographic processing unit 4322 and the plaintext processing unit 4323 execute processing as a function of a processor. The shared memory 431 also stores keys managed in the key storage unit 121, the results of calculations performed by the cryptographic processing unit 4322, and the results of calculations performed by the plaintext processing unit 4323.
暗号処理部4322は、演算の結果を共有メモリ431に記憶させる。平文処理部4323は、共有メモリ431から、暗号処理部4322が実行した演算の結果を取得する。このとき、平文処理部4323は、鍵格納部121から復号のための鍵(秘密鍵)を取得し、暗号処理部4322が実行した演算の結果について復号する。 The cryptographic processing unit 4322 stores the result of the calculation in the shared memory 431. The plaintext processing unit 4323 obtains the result of the operation performed by the encryption processing unit 4322 from the shared memory 431. At this time, the plaintext processing unit 4323 obtains a decryption key (private key) from the key storage unit 121 and decrypts the result of the operation performed by the encryption processing unit 4322.
図17は、アカウント制御を用いて実行権限を分けた場合を示す図である。1台のコンピュータ内で暗号処理部4322と平文処理部4323の実行権限を分ける場合、例えば、2つのアカウント(アカウント1,アカウント2)を用意し、それぞれのアカウントに実行権限を1つずつ割り当てることで実現できる。具体的には、図17において示すように、暗号処理部4322の実行権限をアカウント1に付与し、平文処理部4323の実行権限をアカウント2に与える。なお、アカウント1およびアカウント2には、共有メモリ431へのアクセス権限(データの読み出しと書き込みを行う権限)が与えられている。 FIG. 17 is a diagram showing a case where execution authority is divided using account control. If you want to separate the execution authority of the cryptographic processing unit 4322 and the plaintext processing unit 4323 within one computer, for example, prepare two accounts (account 1 and account 2) and assign one execution authority to each account. This can be achieved with Specifically, as shown in FIG. 17, the authority to execute the cryptographic processing unit 4322 is granted to account 1, and the authority to execute the plaintext processing unit 4323 is granted to account 2. Note that account 1 and account 2 are given access authority to the shared memory 431 (authority to read and write data).
機械学習装置400では、アカウントを分離することにより、1台のコンピュータ内で、暗号処理部4322の実行権限と、平文処理部4323の実行権限とを分けることができる。これにより、例えば、アカウント1は、平文処理部4323の実行権限がないため、復号鍵を取得する権限はない。すなわち、悪意ある第三者が、暗号処理部4322の権限を有するアカウント1を奪取しても、アカウント1は鍵格納部121から復号鍵を取得できないため、不正に取得された画像等のデータの復号は困難である。また、悪意ある第三者が、平文処理部4323の権限を有するアカウント2を奪取しても、畳み込みニューラルネットワークの計算過程が進んでいるため、もとの入力画像の復元は困難である。 In the machine learning device 400, by separating accounts, the execution authority of the encryption processing unit 4322 and the execution authority of the plaintext processing unit 4323 can be separated within one computer. Accordingly, for example, account 1 does not have the authority to execute the plaintext processing unit 4323, and therefore does not have the authority to acquire the decryption key. In other words, even if a malicious third party seizes Account 1, which has the authority to use the cryptographic processing unit 4322, Account 1 cannot obtain the decryption key from the key storage unit 121, so the data such as images that have been illegally obtained cannot be accessed. Decoding is difficult. Furthermore, even if a malicious third party seizes the account 2 that has authority over the plaintext processing unit 4323, it will be difficult to restore the original input image because the calculation process of the convolutional neural network is still progressing.
なお、入力画像の復元を困難にするため、暗号処理部4322の演算終了後、第1のモデル情報は、共有メモリ431から削除することが望ましい。上述したように、モデル情報、および計算途中の画像から元の画像を復元することができる。このため、悪意ある第三者が平文処理部の権限を有するアカウント2を奪取した場合、元の入力画像の復元を試みるおそれがある。したがって、第1のモデル情報は、アカウント2がアクセスできないようにすることにより、よりセキュリティが高まる。 Note that in order to make it difficult to restore the input image, it is desirable to delete the first model information from the shared memory 431 after the cryptographic processing unit 4322 completes the calculation. As described above, the original image can be restored from the model information and the image that is currently being calculated. For this reason, if a malicious third party seizes the account 2 that has authority over the plaintext processing unit, there is a risk of attempting to restore the original input image. Therefore, the first model information is more secure by preventing account 2 from accessing it.
さらに、機械学習装置400は、暗号処理部4322と平文処理部4323が共通してアクセス可能な共有メモリ431を用いることで、計算過程のデータの流出を防ぐことができる。また、悪意のある第三者が計算過程の演算の結果を遡って取得することを防止することもできる。すなわち、磁気ディスク装置などの記憶装置を介して情報を共有すると、悪意のある第三者にアカウントが乗っ取られた際に過去の演算の結果を取得されるリスクが発生するが、揮発性メモリなどを共有メモリ431として用いることで、暗号処理部4322および平文処理部4323の演算の結果は一次的に記憶されるのみとなり、悪意のある第三者が過去の演算の結果を不正に取得することを予防できる。 Furthermore, the machine learning device 400 can prevent leakage of data in the calculation process by using the shared memory 431 that can be commonly accessed by the encryption processing unit 4322 and the plaintext processing unit 4323. Furthermore, it is also possible to prevent a malicious third party from retroactively obtaining the results of the calculation process. In other words, if you share information via a storage device such as a magnetic disk device, there is a risk that if your account is hijacked by a malicious third party, the results of past calculations will be obtained. By using the shared memory 431 as the shared memory 431, the results of calculations by the cryptographic processing unit 4322 and plaintext processing unit 4323 are only temporarily stored, preventing a malicious third party from illegally obtaining the results of past calculations. can be prevented.
(処理の流れ)
図18は、機械学習装置400が実行する処理の一例を示すフローチャートである。
(Processing flow)
FIG. 18 is a flowchart illustrating an example of processing executed by the machine learning device 400.
制御部430は、画像データ等のデータ、又は画像データ等のデータおよびラベルを取得する(ステップS301)。 The control unit 430 acquires data such as image data, or data such as image data and a label (step S301).
制御部430は、暗号実行領域で行う演算と平文実行領域で行う演算との境界となる第N層を指定する層指定情報を取得する(ステップS302)。 The control unit 430 acquires layer designation information that designates the Nth layer that is the boundary between the calculation performed in the cryptographic execution area and the calculation performed in the plaintext execution area (step S302).
制御部430は、取得した画像等のデータと適用する学習モデルを準同型暗号で暗号化する。そして、入力層(第0層)から第N層まで暗号化実行領域において演算し、共有メモリ431に記憶する(ステップS303)。 The control unit 430 encrypts the acquired data such as images and the learning model to be applied using homomorphic encryption. Then, calculations are performed in the encryption execution area from the input layer (0th layer) to the Nth layer and stored in the shared memory 431 (step S303).
制御部430は、ステップS303において行った演算の結果を共有メモリ431から取得し、当該演算の結果に基づいて、復号鍵を用いて演算の結果を復号する。そして、復号した演算の結果に基づいて、第(N+1)層から出力層までを平文実行領域において演算し、推論又は学習モデルのパラメータの更新を行う。次いで、制御部430は、出力層までの演算の結果を出力し、処理を終了する(ステップS304)。 The control unit 430 obtains the result of the calculation performed in step S303 from the shared memory 431, and decrypts the result of the calculation using the decryption key based on the result of the calculation. Then, based on the results of the decrypted calculations, calculations are performed in the plaintext execution area from the (N+1)th layer to the output layer, and inference or learning model parameters are updated. Next, the control unit 430 outputs the results of the calculations up to the output layer, and ends the process (step S304).
(効果の説明)
本実施形態に係る機械学習装置400は、暗号処理部4322が実行する処理と平文処理部4323が実行する処理の権限を分け、暗号処理部4322から平文処理部4323への情報の受け渡しは共有メモリ431を介して行う。これにより、暗号処理部4322又は平文処理部4323の権限を奪取した悪意ある第三者が、他の処理にアクセスすることを防止し、セキュリティを高めることができる。
(Explanation of effects)
The machine learning device 400 according to the present embodiment separates authority for processing executed by the encryption processing unit 4322 and processing executed by the plaintext processing unit 4323, and transfers information from the encryption processing unit 4322 to the plaintext processing unit 4323 using a shared memory. 431. This prevents a malicious third party who has taken over the authority of the cryptographic processing unit 4322 or the plaintext processing unit 4323 from accessing other processing, thereby increasing security.
また、機械学習装置400は、暗号処理部4322と平文処理部4323の両方がアクセス可能な共有メモリ431を用いることで、演算の結果の共有が可能となる。揮発性メモリなどに構成した共有メモリ431を用いることで、演算の結果を短期的に記憶し、過去のデータを上書きすることで、悪意ある第三者が不正なアクセスを試みた場合にも、元の画像等の復元につながるデータの取得を困難にし、セキュリティを高めることができる。 Furthermore, the machine learning device 400 uses a shared memory 431 that can be accessed by both the encryption processing unit 4322 and the plaintext processing unit 4323, thereby making it possible to share the results of calculations. By using the shared memory 431 configured as a volatile memory, the results of calculations can be stored in the short term and past data can be overwritten, even if a malicious third party attempts unauthorized access. It is possible to increase security by making it difficult to obtain data that would lead to restoration of the original image, etc.
また、入力画像の復元を困難にするため、暗号処理部4322の演算終了後、第1のモデル情報を、共有メモリ431から削除することで、第1のモデル情報、および平文処理部4323において復号される第N層までの演算結果に基づいて、元の入力画像に復元することを防ぐことができ、よりセキュリティを高めることができる。 Furthermore, in order to make it difficult to restore the input image, the first model information is deleted from the shared memory 431 after the encryption processing unit 4322 completes the calculation, so that the first model information and the plaintext processing unit 4323 can decrypt it. Based on the calculation results up to the Nth layer, it is possible to prevent restoration to the original input image, thereby further increasing security.
<実施形態4>
実施形態4は、実施形態3の変形例である。本実施形態に係る機械学習装置は、実施形態3に係る機械学習装置と比較して、学習モデルに対するアクセス権限を分ける。本実施形態に係る機械学習装置は、暗号処理部の実行権限と平文処理部の実行権限を分けるだけでなく、学習モデルのモデル情報へのアクセス権限も分けることで、悪意のある第三者に一部の権限を奪取されても、元の画像等の復元をより困難にすることを可能とする。
<Embodiment 4>
Embodiment 4 is a modification of Embodiment 3. The machine learning device according to the present embodiment has separate access authority for learning models compared to the machine learning device according to the third embodiment. The machine learning device according to this embodiment not only separates the execution authority of the cryptographic processing unit and the execution authority of the plaintext processing unit, but also separates the access authority to the model information of the learning model, so that a malicious third party can To make it more difficult to restore an original image, etc. even if a part of authority is stolen.
図19は、本実施形態に係る機械学習装置500の機能的構成を示すブロック図である。以下、図19を参照して、実施形態4に係る機械学習装置500の機能的構成について説明する。なお、実施形態3と共通の構成要素には同一の符号を付し、繰り返しの説明を省略する。 FIG. 19 is a block diagram showing the functional configuration of the machine learning device 500 according to this embodiment. The functional configuration of the machine learning device 500 according to the fourth embodiment will be described below with reference to FIG. 19. Note that the same components as in the third embodiment are denoted by the same reference numerals, and repeated explanations will be omitted.
機械学習装置500は、通信部110と、記憶部520と、制御部530と、を備える。記憶部520は、鍵格納部121と、学習モデル格納部522と、を含み、制御部530は、データ取得部531と、共有メモリ532と、機械学習計算部533と、を含む。機械学習計算部533は、受付部1321と、暗号処理部5322と、平文処理部5323と、を有する。 The machine learning device 500 includes a communication section 110, a storage section 520, and a control section 530. The storage unit 520 includes a key storage unit 121 and a learning model storage unit 522, and the control unit 530 includes a data acquisition unit 531, a shared memory 532, and a machine learning calculation unit 533. The machine learning calculation unit 533 includes a reception unit 1321, a cryptographic processing unit 5322, and a plaintext processing unit 5323.
学習モデル格納部522は、入力層から第N層までに関する第1のモデル情報と、第(N+1)層から出力層までに関する第2のモデル情報とを記憶する。第1のモデル情報は、学習モデルのうち、暗号処理部5322における演算のために必要となる学習モデルの情報である。第2のモデル情報は、学習モデルの情報のうち、平文処理部5323における演算のために必要となる学習モデルの情報である。 The learning model storage unit 522 stores first model information from the input layer to the Nth layer, and second model information from the (N+1)th layer to the output layer. The first model information is information on a learning model that is necessary for calculation in the cryptographic processing unit 5322 among the learning models. The second model information is learning model information that is necessary for calculation in the plaintext processing unit 5323, out of the learning model information.
第1のモデル情報と、第2のモデル情報は、例えば、同じ記憶領域に格納され、アクセス権限が設定される。第1のモデル情報は、暗号処理部の実行権限を有する者がアクセス可能であり、第2のモデル情報は、平文処理部の実行権限を有する者がアクセス可能である。また、第1のモデル情報と、第2のモデル情報とを異なる記憶領域に格納してもよい。この場合、第1のモデル情報は、暗号処理部の実行権限を有する者がアクセス可能であり、第2のモデル情報は、平文処理部の実行権限を有する者がアクセス可能である。 The first model information and the second model information are stored, for example, in the same storage area, and access authority is set. The first model information can be accessed by a person who has execution authority for the cryptographic processing unit, and the second model information can be accessed by a person who has execution authority for the plaintext processing unit. Further, the first model information and the second model information may be stored in different storage areas. In this case, the first model information can be accessed by a person who has execution authority for the cryptographic processing unit, and the second model information can be accessed by a person who has execution authority for the plaintext processing unit.
暗号処理部5322は、データ取得部531を介して取得した画像等のデータと第1のモデル情報を取得し、暗号実行領域における入力層から第N層までの演算を行う。そして、暗号処理部5322は、演算結果を共有メモリ532に記憶させる。 The cryptographic processing unit 5322 acquires data such as an image acquired through the data acquisition unit 531 and the first model information, and performs calculations from the input layer to the Nth layer in the cryptographic execution area. The cryptographic processing unit 5322 then stores the calculation result in the shared memory 532.
平文処理部5323は、共有メモリ532から、暗号処理部5322が実行した第N層までの演算の結果を取得する。そして、データ取得部521を介して取得した第2のモデル情報を用いて、平文実行領域における第(N+1)層から出力層までの演算を行い、これにより推論又は学習モデルのパラメータの更新を行う。この際、平文処理部5323は、鍵格納部121において管理する復号のための鍵(秘密鍵)を用いて第N層までの演算の結果を復号する。 The plaintext processing unit 5323 obtains the results of the calculations up to the Nth layer executed by the encryption processing unit 5322 from the shared memory 532. Then, using the second model information acquired via the data acquisition unit 521, calculations from the (N+1)th layer to the output layer in the plaintext execution area are performed, and thereby the parameters of the inference or learning model are updated. . At this time, the plaintext processing unit 5323 decrypts the results of the calculations up to the Nth layer using the decryption key (private key) managed in the key storage unit 121.
なお、各モデル情報は、機械学習装置500以外の装置が記憶していてもよく、データ取得部531は、各モデル情報を、機械学習装置500以外の装置等から別々に取得してもよい。 Note that each model information may be stored in a device other than the machine learning device 500, and the data acquisition unit 531 may separately obtain each model information from a device other than the machine learning device 500.
(効果の説明)
本実施形態に係る機械学習装置500は、暗号処理部5322が実行する処理と平文処理部5323が実行する処理の権限を分けるだけでなく、学習モデルへのアクセス権限も分ける。これにより、悪意ある第三者が実行権限の一部を奪取したとしても、実施形態3に係る機械学習装置400よりも、取得できる情報を減らすことができる。したがって、元の画像等を復元することをより困難にし、セキュリティを高めることができる。
(Explanation of effects)
The machine learning device 500 according to this embodiment not only separates the authority for processing executed by the cryptographic processing unit 5322 and the processing executed by the plaintext processing unit 5323, but also separates the authority for accessing the learning model. As a result, even if a malicious third party seizes part of the execution authority, the amount of information that can be acquired can be reduced compared to the machine learning device 400 according to the third embodiment. Therefore, it is made more difficult to restore the original image, etc., and security can be improved.
<実施形態5>
実施形態3に係る機械学習装置は、1つのコンピュータにおいて、暗号処理部と平文処理部の実行権限を分けることで、悪意ある第三者が一部の権限を奪取しても、元の画像等の復元を困難にし、セキュリティを高めた。実施形態5に係る機械学習システムは、実施形態1又は2で述べた機械学習システムにおける暗号処理部の処理と平文処理部の処理を異なる端末装置で実行させるなど、暗号処理部と平文処理部とを物理的に異なる実行環境において演算を実行することで、悪意ある第三者が一部の実行環境の権限を奪取しても元の画像等の復元を困難にし、セキュリティを高める。物理的に異なる実行環境において演算することで、1つのコンピュータにおいて実行権限を分けるよりも、実行権限の分離をより確実なものにし、セキュリティを高めることができる。
<Embodiment 5>
The machine learning device according to the third embodiment separates the execution authority of the encryption processing unit and the plaintext processing unit in one computer, so that even if a malicious third party seizes some authority, the original image etc. This makes restoration more difficult and increases security. The machine learning system according to Embodiment 5 is configured such that the encryption processing unit and the plaintext processing unit in the machine learning system described in Embodiment 1 or 2 are executed by different terminal devices. By executing calculations in physically different execution environments, even if a malicious third party seizes authority in a part of the execution environment, it is difficult to restore the original image, etc., thereby increasing security. By performing calculations in physically different execution environments, the separation of execution authority can be made more reliable and security can be improved, compared to dividing execution authority in one computer.
(機械学習システム3の構成)
図20は、機械学習システム3の全体図である。図20に示すように、本実施形態に係る機械学習システム3は、暗号実行領域の演算を行う暗号処理装置600と、平文実行領域の演算を行う平文処理装置700と、その余の機械学習のための処理を行うシステム管理装置800とを備える。
(Configuration of machine learning system 3)
FIG. 20 is an overall diagram of the machine learning system 3. As shown in FIG. 20, the machine learning system 3 according to the present embodiment includes a cryptographic processing device 600 that performs calculations in the cryptographic execution area, a plaintext processing device 700 that performs calculations in the plaintext execution area, and the rest of the machine learning system. and a system management device 800 that performs processing for this purpose.
暗号処理装置600と、平文処理装置700と、システム管理装置800とは、ネットワークNWを介してデータを送受信することができる。 The cryptographic processing device 600, the plaintext processing device 700, and the system management device 800 can transmit and receive data via the network NW.
機械学習システム3の機能は、実施形態1に係る機械学習装置100の機能を、暗号処理装置600と、平文処理装置700と、システム管理装置800とに分ける。暗号処理装置600と、平文処理装置700と、システム管理装置800とがネットワークNWを介して通信することで、機械学習装置100の機能を3つに分割した装置により実現するものである。 The functions of the machine learning system 3 are divided into the functions of the machine learning device 100 according to the first embodiment into a cryptographic processing device 600, a plaintext processing device 700, and a system management device 800. The cryptographic processing device 600, the plaintext processing device 700, and the system management device 800 communicate with each other via the network NW, thereby realizing the functions of the machine learning device 100 by dividing the functions into three devices.
機械学習システム3の機能は、具体的には、以下の構成で実現できる。例えば、実施形態1に係る機械学習装置100の記憶部120における鍵格納部121と学習モデル格納部122の機能は、システム管理装置800に機能的に配置する。機械学習装置100の制御部130におけるデータ取得部131と機械学習計算部132の暗号処理部1322の機能は、暗号処理装置600に機能的に配置する。機械学習装置100の制御部130における機械学習計算部132の平文処理部1323の機能は、平文処理装置700に機能的に配置する。機械学習装置100の制御部130における機械学習計算部132の受付部1321の機能は、システム管理装置800に機能的に配置する。 Specifically, the functions of the machine learning system 3 can be realized with the following configuration. For example, the functions of the key storage unit 121 and learning model storage unit 122 in the storage unit 120 of the machine learning device 100 according to the first embodiment are functionally arranged in the system management device 800. The functions of the data acquisition unit 131 in the control unit 130 of the machine learning device 100 and the cryptographic processing unit 1322 of the machine learning calculation unit 132 are functionally arranged in the cryptographic processing device 600. The functions of the plaintext processing unit 1323 of the machine learning calculation unit 132 in the control unit 130 of the machine learning device 100 are functionally arranged in the plaintext processing device 700. The function of the reception unit 1321 of the machine learning calculation unit 132 in the control unit 130 of the machine learning device 100 is functionally arranged in the system management device 800.
ただし、前述の例はあくまで一例であり、機械学習システム3の機能は、少なくとも暗号処理装置600に暗号処理部1322の機能が配置され、平文処理装置700に平文処理部1323の機能が配置されればよい。その他の機能は、暗号処理装置600、平文処理装置700、システム管理装置800のいずれかに配置されてもよい。 However, the above-mentioned example is just an example, and the functions of the machine learning system 3 are such that at least the function of the cryptographic processing section 1322 is arranged in the cryptographic processing device 600 and the function of the plaintext processing section 1323 is arranged in the plaintext processing device 700. Bye. Other functions may be placed in either the cryptographic processing device 600, the plaintext processing device 700, or the system management device 800.
また、例えば、実施形態1に係る機械学習装置100の記憶部120における鍵格納部121と学習モデル格納部122の機能は、暗号処理装置600および平文処理装置700の双方に機能的に配置してもよい。 Further, for example, the functions of the key storage unit 121 and the learning model storage unit 122 in the storage unit 120 of the machine learning device 100 according to the first embodiment are functionally arranged in both the cryptographic processing device 600 and the plaintext processing device 700. Good too.
また、例えば、実施形態1に係る機械学習装置100の制御部130におけるデータ取得部131の機能は、システム管理装置800に機能的に配置されてもよい。機械学習装置100の受付部1321の機能は、暗号処理装置600に機能的に配置されてもよい。 Further, for example, the function of the data acquisition unit 131 in the control unit 130 of the machine learning device 100 according to the first embodiment may be functionally arranged in the system management device 800. The function of the reception unit 1321 of the machine learning device 100 may be functionally arranged in the cryptographic processing device 600.
(暗号処理装置600の機能的構成)
図21は、本実施形態に係る暗号処理装置600の機能的構成を示すブロック図である。以下、図21を参照して、本実施形態に係る暗号処理装置600の機能的構成について説明する。
(Functional configuration of cryptographic processing device 600)
FIG. 21 is a block diagram showing the functional configuration of a cryptographic processing device 600 according to this embodiment. The functional configuration of the cryptographic processing device 600 according to this embodiment will be described below with reference to FIG. 21.
暗号処理装置600は、通信部610と、記憶部620と、制御部630とを備える。 The cryptographic processing device 600 includes a communication section 610, a storage section 620, and a control section 630.
通信部610は、暗号処理装置600が他の装置と通信するための処理を行う。通信部610は、他の装置との通信は、セキュアな通信チャネルを構築する。 The communication unit 610 performs processing for the cryptographic processing device 600 to communicate with other devices. The communication unit 610 establishes a secure communication channel for communication with other devices.
記憶部620は、例えば、RAM等の揮発性のメモリ、フラッシュメモリ、HDD、SSD等により構成され、暗号処理装置600が利用するデータ、およびプログラムを記憶する。 The storage unit 620 includes, for example, a volatile memory such as a RAM, a flash memory, an HDD, an SSD, etc., and stores data and programs used by the cryptographic processing device 600.
制御部630は、暗号処理装置600のプロセッサが記憶部620に記憶されるプログラムを読み込み、プログラムに含まれる命令を実行することにより実現される。制御部630は、暗号処理装置600の動作を制御する。具体的には、制御部630は、データ取得部631と、機械学習計算部632と、を含む。 The control unit 630 is realized by the processor of the cryptographic processing device 600 reading a program stored in the storage unit 620 and executing instructions included in the program. Control unit 630 controls the operation of cryptographic processing device 600. Specifically, the control unit 630 includes a data acquisition unit 631 and a machine learning calculation unit 632.
データ取得部631は、ユーザが入力した画像データ等とラベルを取得する。 The data acquisition unit 631 acquires image data, etc. input by the user and a label.
機械学習計算部632は、データ取得部631において取得した画像データ等に基づいて、畳み込みニューラルネットワークを用いた計算処理を行う。この計算処理は、具体的には、学習モデルのパラメータを更新するための学習、もしくは、取得した画像データ等から学習モデルを用いて行う推論のための計算処理である。なお、畳み込みニューラルネットワークは複数の層から構成される。 The machine learning calculation unit 632 performs calculation processing using a convolutional neural network based on the image data etc. acquired by the data acquisition unit 631. Specifically, this calculation process is a calculation process for learning to update the parameters of a learning model or for inference using a learning model from acquired image data or the like. Note that a convolutional neural network is composed of multiple layers.
機械学習計算部632は、暗号処理部6322を有する。暗号処理部6322は、通信部610を介してシステム管理装置800の鍵格納部821(後述)から取得した暗号化のための鍵を用いて、準同型暗号により画像データ等を暗号化する。なお、データ取得部631が、準同型暗号により暗号化された画像データを取得していた場合は、当該暗号化を省略する。 The machine learning calculation unit 632 includes a cryptographic processing unit 6322. The cryptographic processing unit 6322 encrypts image data and the like by homomorphic encryption using an encryption key obtained from the key storage unit 821 (described later) of the system management device 800 via the communication unit 610. Note that if the data acquisition unit 631 has acquired image data encrypted by homomorphic encryption, the encryption is omitted.
暗号処理部6322は、通信部610を介して、システム管理装置800の学習モデル格納部822(後述)から取得したモデル情報と、通信部610を介して取得したシステム管理装置800の受付部831(後述)が取得した層指定情報を用いて、入力層から第N層までの計算処理を準同型暗号による暗号実行領域において演算する。 The cryptographic processing unit 6322 receives the model information obtained from the learning model storage unit 822 (described later) of the system management device 800 via the communication unit 610 and the reception unit 831 ( (described later) uses the acquired layer designation information to perform calculations from the input layer to the Nth layer in the encryption execution area using homomorphic encryption.
暗号処理部6322は、通信部610を介して、暗号実行領域における演算の結果を平文処理装置700に送信する。平文処理装置700は、通信部710を介して、暗号実行領域における演算の結果を取得する。 The cryptographic processing unit 6322 transmits the result of the calculation in the cryptographic execution area to the plaintext processing device 700 via the communication unit 610. The plaintext processing device 700 obtains the result of the calculation in the cryptographic execution area via the communication unit 710.
(平文処理装置700の機能的構成)
図22は、本実施形態に係る平文処理装置700の機能的構成を示すブロック図である。以下、図22を参照して、本実施形態に係る平文処理装置700の機能的構成について説明する。
(Functional configuration of plaintext processing device 700)
FIG. 22 is a block diagram showing the functional configuration of the plaintext processing device 700 according to this embodiment. The functional configuration of the plaintext processing device 700 according to this embodiment will be described below with reference to FIG. 22.
平文処理装置700は、通信部710と、記憶部720と、制御部730とを備える。 Plaintext processing device 700 includes a communication section 710, a storage section 720, and a control section 730.
通信部710は、平文処理装置700が他の装置と通信するための処理を行う。通信部710は、他の装置との通信は、セキュアな通信チャネルを構築する。 The communication unit 710 performs processing for the plaintext processing device 700 to communicate with other devices. The communication unit 710 establishes a secure communication channel for communication with other devices.
記憶部720は、例えば、RAM等の揮発性のメモリ、フラッシュメモリ、HDD、SSD等により構成され、平文処理装置700が利用するデータ、およびプログラムを記憶する。 The storage unit 720 includes, for example, a volatile memory such as a RAM, a flash memory, an HDD, an SSD, etc., and stores data and programs used by the plaintext processing device 700.
制御部730は、平文処理装置700のプロセッサが記憶部720に記憶されるプログラムを読み込み、プログラムに含まれる命令を実行することにより実現される。制御部730は、平文処理装置700の動作を制御する。具体的には、制御部730は、機械学習計算部732を含む。 The control unit 730 is realized by the processor of the plaintext processing device 700 reading a program stored in the storage unit 720 and executing instructions included in the program. The control unit 730 controls the operation of the plaintext processing device 700. Specifically, the control unit 730 includes a machine learning calculation unit 732.
機械学習計算部732は、通信部710を介して、暗号処理装置600から取得した暗号実行領域における演算の結果に基づき、畳み込みニューラルネットワークを用いた計算処理を行う。この計算処理は、具体的には、学習モデルのパラメータを更新するための学習、もしくは、取得した画像データ等から学習モデルを用いて行う推論のための計算処理である。なお、畳み込みニューラルネットワークは複数の層から構成される。 The machine learning calculation unit 732 performs calculation processing using a convolutional neural network based on the result of calculation in the cryptographic execution area obtained from the cryptographic processing device 600 via the communication unit 710. Specifically, this calculation process is a calculation process for learning to update the parameters of a learning model or for inference using a learning model from acquired image data or the like. Note that a convolutional neural network is composed of multiple layers.
機械学習計算部732は、平文処理部7323を有する。平文処理部7323は、通信部710を介してシステム管理装置800の鍵格納部821(後述)から取得した復号のための鍵を用いて、暗号実行領域における演算の結果を復号する。 The machine learning calculation unit 732 includes a plaintext processing unit 7323. The plaintext processing unit 7323 decrypts the result of the operation in the encryption execution area using a decryption key obtained from the key storage unit 821 (described later) of the system management device 800 via the communication unit 710.
平文処理部7323は、通信部710を介してシステム管理装置800の学習モデル格納部822(後述)から取得したモデル情報と、通信部710を介して取得したシステム管理装置800の受付部831(後述)が取得した層指定情報を用いて、第(N+1)層から出力層までの計算処理を平文実行領域において演算する。これにより、推論または学習モデルのパラメータの更新を行う。 The plaintext processing unit 7323 uses the model information acquired from the learning model storage unit 822 (described later) of the system management device 800 via the communication unit 710 and the model information acquired from the learning model storage unit 822 (described later) of the system management device 800 via the communication unit 710. ) is used to perform calculation processing from the (N+1)th layer to the output layer in the plaintext execution area. This updates the parameters of the inference or learning model.
平文処理部7323は、推論または学習モデルのパラメータの更新を行い、通信部710を介して、当該学習モデルをシステム管理装置800に送信し、システム管理装置800の学習モデル格納部822(後述)に記憶されている学習モデルを更新する。 The plaintext processing unit 7323 performs inference or updates parameters of the learning model, transmits the learning model to the system management device 800 via the communication unit 710, and stores it in the learning model storage unit 822 (described later) of the system management device 800. Update the stored learning model.
(システム管理装置800の機能的構成)
図23は、本実施形態に係るシステム管理装置800の機能的構成を示すブロック図である。以下、図23を参照して、本実施形態に係るシステム管理装置800の機能的構成について説明する。
(Functional configuration of system management device 800)
FIG. 23 is a block diagram showing the functional configuration of the system management device 800 according to this embodiment. The functional configuration of the system management device 800 according to this embodiment will be described below with reference to FIG. 23.
システム管理装置800は、通信部810と、記憶部820と、制御部830とを備える。 System management device 800 includes a communication section 810, a storage section 820, and a control section 830.
通信部810は、システム管理装置800が他の装置と通信するための処理を行う。通信部810は、他の装置との通信は、セキュアな通信チャネルを構築する。 The communication unit 810 performs processing for the system management device 800 to communicate with other devices. The communication unit 810 establishes a secure communication channel for communication with other devices.
記憶部820は、例えば、RAM等の揮発性のメモリ、フラッシュメモリ、HDD、SSD等により構成され、システム管理装置800が利用するデータ、およびプログラムを記憶する。記憶部820は、鍵格納部821と、学習モデル格納部822と、を含む。
鍵格納部821は、データを暗号化し、又は暗号化されたデータを復号するための鍵を記憶する。学習モデル格納部822は、機械学習システム3において使用する学習モデルを記憶する。
The storage unit 820 is configured with, for example, a volatile memory such as a RAM, a flash memory, an HDD, an SSD, etc., and stores data and programs used by the system management device 800. The storage unit 820 includes a key storage unit 821 and a learning model storage unit 822.
The key storage unit 821 stores a key for encrypting data or decrypting encrypted data. The learning model storage unit 822 stores learning models used in the machine learning system 3.
制御部830は、システム管理装置800のプロセッサが記憶部820に記憶されるプログラムを読み込み、プログラムに含まれる命令を実行することにより実現される。制御部830は、システム管理装置800の動作を制御する。制御部830は、受付部831を含む。 The control unit 830 is realized by the processor of the system management device 800 reading a program stored in the storage unit 820 and executing instructions included in the program. The control unit 830 controls the operation of the system management device 800. Control unit 830 includes a reception unit 831.
受付部831は、畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層(ただし、Nは自然数。)を指定する層指定情報を受け付ける。 The reception unit 831 receives layer designation information that designates the Nth layer (N is a natural number), which is a layer on the way from the input layer to the output layer of the convolutional neural network.
システム管理装置800は、通信部810を介して、暗号処理装置600または/および平文処理装置700に対して、層指定情報を送信する。 System management device 800 transmits layer designation information to cryptographic processing device 600 and/or plaintext processing device 700 via communication unit 810 .
(物理的に異なる実行環境において演算を行う場合の具体例)
図24は、物理的に異なる実行環境において畳み込みニューラルネットワークを用いた計算処理を行う場合の具体例を示す図である。
(Specific example of performing calculations in physically different execution environments)
FIG. 24 is a diagram illustrating a specific example of performing calculation processing using a convolutional neural network in physically different execution environments.
本実施形態に係る機械学習システム3のシステムでは、ニューラルネットワークを用いた計算処理を、準同型暗号による暗号実行領域と、平文実行領域に分けて行う。そして、暗号実行領域における処理を暗号処理装置600において行い、平文実行領域における処理を平文処理装置700において行うことで、物理的に異なる実行環境において計算処理を行う。 In the machine learning system 3 according to the present embodiment, calculation processing using a neural network is performed in a cryptographic execution area using homomorphic encryption and a plaintext execution area. Processing in the cryptographic execution area is performed in the cryptographic processing device 600, and processing in the plaintext execution area is performed in the plaintext processing device 700, thereby performing calculation processing in physically different execution environments.
図24に示すように、暗号処理装置600において、暗号処理部6322が、データ取得部631(図21参照)が取得した画像データ等を暗号化し、暗号実行領域において、入力層(第0層)から第N層までの演算を実行する。暗号処理装置600は、入力層から第N層までの演算の結果を、ネットワークを介して平文処理装置700に送信する。平文処理装置700において、平文処理部7323は、暗号処理装置600から送信された演算の結果を復号した上で、平文実行領域において、第(N+1)層から出力層までの演算を行う。このように、機械学習システム3は、暗号処理部6322と平文処理部7323とを異なる実行環境において計算処理させることで、悪意のある第三者に、計算処理に係る装置がハッキングされた際のリスクを軽減し、セキュリティを高めることができる。 As shown in FIG. 24, in the cryptographic processing device 600, the cryptographic processing unit 6322 encrypts the image data etc. acquired by the data acquisition unit 631 (see FIG. 21), and in the cryptographic execution area, the cryptographic processing unit 6322 encrypts the image data etc. acquired by the data acquisition unit 631 (see FIG. 21). The calculations from to the Nth layer are executed. The cryptographic processing device 600 transmits the results of calculations from the input layer to the Nth layer to the plaintext processing device 700 via the network. In the plaintext processing device 700, the plaintext processing unit 7323 decrypts the result of the operation sent from the cryptographic processing device 600, and then performs the operations from the (N+1)th layer to the output layer in the plaintext execution area. In this way, the machine learning system 3 allows the cryptographic processing unit 6322 and the plaintext processing unit 7323 to process calculations in different execution environments, thereby preventing the computer from being hacked by a malicious third party. It can reduce risks and increase security.
(処理の流れ)
図25は、機械学習システム3が実行する処理の一例を示すシーケンス図である。なお、ステップの順番は図25で示す例に限られない。
(Processing flow)
FIG. 25 is a sequence diagram illustrating an example of a process executed by the machine learning system 3. Note that the order of steps is not limited to the example shown in FIG. 25.
暗号処理装置600は、画像データ等のデータ、又は画像データ等のデータおよびラベルを取得する(ステップS401)。 The cryptographic processing device 600 acquires data such as image data, or data such as image data and a label (step S401).
システム管理装置800は、暗号実行領域で行う演算と平文実行領域で行う演算との境界となる第N層を指定する層指定情報を取得する(ステップS402)。 The system management device 800 acquires layer designation information that designates the Nth layer that is the boundary between the calculation performed in the cryptographic execution area and the calculation performed in the plaintext execution area (step S402).
システム管理装置800は、暗号処理装置600に対して、層指定情報、学習モデル、暗号化のための鍵(暗号鍵)を送信する(ステップS403)。 The system management device 800 transmits the layer designation information, the learning model, and the key for encryption (encryption key) to the cryptographic processing device 600 (step S403).
暗号処理装置600は、取得した画像等のデータと適用する学習モデルを準同型暗号で暗号化する。そして、第0層から第N層まで暗号化実行領域において演算する(ステップS404)。 The cryptographic processing device 600 encrypts the acquired data such as images and the learning model to be applied using homomorphic encryption. Then, calculations are performed in the encryption execution area from the 0th layer to the Nth layer (step S404).
暗号処理装置600は、暗号実行領域における演算結果を平文処理装置700に送信する(ステップS405)。 The cryptographic processing device 600 transmits the calculation result in the cryptographic execution area to the plaintext processing device 700 (step S405).
システム管理装置800は、層指定情報、学習モデル、復号のための鍵(秘密鍵)を平文処理装置700に送信する(ステップS406)。なお、復号のための鍵は、セキュリティが確保された通信路において送信される他に、予め、平文処理装置700とシステム管理装置800とが共有しておいてもよい。 The system management device 800 transmits the layer designation information, the learning model, and the decryption key (private key) to the plaintext processing device 700 (step S406). Note that the decryption key may be shared in advance between the plaintext processing device 700 and the system management device 800, in addition to being transmitted over a secure communication path.
平文処理装置700は、暗号処理装置600が行った演算の結果に基づいて、復号鍵を用いて演算結果を復号する。そして、復号した演算の結果に基づいて、第(N+1)層から出力層までを平文実行領域において演算し、推論又は学習モデルのパラメータの更新を行う(ステップS407)。 Based on the result of the calculation performed by the cryptographic processing device 600, the plaintext processing device 700 decrypts the calculation result using the decryption key. Then, based on the results of the decrypted calculations, calculations are performed in the plaintext execution area from the (N+1)th layer to the output layer, and the parameters of the inference or learning model are updated (step S407).
平文処理装置700は更新された学習モデルをシステム管理装置800に送信し、システム管理装置800は記憶している学習モデルのパラメータを更新する(ステップS408)。 The plaintext processing device 700 transmits the updated learning model to the system management device 800, and the system management device 800 updates the stored parameters of the learning model (step S408).
(効果の説明)
本実施形態に係る機械学習システム3は、暗号処理部6322が実行する処理と、平文処理部7323が実行する処理とを、物理的な実行環境に分けて行う。これにより、暗号処理部6322又は平文処理部7323の実行環境をハッキングした悪意ある第三者が、他の処理にアクセスすることを防止し、元の画像等を取得することを予防してセキュリティを高めることができる。機械学習システム3は、物理的な実行環境を分けることにより、1つのコンピュータ上で実行権限を分けるよりも、他の処理へのアクセスを困難にし、セキュリティを高めることができる。
(Explanation of effects)
The machine learning system 3 according to this embodiment performs processing executed by the cryptographic processing unit 6322 and processing executed by the plaintext processing unit 7323 in separate physical execution environments. This prevents a malicious third party who has hacked the execution environment of the cryptographic processing unit 6322 or the plaintext processing unit 7323 from accessing other processes and prevents them from acquiring the original image, etc., thereby improving security. can be increased. By dividing the physical execution environment, the machine learning system 3 can make access to other processes more difficult and improve security than by dividing execution authority on one computer.
<実施形態6>
実施形態6は、実施形態5の変形例である。実施形態5に係る機械学習システム3は、暗号処理装置600と平文処理装置700のいずれにおいても、システム管理装置800の学習モデル格納部822に記憶された学習モデルを取得し、それぞれ畳み込みニューラルネットワークのための計算を行った。実施形態6に係る機械学習システム3は、暗号処理装置600は、学習モデルのうち入力層から第N層までに関する情報(「第1のモデル情報」)を取得して演算を行い、平文処理装置700は、学習モデルのうち第(N+1)層から出力層までに関する情報(「第2のモデル情報」)を取得して演算を行う。また、第1のモデル情報および第2のモデル情報は、システム管理装置800からではなく、信頼できるサーバ等から別々に取得するようにしてもよい。
<Embodiment 6>
Embodiment 6 is a modification of Embodiment 5. The machine learning system 3 according to the fifth embodiment acquires the learning model stored in the learning model storage unit 822 of the system management device 800 in both the cryptographic processing device 600 and the plaintext processing device 700, and applies the learning model to the convolutional neural network. I did some calculations for this. In the machine learning system 3 according to the sixth embodiment, the cryptographic processing device 600 acquires information regarding the input layer to the Nth layer of the learning model (“first model information”) and performs calculations, and the plaintext processing device 700 acquires information (“second model information”) from the (N+1)th layer to the output layer of the learning model and performs calculations. Further, the first model information and the second model information may be obtained separately from a reliable server or the like instead of from the system management device 800.
暗号処理装置600の暗号処理部6322は、第1のモデル情報を取得し、データ取得部631が取得した画像データ等と第1のモデル情報を用いて、入力層から第N層までの暗号実行領域における演算を行う。 The cryptographic processing unit 6322 of the cryptographic processing device 600 acquires the first model information and performs cryptographic execution from the input layer to the Nth layer using the image data etc. acquired by the data acquisition unit 631 and the first model information. Perform calculations in the area.
平文処理装置700の平文処理部7323は、第2のモデル情報を取得し、暗号処理部6322が行った演算の結果と、第2のモデル情報を用いて、第(N+1)層から出力層までの平文実行領域における演算を行い、推論またはモデル情報のパラメータの更新を行う。 The plaintext processing unit 7323 of the plaintext processing device 700 acquires the second model information, and uses the result of the calculation performed by the cryptographic processing unit 6322 and the second model information to process data from the (N+1)th layer to the output layer. Perform calculations in the plaintext execution area of , and update parameters of inference or model information.
また、実施形態6における機械学習システム3は、前述のように、暗号処理部6322と平文処理部7323の両方において、それぞれの演算に必要な学習モデルの情報を取得するのではなく、層指定情報として指定されるNについて、一般的に用いられる値がある程度決まっている場合には、予め暗号処理装置600と平文処理装置700に、第1のモデル情報と第2のモデル情報を記憶しておいてもよい。 In addition, as described above, the machine learning system 3 in the sixth embodiment does not acquire learning model information necessary for each operation in both the encryption processing unit 6322 and the plaintext processing unit 7323, but uses layer designation information. If the generally used value of N specified as ``N'' is determined to some extent, first model information and second model information may be stored in the cryptographic processing device 600 and the plaintext processing device 700 in advance. You can stay there.
すなわち、層指定情報として、例えば、N=5がよく用いられる場合には、暗号処理装置600の記憶部620に第1のモデル情報として、予め、入力層から第5層までのモデル情報を記憶し、平文処理装置700の記憶部720に第2のモデル情報として、第6層から出力層までのモデル情報を記憶してもよい。 That is, if N=5 is often used as the layer designation information, for example, model information from the input layer to the fifth layer is stored in advance in the storage unit 620 of the cryptographic processing device 600 as the first model information. However, model information from the sixth layer to the output layer may be stored in the storage unit 720 of the plaintext processing device 700 as the second model information.
(効果の説明)
実施形態6における機械学習システム3は、実施形態5のように、暗号処理部6322と平文処理部7323の物理的な実行環境を分けるだけでなく、各処理部は、学習モデルの全てのパラメータではなく、自己の演算に必要な学習モデルのパラメータのみを取得することで、悪意のある第三者がハッキングした際に、当該第三者が取得する情報をできる限り少なくすることにより、元の画像等を復元することを困難にし、セキュリティを高めることができる。
(Explanation of effects)
The machine learning system 3 in the sixth embodiment not only separates the physical execution environments of the cryptographic processing unit 6322 and the plaintext processing unit 7323 as in the fifth embodiment, but also separates the physical execution environments of the cryptographic processing unit 6322 and the plaintext processing unit 7323. By acquiring only the parameters of the learning model necessary for its own calculations, in the event of hacking by a malicious third party, the information acquired by the third party is minimized and the original image can be restored. etc. can be made difficult to restore, increasing security.
<実施形態7>
実施形態7は、実施形態5の変形例である。実施形態7に係る機械学習システム4は、少なくとも2以上の暗号処理装置と、少なくとも2以上の平文処理装置とを備える。また、暗号処理装置と平文処理装置とは、少なくとも一組のペアリングがされており、ペアリングされた暗号処理装置と平文処理装置とを用いて畳み込みニューラルネットワークの入力層から出力層までの計算処理を実行する。
<Embodiment 7>
Embodiment 7 is a modification of Embodiment 5. The machine learning system 4 according to the seventh embodiment includes at least two or more cryptographic processing devices and at least two or more plaintext processing devices. Furthermore, the cryptographic processing device and the plaintext processing device are paired in at least one pair, and the paired cryptographic processing device and plaintext processing device are used to perform calculations from the input layer to the output layer of the convolutional neural network. Execute processing.
また、実施形態7に係る機械学習システムは、ペアリングされていない暗号処理装置と平文処理装置は、畳み込みニューラルネットワークの入力層から出力層までの計算処理とは異なる処理に関する通信を行う。 Further, in the machine learning system according to the seventh embodiment, the unpaired cryptographic processing device and plaintext processing device communicate regarding processing different from the calculation processing from the input layer to the output layer of the convolutional neural network.
実施形態7に係る機械学習システムは、ペアリングされている暗号処理装置と平文処理装置の間で通信するだけでなく、ペアリングされていない暗号処理装置と平文処理装置の間でも通信を行うことにより、悪意のある第三者が、畳み込みニューラルネットワークの入力層から出力層までの一つの計算処理がどの装置により行われているか判別することを困難にさせる。すなわち、ペアリングされた暗号処理装置と平文処理装置との間でのみ通信を行えば、悪意のある第三者は、通信が行われていることを感知すれば、一つの計算処理においてどの装置がペアリングされているか容易に判別可能である。一方で、ペアリングされていない暗号処理装置と平文処理装置との間でも入力層から出力層までの計算処理とは異なる処理に関する通信(ダミーの通信でもよい)を行うことで、ペアリングされている端末を判別することを困難にさせる。 The machine learning system according to Embodiment 7 not only communicates between a cryptographic processing device and a plaintext processing device that are paired, but also communicates between a cryptographic processing device and a plaintext processing device that are not paired. This makes it difficult for a malicious third party to determine which device is performing one calculation process from the input layer to the output layer of the convolutional neural network. In other words, if communication is performed only between the paired cryptographic processing device and plaintext processing device, a malicious third party can detect which device is involved in a single calculation process by sensing that communication is occurring. It can be easily determined whether the two are paired. On the other hand, even if an unpaired cryptographic processing device and a plaintext processing device communicate with each other regarding processing different from the calculation processing from the input layer to the output layer (dummy communication may also be used), pairing can be achieved. make it difficult to determine which terminal is on the computer.
(具体例)
図26は、機械学習システム4の具体的構成を示す図である。機械学習システム4は、2以上の暗号処理装置600-1~600-P(Pは2以上の整数。以下、特に、区別する場合を除き、「暗号処理装置600」と記載する。)と、2以上の平文処理装置700-1~700-Q(Qは2以上の整数。以下、特に区別する場合を除き、「平文処理装置700」と記載する。)を含み、これらはネットワークを介して接続されている。例えば、暗号処理装置600-1と平文処理装置700-1、暗号処理装置600-2と平文処理装置700-2、暗号処理装置600-Pと平文処理装置700-Qがペアリングされているとき、これらは、一つの畳み込みニューラルネットワークの入力層から出力層までの計算処理を実行する。一方で、ペアリングされていない暗号処理装置600と平文処理装置700は、畳み込みニューラルネットワークの入力層から出力層までの計算処理とは無関係の通信、すなわちダミーの通信を行う。これにより、悪意のある第三者がどの装置間でペアリングされているか感知することを防止し、ハッキングなどをさせにくくするシステムとすることが可能となる。
(Concrete example)
FIG. 26 is a diagram showing a specific configuration of the machine learning system 4. The machine learning system 4 includes two or more cryptographic processing devices 600-1 to 600-P (P is an integer of 2 or more. Hereinafter, unless otherwise specified, it will be referred to as "cryptographic processing device 600"), It includes two or more plaintext processing devices 700-1 to 700-Q (Q is an integer of 2 or more. Hereinafter, unless otherwise specified, it will be referred to as "plaintext processing device 700"), which are connected via a network. It is connected. For example, when cryptographic processing device 600-1 and plaintext processing device 700-1, cryptographic processing device 600-2 and plaintext processing device 700-2, and cryptographic processing device 600-P and plaintext processing device 700-Q are paired. , these perform calculation processing from the input layer to the output layer of one convolutional neural network. On the other hand, the unpaired cryptographic processing device 600 and plaintext processing device 700 perform communication unrelated to calculation processing from the input layer to the output layer of the convolutional neural network, that is, dummy communication. This prevents a malicious third party from detecting which devices are paired, making it possible to create a system that makes hacking difficult.
また、望ましくは、ペアリングされた装置間とペアリングされていない装置間において、同程度の通信が行われるとよい。これにより悪意のある第三者がペアリングされている装置の組合せを感知することをより難しくすることが可能となる。なお、ペアリングは、図示しない管理装置等により管理され、一定期間ごとに変更してもよい。ペアリングがランダムに変更されることにより、ハッキングの可能性をさらに低減させることができる。 Furthermore, it is preferable that the same level of communication be performed between paired devices and unpaired devices. This can make it more difficult for a malicious third party to detect the combination of paired devices. Note that the pairing is managed by a management device (not shown) or the like, and may be changed at regular intervals. By changing the pairing randomly, the possibility of hacking can be further reduced.
(効果の説明)
実施形態7に係る機械学習システム4は、複数の暗号処理装置600と複数の平文処理装置700を備え、一つの畳み込みニューラルネットワークの入力層から出力層までの計算処理を実行するためにペアリングされた暗号処理装置600と平文処理装置700の組合せと、ペアリングされていない組合せを含む。これにより、悪意のある第三者が、どの装置がペアリングされているか感知することを困難にし、元の画像等の入手や復元を困難にし、セキュリティを高めることが可能となる。
(Explanation of effects)
The machine learning system 4 according to the seventh embodiment includes a plurality of cryptographic processing devices 600 and a plurality of plaintext processing devices 700, which are paired to execute calculation processing from the input layer to the output layer of one convolutional neural network. This includes a combination of a cryptographic processing device 600 and a plaintext processing device 700, and a combination that is not paired. This makes it difficult for a malicious third party to detect which device is paired, making it difficult to obtain or restore the original image, etc., thereby increasing security.
以上で実施形態の説明を終了するが、上記実施形態は一例に過ぎない。そのため、機械学習装置100,300,400,500、暗号処理装置600、平文処理装置700、システム管理装置800の具体的な構成、処理内容等は上記実施形態で説明したものに限られない。 This concludes the description of the embodiment, but the above embodiment is merely an example. Therefore, the specific configurations, processing contents, etc. of the machine learning devices 100, 300, 400, 500, cryptographic processing device 600, plaintext processing device 700, and system management device 800 are not limited to those described in the above embodiments.
また、本開示に係る機械学習装置は、上記装置によらず、例えば、コンピュータがプログラムを実行することで、その機能を実現してもよい。情報提供システムの機能を実現するためのプログラムは、USB(Universal Serial Bus)メモリ、CD-ROM(Compact Disc-Read Only Memory)、DVD(Digital Versatile Disc)、HDD(Hard Disc Drive)、SSD(Solid State Drive)等のコンピュータ読み取り可能な記録媒体に記憶されてもよいし、ネットワークを介してコンピュータにダウンロードされてもよい。 Further, the machine learning device according to the present disclosure may realize its functions by, for example, executing a program on a computer, without relying on the above device. Programs to realize the functions of the information provision system include USB (Universal Serial Bus) memory, CD-ROM (Compact Disc-Read Only Memory), DVD (Digital Versatile Disc), HDD (Hard Disc Drive), and SSD (Solid Disc Drive). The information may be stored in a computer-readable recording medium such as a state drive, or may be downloaded to a computer via a network.
以上、本開示の好ましい実施形態について説明したが、上記実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものとする。 Although the preferred embodiments of the present disclosure have been described above, the embodiments described above can be implemented in various other forms, and various omissions, substitutions, and changes can be made without departing from the gist of the invention. be able to. These embodiments and their modifications are included within the scope and gist of the invention as well as within the scope of the invention described in the claims and its equivalents.
1,2,3,4 機械学習システム、11 プロセッサ、12 メモリ、13 ストレージ、14 通信IF、15 入出力IF、100,300,400,500 機械学習装置、110,610,710,810 通信部、120,420,620,720,820 記憶部、121,821 鍵格納部、122,522,822 学習モデル格納部、431,532 共有メモリ、130,430,530,630,730,830 制御部、131,531,631 データ取得部、132,332,432,533,632,732 機械学習計算部、200 端末装置、600 暗号処理装置、700 平文処理装置、800 システム管理装置、401,402,403 画面、410 画像、412 アイコン、413 ボタン、1321,831 受付部、1322,4322,5322,6322 暗号処理部、1323,4323,5323,7323 平文処理部、3324 提供部、3325 推定部。
1, 2, 3, 4 machine learning system, 11 processor, 12 memory, 13 storage, 14 communication IF, 15 input/output IF, 100, 300, 400, 500 machine learning device, 110, 610, 710, 810 communication department, 120,420,620,720,820 Storage unit, 121,821 Key storage unit, 122,522,822 Learning model storage unit, 431,532 Shared memory, 130,430,530,630,730,830 Control unit, 131 , 531, 631 data acquisition unit, 132, 332, 432, 533, 632, 732 machine learning calculation unit, 200 terminal device, 600 cryptographic processing device, 700 plaintext processing device, 800 system management device, 401, 402, 403 screen, 410 image, 412 icon, 413 button, 1321, 831 reception unit, 1322, 4322, 5322, 6322 encryption processing unit, 1323, 4323, 5323, 7323 plaintext processing unit, 3324 provision unit, 3325 estimation unit.
Claims (11)
前記画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行う機械学習計算部と、を備え、
前記畳み込みニューラルネットワークは複数の層から構成され、
前記機械学習計算部は、
準同型暗号による暗号実行領域において演算する暗号処理部と、
平文実行領域において演算する平文処理部と、
前記暗号処理部および前記平文処理部がアクセス可能な共有メモリと、
前記畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付ける受付部と、を有し、
前記暗号処理部は、前記入力層から前記第N層までの演算を実行し、
前記平文処理部は、第(N+1)層から前記出力層までの演算を実行し、
前記共有メモリは、前記暗号処理部および前記平文処理部が実行した演算の結果を記憶する機械学習装置。 a data acquisition unit that acquires image data;
A machine learning calculation unit that performs calculation processing using a convolutional neural network based on the image data,
The convolutional neural network is composed of multiple layers,
The machine learning calculation unit is
a cryptographic processing unit that operates in a cryptographic execution area using homomorphic cryptography;
a plaintext processing unit that operates in the plaintext execution area;
a shared memory accessible by the encryption processing unit and the plaintext processing unit;
a reception unit that receives layer designation information that designates an N-th layer that is an intermediate layer from the input layer to the output layer of the convolutional neural network;
The cryptographic processing unit executes operations from the input layer to the Nth layer,
The plaintext processing unit executes operations from the (N+1)th layer to the output layer,
The shared memory is a machine learning device that stores results of calculations executed by the encryption processing unit and the plaintext processing unit.
前記平文処理部は、前記共有メモリから、前記暗号処理部が実行した前記第N層までの演算の結果を取得し、前記取得した演算の結果に基づいて、前記第(N+1)層から前記出力層までの演算を実行する、請求項1に記載の機械学習装置。 The cryptographic processing unit stores the results of operations from the input layer to the Nth layer in the shared memory,
The plaintext processing unit acquires the results of the calculations up to the Nth layer executed by the cryptographic processing unit from the shared memory, and processes the output from the (N+1)th layer based on the results of the acquired calculations. The machine learning device according to claim 1, which performs calculations up to layers.
前記平文処理部は、第(N+1)層から前記出力層までに関する第2のモデル情報を用いて、前記第(N+1)層から前記出力層までの演算を実行する、請求項1または請求項2に記載の機械学習装置。 The cryptographic processing unit executes the calculation from the input layer to the Nth layer using first model information from the input layer to the Nth layer,
3. The plaintext processing unit executes operations from the (N+1)th layer to the output layer using second model information regarding the (N+1)th layer to the output layer. Machine learning device described in.
前記画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行う機械学習計算部と、を備え、
前記畳み込みニューラルネットワークは複数の層から構成され、
前記機械学習計算部は、
準同型暗号による暗号実行領域において演算する暗号処理部と、
平文実行領域において演算する平文処理部と、
前記畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付ける受付部と、を有し、
前記暗号処理部は、前記入力層から前記第N層までの演算を実行し、
前記平文処理部は、第(N+1)層から前記出力層までの演算を実行し、
前記暗号処理部と、前記平文処理部とは、物理的に異なる実行環境において演算を実行する機械学習システム。 a data acquisition unit that acquires image data;
A machine learning calculation unit that performs calculation processing using a convolutional neural network based on the image data,
The convolutional neural network is composed of multiple layers,
The machine learning calculation unit is
a cryptographic processing unit that operates in a cryptographic execution area using homomorphic cryptography;
a plaintext processing unit that operates in the plaintext execution area;
a reception unit that receives layer designation information that designates an N-th layer that is an intermediate layer from the input layer to the output layer of the convolutional neural network;
The cryptographic processing unit executes operations from the input layer to the Nth layer,
The plaintext processing unit executes operations from the (N+1)th layer to the output layer,
A machine learning system in which the cryptographic processing unit and the plaintext processing unit execute calculations in physically different execution environments.
前記平文処理部を含む平文処理装置と、をさらに備え、
前記暗号処理装置と、前記平文処理装置とは、ネットワークを介してデータを送受信する、請求項4に記載の機械学習システム。 a cryptographic processing device including the data acquisition section and the cryptographic processing section;
further comprising a plaintext processing device including the plaintext processing unit,
The machine learning system according to claim 4, wherein the cryptographic processing device and the plaintext processing device transmit and receive data via a network.
前記平文処理装置は、前記第(N+1)層から前記出力層までに関する第2のモデル情報を取得し、
前記暗号処理部は、前記第1のモデル情報を用いて、前記入力層から前記第N層までの前記演算を実行し、
前記平文処理部は、前記第2のモデル情報を用いて、前記第(N+1)層から前記出力層までの演算を実行する、請求項5に記載の機械学習システム。 The cryptographic processing device obtains first model information from the input layer to the Nth layer,
The plaintext processing device obtains second model information from the (N+1)th layer to the output layer,
The cryptographic processing unit executes the calculations from the input layer to the Nth layer using the first model information,
The machine learning system according to claim 5, wherein the plaintext processing unit uses the second model information to execute calculations from the (N+1)th layer to the output layer.
前記暗号処理装置と前記平文処理装置とは、少なくとも一組のペアリングをされており、
前記機械学習計算部は、前記ペアリングされた前記暗号処理装置と前記平文処理装置とを用いて前記計算処理を実行する、
請求項5または請求項6に記載の機械学習システム。 comprising at least two or more of the cryptographic processing devices and at least two or more of the plaintext processing devices,
The cryptographic processing device and the plaintext processing device are paired in at least one pair,
The machine learning calculation unit executes the calculation process using the paired cryptographic processing device and the plaintext processing device.
The machine learning system according to claim 5 or claim 6.
前記画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行う機械学習計算部と、を備え、
前記畳み込みニューラルネットワークは複数の層から構成され、
前記機械学習計算部は、
準同型暗号による暗号実行領域において演算する暗号処理部と、
平文実行領域において演算する平文処理部と、
前記暗号処理部および前記平文処理部がアクセス可能な共有メモリと、
前記畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付ける受付部と、を有し、
前記暗号処理部は、前記入力層から前記第N層までの演算を実行し、
前記平文処理部は、第(N+1)層から前記出力層までの演算を実行し、
前記共有メモリは、前記暗号処理部および前記平文処理部が実行した演算の結果を記憶する機械学習システム。 a data acquisition unit that acquires image data;
A machine learning calculation unit that performs calculation processing using a convolutional neural network based on the image data,
The convolutional neural network is composed of multiple layers,
The machine learning calculation unit is
a cryptographic processing unit that operates in a cryptographic execution area using homomorphic cryptography;
a plaintext processing unit that operates in the plaintext execution area;
a shared memory accessible by the encryption processing unit and the plaintext processing unit;
a reception unit that receives layer designation information that designates an N-th layer that is an intermediate layer from the input layer to the output layer of the convolutional neural network;
The cryptographic processing unit executes operations from the input layer to the Nth layer,
The plaintext processing unit executes operations from the (N+1)th layer to the output layer,
In the machine learning system, the shared memory stores results of calculations executed by the encryption processing unit and the plaintext processing unit.
前記画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行うステップと、を備え、
前記畳み込みニューラルネットワークは複数の層から構成され、
前記畳み込みニューラルネットワークを用いた計算処理を行うステップは、
前記畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付けるステップと、
準同型暗号による暗号実行領域において、前記入力層から前記第N層までの演算を実行するステップと、
平文実行領域において、第(N+1)層から前記出力層までの演算を実行するステップと、
前記暗号実行領域および前記平文実行領域からアクセス可能な共有メモリが、前記暗号実行領域および前記平文実行領域における演算の結果を記憶するステップと、を有する機械学習方法。 obtaining image data;
A step of performing calculation processing using a convolutional neural network based on the image data,
The convolutional neural network is composed of multiple layers,
The step of performing calculation processing using the convolutional neural network,
a step of receiving layer designation information that designates an Nth layer that is an intermediate layer from the input layer to the output layer of the convolutional neural network;
performing operations from the input layer to the N-th layer in a cryptographic execution area using homomorphic encryption;
performing operations from the (N+1)th layer to the output layer in a plaintext execution area;
A machine learning method comprising: a shared memory accessible from the cryptographic execution area and the plaintext execution area storing results of operations in the cryptographic execution area and the plaintext execution area.
前記制御部が、画像データを取得するステップと、
前記記憶部が、前記画像データを記憶するステップと、
前記制御部が、前記記憶部が記憶した前記画像データに基づいて、畳み込みニューラルネットワークを用いた計算処理を行うステップと、を備え、
前記畳み込みニューラルネットワークは複数の層から構成され、
前記畳み込みニューラルネットワークを用いた計算処理を行うステップは、
前記制御部が、前記畳み込みニューラルネットワークの入力層から出力層に向けての途中の層である第N層を指定する層指定情報を受け付けるステップと、
前記制御部が、準同型暗号による暗号実行領域において、前記入力層から前記第N層までの演算を実行するステップと、
前記制御部が、平文実行領域において、第(N+1)層から前記出力層までの演算を実行するステップと、を有し、
前記記憶部は、前記暗号実行領域および前記平文実行領域からアクセス可能な共有メモリを含み、
前記共有メモリが、前記暗号実行領域および前記平文実行領域における演算の結果を記憶するステップ、をさらに有する機械学習プログラム。 A machine learning program that is executed by a computer including a control unit and a storage unit,
the control unit acquiring image data;
the storage unit storing the image data;
The control unit performs calculation processing using a convolutional neural network based on the image data stored in the storage unit,
The convolutional neural network is composed of multiple layers,
The step of performing calculation processing using the convolutional neural network,
a step in which the control unit receives layer designation information that designates an N-th layer that is an intermediate layer from the input layer to the output layer of the convolutional neural network;
a step in which the control unit executes operations from the input layer to the N-th layer in a cryptographic execution area using homomorphic encryption;
The control unit has a step of executing an operation from the (N+1)th layer to the output layer in a plaintext execution area,
The storage unit includes a shared memory that is accessible from the cryptographic execution area and the plaintext execution area,
The machine learning program further comprises a step in which the shared memory stores results of calculations in the cryptographic execution area and the plaintext execution area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022112943A JP2023166317A (en) | 2022-05-09 | 2022-07-14 | Machine learning apparatus, machine learning system, machine learning method, and machine learning program |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022076897A JP7112151B1 (en) | 2022-05-09 | 2022-05-09 | Machine learning device, machine learning system, machine learning method, and machine learning program |
| JP2022112943A JP2023166317A (en) | 2022-05-09 | 2022-07-14 | Machine learning apparatus, machine learning system, machine learning method, and machine learning program |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022076897A Division JP7112151B1 (en) | 2022-05-09 | 2022-05-09 | Machine learning device, machine learning system, machine learning method, and machine learning program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2023166317A true JP2023166317A (en) | 2023-11-21 |
Family
ID=82701533
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022076897A Active JP7112151B1 (en) | 2022-05-09 | 2022-05-09 | Machine learning device, machine learning system, machine learning method, and machine learning program |
| JP2022112943A Pending JP2023166317A (en) | 2022-05-09 | 2022-07-14 | Machine learning apparatus, machine learning system, machine learning method, and machine learning program |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022076897A Active JP7112151B1 (en) | 2022-05-09 | 2022-05-09 | Machine learning device, machine learning system, machine learning method, and machine learning program |
Country Status (1)
| Country | Link |
|---|---|
| JP (2) | JP7112151B1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115841613B (en) * | 2022-12-28 | 2025-08-01 | 中国科学院大学 | Optical encryption image recognition method, system, electronic equipment and storage medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180129900A1 (en) | 2016-11-04 | 2018-05-10 | Siemens Healthcare Gmbh | Anonymous and Secure Classification Using a Deep Learning Network |
| JP7096610B2 (en) * | 2021-01-15 | 2022-07-06 | 株式会社アクセル | Processing equipment, inference equipment, learning equipment, processing system, processing method, and processing program |
-
2022
- 2022-05-09 JP JP2022076897A patent/JP7112151B1/en active Active
- 2022-07-14 JP JP2022112943A patent/JP2023166317A/en active Pending
Also Published As
| Publication number | Publication date |
|---|---|
| JP7112151B1 (en) | 2022-08-03 |
| JP2023166107A (en) | 2023-11-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108463827B (en) | System and method for detecting leakage of sensitive information while protecting privacy | |
| US10885158B2 (en) | Device, system and method for token based outsourcing of computer programs | |
| EP3985540B1 (en) | Method and apparatus for generating synthetic data | |
| US20200218826A1 (en) | Data searching system, data searching method and computer readable medium | |
| EP3843319B1 (en) | Apparatus and method for set intersection operation | |
| JP7076167B1 (en) | Machine learning equipment, machine learning systems, machine learning methods, and machine learning programs | |
| US11936792B2 (en) | Method and system for providing privacy-preserving data analysis | |
| CN117874144A (en) | Medical data sharing method, device, equipment and storage medium based on blockchain | |
| CN112948883B (en) | Methods, devices and systems for multi-party joint modeling to protect private data | |
| WO2018008547A1 (en) | Secret computation system, secret computation device, secret computation method, and program | |
| JP7112151B1 (en) | Machine learning device, machine learning system, machine learning method, and machine learning program | |
| JP2017126867A (en) | Data management system, data management program, communication terminal and data management server | |
| KR20170022455A (en) | Analytics center and control method thereof, and service providing device and control method thereof in co-operational privacy protection communication environment | |
| US12182309B2 (en) | Method and system for unifying de-identified data from multiple sources | |
| US20230394303A1 (en) | Machine learning system, client terminal, aggregated server device and method | |
| CN116579020A (en) | Campus risk prediction method, device, equipment and medium based on privacy protection | |
| CN116702211A (en) | Medical information management system and method | |
| EP4252385A1 (en) | Concept for sharing data | |
| CN115834791B (en) | Image encryption and decryption transmission method using matrix key and electronic equipment | |
| US20250298910A1 (en) | Protection of ai models | |
| US12417295B2 (en) | System and method for securely evaluating risk over encrypted data | |
| KR101676418B1 (en) | Method and apparatus for processing information | |
| CN111222138A (en) | Algorithm checking method, algorithm right confirming method and device | |
| Bhangre | Crypto Security Layer for Healthcare Applications and Data Storage in a Multi-Cloud Environment | |
| EP4391516A1 (en) | Image obfuscation |