JP7472998B2 - Parameter estimation device, secret parameter estimation system, secure computing device, methods thereof, and programs - Google Patents
Parameter estimation device, secret parameter estimation system, secure computing device, methods thereof, and programs Download PDFInfo
- Publication number
- JP7472998B2 JP7472998B2 JP2022555022A JP2022555022A JP7472998B2 JP 7472998 B2 JP7472998 B2 JP 7472998B2 JP 2022555022 A JP2022555022 A JP 2022555022A JP 2022555022 A JP2022555022 A JP 2022555022A JP 7472998 B2 JP7472998 B2 JP 7472998B2
- Authority
- JP
- Japan
- Prior art keywords
- shares
- storage unit
- parameter
- update unit
- parameter storage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 34
- 230000006870 function Effects 0.000 claims description 24
- 238000012417 linear regression Methods 0.000 claims description 23
- 238000012545 processing Methods 0.000 description 24
- 238000004364 calculation method Methods 0.000 description 7
- 238000013500 data storage Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012549 training Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000001052 transient effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Complex Calculations (AREA)
Description
この発明は、線形回帰モデルのパラメータを推定する技術に関する。 This invention relates to a technique for estimating parameters of a linear regression model.
線形回帰分析の手法として、例えば、lasso回帰やElasticNet等が知られている。非特許文献1に開示されたscikit-learnは、lasso回帰やElasticNetを平文で実行する機械学習ライブラリである。Known linear regression analysis techniques include, for example, lasso regression and ElasticNet. Scikit-learn, disclosed in Non-Patent
lasso回帰やElasticNetは、y=w0+w1x1+w2x2+…+wdxdで定義される線形回帰モデルのパラメータW=(w0, w1, …, wd)を推定する手法である。lasso回帰とElasticNetは、特に、L1ノルムを用いた正則化項(以下、「L1正則化項」と呼ぶ)を持つことを特徴とする。lasso回帰やElasticNetは、具体的には、まず式(1)を計算することでパラメータw0を更新し、続いて1以上n以下の各整数kについて式(2)を計算することでパラメータw1, …, wdを更新する。 Lasso regression and ElasticNet are methods for estimating parameters W=(w0, w1, ..., wd) of a linear regression model defined as y=w0+w1x1 + w2x2 + ... + wdxd . Lasso regression and ElasticNet are characterized by having a regularization term using the L1 norm (hereinafter referred to as the "L1 regularization term"). Specifically, lasso regression and ElasticNet first update parameter w0 by calculating formula (1), and then update parameters w1 , ..., wd by calculating formula (2) for each integer k between 1 and n.
ここで、yi, xi,j(ただし、i=1, …, n、j=1, …, d、nは学習データの数)は学習データであり、λ, αはハイパーパラメータである。また、式(2)の右辺にある二つの引数を取る関数Sは、式(3)で定義されるソフト閾値関数(Soft-thresholding関数)である。ソフト閾値関数は、lasso回帰やElasticNetのように、閾値を用いてスパースモデリングを行うアルゴリズム等で用いられる。 Here, y i , x i,j (where i=1, ..., n, j=1, ..., d, and n is the number of training data) are training data, and λ and α are hyperparameters. The function S on the right side of equation (2) that takes two arguments is the soft-thresholding function defined in equation (3). Soft-thresholding functions are used in algorithms that perform sparse modeling using a threshold, such as lasso regression and ElasticNet.
従来のlasso回帰やElasticNetでは、パラメータ更新1回につきd+1回の行列計算を行う必要があり、パラメータ数に比例して計算量が増加する。また、lasso回帰やElasticNetを秘密計算する手法は知られていない。特に、従来のアルゴリズムを単純に秘密計算に置き換えるだけでは、計算量が膨大になるため現実的ではない。 Conventional lasso regression and ElasticNet require d+1 matrix calculations for each parameter update, and the amount of calculation increases in proportion to the number of parameters. In addition, there are no known methods for performing secure computation on lasso regression or ElasticNet. In particular, simply replacing conventional algorithms with secure computation is not realistic because the amount of computation required would be enormous.
この発明の目的は、上記のような技術的課題に鑑みて、lasso回帰やElasticNet等のL1正則化項を持つ線形回帰モデルのパラメータを効率的に推定する技術を提供することである。 In view of the technical challenges described above, the object of this invention is to provide a technology for efficiently estimating parameters of linear regression models with L1 regularization terms, such as lasso regression and ElasticNet.
上記の課題を解決するために、この発明の第一の態様のパラメータ推定装置は、L1正則化項を持つ線形回帰モデルのパラメータw0, w1, …, wdを推定するパラメータ推定装置であって、nは学習データの数であり、iは1以上n以下の各整数であり、jは1以上d以下の各整数であり、kは2以上d以下の各整数であり、λ, αはハイパーパラメータであり、yi, xi,jは学習データであり、Sはソフト閾値関数であり、次式を計算することで、パラメータw0を更新する第一更新部と、
次式を計算することで、パラメータw1を更新する第二更新部と、
次式を計算することで、パラメータw2, …, wdを更新する第三更新部と、
を含む。
In order to solve the above problems, a parameter estimation device according to a first aspect of the present invention is a parameter estimation device that estimates parameters w0 , w1 , ..., wd of a linear regression model having an L1 regularization term, where n is the number of training data, i is an integer between 1 and n, j is an integer between 1 and d, k is an integer between 2 and d, λ and α are hyperparameters, yi , xi,j are training data, and S is a soft threshold function, and includes a first updating unit that updates the parameter w0 by calculating the following equation:
a second update unit that updates the parameter w1 by calculating
a third update unit for updating the parameters w2 , ..., wd by calculating
including.
この発明の第二の態様の秘密パラメータ推定システムは、L1正則化項を持つ線形回帰モデルのパラメータw0, w1, …, wdを秘密計算により推定する、複数の秘密計算装置を含む秘密パラメータ推定システムであって、nは学習データの数であり、iは1以上n以下の各整数であり、jは1以上d以下の各整数であり、kは2以上d以下の各整数であり、λ, αはハイパーパラメータであり、[yi], [xi,j]は学習データyi, xi,jのシェアであり、Sはソフト閾値関数であり、秘密計算装置は、次式を計算することで、パラメータw0のシェア[w0]を更新する第一更新部と、
次式を計算することで、パラメータw1のシェア[w1]を更新する第二更新部と、
次式を計算することで、パラメータw2, …, wdのシェア[w2], …, [wd]を更新する第三更新部と、
を含む。
A secret parameter estimation system according to a second aspect of the present invention is a secret parameter estimation system including a plurality of secure computing devices that estimates parameters w 0 , w 1 , ..., w d of a linear regression model having an L1 regularization term by secure computation, where n is the number of training data, i is an integer between 1 and n, j is an integer between 1 and d, and k is an integer between 2 and d, λ and α are hyperparameters, [y i ], [x i,j ] are shares of the training data y i and x i,j , and S is a soft threshold function. The secure computing devices include a first update unit that updates the share [w 0 ] of the parameter w 0 by calculating the following formula:
a second update unit that updates the share [w 1 ] of the parameter w 1 by calculating
a third update unit for updating the shares [ w2 ], …, [ wd ] of the parameters w2 , …, wd by calculating
including.
この発明によれば、lasso回帰やElasticNet等のL1正則化項を持つ線形回帰モデルのパラメータを効率的に推定することができる。 According to this invention, it is possible to efficiently estimate parameters of linear regression models with L1 regularization terms, such as lasso regression and ElasticNet.
以下、この発明の実施の形態について詳細に説明する。なお、図面中において同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。Hereinafter, an embodiment of the present invention will be described in detail. Note that components having the same functions in the drawings are given the same numbers, and duplicate explanations will be omitted.
[第1実施形態]
本発明の第1実施形態は、y=w0+w1x1+w2x2+…+wdxdで定義される線形回帰モデルのパラメータW=(w0, w1, …, wd)を平文で推定するパラメータ推定装置および方法である。本実施形態では、線形回帰モデルとして、lasso回帰やElasticNet等のL1正則化項を持つ線形回帰モデルを想定する。ただし、L1正則化項を持つ線形回帰モデルであれば、lasso回帰やElasticNet以外のモデルであっても適用することができる。
[First embodiment]
The first embodiment of the present invention is a parameter estimation device and method for estimating parameters W=(w0, w1, ..., wd) of a linear regression model defined by y=w0+w1x1 + w2x2 + ... + wdxd in plain text . In this embodiment, a linear regression model having an L1 regularization term such as lasso regression or ElasticNet is assumed as the linear regression model. However, models other than lasso regression or ElasticNet can also be applied as long as they are linear regression models having an L1 regularization term.
図1に示すように、本実施形態のパラメータ推定装置10は、例えば、第一更新部11、第二更新部12、第三更新部13、パラメータ記憶部14、および学習データ記憶部15を備える。このパラメータ推定装置10が、図2に示す各ステップを実行することにより、第1実施形態のパラメータ推定方法が実現される。1, the
パラメータ推定装置10は、例えば、中央演算処理装置(CPU: Central Processing Unit)、主記憶装置(RAM: Random Access Memory)などを有する公知又は専用のコンピュータに特別なプログラムが読み込まれて構成された特別な装置である。パラメータ推定装置10は、例えば、中央演算処理装置の制御のもとで各処理を実行する。パラメータ推定装置10に入力されたデータや各処理で得られたデータは、例えば、主記憶装置に格納され、主記憶装置に格納されたデータは必要に応じて中央演算処理装置へ読み出されて他の処理に利用される。パラメータ推定装置10の各処理部は、少なくとも一部が集積回路等のハードウェアによって構成されていてもよい。パラメータ推定装置10が備える各記憶部は、例えば、RAM(Random Access Memory)などの主記憶装置、ハードディスクや光ディスクもしくはフラッシュメモリ(Flash Memory)のような半導体メモリ素子により構成される補助記憶装置、またはリレーショナルデータベースやキーバリューストアなどのミドルウェアにより構成することができる。The
以下、図2を参照して、第1実施形態のパラメータ推定装置10が実行するパラメータ推定方法について説明する。
Below, with reference to Figure 2, we will explain the parameter estimation method performed by the
パラメータ記憶部14には、推定対象とする線形回帰モデルのパラメータW=(w0, w1, …, wd)と、ハイパーパラメータλ, αが記憶されている。パラメータの数を定義する値dは、推定対象とするモデルの定義により定まる。ハイパーパラメータλ, αは事前に調整して記憶しておく。 The parameter storage unit 14 stores parameters W=( w0 , w1 , ..., wd ) of the linear regression model to be estimated, and hyperparameters λ and α. The value d that defines the number of parameters is determined by the definition of the model to be estimated. The hyperparameters λ and α are adjusted and stored in advance.
学習データ記憶部15には、n件の学習データyi, xi,j(ただし、i=1, …, n、j=1, …, d)が記憶されている。学習データは、パラメータ推定のために予め収集もしくは生成されたものである。学習データの種類は、推定対象とするモデルが目的とするタスクにより定まる。
The learning
ステップS11において、第一更新部11は、学習データ記憶部15に記憶されたn件の学習データyi, xi,jおよびパラメータ記憶部14に記憶された更新前のパラメータW=(w0, w1, …, wd)を読み出す。第一更新部11は、式(4)を計算することで、パラメータw0を更新する。第一更新部11は、更新済みのパラメータw0を第二更新部12へ送る。
In step S11, the first updating
ステップS12において、第二更新部12は、まず1以上n以下の各整数iについて式(5)を計算し、続いて式(6)(7)を計算することで、パラメータw1を更新する。第二更新部12は、更新済みのパラメータw1と式(5)の計算結果t1,iを第三更新部13へ送る。
In step S12, the
ステップS13において、第三更新部13は、2以上d以下の各整数kについて、式(8)(9)(10)を計算することで、パラメータw2, …, wdを更新する。なお、式(8)は1以上n以下の各整数iについて計算される。第三更新部13は、更新済みのパラメータw0, w1, w2, …, wdをパラメータ記憶部14に記憶する。
In step S13, the third updating
第一更新部11が計算するパラメータw0の更新式(4)は従来と同様であり、第二更新部12が計算するパラメータw1の更新式(5)~(7)は従来と実質的に同様である。一方、第三更新部13が計算するパラメータwk(ただし、k=2, …, d)の更新式(8)~(10)は、更新済みのパラメータwk-1およびパラメータwk-1を更新する際に計算した値tk-1,iを用いて、再帰的に計算するように、従来の更新式(2)を変形したものである。このように式変形を行うことにより、パラメータ更新1回につき、必要となる行列計算がd+1回から2回に減少する。したがって、本実施形態によれば、効率的にパラメータ更新を行うことができる。
The update equation (4) of the parameter w0 calculated by the
[第2実施形態]
本発明の第2実施形態は、y=w0+w1x1+w2x2+…+wdxdで定義される線形回帰モデルのパラメータW=(w0, w1, …, wd)を秘密計算により推定する秘密パラメータ推定システムおよび方法である。学習データおよびパラメータは秘密分散により秘匿されており、これらを秘匿したまま秘密計算によりパラメータの推定を行う。本実施形態においても、lasso回帰やElasticNet等のL1正則化項を持つ線形回帰モデルを想定するが、第1実施形態と同様に、lasso回帰やElasticNet以外のモデルであっても適用することができる。
[Second embodiment]
The second embodiment of the present invention is a secret parameter estimation system and method for estimating parameters W=(w0, w1, ..., wd) of a linear regression model defined by y=w0+w1x1 + w2x2 + ... + wdxd by secure computation . The learning data and parameters are kept secret by secret sharing, and the parameters are estimated by secure computation while keeping them secret. In this embodiment, a linear regression model having an L1 regularization term such as lasso regression or ElasticNet is also assumed, but similar to the first embodiment, models other than lasso regression or ElasticNet can also be applied.
本実施形態では、以下の記法を用いる。[・]は値・を秘匿したデータである。例えば、Shamir秘密分散、複製秘密分散等の分散値を用いることができる。[・]の中が数式である場合、その数式を秘密計算した結果が秘匿されていることを表す。また、本実施形態では、秘密分散により分散された値の1個の断片を「シェア」と呼び、すべてのシェアの集合全体を「分散値」と呼ぶ。In this embodiment, the following notation is used. [・] is data that keeps the value ・ secret. For example, shared values such as Shamir secret sharing and duplicated secret sharing can be used. If there is a formula inside [・], it indicates that the result of secretly calculating the formula is kept secret. Also, in this embodiment, one piece of a value shared by secret sharing is called a "share," and the entire set of all shares is called the "shared value."
第2実施形態の秘密パラメータ推定システム100は、学習データおよびパラメータを秘匿したまま秘密計算によりパラメータ推定を行う情報処理システムである。秘密パラメータ推定システム100は、図3に示すように、M(≧3)台の秘密計算装置11, …, 1Mを含む。本実施形態では、秘密計算装置11, …, 1Mはそれぞれ通信網9へ接続される。通信網9は、接続される各装置が相互に通信可能なように構成された回線交換方式もしくはパケット交換方式の通信網であり、例えばインターネットやLAN(Local Area Network)、WAN(Wide Area Network)等を用いることができる。なお、各装置は必ずしも通信網9を介してオンラインで通信可能である必要はない。例えば、秘密計算装置1m(m=1, …, M)へ入力する情報を磁気テープやUSBメモリ等の可搬型記録媒体に記憶し、その可搬型記録媒体から秘密計算装置1mへオフラインで入力するように構成してもよい。
The secret parameter estimation system 100 of the second embodiment is an information processing system that performs parameter estimation by secure computation while keeping learning data and parameters secret. As shown in FIG. 3, the secret parameter estimation system 100 includes M (≧3)
図4に示すように、本実施形態の秘密パラメータ推定システム100に含まれる秘密計算装置1m(m=1, …, M)は、例えば、第一更新部21、第二更新部22、第三更新部23、パラメータ記憶部24、および学習データ記憶部25を備える。この秘密計算装置1mが他の秘密計算装置1m'(ただし、m'=1, …, M、m≠m')と協調しながら図5に示す各ステップの処理を行うことにより第2実施形態の秘密パラメータ推定方法が実現される。
As shown in Fig. 4, a secure computing device 1 m (m=1, ..., M) included in the secret parameter estimation system 100 of this embodiment includes, for example, a
秘密計算装置1mは、例えば、中央演算処理装置(CPU: Central Processing Unit)、主記憶装置(RAM: Random Access Memory)等を有する公知又は専用のコンピュータに特別なプログラムが読み込まれて構成された特別な装置である。秘密計算装置1mは、例えば、中央演算処理装置の制御のもとで各処理を実行する。秘密計算装置1mに入力されたデータや各処理で得られたデータは、例えば、主記憶装置に格納され、主記憶装置に格納されたデータは必要に応じて中央演算処理装置へ読み出されて他の処理に利用される。秘密計算装置1mの各処理部は、少なくとも一部が集積回路等のハードウェアによって構成されていてもよい。秘密計算装置1mが備える各記憶部は、例えば、RAM(Random Access Memory)等の主記憶装置、ハードディスクや光ディスクもしくはフラッシュメモリ(Flash Memory)のような半導体メモリ素子により構成される補助記憶装置、またはリレーショナルデータベースやキーバリューストア等のミドルウェアにより構成することができる。
The
以下、図5を参照して、第2実施形態の秘密パラメータ推定システム100が実行する秘密パラメータ推定方法の処理手続きを説明する。 Below, with reference to Figure 5, the processing procedure of the secret parameter estimation method executed by the secret parameter estimation system 100 of the second embodiment is described.
パラメータ記憶部24には、推定対象とする線形回帰モデルのパラメータW=(w0, w1, …, wd)のシェア[W]=([w0], [w1], …, [wd])と、ハイパーパラメータλ, αが記憶されている。パラメータWは所定の秘密分散方式により予め秘匿されている。
The
学習データ記憶部25には、n件の学習データyi, xi,j(ただし、i=1, …, n、j=1, …, d)のシェア[yi], [xi,j]が記憶されている。学習データyi, xi,jは、パラメータWを秘匿する際に用いたものと同じ秘密分散方式により予め秘匿されている。
The learning
ステップS21において、秘密計算装置1mの第一更新部21は、学習データ記憶部25に記憶されたn件の学習データのシェア[yi], [xi,j]およびパラメータ記憶部24に記憶された更新前のパラメータのシェア[W]=([w0], [w1], …, [wd])を読み出す。第一更新部21は、他の秘密計算装置1m'と協調して、式(11)を秘密計算することで、パラメータw0のシェア[w0]を更新する。第一更新部21は、更新済みのパラメータw0のシェア[w0]を第二更新部22へ送る。
In step S21, the
ステップS22において、秘密計算装置1mの第二更新部22は、他の秘密計算装置1m'と協調して、まず1以上n以下の各整数iについて式(12)を秘密計算し、続いて式(13)(14)を秘密計算することで、パラメータw1のシェア[w1]を更新する。第二更新部22は、更新済みのパラメータw1のシェア[w1]と式(12)の計算結果のシェア[t1,i]を第三更新部23へ送る。
In step S22, the
ステップS23において、秘密計算装置1mの第三更新部23は、他の秘密計算装置1m'と協調して、2以上d以下の各整数kについて、式(15)(16)(17)を秘密計算することで、パラメータw2, …, wdのシェア[w2], …, [wd]を更新する。なお、式(15)は1以上n以下の各整数iについて秘密計算される。第三更新部23は、更新済みのパラメータw0, w1, w2, …, wdのシェア[w0], [w1], [w2], …, [wd]をパラメータ記憶部24に記憶する。
In step S23, the
[第2実施形態の変形例]
従来のソフト閾値関数は、入力値同士の比較を行う必要がある。秘密計算では、比較する値のビット数に処理時間が依存するため、入力値のビット数が大きいほどソフト閾値関数の計算速度が落ちるという問題がある。そこで、本変形例では、入力値のビット数によらず、入力値を秘匿したまま、ソフト閾値関数を十分な速度で計算するために、下記参考文献1に記載された秘密右シフトプロトコルを用いる。
〔参考文献1〕五十嵐大、“秘密計算AIの実装に向けた秘密実数演算群の設計と実装-O(|p|)ビット通信量 O(1)ラウンドの実数向け右シフト-”、CSS2019、2019年
[Modification of the second embodiment]
Conventional soft threshold functions require comparison of input values. In secure computation, the processing time depends on the number of bits of the values to be compared, so the computation speed of the soft threshold function decreases as the number of bits of the input value increases. Therefore, in this modified example, in order to compute the soft threshold function at a sufficient speed while keeping the input value secret, regardless of the number of bits of the input value, the secret right shift protocol described in the
[Reference 1] Dai Igarashi, "Design and Implementation of a Secret Real-Number Operation Group for the Implementation of Secure Computing AI - Right Shift for Real Numbers with O(|p|) Bit Communication Volume and O(1) Rounds -", CSS2019, 2019
秘密計算では、浮動小数点数の処理コストは大きいため、固定小数点数を用いた方が高速である。固定小数点数を用いた場合、小数を含む値はすべて整数にエンコードして扱う。例えば、精度をyビットとした場合、値xはx×2yとして秘密分散する。 In secure computation, since the processing cost of floating-point numbers is high, using fixed-point numbers is faster. When using fixed-point numbers, all values that contain decimals are encoded into integers for handling. For example, if the precision is y bits, the value x is secretly shared as x × 2 y .
ソフト閾値関数では、大小比較を2回行い、値を出力する。例として、精度が30ビットの値a, bのシェア[a], [b]を入力した場合は、[a+b], [a-b]と[0]とを比較し、値を出力する。このとき、そのまま計算を行うと、大小比較のラウンドはO(30)となる。しかしながら、[a+b], [a-b]と[0]とを比較するためであれば、精度は30ビットより小さくても可能である。そこで、ラウンドO(1)で算術右シフトを行える秘密右シフトプロトコルを用いる。具体的には、入力値[a], [b]の和[a+b]と差[a-b]を秘密計算し、その結果を秘密右シフトプロトコルにより精度30ビットから任意のn(<30)ビットに下げた上で、[0]との比較を行う。これにより、大小比較のラウンドをO(30)からO(n+1)に減らすことができる。nは元の精度よりも小さければ効率がよくなるが、例えば、20ビット以上精度を下げるためにn<10に設定すると好適である。 In a soft threshold function, a larger-than comparison is performed twice and a value is output. For example, if the shares [a] and [b] of values a and b with 30-bit precision are input, [a+b] and [a-b] are compared with [0] and a value is output. In this case, if the calculation is performed as is, the rounds of the larger-than comparison will be O(30). However, if the precision is to be compared between [a+b] and [a-b] and [0], a precision smaller than 30 bits is also possible. Therefore, a secret right shift protocol is used that can perform arithmetic right shift in rounds O(1). Specifically, the sum [a+b] and difference [a-b] of the input values [a] and [b] are secretly calculated, and the result is reduced from 30 bits to an arbitrary n (<30) bits by the secret right shift protocol, and then compared with [0]. This reduces the rounds of the larger-than comparison from O(30) to O(n+1). It is more efficient if n is smaller than the original precision, but it is preferable to set n<10 to reduce the precision by, say, 20 or more bits.
lasso回帰やElasticNetでは、入力値a, bが取り得る範囲は事前計算が可能である。そこで、入力値の和[a+b]と差[a-b]が取り得る範囲を事前計算しておき、[a+b], [a-b]の精度が数ビット残るように秘密右シフトを行う。これにより、入力値のビット数によらず数ビットの比較で済むため、ソフト閾値関数を一定時間で計算可能になる。 In lasso regression and ElasticNet, the possible range of input values a and b can be pre-calculated. Therefore, the possible range of the sum [a+b] and difference [a-b] of the input values are pre-calculated, and a secret right shift is performed so that a few bits of precision remain for [a+b] and [a-b]. This allows only a comparison of a few bits regardless of the number of bits in the input value, making it possible to calculate the soft threshold function in a constant time.
本変形例の効果を確認するために実機で比較試験を行った。ソフト閾値関数を1回計算する時間は、秘密右シフトを行わない場合には約25000マイクロ秒であった。一方、秘密右シフトを行わった場合には約15000マイクロ秒であった。これにより、ソフト閾値関数で秘密右シフトを行うことで大幅に効率化されることが実証された。 To confirm the effect of this modified example, a comparative test was conducted on an actual machine. The time to calculate the soft threshold function once was approximately 25,000 microseconds without a secret right shift. On the other hand, it was approximately 15,000 microseconds with a secret right shift. This demonstrated that a significant improvement in efficiency can be achieved by using a soft threshold function to perform a secret right shift.
秘密計算では任意に精度を設定可能であるが、精度が大きすぎるとオーバーフローが発生するリスクがある。そのため、オーバーフローのリスクと精度とのバランスを考える必要がある。第2実施形態では、学習データやパラメータを任意の秘密分散方式により秘匿する構成としたが、この秘密分散方式を精度30ビットに設定する。そして、本変形例のようにソフト閾値関数内で精度をnビットに下げるように構成する。これにより、オーバーフローが発生せずに精度よくパラメータ更新を行うことが可能となる。 In secure computation, the precision can be set arbitrarily, but if the precision is too large, there is a risk of overflow. Therefore, it is necessary to consider the balance between the risk of overflow and precision. In the second embodiment, the learning data and parameters are concealed using an arbitrary secret sharing scheme, and this secret sharing scheme is set to a precision of 30 bits. Then, as in this modified example, the precision is reduced to n bits within the soft threshold function. This makes it possible to perform parameter updates with precision without causing overflow.
以上、この発明の実施の形態について説明したが、具体的な構成は、これらの実施の形態に限られるものではなく、この発明の趣旨を逸脱しない範囲で適宜設計の変更等があっても、この発明に含まれることはいうまでもない。実施の形態において説明した各種の処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。 Although the embodiments of the present invention have been described above, the specific configuration is not limited to these embodiments, and it goes without saying that the present invention includes appropriate design changes and the like that do not deviate from the spirit of the present invention. The various processes described in the embodiments are not only executed chronologically in the order described, but may also be executed in parallel or individually depending on the processing capacity of the device executing the processes or as necessary.
[プログラム、記録媒体]
上記実施形態で説明した各装置における各種の処理機能をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムを図6に示すコンピュータの記憶部1020に読み込ませ、演算処理部1010、入力部1030、出力部1040などに動作させることにより、上記各装置における各種の処理機能がコンピュータ上で実現される。
[Program, recording medium]
When the various processing functions of each device described in the above embodiment are realized by a computer, the processing contents of the functions that each device should have are described by a program. Then, the various processing functions of each device are realized on the computer by loading this program into the
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体は、例えば、非一時的な記録媒体であり、磁気記録装置、光ディスク等である。 The program describing this processing can be recorded on a computer-readable recording medium. The computer-readable recording medium is, for example, a non-transitory recording medium, such as a magnetic recording device or an optical disk.
また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD-ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 This program may be distributed, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, this program may be distributed by storing it in a storage device of a server computer and transferring the program from the server computer to other computers via a network.
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の非一時的な記憶装置である補助記録部1050に格納する。そして、処理の実行時、このコンピュータは、自己の非一時的な記憶装置である補助記録部1050に格納されたプログラムを一時的な記憶装置である記憶部1020に読み込み、読み込んだプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み込み、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。A computer that executes such a program, for example, first stores the program recorded on a portable recording medium or the program transferred from a server computer in its own non-transient storage device, the
また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、本装置を構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。 In addition, in this embodiment, the device is configured by executing a specific program on a computer, but at least a portion of the processing content may be realized in hardware.
Claims (7)
パラメータ記憶部と、
学習データy i , x i,j (i=1,…,n,j=1,…,d)と、前記パラメータ記憶部から読みだしたw 1 ,…,w d とから、次式によりw' 0 を計算する第一更新部と、
λ, αを前記線形回帰モデルのハイパーパラメータ、Sはソフト閾値関数として、前記学習データy i , x i,j (i=1,…,n,j=1,…,d)と、前記パラメータ記憶部から読みだしたw 2 ,…,w d と、前記第一更新部から取得した前記w' 0 とから、次式によりt 1,i (i=1,…,n)とw' 1 とを計算する第二更新部と、
前記学習データx i,k (i=1,…,n,k=1,…,d)と、前記パラメータ記憶部から読み出したパラメータw 1 ,…,w d と、前記第二更新部から取得した前記t 1,i (i=1,…,n)とから、次式によりt k,i (i=1,…,n,k=2,…,d)を再帰的に求めてw' k (k=2,…,d)を計算し、前記w' 0 ,…w' d を、前記w 0 ,…,w d の更新値として前記パラメータ記憶部に記憶する第三更新部と、
を含むパラメータ推定装置。 A parameter estimator for estimating parameters w 0 , w 1 , …, w d of a linear regression model having an L1 regularization term, comprising:
A parameter storage unit;
a first update unit that calculates w'0 from learning data yi , xi ,j (i=1,...,n, j= 1 ,..., d ) and w1 ,...,wd read from the parameter storage unit by the following formula;
a second update unit that calculates t1, i (i=1,...,n) and w'1 from the learning data yi, xi,j ( i =1,...,n, j= 1 ,..., d ), w2 ,... , wd read from the parameter storage unit, and w'0 acquired from the first update unit , using the following formula , where λ and α are hyper parameters of the linear regression model and S is a soft threshold function;
a third update unit that calculates w'k (k=2,...,d) by recursively determining tk,i (i=1,...,n, k=2,...,d) from the learning data xi,k (i=1,...,n, k=1,...,d), parameters w1 ,..., wd read from the parameter storage unit, and t1, i ( i = 1,...,n) obtained from the second update unit , and stores the w'0 , ... ,w'd in the parameter storage unit as update values of the w0 , ...,wd ;
A parameter estimator comprising:
パラメータ記憶部と、
学習データのシェア[y i ], [x i,j ](i=1,…,n,j=1,…,d)と、前記パラメータ記憶部から読み出したパラメータのシェア[w 1 ],…,[w d ]とから、他の秘密計算装置と協調して次式を秘密計算することによりシェア[w' 0 ]を計算する第一更新部と、
λ, αを前記線形回帰モデルのハイパーパラメータ、Sはソフト閾値関数として、前記学習データのシェア[y i ], [x i,j ](i=1,…,n,j=1,…,d)と、前記パラメータ記憶部から読み出したシェア[w 2 ],…,[w d ]と、前記第一更新部から取得した前記シェア[w' 0 ]とから、他の秘密計算装置と協調して次式を秘密計算することによりシェア[t 1,i ](i=1,…,n)とシェア[w' 1 ]を計算する第二更新部と、
前記学習データのシェア[x i,k ](i=1,…,n,k=1,…,d)と、前記パラメータ記憶部から読み出したシェア[w 1 ],…,[w d ]と、前記第二更新部から取得した前記シェア[t 1,i ](i=1,…,n)とから、他の秘密計算装置と協調して次式を秘密計算することによりシェア[t k,i ](i=1,…,n,k=2,…,d)を再帰的に求めてシェア[w' k ](k=2,…,d)を計算し、前記シェア[w' 0 ],…,[w' d ]を、前記シェア[w 0 ],…,[w d ]の更新値として前記パラメータ記憶部に記憶する第三更新部と、
を含むパラメータ推定装置。 A secret parameter estimation system including a plurality of secure computing devices that estimates parameters w 0 , w 1 , ..., w d of a linear regression model having an L1 regularization term by secure computation , the secure computing devices comprising :
A parameter storage unit;
a first update unit that calculates a share [w' 0 ] by secretly calculating the following formula in cooperation with other secure computation devices from the shares [y i ] , [x i,j ] (i=1,...,n, j=1,...,d) of learning data and the shares [w 1 ] , ... ,[w d ] of parameters read from the parameter storage unit ;
a second update unit which calculates shares [t 1,i ] (i=1,...,n) and shares [w' 1 ] from the shares [y i ], [x i,j ] (i=1,...,n, j=1,...,d) of the learning data, the shares [w 2 ],...,[w d ] read from the parameter storage unit , and the share [w' 0 ] obtained from the first update unit, by secretly calculating the following formula in cooperation with other secure computation devices, where λ and α are hyper parameters of the linear regression model and S is a soft threshold function ;
a third update unit that calculates shares [ w' k ] (k=2,...,d) by recursively determining shares [t k,i] (i=1,...,n, k=2,...,d) from the shares [x i ,k ] (i=1, ... ,n, k=1,...,d) of the learning data, the shares [w 1 ],...,[w d ] read from the parameter storage unit, and the shares [t 1 ,i ] (i=1,...,n) obtained from the second update unit, in cooperation with other secure computation devices, and stores the shares [w' 0 ],...,[w' d ] in the parameter storage unit as updated values of the shares [w 0 ],...,[w d ];
A parameter estimator comprising:
前記ソフト閾値関数は、秘密計算により第一引数と第二引数との和および第一引数と第二引数との差を少なくとも1ビット右シフトした結果を0と比較することで計算される、
秘密パラメータ推定システム。 3. A secret parameter estimation system according to claim 2, comprising:
the soft threshold function is calculated by securely shifting a sum of a first argument and a second argument and a difference between the first argument and the second argument by at least one bit to the right and comparing the results with 0;
A secret parameter estimation system.
第一更新部が、学習データy i , x i,j (i=1,…,n,j=1,…,d)と、パラメータ記憶部から読み出したw 1 ,…,w d とから、次式によりw' 0 を計算し、
λ, αを前記線形回帰モデルのハイパーパラメータ、Sはソフト閾値関数として、第二更新部が、前記学習データy i , x i,j (i=1,…,n,j=1,…,d)と、前記パラメータ記憶部から読み出したパラメータw 2 ,…,w d と、前記第一更新部から取得した前記w' 0 とから、次式によりt 1,i (i=1,…,n)とw' 1 とを計算し、
第三更新部が、前記学習データx i,k (i=1,…,n,k=1,…,d)と、前記パラメータ記憶部から読み出したパラメータw 1 ,…,w d と、前記第二更新部から取得した前記t 1,i (i=1,…,n)とから、次式によりt k,i (i=1,…,n,k=2,…,d)を再帰的に求めてw' k (k=2,…,d)を計算し、前記w' 0 ,…w' d を、前記w 0 ,…,w d の更新値として前記パラメータ記憶部に記憶する、
パラメータ推定方法。 A parameter estimation method executed by a parameter estimation device for estimating parameters w 0 , w 1 , ..., w d of a linear regression model having an L1 regularization term, comprising the steps of:
A first update unit calculates w'0 from the learning data yi , xi ,j (i=1,...,n, j=1,...,d) and w1,...,wd read from the parameter storage unit by the following formula :
where λ and α are hyperparameters of the linear regression model, and S is a soft threshold function, a second update unit calculates t 1,i (i=1,...,n) and w' 1 from the learning data y i , x i,j ( i=1,...,n, j=1,..., d ), parameters w 2 ,... , wd read from the parameter storage unit, and w' 0 acquired from the first update unit , using the following formula :
a third update unit recursively determines tk,i (i=1,...,n, k=2,...,d) from the learning data xi , k (i=1,...,n, k=1,..., d ), parameters w1 ,... ,wd read from the parameter storage unit, and t1 ,i (i=1,...,n) obtained from the second update unit , to calculate w'k (k=2,...,d) by the following formula , and stores the w'0 , ... ,w'd in the parameter storage unit as updated values of the w0 ,...,wd .
Parameter estimation methods.
各秘密計算装置の第一更新部が、学習データのシェア[y i ], [x i,j ](i=1,…,n,j=1,…,d)と、パラメータ記憶部から読み出したパラメータのシェア[w 1 ],…,[w d ]とから、他の秘密計算装置と協調して次式を秘密計算することによりシェア[w' 0 ]を計算し、
λ, αを前記線形回帰モデルのハイパーパラメータ、Sはソフト閾値関数として、各秘密計算装置の第二更新部が、前記学習データのシェア[y i ], [x i,j ](i=1,…,n,j=1,…,d)と、前記パラメータ記憶部から読み出したシェア[w 2 ],…,[w d ]と、前記第一更新部から取得した前記シェア[w' 0 ]とから、他の秘密計算装置と協調して次式を秘密計算することによりシェア[t 1,i ](i=1,…,n)とシェア[w' 1 ]を計算し、
各秘密計算装置の第三更新部が、前記学習データのシェア[x i,k ](i=1,…,n,k=1,…,d)と、前記パラメータ記憶部から読み出したシェア[w 1 ],…,[w d ]と、前記第二更新部から取得した前記シェア[t 1,i ](i=1,…,n)とから、他の秘密計算装置と協調して次式を秘密計算することによりシェア[t k,i ](i=1,…,n,k=2,…,d)を再帰的に求めてシェア[w' k ](k=2,…,d)を計算し、前記シェア[w' 0 ],…,[w' d ]を、前記シェア[w 0 ],…,[w d ]の更新値として前記パラメータ記憶部に記憶する
パラメータ推定方法。 A secret parameter estimation method executed by a secret parameter estimation system including a plurality of secure computing devices, which estimates parameters w0 , w1 , ..., wd of a linear regression model having an L1 regularization term by secure computation, comprising:
The first update unit of each secure computation device calculates a share [w' 0 ] by secretly computing the following formula in cooperation with the other secure computation devices from the shares [y i ], [x i,j ] (i=1,...,n, j=1,..., d ) of the learning data and the shares [w 1 ],...,[w d ] of the parameters read from the parameter storage unit ,
where λ and α are hyperparameters of the linear regression model, and S is a soft threshold function, the second update unit of each secure computing device calculates shares [ t 1,i ] (i=1,...,n) and shares [w' 1 ] from the shares [y i ], [x i,j ] (i=1,...,n, j=1,...,d) of the learning data, the shares [w 2 ], ... ,[w d ] read from the parameter storage unit, and the share [w' 0 ] obtained from the first update unit , by secretly calculating the following formula in cooperation with other secure computing devices :
The third update unit of each secure computing device recursively obtains shares [t k,i ] (i=1,...,n, k=2,...,d) from the shares [x i,k ] (i= 1 ,...,n, k=1,...,d) of the learning data, the shares [ w 1 ],... ,[w d ] read from the parameter storage unit, and the shares [t 1,i ] (i=1,...,n) obtained from the second update unit , in cooperation with other secure computing devices, by secretly calculating the following formula , thereby calculating shares [w' k ] (k=2,...,d), and stores the shares [w' 0 ],...,[w' d ] in the parameter storage unit as updated values of the shares [w 0 ],...,[w d ].
Parameter estimation methods.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2020/037972 WO2022074756A1 (en) | 2020-10-07 | 2020-10-07 | Parameter estimation device, secret parameter estimation system, secret computing device, method for these, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2022074756A1 JPWO2022074756A1 (en) | 2022-04-14 |
JP7472998B2 true JP7472998B2 (en) | 2024-04-23 |
Family
ID=81125737
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022555022A Active JP7472998B2 (en) | 2020-10-07 | 2020-10-07 | Parameter estimation device, secret parameter estimation system, secure computing device, methods thereof, and programs |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7472998B2 (en) |
WO (1) | WO2022074756A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017130116A (en) | 2016-01-21 | 2017-07-27 | 日本電信電話株式会社 | Regression analysis device, regression analysis method, and regression analysis program |
CN108563739A (en) | 2018-04-11 | 2018-09-21 | 平安科技(深圳)有限公司 | Weather data acquisition methods and device, computer installation and readable storage medium storing program for executing |
-
2020
- 2020-10-07 JP JP2022555022A patent/JP7472998B2/en active Active
- 2020-10-07 WO PCT/JP2020/037972 patent/WO2022074756A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017130116A (en) | 2016-01-21 | 2017-07-27 | 日本電信電話株式会社 | Regression analysis device, regression analysis method, and regression analysis program |
CN108563739A (en) | 2018-04-11 | 2018-09-21 | 平安科技(深圳)有限公司 | Weather data acquisition methods and device, computer installation and readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
JPWO2022074756A1 (en) | 2022-04-14 |
WO2022074756A1 (en) | 2022-04-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7093599B2 (en) | How to manage snapshots on the blockchain, computer programs, snapshot nodes, auditor nodes and systems | |
Hoefling | A path algorithm for the fused lasso signal approximator | |
Klotz et al. | Practical guidelines for solving difficult linear programs | |
CN111475848B (en) | Global and local low noise training method for guaranteeing privacy of edge calculation data | |
JP7067632B2 (en) | Secret sigmoid function calculation system, secret logistic regression calculation system, secret sigmoid function calculation device, secret logistic regression calculation device, secret sigmoid function calculation method, secret logistic regression calculation method, program | |
JP7283065B2 (en) | Estimation device, optimization device, estimation method, optimization method, and program | |
CN113496080A (en) | Variance change point detection method and system and computer readable storage medium | |
CN116029359A (en) | Computer-readable recording medium, machine learning method, and information processing apparatus | |
JP7472998B2 (en) | Parameter estimation device, secret parameter estimation system, secure computing device, methods thereof, and programs | |
JP7276482B2 (en) | Knowledge tracing device, method and program | |
JP6977882B2 (en) | Secret batch approximation system, secret calculator, secret batch approximation method, and program | |
JP7231102B1 (en) | PLANT RESPONSE ESTIMATION DEVICE, PLANT RESPONSE ESTIMATION METHOD, AND PROGRAM | |
EP3096308A1 (en) | Element replication device, element replication method, and program | |
Beckman et al. | Scalable computations for nonstationary Gaussian processes | |
US20210216374A1 (en) | Cluster update accelerator circuit | |
JP7235129B2 (en) | Variable optimization device, variable optimization method, program | |
JP7310884B2 (en) | Parameter estimation device, parameter estimation method, and parameter estimation program | |
JP7070051B2 (en) | Arithmetic logic unit, calculation method and program | |
WO2023119551A1 (en) | Signal processing device, signal processing method, and program | |
JP7428288B1 (en) | Plant response estimation device, plant response estimation method, and program | |
US11579947B2 (en) | Univariate density estimation method | |
JP2005242580A (en) | Parameter estimation method, data prediction method, parameter estimation device, data prediction device, and computer program | |
CN111753949B (en) | Data block processing method and device and electronic equipment | |
CN113688995B (en) | Quantum system control method and device | |
JP7318721B2 (en) | Approximate function computing device, method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230124 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240104 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240219 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240312 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240325 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7472998 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |