JP6844565B2 - Neural network device and program - Google Patents
Neural network device and program Download PDFInfo
- Publication number
- JP6844565B2 JP6844565B2 JP2018047495A JP2018047495A JP6844565B2 JP 6844565 B2 JP6844565 B2 JP 6844565B2 JP 2018047495 A JP2018047495 A JP 2018047495A JP 2018047495 A JP2018047495 A JP 2018047495A JP 6844565 B2 JP6844565 B2 JP 6844565B2
- Authority
- JP
- Japan
- Prior art keywords
- similarity
- data
- input data
- filter
- neural network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、ニューラルネットワーク装置及びプログラムに関する。 The present invention relates to neural network devices and programs.
従来、データ要素が1次元に並ぶ系列データを入力データとし、入力データの中にパターンを見つけることで入力データの特徴を抽出する1次元畳み込みニューラルネットワークが提案されている。例えば、非特許文献1及び2には、系列データとしてのタンパク質を表す文字列を入力データとし、当該文字列からタンパク質の二次構造を予測する1次元畳み込みニューラルネットワークが開示されている。
Conventionally, a one-dimensional convolutional neural network has been proposed in which series data in which data elements are arranged in one dimension is used as input data, and features of the input data are extracted by finding a pattern in the input data. For example, Non-Patent
また、非特許文献3には、動的時間伸縮法(Dynamic Time Warping)と呼ばれる手法により2つの系列データの間の誤差関数を算出し、当該誤差関数の偏微分を行うことで当該誤差関数の評価を行うことが開示されている。 Further, in Non-Patent Document 3, an error function between two series data is calculated by a method called Dynamic Time Warping, and the error function is partially differentiated to obtain the error function. It is disclosed to make an evaluation.
1次元畳み込みニューラルネットワークにおいては、2つの系列データ間の比較を図7(a)に示すようなPosition-wise Comparionにより行っていた。Position-wise Comparionは、系列データ1及び系列データ2のi番目のデータ要素同士を順次比較するという方法である。
In the one-dimensional convolutional neural network, the comparison between the two series data was performed by the Position-wise Comparion as shown in FIG. 7 (a). Position-wise Comparion is a method of sequentially comparing the i-th data elements of the
しかしながら、Position-wise Comparionによると、2つの系列データの少なくとも一方においてデータ要素が挿入又は削除された場合、本来類似している2つの系列データの類似度が低く判定される場合があった。例えば、図7(b)に示す通り、系列データ1及び系列データ2は本来類似する系列データであるが、系列データ1の2番目に外乱要素である文字「L」が挿入されたものである。この場合、図7(a)に示すようなPosition-wise Comparionによると、系列データ1と系列データ2との間で、2〜4番目の文字がいずれも異なるため、系列データ1と系列データ2との間の類似度が低く誤判定されてしまう。
However, according to Position-wise Comparion, when a data element is inserted or deleted in at least one of the two series data, the similarity between the two series data that are originally similar may be judged to be low. For example, as shown in FIG. 7B, the
本発明の目的は、複数のデータ要素が並ぶ系列データ間において、本来類似する2つの系列データの少なくとも一方においてデータ要素が挿入又は削除された場合であっても、当該2つの系列データの類似性をより的確に検出可能なニューラルネットワーク装置を提供することにある。 An object of the present invention is the similarity of two series data even when a data element is inserted or deleted in at least one of two originally similar series data between series data in which a plurality of data elements are lined up. It is an object of the present invention to provide the neural network apparatus which can detect more accurately.
本発明は、複数のデータ要素が並ぶ系列データである入力データが入力されるニューラルネットワーク装置であって、前記入力データの少なくとも一部分である部分入力データと、複数のデータ要素が並ぶ系列データであるフィルタとの間の系列データ類似度を算出する類似度算出部であって、前記部分入力データ及び前記フィルタの少なくとも一方において、少なくとも1つの前記データ要素を削除した場合の、前記部分入力データと前記フィルタとの間の類似度に基づいて、前記系列データ類似度を算出する類似度算出部と、前記部分入力データと前記フィルタとの間の前記系列データ類似度に基づいて、前記ニューラルネットワーク装置に関するパラメータを学習する学習部と、を備えることを特徴とするニューラルネットワーク装置である。 The present invention is a neural network device in which input data, which is series data in which a plurality of data elements are arranged, is input, and is partial input data which is at least a part of the input data and series data in which a plurality of data elements are arranged. A similarity calculation unit that calculates the similarity of series data with a filter, wherein at least one of the partial input data and the filter deletes at least one of the data elements, and the partial input data and the said. The neural network apparatus relates to a similarity calculation unit that calculates the series data similarity based on the similarity between the filters and the series data similarity between the partial input data and the filter. It is a neural network device characterized by including a learning unit for learning parameters.
望ましくは、前記類似度算出部は、前記部分入力データに含まれる各データ要素を比較入力データ要素列に加える処理、及び、前記フィルタに含まれる各データ要素を比較フィルタ要素列に加える処理の少なくとも一方を実行して前記比較入力データ要素列と前記比較フィルタ要素列との間の類似度である中間類似度を算出する処理を、順次、前記部分入力データ及び前記フィルタの並びにおける最初から最後まで繰り返すことで前記系列データ類似度を算出し、各中間類似度の算出処理において、前記データ要素を前記比較入力データ要素列及び前記比較フィルタ要素列の双方に追加する場合と、前記データ要素を前記比較入力データ要素列に追加せず前記比較フィルタ要素列に追加する場合と、前記データ要素を前記比較入力データ要素列に追加し前記比較フィルタ要素列に追加しない場合それぞれの前記比較入力データ要素列と前記比較フィルタ要素列との間の類似度のうち、最も大きい類似度を前記中間類似度として算出する、ことを特徴とする。 Desirably, the similarity calculation unit at least a process of adding each data element included in the partial input data to the comparison input data element string and a process of adding each data element included in the filter to the comparison filter element string. The process of executing one to calculate the intermediate similarity, which is the similarity between the comparison input data element string and the comparison filter element string, is sequentially performed from the beginning to the end of the partial input data and the sequence of the filters. The series data similarity is calculated by repeating the process, and in each intermediate similarity calculation process, the data element is added to both the comparison input data element string and the comparison filter element string, and the data element is added to the comparison filter element string. The case where the data element is added to the comparison filter element column without being added to the comparison input data element column, and the case where the data element is added to the comparison input data element column and not added to the comparison filter element column. Among the similarities between the above and the comparison filter element sequence, the largest similarity is calculated as the intermediate similarity.
望ましくは、前記類似度算出部は、前記比較入力データ要素列及び前記比較フィルタ要素列のいずれかに前記データ要素を追加しない場合に、データ要素の削除に要するコストである削除コストを考慮して、前記中間類似度を算出する、ことを特徴とする。 Desirably, the similarity calculation unit considers the deletion cost, which is the cost required to delete the data element when the data element is not added to either the comparison input data element string or the comparison filter element string. , The intermediate similarity is calculated.
望ましくは、前記学習部は、前記部分入力データ、前記フィルタ、及び前記削除コストに関する前記系列データ類似度に関する偏微分に基づいて、前記ニューラルネットワーク装置に関するパラメータを学習する、ことを特徴とする。 Desirably, the learning unit learns the parameters related to the neural network device based on the partial input data, the filter, and the partial differential with respect to the series data similarity with respect to the deletion cost.
また、本発明は、コンピュータを、複数の入力データ要素が並ぶ系列データである入力データが入力されるニューラルネットワーク装置であって、前記入力データの少なくとも一部分である部分入力データと、複数のデータ要素が並ぶ系列データであるフィルタとの間の系列データ類似度を算出する類似度算出部であって、前記部分入力データ及び前記フィルタの少なくとも一方において、少なくとも1つの前記データ要素を削除した場合の、前記部分入力データと前記フィルタとの間の類似度に基づいて、前記系列データ類似度を算出する類似度算出部と、前記部分入力データと前記フィルタとの間の前記系列データ類似度に基づいて、前記ニューラルネットワーク装置に関するパラメータを学習する学習部と、を備えるニューラルネットワーク装置として機能させることを特徴とするプログラムである。 Further, the present invention is a neural network device in which input data, which is series data in which a plurality of input data elements are arranged, is input to a computer, and a partial input data which is at least a part of the input data and a plurality of data elements. A similarity calculation unit that calculates the similarity of series data with a filter that is series data in which is arranged, and when at least one of the data elements is deleted in at least one of the partial input data and the filter. Based on the similarity between the partial input data and the filter, the similarity calculation unit that calculates the series data similarity, and the series data similarity between the partial input data and the filter. , A program characterized by functioning as a neural network device including a learning unit for learning parameters related to the neural network device.
本発明によれば、複数のデータ要素が並ぶ系列データ間において、本来類似する2つの系列データの少なくとも一方においてデータ要素が挿入又は削除された場合であっても、当該2つの系列データの類似性をより的確に検出可能なニューラルネットワーク装置を提供することができる。 According to the present invention, even when a data element is inserted or deleted in at least one of two originally similar series data between series data in which a plurality of data elements are lined up, the similarity of the two series data It is possible to provide a neural network device that can detect the above more accurately.
以下、本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described.
図1には、本実施形態に係るニューラルネットワーク装置10の構成概略図が示されている。本実施形態におけるニューラルネットワーク装置10はサーバコンピュータであるが、ニューラルネットワーク装置10としては、以下に説明する機能を発揮する限りにおいてどのような装置であってもよい。
FIG. 1 shows a schematic configuration diagram of the
ニューラルネットワーク装置10は、後述するニューラルネットワーク14を用いて、複数のデータ要素が並ぶ系列データである入力データと、同じく複数のデータ要素が並ぶ系列データであるフィルタ(後述のようにこれはニューラルネットワーク14のパラメータの1つである)との間の類似度である系列データ類似度を算出しながら、ニューラルネットワーク14に関するパラメータの学習、あるいは、入力データの特徴の抽出を行うものである。
The
本実施形態においては、ニューラルネットワーク装置10は、タンパク質を表す文字列を入力データとし、当該文字列をニューラルネットワーク14に入力することで、タンパク質を表す文字列に含まれる特徴的な部分(文字配列)に基づいて、当該タンパク質の二次構造を予測する。ここで、タンパク質は、20種類のアミノ酸の1次元の列で表現されており、各アミノ酸は「A」、「R」、あるいは「N」などの文字で表される。タンパク質の二次構造とは、数個から20個程度のアミノ酸によって構成される立体構造であり、α-helixやβ-sheetなどの8種類に分類することができる。
In the present embodiment, the
具体的には、ニューラルネットワーク装置10の入力データは、
x=x1,x2,・・・xT
と表すことができる。なお、Tは入力データの長さ(文字数)である。各xiは20種類のアミノ酸を表す文字のいずれかである。ニューラルネットワーク14は、入力データの各位置のラベル(タンパク質の二次構造を示すラベル)の予測値を出力する。ここで、入力データの各位置のラベルの予測値は、
y=y1,y2,・・・yT
で表される。
Specifically, the input data of the
x = x 1 , x 2 , ... x T
It can be expressed as. Note that T is the length (number of characters) of the input data. Each x i is either a character representing the 20 amino acids. The
y = y 1 , y 2 , ... y T
It is represented by.
記憶部12は、例えばハードディスク、ROM(Read Only Memory)、あるいはRAM(Random Access Memory)などを含んで構成される。図1に示す通り、記憶部12には、ニューラルネットワーク14が記憶される。なお、ニューラルネットワーク14の実体は、ニューラルネットワーク14に関する各種パラメータ(上述のフィルタあるいは後述の削除コストGを含む)、及び、入力データに対して処理を行うための処理実行プログラムである。したがって、記憶部12にニューラルネットワーク14が記憶されるとは、上記各種パラメータ及び処理実行プログラムが記憶部12に記憶されることを意味する。
The
通信部16は、例えばネットワークアダプタなどを含んで構成される。通信部16は、LAN(Local Area Network)やインターネットなどの通信回線を介して他の装置と通信する機能を発揮する。例えば、通信部16は、ニューラルネットワーク装置10における処理結果を示す結果情報を他の装置に送信する。
The
制御部18は、例えばCPU(Central Processing Unit)などを含んで構成され、ニューラルネットワーク装置10の各部を制御する。特に、制御部18は、記憶部12に記憶されたニューラルネットワーク14の処理プログラムを実行することにより、図1に示すように、類似度算出部20、予測部22、及び学習部24としても機能する。
The
類似度算出部20は、入力データの少なくとも一部分である部分入力データと、上述のフィルタとの間の類似度である系列データ類似度を算出する。本実施形態では、入力データはタンパク質を表す文字列(アミノ酸列)であるから、部分入力データは当該文字列の一部分(なお全部であってもよい)ということになる。フィルタも文字列(アミノ酸列)である。フィルタとしては、入力データから抽出したい文字列が設定される。なお、フィルタは複数設けられてもよい。
The
予測部22は、類似度算出部20が算出した部分入力データとフィルタとの間の系列データ類似度に基づいて、入力データの各データ要素のラベルを予測する。本実施形態では、予測部22は、タンパク質を表す文字列に含まれる各文字(アミノ酸)に対する、タンパク質の二次構造を予測する。
The
学習部24は、類似度算出部20が算出した部分入力データとフィルタとの間の系列データ類似度に基づいて、ニューラルネットワーク14に関する各パラメータを学習する。
The
類似度算出部20、予測部22、及び学習部24の処理の詳細については後述する。
Details of the processing of the
ニューラルネットワーク装置10の構成概要は以上の通りである。なお、ニューラルネットワーク装置10がサーバ以外のコンピュータ(例えばパーソナルコンピュータ)などである場合には、上述の構成要件に加え、例えばキーボードあるいはマウスなどを含んで構成されユーザの指示をニューラルネットワーク装置10に入力するための入力部、あるいは、液晶パネルなどを含んで構成され制御部18の処理結果を表示する表示部などが含まれていてもよい。
The outline of the configuration of the
以下、類似度算出部20及び予測部22の処理の詳細について説明する。
Hereinafter, the details of the processing of the
本実施形態においては、入力データとしてのタンパク質の文字列は、20種類の文字から構成される文字列である。類似度算出部20は、20種類の文字をそれぞれd次元のベクトル(特徴ベクトル)で表現する。これにより、文字列である入力データは、d次元ベクトル列に変換される。なお、d次元への変換は所定の方法により実行するようにしてよい。
In the present embodiment, the character string of the protein as the input data is a character string composed of 20 kinds of characters. The
例えば、図2(a)に示される通り、入力データである「A,L,C,K,M,V,・・・」が、d次元ベクトル列「e1,e2,e3,e4,e5,e6,・・・,eT」に変換される。 For example, as shown in FIG. 2 (a), the input data "A, L, C, K, M, V, ··· " is, d-dimensional vector sequence "e 1, e 2, e 3 , e 4 , e 5 , e 6 , ..., e T "is converted.
同様に、本実施形態においては、ニューラルネットワーク14のフィルタも、20種類の文字から構成される文字列である。類似度算出部20は、入力データ同様に、20種類の文字がそれぞれd次元のベクトル(特徴ベクトル)で表現されたフィルタを用いる。
Similarly, in the present embodiment, the filter of the
例えば、図2(b)に示される通り、「A,C,K,G,・・・」が、d次元のベクトル列「W(1),W(2),W(3),W(4),・・・,W(M)」で表現されたフィルタを用いる。なお、Mはフィルタの長さ(文字数)である。 For example, as shown in FIG. 2 (b), "A, C, K, G, ..." Is a d-dimensional vector sequence "W (1), W (2), W (3), W ( 4), ..., W (M) ”is used. Note that M is the length (number of characters) of the filter.
本実施形態では、複数のフィルタが用意される。各フィルタをW1,W2,・・・WJで表す。Jはフィルタの個数である。 In this embodiment, a plurality of filters are prepared. Each filter is represented by W 1 , W 2 , ... W J. J is the number of filters.
本実施形態では、入力データの位置iを中心とした幅Nの窓を考え、当該窓に含まれる文字列が部分入力データとなる。したがって、部分入力データは、
類似度算出部20は、部分入力データXと、フィルタWとの間の系列データ類似度Sim(X,W)を算出する。上述の通り、フィルタは複数用意されることから、類似度算出部20は、部分入力データXと各フィルタWj(jは1〜J)との間で複数の系列データ類似度Z(j)=Sim(X,Wj)(1≦j≦J)が算出される。なお、系列データ類似度は実数値である。Sim(X,W)については後述する。
The
算出した複数の系列データ類似度Z(j)=Sim(X,Wj)(1≦j≦J)は、J次元のベクトルとみなすことができる。また、部分入力データXは入力データにおける位置iを中心としていたので、各i(iは1〜N)でJ次元のベクトルZiが算出され、J次元ベクトル列Zi (j)が形成されることになる。なお、J次元ベクトル列は
Zi (j)=Z1 (j),Z2 (j),・・・ZT (j)
である。ここで、各フィルタWjは各位置iで共通したものが用いられる。
The calculated plurality of series data similarity Z (j) = Sim (X, W j ) (1 ≦ j ≦ J) can be regarded as a J-dimensional vector. Further, since the partial input data X is centered on the position i in the input data, the J-dimensional vector Z i is calculated for each i (i is 1 to N), and the J-dimensional vector sequence Z i (j) is formed. Will be. The J-dimensional vector sequence is Z i (j) = Z 1 (j) , Z 2 (j) , ... Z T (j).
Is. Here, as each filter W j , a filter common to each position i is used.
上述の処理によって、入力データx1,x2,・・・xTがJ次元ベクトル列Z1,Z2,・・・ZTに変換される。 By the above processing, the input data x 1 , x 2 , ... X T are converted into the J-dimensional vector sequences Z 1 , Z 2 , ... Z T.
予測部22は、入力データの各位置iについてそれぞれ算出された複数の系列データ類似度(J次元ベクトル列)Zi (j)に基づいて入力データ各位置(各文字)iのラベルyiを予測する。ラベルyiを予測する方法は種々の方法が用いられてよいが、本実施形態では、複数の系列データ類似度Zi (j)を入力とする多層の全結合ニューラルネットワークを用いて予測する。あるいは、リカレントニューラルネットワークを用いて、複数の系列データ類似度Zi (j)を新しい系列データZ’iに変換した後に、上記の全結合ニューラルネットワークを用いて予測するようにしてもよい。 The prediction unit 22 sets the label y i of each position (each character) i of the input data based on the plurality of series data similarity (J-dimensional vector sequence) Z i (j) calculated for each position i of the input data. Predict. Various methods may be used to predict the label y i , but in the present embodiment, the prediction is made using a multi-layered fully connected neural network having a plurality of series data similarity Zi (j) as inputs. Alternatively, using a recurrent neural network, after converting a plurality of series-data-similarity Z i to (j) into a new series data Z 'i, may be predicted using total binding neural network described above.
上記の全結合ニューラルネットワークあるいはリカレントニューラルネットワークは、記憶部12に記憶されて(ニューラルネットワーク14に含まれて)いてもよいし、それとは別に用意されてもよい。また、予測部22及び上記の全結合ニューラルネットワークあるいはリカレントニューラルネットワークをニューラルネットワーク装置10以外の装置に設ける実施形態も採用し得る。
The fully connected neural network or the recurrent neural network may be stored in the storage unit 12 (included in the neural network 14), or may be prepared separately. Further, an embodiment in which the
以下、類似度算出部20によるSim(X,W)の詳細な算出方法について説明する。上述の通り、部分入力データXは長さNのd次元ベクトル列であり、フィルタW(ここでは1つのフィルタWに着目する)は長さMのd次元ベクトル列であり、Sim(X,W)は部分入力データXとフィルタWとの間の系列データ類似度である。以後、X(t)を部分入力データXのt番目のベクトルとし、W(s)をフィルタWのs番目のベクトルとする。
Hereinafter, a detailed calculation method of Sim (X, W) by the
図3に、系列データ類似度の計算アルゴリズム30が示されている。図3に示す計算アルゴリズム30は、(N+1)行(M+1)列の行列Sに対して再帰的な計算を行うアルゴリズムである。具体的には、行列Sの各成分の値を左上(1行1列)から右下(N行M列)に対して算出していくような手続きになっている。
FIG. 3 shows a sequence data
行列Sが図4に示されている。行列Sの各成分の値であるS(t,s)は、部分入力データX(1:t)と、フィルタW(1:s)との間の類似度を表している。なお、X(1:t)は、部分入力データの1番目からt番目までのベクトル列(データ要素列)であり、W(1:s)は、フィルタWの1番目からs番目までのベクトル列である。 The matrix S is shown in FIG. S (t, s), which is the value of each component of the matrix S, represents the degree of similarity between the partial input data X (1: t) and the filter W (1: s). Note that X (1: t) is a vector sequence (data element sequence) from the first to the tth of the partial input data, and W (1: s) is a vector from the first to the sth of the filter W. It is a column.
計算アルゴリズム30の概要を説明すると、類似度算出部20は、部分入力データXに含まれる各ベクトル(各データ要素)を比較入力ベクトル列(比較入力データ要素列)に加える処理、及び、フィルタWに含まれる各ベクトルを比較フィルタベクトル列(比較フィルタ要素列)に加える処理の少なくとも一方を実行して比較入力ベクトル列と前記比較フィルタベクトル列との間の類似度である中間類似度を算出する処理を、順次、部分入力データX及びフィルタWにおけるデータ要素の並びの最初から最後まで繰り返すことによって、最終的に得られた中間類似度をSim(X,W)とする。
Explaining the outline of the
以下、図4を参照しながら、図3に示す計算アルゴリズム30の詳細を説明する。
Hereinafter, the details of the
計算アルゴリズム30のブロック32においては、行列Sの第0行目の各成分を初期化する処理を行っている。具体的には、行列Sの第0行目のs(sは0からM)列に対して値−sGを入力する。ここで、Gは、部分入力データXあるいはフィルタWの1つのベクトル(データ要素)を削除するために必要なコストを表す値である。Gは学習部24による学習対象となるニューラルネットワーク14のパラメータである。
In the
計算アルゴリズム30のブロック34においては、行列Sの第0列目の各成分を初期化する処理を行っている。具体的には、行列Sの第0列目のt(tは1からN)列に対して値−tGを入力する。
In the
計算アルゴリズム30のブロック36においては、行列Sのその余の成分の値であるS(t,s)を算出する処理を行っている。具体的には、ブロック36に示される通り、max関数によって、3つの要素のうち最大の値を取る要素がS(t,s)として算出される。3つの要素は、第1要素として
S(t−1,s−1)+VecSim(X(t),W(s))、
第2要素として
S(t−1,s)−G、
第3要素として
S(t,s−1)−G
である。
In the
As the second element, S (t-1, s) -G,
As the third element, S (t, s-1) -G
Is.
ここで、行列Sの3行3列目の成分40を算出する場合を例に、上記の第1〜第3要素について説明する。なお、上述の通り、部分入力データXは
X(1),X(2),X(3),・・・,X(N)
であり、
フィルタWは
W(1),W(2),W(3),・・・,W(M)
である。
Here, the first to third elements described above will be described by taking the case of calculating the component 40 in the third row and third column of the matrix S as an example. As described above, the partial input data X is X (1), X (2), X (3), ..., X (N).
And
Filter W is W (1), W (2), W (3), ..., W (M)
Is.
第1要素のうち、第1項は、部分入力データX(1:t−1)とフィルタW(1:s−1)の類似度を表している。本例では、X(1),X(2)のベクトル列と、W(1),W(2)のベクトル列との類似度である。 Among the first elements, the first term represents the degree of similarity between the partial input data X (1: t-1) and the filter W (1: s-1). In this example, it is the degree of similarity between the vector sequences of X (1) and X (2) and the vector sequences of W (1) and W (2).
第1要素の第2項であるVecSim(X(t),W(s))は、X(t)とW(s)との類似度を算出するための関数である。例えば、VecSimは、ベクトルX(t)とベクトルW(s)の内積を算出する関数であってよい。本例では、VecSim(X(t),W(s))は、ベクトルX(3)とベクトルW(3)との類似度を表すものである。 The second term of the first element, VecSim (X (t), W (s)), is a function for calculating the degree of similarity between X (t) and W (s). For example, VecSim may be a function that calculates the inner product of the vector X (t) and the vector W (s). In this example, VecSim (X (t), W (s)) represents the degree of similarity between the vector X (3) and the vector W (3).
つまり、第1要素は、X(1),X(2)のベクトル列と、W(1),W(2)のベクトル列との類似度に、ベクトルX(3)とベクトルW(3)との類似度を加算したものである。これは、X(1),X(2)のベクトル列に新たなベクトルX(3)が追加された比較入力ベクトル列と、W(1),W(2)のベクトル列に新たなベクトルW(3)が追加された比較フィルタベクトル列との間の類似度に相当する。第1要素は、部分入力データXとフィルタWの双方においてベクトルを削除しないケースに対応する。 That is, the first element has the degree of similarity between the vector sequences of X (1) and X (2) and the vector sequences of W (1) and W (2), and the vector X (3) and the vector W (3). It is the sum of the similarity with. This is a comparison input vector sequence in which a new vector X (3) is added to the vector sequences of X (1) and X (2), and a new vector W in the vector sequences of W (1) and W (2). (3) corresponds to the degree of similarity with the added comparison filter vector sequence. The first element corresponds to the case where the vector is not deleted in both the partial input data X and the filter W.
第2要素の第1項は、部分入力データX(1:t−1)とフィルタW(1:s)の類似度を表している。本例では、X(1),X(2)のベクトル列と、W(1),W(2),W(3)のベクトル列との類似度である。これは、X(1),X(2)のベクトル列に新たなベクトルX(3)が追加されなかった比較入力ベクトル列と、W(1),W(2)のベクトル列に新たなベクトルW(3)が追加された比較フィルタベクトル列との間の類似度である。第2要素は、フィルタWの1つのベクトルを削除(スキップ)、すなわち系列データ類似度の算出のために考慮しないケースに対応する。 The first term of the second element represents the degree of similarity between the partial input data X (1: t-1) and the filter W (1: s). In this example, the degree of similarity between the vector sequences of X (1) and X (2) and the vector sequences of W (1), W (2), and W (3). This is a comparison input vector sequence in which a new vector X (3) is not added to the vector sequences of X (1) and X (2), and a new vector in the vector sequence of W (1) and W (2). W (3) is the degree of similarity with the added comparison filter vector sequence. The second element corresponds to the case where one vector of the filter W is deleted (skipped), that is, it is not considered for the calculation of the series data similarity.
第2要素の第2項である−Gは、上述の通り、フィルタWの1つのベクトルを削除するために必要なコストである。上述のように、第2要素においては、フィルタWの1つのベクトルが削除されるため、削除コストを差し引いた値を算出している。 The second term of the second element, -G, is the cost required to delete one vector of the filter W, as described above. As described above, in the second element, since one vector of the filter W is deleted, the value obtained by subtracting the deletion cost is calculated.
第3要素の第1項は、部分入力データX(1:t)とフィルタW(1:s−1)の類似度を表している。本例では、X(1),X(2),X(3)のベクトル列と、W(1),W(2)のベクトル列との類似度である。これは、X(1),X(2)のベクトル列に新たなベクトルX(3)が追加された比較入力ベクトル列と、W(1),W(2)のベクトル列に新たなベクトルW(3)が追加されなかった比較フィルタベクトル列との間の類似度である。第3要素は、部分入力データXの1つのベクトルを削除(スキップ)、すなわち系列データ類似度の算出のために考慮しないケースに対応する。 The first term of the third element represents the degree of similarity between the partial input data X (1: t) and the filter W (1: s-1). In this example, it is the similarity between the vector sequences of X (1), X (2), and X (3) and the vector sequences of W (1) and W (2). This is a comparison input vector sequence in which a new vector X (3) is added to the vector sequences of X (1) and X (2), and a new vector W in the vector sequences of W (1) and W (2). (3) is the degree of similarity with the comparison filter vector sequence to which it was not added. The third element corresponds to the case where one vector of the partial input data X is deleted (skipped), that is, it is not considered for the calculation of the series data similarity.
第3要素の第2項である−Gは、上述の通り、部分入力データXの1つのベクトルを削除するために必要なコストである。上述のように、第3要素においては、部分入力データXの1つのベクトルが削除されるため、削除コストを差し引いた値を算出している。 The second term of the third element, -G, is the cost required to delete one vector of the partial input data X, as described above. As described above, in the third element, since one vector of the partial input data X is deleted, the value obtained by subtracting the deletion cost is calculated.
max関数によって、第1〜第3要素のうち最大の値を取る要素が中間類似度S(t,s)として算出される。換言すれば、類似度算出部20は、中間類似度S(t,s)の算出処理において、ベクトルX(t)を比較入力ベクトル列に追加し、且つ、ベクトルW(s)を比較フィルタベクトル列に追加した場合と、ベクトルX(t)を比較入力ベクトル列に追加せずベクトルW(s)を比較フィルタベクトル列に追加した場合と、ベクトルX(t)を比較入力ベクトル列に追加しベクトルW(s)を比較フィルタベクトル列に追加しない場合それぞれの比較入力ベクトル列と比較フィルタベクトル列との間の類似度のうち、最も大きい類似度を中間類似度S(t,s)として算出する。
By the max function, the element having the maximum value among the first to third elements is calculated as the intermediate similarity S (t, s). In other words, the
なお、計算アルゴリズム30ではmax関数が用いられているが、第1〜第3要素のうち最大の値を取る限りにおいて他の関数が用いられてもよい。例えば、max関数に代えて、微分可能なソフトマックス関数を用いてもよい。ソフトマックス関数は、以下の式で表される。
ブロック36の処理によって、行列S(図4参照)の各成分の値が算出されていき、最終的にN行M列の成分42の値であるS(N,M)が算出される。計算アルゴリズム30のブロック38においては、当該S(N,M)が、部分入力データXとフィルタWとの間の系列データ類似度Sim(X,W)として出力される。
By the processing of
なお、本実施形態におけるSim(X,W)の算出方法は、部分入力データXとフィルタWの長さが同じ(N=M)であり、且つ、削除コストGが十分に大きい(G→∞)である場合、標準的なベクトルの類似度関数である内積に一致する。すなわち、本実施形態におけるSim(X,W)の算出方法は、内積を類似度関数とする畳み込みニューラルネットワークを一般化したものとなっている。 In the calculation method of Sim (X, W) in the present embodiment, the lengths of the partial input data X and the filter W are the same (N = M), and the deletion cost G is sufficiently large (G → ∞). ), It matches the inner product, which is a standard vector similarity function. That is, the method of calculating Sim (X, W) in the present embodiment is a generalization of a convolutional neural network in which the inner product is a similarity function.
上述のように、本実施形態においては、類似度算出部20は、部分入力データXとフィルタWの少なくとも一方において、少なくとも1つのベクトル(X(t)又はW(s))を削除した場合の部分入力データXとフィルタWとの間の類似度に基づいて、部分入力データXとフィルタWとの間の系列データ類似度を算出する。
As described above, in the present embodiment, the
本実施形態によれば、部分入力データXとフィルタWの少なくとも一方においてデータ要素が挿入又は削除された場合であっても、当該挿入又は削除されたデータ要素を考慮した上で、的確に部分入力データXとフィルタWとの間の類似度を算出することができる。これにより、ニューラルネットワーク14としては、従来よりも好適にラベルの予測あるいは学習を行うことができる。
According to the present embodiment, even when a data element is inserted or deleted in at least one of the partial input data X and the filter W, the partial input is accurately performed in consideration of the inserted or deleted data element. The degree of similarity between the data X and the filter W can be calculated. As a result, the
特に、タンパク質を表す文字列は、進化の過程において文字列中のある文字が欠損したり、新たに挿入されたりする場合がある。したがって、本実施形態に係るニューラルネットワーク14は、特に、タンパク質の二次構造の予測に適しているといえる。すなわち、ニューラルネットワーク14によれば、欠損あるいは挿入された文字(アミノ酸)を考慮した上で、フィルタとのより自然な類似度が算出され、ひいては、タンパク質の二次構造の予測精度が向上する。
In particular, in the character string representing a protein, a certain character in the character string may be deleted or newly inserted in the process of evolution. Therefore, it can be said that the
タンパク質の二次構造の予測結果に関して、十分に学習した従来の1次元畳み込みニューラルネットワークにおいては、学習データに対する予測精度が44.19%であり、未知データに対する予測精度が42.05%であったところ、十分に学習した本実施形態に係るニューラルネットワーク14においては、学習データに対する予測精度が44.93%であり、未知データに対する予測精度が42.97%となった。
Regarding the prediction result of the secondary structure of the protein, in the conventional one-dimensional convolutional neural network that was fully trained, the prediction accuracy for the training data was 44.19% and the prediction accuracy for the unknown data was 42.05%. However, in the
以下、学習部24の処理の詳細について説明する。
Hereinafter, the details of the processing of the
ニューラルネットワーク14に関するパラメータの学習は、入力データと、入力データの特徴が既知である学習データに基づいて行う。本実施形態では、入力データがタンパク質を表す文字列であるので、当該文字列と、各文字に対するラベル(タンパク質の二次構造)が既知のデータを学習データとして用いる。
The learning of the parameters related to the
学習部24は、学習データにフィッティングするようにニューラルネットワーク14に関する各パラメータを学習(更新)する。具体的には、損失関数をパラメータに関して微分し、損失が小さくなる方向にパラメータを更新していく。学習の具体的な方法としては、例えば確率勾配法などがあるが、その他の方法であってもよい。
The
本実施形態では、学習部24は、Sim(X,W)を、部分入力データX、フィルタW、及び削除コストGに関する偏微分に基づいて、ニューラルネットワーク14に関する各パラメータ(すなわち部分入力データX、フィルタW、及び削除コストG)を学習する。これによれば、偏微分の連鎖律によって損失関数をニューラルネットワーク14の各パラメータに関して偏微分することが可能になり、損失が小さくなる方向に各パラメータを更新することが可能になる。
In the present embodiment, the
Sim(X,W)の部分入力データX、フィルタW、及び削除コストGに関する偏微分を計算するためには、Sim(X,W)を計算するために用いられた行列S(図4参照)、及び、新たな行列R及び行列Pが必要となる。 In order to calculate the partial differential with respect to the partial input data X of Sim (X, W), the filter W, and the deletion cost G, the matrix S used to calculate Sim (X, W) (see FIG. 4). , And a new matrix R and matrix P are needed.
行列Rの計算アルゴリズム50が図5に示されている。計算アルゴリズム50のブロック52においては、sがMから1まで1つずつ減っていき、tがNから1まで1つずつ減っていく。すなわち、行列Sの計算とは逆に、行列Rの各成分の値の計算は、行列Rの右下から左上に向かって行われることになる。ブロック52で算出される行列Rの各成分の値R(t,s)は、
また、行列Pの計算アルゴリズム60が図6に示されている。計算アルゴリズム60のブロック62においては、sが1からMまで1つずつ増加していき、tが1からNまで1つずつ増加していく。すなわち、行列Pの計算においては、行列Pの各成分の値の計算は、行列Pの左上から右下に向かって行われることになる。計算アルゴリズム60の戻り値P(N,M)は、
計算アルゴリズム50の計算結果から、Sim(X,W)の部分入力データX、フィルタW、及び削除コストGに関する偏微分は以下のように計算できる。
ここで、類似度が内積で表現できる場合、すなわち
以上、本発明に係る実施形態を説明したが、本発明は上記実施形態に限られるものではなく、本発明の趣旨を逸脱しない限りにおいて種々の変更が可能である。 Although the embodiments according to the present invention have been described above, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the spirit of the present invention.
例えば、上記実施形態においては、入力データとしてタンパク質を表す文字列を用いたが、入力データとしてはその他の系列データを用いるようにしてもよい。 For example, in the above embodiment, a character string representing a protein is used as the input data, but other series data may be used as the input data.
例えば、塩基配列を入力データとして用い、ニューラルネットワーク装置10を用いて遺伝子の機能予測をしてもよい。また、音声波形を入力データとして用い、ニューラルネットワーク装置10を用いて音声認識を行ってもよい。あるいは、文字列を入力データとして用い、ニューラルネットワーク装置10を用いて当該文字列に対する自然言語処理を行うようにしてもよい。
For example, a base sequence may be used as input data, and a
10 ニューラルネットワーク装置、12 記憶部、14 ニューラルネットワーク、16 通信部、18 制御部、20 類似度算出部、22 予測部、24 学習部。 10 Neural network device, 12 Storage unit, 14 Neural network, 16 Communication unit, 18 Control unit, 20 Similarity calculation unit, 22 Prediction unit, 24 Learning unit.
Claims (5)
前記入力データの少なくとも一部分である部分入力データと、複数のデータ要素が並ぶ系列データであるフィルタとの間の系列データ類似度を算出する類似度算出部であって、前記部分入力データ及び前記フィルタの少なくとも一方において、少なくとも1つの前記データ要素を削除した場合の、前記部分入力データと前記フィルタとの間の類似度に基づいて、前記系列データ類似度を算出する類似度算出部と、
前記部分入力データと前記フィルタとの間の前記系列データ類似度に基づいて、前記ニューラルネットワーク装置に関するパラメータを学習する学習部と、
を備えることを特徴とするニューラルネットワーク装置。 A neural network device in which input data, which is series data in which multiple data elements are arranged, is input.
A similarity calculation unit that calculates the similarity of series data between a partial input data that is at least a part of the input data and a filter that is series data in which a plurality of data elements are arranged, and is the partial input data and the filter. A similarity calculation unit that calculates the series data similarity based on the similarity between the partial input data and the filter when at least one of the data elements is deleted in at least one of the above.
A learning unit that learns parameters related to the neural network device based on the series data similarity between the partial input data and the filter.
A neural network device characterized by comprising.
ことを特徴とする請求項1に記載のニューラルネットワーク装置。 The similarity calculation unit executes at least one of a process of adding each data element included in the partial input data to the comparison input data element string and a process of adding each data element included in the filter to the comparison filter element string. Then, the process of calculating the intermediate similarity, which is the similarity between the comparison input data element string and the comparison filter element string, is sequentially repeated from the beginning to the end in the partial input data and the sequence of the filters. When the series data similarity is calculated and the data element is added to both the comparison input data element string and the comparison filter element string in each intermediate similarity calculation process, the data element is added to the comparison input data. When adding to the comparison filter element column without adding to the element string, and when adding the data element to the comparison input data element column and not adding to the comparison filter element column, the comparison input data element string and the comparison respectively. Among the similarities with the filter element sequence, the largest similarity is calculated as the intermediate similarity.
The neural network apparatus according to claim 1.
ことを特徴とする請求項2に記載のニューラルネットワーク装置。 The similarity calculation unit considers the deletion cost, which is the cost required to delete the data element when the data element is not added to either the comparison input data element string or the comparison filter element string, and considers the intermediate. Calculate similarity,
The neural network apparatus according to claim 2.
ことを特徴とする請求項3に記載のニューラルネットワーク装置。 The learning unit learns the parameters related to the neural network device based on the partial input data, the filter, and the partial differential with respect to the series data similarity with respect to the deletion cost.
The neural network apparatus according to claim 3.
複数の入力データ要素が並ぶ系列データである入力データが入力されるニューラルネットワーク装置であって、
前記入力データの少なくとも一部分である部分入力データと、複数のデータ要素が並ぶ系列データであるフィルタとの間の系列データ類似度を算出する類似度算出部であって、前記部分入力データ及び前記フィルタの少なくとも一方において、少なくとも1つの前記データ要素を削除した場合の、前記部分入力データと前記フィルタとの間の類似度に基づいて、前記系列データ類似度を算出する類似度算出部と、
前記部分入力データと前記フィルタとの間の前記系列データ類似度に基づいて、前記ニューラルネットワーク装置に関するパラメータを学習する学習部と、
を備えるニューラルネットワーク装置として機能させることを特徴とするプログラム。 Computer,
A neural network device in which input data, which is series data in which a plurality of input data elements are arranged, is input.
A similarity calculation unit that calculates the similarity of series data between a partial input data that is at least a part of the input data and a filter that is series data in which a plurality of data elements are arranged, and is the partial input data and the filter. A similarity calculation unit that calculates the series data similarity based on the similarity between the partial input data and the filter when at least one of the data elements is deleted in at least one of the above.
A learning unit that learns parameters related to the neural network device based on the series data similarity between the partial input data and the filter.
A program characterized by functioning as a neural network device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018047495A JP6844565B2 (en) | 2018-03-15 | 2018-03-15 | Neural network device and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018047495A JP6844565B2 (en) | 2018-03-15 | 2018-03-15 | Neural network device and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019159988A JP2019159988A (en) | 2019-09-19 |
JP6844565B2 true JP6844565B2 (en) | 2021-03-17 |
Family
ID=67993633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018047495A Active JP6844565B2 (en) | 2018-03-15 | 2018-03-15 | Neural network device and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6844565B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111027681B (en) * | 2019-12-09 | 2023-06-27 | 腾讯科技(深圳)有限公司 | Time sequence data processing model training method, data processing method, device and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009093490A (en) * | 2007-10-10 | 2009-04-30 | Mitsubishi Electric Corp | Age estimation device and program |
JP2013077194A (en) * | 2011-09-30 | 2013-04-25 | Hiroshi Sugimura | Information system device utilizing knowledge |
-
2018
- 2018-03-15 JP JP2018047495A patent/JP6844565B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019159988A (en) | 2019-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lanchantin et al. | Deep motif dashboard: visualizing and understanding genomic sequences using deep neural networks | |
CN111652364A (en) | Apparatus and method for training meta learning network | |
Nssibi et al. | Advances in nature-inspired metaheuristic optimization for feature selection problem: A comprehensive survey | |
CN113010683B (en) | Entity relationship identification method and system based on improved graph attention network | |
CN112086144A (en) | Molecule generation method, molecule generation device, electronic device, and storage medium | |
JP6844565B2 (en) | Neural network device and program | |
JP4268500B2 (en) | Process state similar case search method, state prediction method, and storage medium | |
CN113705092B (en) | Disease prediction method and device based on machine learning | |
Shubh et al. | Handwriting recognition using deep learning | |
CN111259176B (en) | Cross-modal Hash retrieval method based on matrix decomposition and integrated with supervision information | |
CN115409111A (en) | Training method of named entity recognition model and named entity recognition method | |
Belhouchette | Facial recognition to identify emotions: an application of deep learning | |
Cai et al. | Deep low-shot learning for biological image classification and visualization from limited training samples | |
US20220164659A1 (en) | Deep Learning Error Minimizing System for Real-Time Generation of Big Data Analysis Models for Mobile App Users and Controlling Method for the Same | |
JP6993250B2 (en) | Content feature extractor, method, and program | |
CN114358284A (en) | Method, device and medium for training neural network step by step based on category information | |
Xavier et al. | Genome assembly using reinforcement learning | |
CN112861689A (en) | Searching method and device of coordinate recognition model based on NAS technology | |
CN109697528A (en) | Business revenue data predication method, device, computer equipment and storage medium | |
JP7404962B2 (en) | Image processing system and image processing program | |
US20230146635A1 (en) | Method and Systems for Conditioning Data Sets for Efficient Computational Processing | |
CN111783980B (en) | Ranking learning method based on dual cooperation generation type countermeasure network | |
JP7189553B2 (en) | Reasoning method, reasoning device and program | |
CN111933217B (en) | DNA motif length prediction method and prediction system based on deep learning | |
JP6980616B2 (en) | Computer system and learning method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190620 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200529 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200707 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200826 |
|
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: 20210126 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210208 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6844565 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |