JP2016218513A - Neural network and computer program therefor - Google Patents
Neural network and computer program therefor Download PDFInfo
- Publication number
- JP2016218513A JP2016218513A JP2015099137A JP2015099137A JP2016218513A JP 2016218513 A JP2016218513 A JP 2016218513A JP 2015099137 A JP2015099137 A JP 2015099137A JP 2015099137 A JP2015099137 A JP 2015099137A JP 2016218513 A JP2016218513 A JP 2016218513A
- Authority
- JP
- Japan
- Prior art keywords
- function
- output
- input
- layer
- 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.)
- Granted
Links
Images
Abstract
Description
この発明は機械学習に関し、特に、計算資源の小さな計算機でも精度よく推論を行うことができるニューラルネットワークに関する。 The present invention relates to machine learning, and more particularly, to a neural network that can perform inference with high accuracy even on a computer with small calculation resources.
機械学習とは、限られた量の事例から、一般的な法則あるいは傾向を獲得することを目的とした、帰納的な推論に基づく学習方法である。数理的には、事例(訓練)データが真のデータ分布から標本として抽出されたことを仮定し、抽出元のデータ分布を大域的に推定することとして定式化される。データ分布は、データ空間を定義域とし、確率等のデータらしさを表現する空間を値域とする連続関数として捉えることができる。この連続関数を訓練データから近似する方法の一つとしてニューラルネットワークがある。ニューラルネットワークは、多層パーセプトロン(multi-layered perceptron:MLP)すなわちフィードフォワードニューラルネットワーク(feed forward neural network:FFNN)として、言語モデル、音声認識、及び画像認識等様々な識別タスクにおいて広く利用されている。 Machine learning is a learning method based on inductive reasoning that aims to acquire general rules or trends from a limited amount of cases. Mathematically, it is formulated as a global estimation of the source data distribution, assuming that the case (training) data is sampled from the true data distribution. The data distribution can be understood as a continuous function having a data space as a domain and a space expressing a data quality such as probability as a range. One method for approximating this continuous function from training data is a neural network. Neural networks are widely used as multi-layered perceptrons (MLPs) or feed forward neural networks (FFNNs) in various identification tasks such as language models, speech recognition, and image recognition.
任意の連続関数すなわちデータ分布は、ロジスティックシグモイド関数を活性化関数として使用する2層ニューラルネットワークにおいて表現可能である。しかし、2層程度の少ない層数のネットワークでは、個々の訓練データ点等の局所的な分布のみを学習し、大域的な分布を獲得できない過適合が発生する傾向がある。この様子を図1に示す。図1は2次元のデータ空間において、2種類のデータが存在し、それらの訓練データ(×及び○で示す)が得られた場合を想定したものである。ニューラルネットワークのタスクとして、これら2種類のデータを識別する場合、元のデータ空間においてこれら2種類のデータを識別するための識別曲線を求めることが必要である。しかし、想定するパラメータの数が多すぎたりすると、識別曲線が訓練データに対して過適合することが多い。過適合により得られた識別曲線を例えば図1の識別曲線とすると、この識別曲線30は、訓練データに対する識別性能は極めて高く、ときには完全な識別結果を与えるが、訓練データ以外のデータに対する識別性能(汎化性能)は逆に悪化する。それに対して適正な訓練により得られた識別曲線32は、全てのテストデータに対して完全な識別結果を与えるとは限らないが、訓練データ以外のデータが与えられたときも比較的精度よくデータの識別を行うことができる。
Any continuous function or data distribution can be represented in a two-layer neural network using a logistic sigmoid function as an activation function. However, in a network with a small number of layers such as about two layers, there is a tendency that only a local distribution such as individual training data points is learned, and overfitting that cannot acquire a global distribution occurs. This is shown in FIG. FIG. 1 assumes a case where two types of data exist in a two-dimensional data space and their training data (indicated by x and ◯) are obtained. When these two types of data are identified as a neural network task, it is necessary to obtain an identification curve for identifying these two types of data in the original data space. However, if too many parameters are assumed, the identification curve often overfits the training data. If the discrimination curve obtained by overfitting is, for example, the discrimination curve of FIG. 1, this
過適合を抑制するため、機械学習全般において正則化(非特許文献1、非特許文献2)と呼ばれる手法が広く用いられている。正則化とは、識別モデルが訓練データを近似する様に学習する際に、近似に影響するパラメータ数を削減したり、パラメータの値を小さくしたりする手法である。この手法は、訓練データが抽出される元の分布は、滑らかな形状であるという仮定に基づいている。すなわち、正則化は、元の分布が少数かつ小さな値のパラメータによって構成される関数であるという仮定に基づいている。一般には、最小化する目的関数にパラメータのL2ノルム又はL1ノルムを加えることで、多くのパラメータの値を0または0近傍とする目的で用いられる。すなわち、正則化により推論に使用されるパラメータの数を実質的に制限するという制約を課すことで、汎化性能が向上する。
In order to suppress overfitting, a technique called regularization (Non-Patent
正則化と共に、モデルの計算構造(関数定義)という観点から汎化性能を向上するという考え方がある。その手法の1つとして、深層学習(deep learning)と呼ばれる、多層化したニューラルネットワークがある。多数の層からなるニューラルネットワークでは、入力に近い層においては局所的なデータ分布を捉え、出力層へと進むにつれて、局所的なデータ分布の組み合わせにより大域的な分布を捉える性質があると言われている(非特許文献3)。画像認識等一部の識別タスクにおいては、深層学習により従来手法を大幅に凌駕する汎化性能が達成されている(非特許文献4)。 Along with regularization, there is an idea of improving generalization performance from the viewpoint of the calculation structure (function definition) of the model. As one of the methods, there is a multilayered neural network called deep learning. In a neural network consisting of many layers, it is said that local data distribution is captured in layers close to the input, and global distribution is captured by a combination of local data distributions as it proceeds to the output layer. (Non-patent Document 3). In some identification tasks such as image recognition, generalization performance that far surpasses conventional techniques is achieved by deep learning (Non-Patent Document 4).
図2に、多層化したニューラルネットワーク(ディープニューラルネットワーク:DNN)50の構成例を示す。図2を参照して、DNN50は、入力層52と、複数個の隠れ層からなる中間層54と、出力層56とを含む。この例では、中間層54は5個の隠れ層を含んでいる。DNN50の学習には誤差逆伝搬法が用いられる。すなわち、訓練データが入力層52に与えられ、中間層54を経て出力層56から訓練データに対する予測出力が得られる。その出力と正解データとの誤差が逆に出力側から与えられ、各ノード間の結合の重みとバイアスとが、所定の誤差関数を最小にするように更新される。
FIG. 2 shows a configuration example of a multilayered neural network (deep neural network: DNN) 50. Referring to FIG. 2, DNN 50 includes an
従来は、各層の活性化関数としては、ロジスティックシグモイド関数及びハイパーボリックタンジェント等が広く用いられてきた。しかし最近では、多層化を前提として、各層の活性化関数についても、様々な関数(非特許文献5、非特許文献6)が提案され、これらにより汎化性能が向上することが示されている。
Conventionally, logistic sigmoid functions, hyperbolic tangents, and the like have been widely used as activation functions for each layer. However, recently, on the premise of multilayering, various functions (
以上のように、従来技術により、多層化による汎化性能の向上が示されている。しかし、同時に計算量が増大したという問題がある。したがって、性能向上のためには、依然として大規模な計算装置が必要である。また、汎用GPU計算機の普及等、計算機ハードウェアの大規模並列化の進展により各層の計算効率は向上しているが、多層モデルでは入力側の層における計算を終えるまで次の層の計算が不可能であるという制約がある。したがって、多層化による層数の増加に比例して必然的に待ち時間が増大し、訓練時のみならず予測時の計算効率も低下しているという問題がある。 As described above, improvement in generalization performance by multilayering has been shown by the prior art. However, there is a problem that the calculation amount has increased at the same time. Therefore, a large-scale computing device is still necessary for improving the performance. In addition, the computation efficiency of each layer has improved due to the progress of massive parallelization of computer hardware, such as the spread of general-purpose GPU computers. However, in the multilayer model, the calculation of the next layer is not possible until the computation on the input side layer is completed. There is a restriction that it is possible. Therefore, there is a problem that the waiting time is inevitably increased in proportion to the increase in the number of layers due to the multi-layering, and the calculation efficiency is reduced not only during training but also during prediction.
したがって本発明の目的は、短時間で予測可能な、汎化性能の高いニューラルネットワークを提供することである。 Accordingly, an object of the present invention is to provide a neural network with high generalization performance that can be predicted in a short time.
本発明の第1の局面に係るニューラルネットワークは、複数個の入力ノードを持つ入力層と、入力層からの出力を受けるように接続された入力を持つ非線形関数層とを含む。非線形関数層は、各々が入力層の複数個の入力ノードからの出力を受けるように接続された、各々が任意の独立成分を近似可能な複数個の隠れ層を含む。複数個の隠れ層の各々は、各々が複数個の入力ノードに重み付きで接続された入力を持ち、活性化関数として、劣微分可能な周期関数を用いる複数個の神経細胞素子と、同一の隠れ層内の複数個の神経細胞素子の出力を重み付きで受けるように接続され、活性化関数として、劣微分可能な関数を用いる出力集約素子とを含む。 The neural network according to the first aspect of the present invention includes an input layer having a plurality of input nodes and a nonlinear function layer having an input connected to receive an output from the input layer. The nonlinear function layer includes a plurality of hidden layers, each connected to receive outputs from a plurality of input nodes of the input layer, each capable of approximating an arbitrary independent component. Each of the plurality of hidden layers has an input connected to each of a plurality of input nodes with weights, and is the same as a plurality of nerve cell elements that use a sub-differentiable periodic function as an activation function. And an output aggregating element that is connected so as to receive weighted outputs of a plurality of nerve cell elements in the hidden layer and uses a subdifferentiable function as an activation function.
好ましくは、周期関数は、コサイン関数若しくはサイン関数又はこれらの組み合わせ、又は区分線形近似したコサイン関数若しくはサイン関数である。 Preferably, the periodic function is a cosine function or sine function or a combination thereof, or a cosine function or sine function approximated by piecewise linear approximation.
より好ましくは、ニューラルネットワークは、複数個の隠れ層の各々の入力側の重みパラメータにL2正則化を用いて訓練されたものである。 More preferably, the neural network is trained using L2 regularization for the weight parameter on the input side of each of the plurality of hidden layers.
ニューラルネットワークは、準ニュートン法を用いて訓練されたものでもよい。 The neural network may be trained using a quasi-Newton method.
より好ましくは、出力集約素子の活性化関数は恒等関数、すなわち与えられた入力と同じ値を出力する関数でもよい。 More preferably, the activation function of the output aggregation element may be an identity function, that is, a function that outputs the same value as a given input.
ニューラルネットワークはさらに、複数個の隠れ層の出力集約素子の出力を受けるように接続された出力層を含んでもよい。出力層は、各々が複数個の隠れ層の出力集約素子の出力を重み付きで受けるように接続された複数個の出力神経細胞素子を含む。 The neural network may further include an output layer connected to receive the output of the plurality of hidden layer output aggregating elements. The output layer includes a plurality of output nerve cell elements each connected to receive the output of a plurality of hidden layer output aggregation elements with weights.
出力集約素子の活性化関数はsoftmax関数であってもよい。 The activation function of the output aggregation element may be a softmax function.
本発明の第2の局面に係るコンピュータプログラムは、コンピュータを、上記したいずれかのニューラルネットワークとして機能させる。 A computer program according to the second aspect of the present invention causes a computer to function as any one of the neural networks described above.
以下の説明及び図面では、同一の部品には同一の参照番号を付してある。したがって、それらについての詳細な説明は繰返さない。なお、以下の実施の形態の説明では、ニューラルネットワークを「NN」と呼ぶ。 In the following description and drawings, the same parts are denoted by the same reference numerals. Therefore, detailed description thereof will not be repeated. In the following description of the embodiment, the neural network is referred to as “NN”.
[基本的考え方]
機械学習において、訓練データを近似する連続関数を得る枠組みとして、以下に述べる本発明の1実施の形態では、連続関数の離散フーリエ変換における周波数領域を表現するネットワーク構造を用いる。
[Basic concept]
In machine learning, as a framework for obtaining a continuous function that approximates training data, a network structure that represents a frequency domain in a discrete Fourier transform of a continuous function is used in one embodiment of the present invention described below.
図3は、2個のラベル分布を近似する関数を例に、本実施の形態で用いるNNの構造を示す。図3を参照して、このNN80は、入力層90、入力層90の出力を受けるように接続された隠れ層92、及び隠れ層92の出力を受けるように接続された出力層94を含む。
FIG. 3 shows the structure of the NN used in the present embodiment, taking a function approximating two label distributions as an example. Referring to FIG. 3,
この例では、入力層90は3つのノードを含む。各ノードは神経細胞素子(ニューロン)と呼ばれる。各ニューロンは、その入力の重み付きの総和を入力とする所定の活性化関数の値を出力する。活性化関数は、単調増加関数であればよいが、本実施の形態で使用する活性化関数については後述する。
In this example,
隠れ層92は、2つの隠れ層ユニット100及び102を含む。隠れ層ユニット100及び102はいずれも同じ構造を持つ。したがって以下では隠れ層ユニット100のみを例に説明する。また隠れ層92は、階層数でいえば1層のみである。図3では、説明のため隠れ層ユニットを2つとしているが、本実施の形態では10個程度である。
The hidden
隠れ層ユニット100は、いずれも入力層90の3つの入力素子の出力に結合された入力を持ち、コサイン関数を活性化関数として用いるCOS素子120、122、124、126及び128と、COS素子120、122、124、126及び128の出力を受けるようにこれらに結合され、恒等写像を活性化関数として用いるΣ素子140とを含む。これら素子はいずれも神経細胞素子の一種である。
The hidden
出力層94は、本実施の形態では、いずれも隠れ層ユニット100及び102の出力を受けるようにこれらに結合されたノードを含む。
In this embodiment,
各素子の間の結合には重み及びバイアスが設定される。各Σ素子の出力は以下の式により表される。 Weights and biases are set for the coupling between the elements. The output of each Σ element is expressed by the following equation.
なお、出力層94は、ラベル数と同数の隠れ層ユニット100及び102等を用意することで省略可能である。また、各隠れ層ユニットのΣ素子の活性化関数をsoftmax関数とすることで、その出力を確率値として用いることができる。softmax関数は以下の式で表される関数(i=1、…、n)である。
The
図3に示す様に出力層94を用意することで、ラベル数より多いまたは少ないΣ素子を組み込むことも可能である。なお、COS素子においてコサイン関数の代わりにサイン関数を用いた場合も、ネットワークの近似性能は等価である。また、これら以外の微分可能な周期関数若しくはそれらの組み合わせを用いても良い。
By preparing the
本実施の形態でも、従来のFFNN等と同様、誤差逆伝搬法を用いた学習を行う。しかし、本実施の形態では、隠れ層ユニットのCOS素子において、コサイン関数を活性化関数に用いている。そのため、以下に述べるように従来と同様の手法を用いると訓練データに対して隠れ層ユニット100及び102の最適化学習を行うことがむずかしい。そこで本実施の形態では、学習時に以下の様な2つの手法を用いる。第1は正則化、第2は準ニュートン法の採用である。
Also in this embodiment, learning using the error back-propagation method is performed as in the conventional FFNN. However, in this embodiment, the cosine function is used as the activation function in the COS element of the hidden layer unit. For this reason, as described below, it is difficult to perform optimization learning of the hidden
本実施の形態で用いるネットワーク構造は、データ分布の周波数領域表現を用いている。したがって、NN80において、近似する関数の周波数領域における性質として解釈可能である周波数成分、位相成分、振幅成分の各要素を個別に制御可能である。一般に、関数の大域的な傾向は低周波成分によって表現される。したがって、大域的なデータ分布を得ることにより汎化性能の向上を図ることができる。そのため、本実施の形態では、周波数成分への正則化を行うことで、低周波領域によってデータ分布を近似する。正則化項は、周波数成分を表すパラメータについて、原点を頂点とする下に凸な関数(凸関数)である。学習における目的関数を、近似関数と訓練データとの誤差とすると、誤差に正則化を加えることで、目的関数は原点付近において最小値となり、大域的には凸関数となる。図4及び図5は、本実施の形態で用いるネットワークにおける周波数パラメータの値に関する目的関数の形状例を示したものである。正則化をしない場合の目的関数の形状例を図4に示す。また、最小化する目的関数に周波数成分を表すパラメータのL2ノルムを加えた(L2正則化した)場合の目的関数の形状例を図5に示す。
The network structure used in this embodiment uses a frequency domain representation of data distribution. Therefore, each element of the frequency component, the phase component, and the amplitude component that can be interpreted as a property in the frequency domain of the function to be approximated can be individually controlled in the
図4及び図5を対比すると、図4では最小値が複数個存在するのに対し、図5では原点付近に1個のみ大域的な最小値が存在することが分かる。したがって、誤差関数がこの大域的な最小値に収束するように各パラメータの学習を行う。しかし、図5から明らかなように、このグラフには局所的な最小値(極小値)が複数個存在する。通常の学習の過程では、パラメータがこれら極小値の1つに収束してしまう危険性がある。そのような事態は避けなければならない。そこで本実施の形態ではさらに、周波数パラメータに関してはL―BFGS法を含む準ニュートン法等の大域的最適化手法を用いる。準ニュートン法は局所な最適解に収束しにくいという特徴がある。中でもL−BGFS法は使用するメモリが少なくて済むことが知られている。したがって、計算資源の少ない装置でも利用できる。 4 and 5 are compared, it can be seen that there are a plurality of minimum values in FIG. 4, whereas there is only one global minimum value near the origin in FIG. Therefore, each parameter is learned so that the error function converges to the global minimum value. However, as is apparent from FIG. 5, there are a plurality of local minimum values (minimum values) in this graph. In the normal learning process, there is a risk that the parameter will converge to one of these minimum values. Such a situation must be avoided. Therefore, in the present embodiment, a global optimization method such as a quasi-Newton method including the L-BFGS method is further used for the frequency parameter. The quasi-Newton method has a feature that it is difficult to converge to a local optimal solution. In particular, it is known that the L-BGFS method requires less memory. Therefore, the apparatus can be used even with a device having a small calculation resource.
[構成]
図6に、上記した様な構成を持つNNを採用した例として文字認識装置180と、文字認識装置180のNNの学習を行う文字認識NN学習装置186とをブロック図形式で示す。
[Constitution]
FIG. 6 is a block diagram showing a
図6を参照して、文字認識装置180は、手書き文字を含む入力画像182を受け、手書き文字認識を行って文字認識テキスト184を出力するためのものである。この例では文字認識装置180は、図示しない別のスキャナ又は記憶装置等から入力画像182を受信するものとする。文字認識装置180は、入力画像182を受信して一時記憶する入力画像記憶装置200と、入力画像記憶装置200に記憶された入力画像に対して傾きの補正等を行った後、個別の文字画像に分離し、個々の文字画像に対する正規化等をする画像補正部202と、この文字画像を文字ごとに記憶する画像記憶部204と、上記本実施の形態に係るNNからなる学習済の文字認識NN208と、画像記憶部204から各文字ごとに文字画像を読出し、文字認識NN208に入力してその結果を得ることにより文字認識テキスト184を出力するデコーダ210とを含む。
Referring to FIG. 6,
文字認識NN208には、文字認識NN学習装置186による学習が予め行われているものとする。文字認識NN学習装置186は、手書き文字からなる画像をその文字の文字ラベルとともに記憶する手書き文字データベース(DB)240と、手書き文字DB240に記憶された手書き文字から画像補正部202と同様の手法により文字画像を補正し、文字ラベルと組にした学習データを生成する学習データ生成部242と、学習データ生成部242により生成された学習データを記憶する学習データ記憶装置244と、学習データ記憶装置244に記憶された学習データを用い、上記した手法により文字認識NN208の学習を行うための学習処理部246とを含む。文字認識NN208の入力層のノード数は、学習データのうち、文字ラベルを除いた要素数と等しい。文字ラベルは学習時の教師データとして文字認識NN208の出力層側からの誤差逆伝搬に用いられる正解ベクトルの生成に使用される。
In the
[動作]
上記した文字認識NN学習装置186及び文字認識装置180は以下のように動作する。まず文字認識NN学習装置186による文字認識NN208の学習が行われ、その後に文字認識装置180による入力画像182の文字認識が行われる。
[Operation]
The character recognition
学習では、学習データ生成部242が手書き文字DB240に記憶された手書き文字画像を読出し、画像補正部202と同様に画像を補正・正規化し、文字ラベルと組み合わせて学習データを生成する。生成された学習データは学習データ記憶装置244に蓄積される。学習処理部246は、学習データ記憶装置244に蓄積された学習データを用い、上記した手法によって文字認識NN208の学習を行う。学習処理部246による文字認識NN208の学習が終われば、文字認識装置180による入力画像182の文字認識が可能になる。
In learning, the learning
文字認識では、図示しないスキャナ等により入力画像182が生成され、入力画像記憶装置200に記憶される。画像補正部202は、画像の傾き補正、文字領域の抽出、文字領域の正規化等を行って画像を補正し、画像記憶部204に記憶させる。デコーダ210は、この画像を画像記憶部204から読出し、文字認識NN208に入力として与える。文字認識NN208は、学習の結果、入力された文字画像に対応する文字ラベルを特定する出力をデコーダ210に返す。デコーダ210はこの文字ラベルから文字認識テキスト184を生成して出力する。
In character recognition, an
[実験結果]
上記文字認識NN208の性能を調べるため、手書き文字認識に関する実験を行った。実験には、MNIST手書き文字データセットを用いた。本実施の形態による性能と、NNの識別モデルとして非特許文献6で示されたmaxoutモデル、及び非特許文献5で示されたrectifierによる性能を、併せて次のテーブル1に示す。
[Experimental result]
In order to investigate the performance of the
表1に示すように、本実施の形態に係るNNの識別性能は、最新の手法によるものには及ばない。しかし、性能としてはそれほど悪いわけでもない。特筆すべきは、パラメータ数の少なさである。実施の形態(30/10)ではパラメータ数が472Kである。一方、maxoutではパラメータ数は1233K、rectifierに至っては3、798Kである。このように、本実施の形態によれば、少ないパラメータ数で比較的高い精度を出すことができる。更に、実施の形態(20/10)ではパラメータ数は157K、実施の形態(10/15)では118Kと、パラメータ数はさらに大幅に削減される。にもかかわらず、識別誤り率はわずかしか上昇せず、識別性能の低下はごくわずかである。 As shown in Table 1, the identification performance of the NN according to the present embodiment does not reach that of the latest method. However, the performance is not so bad. Of particular note is the small number of parameters. In the embodiment (30/10), the number of parameters is 472K. On the other hand, in maxout, the number of parameters is 1233K, and in rectifier is 3,798K. Thus, according to the present embodiment, a relatively high accuracy can be obtained with a small number of parameters. Furthermore, in the embodiment (20/10), the number of parameters is 157K, and in the embodiment (10/15), the number of parameters is 118K. Nevertheless, the discrimination error rate increases only slightly and the degradation of the discrimination performance is negligible.
さらに、正則化が汎化性能の向上にどの程度寄与しているかを確認するために、正則化を行って文字認識NN208の学習を行った場合と、正則化せずに学習を行った場合との結果を比較した。正則化を行った場合を図7に、行わなかった場合を図8に、それぞれ示す。双方の図において、実線260及び280で示したのがそれぞれ訓練データに対する識別誤り率、破線264及び284で示したのがテストデータに対する識別誤り率である。グラフは、横軸に学習の繰返し数を示し、縦軸にそのときの識別誤り率を示す。
Furthermore, in order to confirm how much regularization contributes to the improvement of generalization performance, when regularization is performed and learning of the
図8の実線280により示されるように、正則化を行わない場合には、テストデータに対する識別誤りは学習とともに大きく低下する。しかし、破線284により示されるように、テストデータについての精度はほとんど高くならなかった。それに対し、図7に示すように、正則化を行った場合には、学習データに対する誤り率の低下は実線260により示されるように正則化を行わなかった場合には及ばなかったが、破線264により示されるように、テストデータに対する識別誤り率は学習とともに低下した。すなわち、識別誤りが少なくなり、識別精度は高くなった。この結果、汎化性能は正則化を行わない場合と比較して高くなっているといえる。
As indicated by a
[実施の形態の効果]
以上のように、上記実施の形態によれば、多層化を必要とせずに汎化性能の向上が可能である。したがって、計算全体における並列計算が占める比率が増大し、並列計算機を用いた場合の計算効率が向上する。また、層数が低減されることによって各層における待ち時間が削減され、予測時における計算時間と計算に必要な計算機資源が削減される。
[Effect of the embodiment]
As described above, according to the above embodiment, the generalization performance can be improved without requiring multi-layering. Therefore, the ratio of the parallel calculation in the entire calculation increases, and the calculation efficiency when using the parallel computer is improved. Further, the waiting time in each layer is reduced by reducing the number of layers, so that the calculation time at the time of prediction and the computer resources necessary for the calculation are reduced.
中間層の計算単位であるΣ素子は、その入力であるCOS素子の出力を互いに共有しないため、訓練時の誤差逆伝搬における経路数が削減される。つまり、信用割り当て問題が緩和される。そのため、全結合の構造と比較して上記実施の形態のNNは効率的な最適化が可能であり、訓練時間の低減という効果がある。 Since the Σ element, which is the calculation unit of the intermediate layer, does not share the output of the COS element as its input, the number of paths in error back propagation during training is reduced. In other words, the credit allocation problem is eased. Therefore, the NN of the above embodiment can be efficiently optimized as compared with the structure of all bonds, and has the effect of reducing the training time.
従来の正則化は、分布を表現するパラメータ数を削減することが目的であったため、識別に関与するパラメータはネットワークの一部に留まっていた。一方で上記実施の形態では、コサインまたはサインという大域的に変化が続く周期関数を活性化関数として用いている。そのため、全ての素子が識別結果に影響を与える。これにより、予め用意するパラメータ数の削減が見込まれることから、全体の計算規模が縮小され、小規模な計算機上での高性能な識別が可能となる。なお、周期関数として上記実施の形態ではコサイン関数を用いている。しかし、上記したようにサイン関数を用いても良い。コサイン関数とサイン関数との組み合わせを用いても良い。さらに、コサイン関数又はサイン関数を区分線形近似した関数(区分線形近似したコサイン関数又はサイン関数)も同様に周期関数となり、コサイン関数又はサイン関数に代えて使用できる。区分線形近似した関数を用いる場合、線分の連結部分において微分可能でないため、通常の方法では準ニュートン法を適用した訓練を行えない。しかしそうした場合でも、区分線形近似のように微分ができない部分で劣微分が定義可能(劣微分可能)であれば準ニュートン法を適用した訓練を行うことができる。すなわち、COS素子のように隠れユニットの神経細胞素子で用いる活性化関数は劣微分可能であればよい。 Conventional regularization has been aimed at reducing the number of parameters expressing the distribution, so the parameters involved in the identification have remained part of the network. On the other hand, in the above-described embodiment, a periodic function called cosine or sine that continues to change globally is used as the activation function. Therefore, all elements affect the identification result. As a result, since the number of parameters prepared in advance is expected to be reduced, the overall calculation scale is reduced, and high-performance discrimination on a small computer becomes possible. In the above embodiment, a cosine function is used as the periodic function. However, as described above, a sine function may be used. A combination of a cosine function and a sine function may be used. Further, a function obtained by piecewise linear approximation of a cosine function or sine function (a cosine function or sine function obtained by piecewise linear approximation) similarly becomes a periodic function, and can be used in place of the cosine function or sine function. In the case of using a piecewise linear approximation function, training using the quasi-Newton method cannot be performed by a normal method because it is not differentiable at a connected portion of line segments. However, even in such a case, if sub-differentiation can be defined in a portion where differentiation cannot be performed as in piecewise linear approximation (sub-differentiation is possible), training using the quasi-Newton method can be performed. That is, the activation function used in the neuron cell element of the hidden unit such as the COS element only needs to be subdifferentiable.
上記実施の形態によれば、従来よりも小規模な計算によって汎化性能が得られる。そのため、計算性能が限定的なモバイル機器において識別モデルを利用する際に、モバイル機器内で完結したアプリケーション及びサービスの提供が可能となる。 According to the above embodiment, generalization performance can be obtained by a smaller-scale calculation than in the past. Therefore, when the identification model is used in a mobile device with limited calculation performance, it is possible to provide a complete application and service in the mobile device.
[コンピュータによる実現]
本発明の実施の形態に係る文字認識装置180及び文字認識NN学習装置186は、いずれもコンピュータハードウェアと、そのコンピュータハードウェア上で実行されるコンピュータプログラムとにより実現できる。図9はこのコンピュータシステム330の外観を示し、図10はコンピュータシステム330の内部構成を示す。
[Realization by computer]
The
図9を参照して、このコンピュータシステム330は、メモリポート352及びDVD(Digital Versatile Disc)ドライブ350を有するコンピュータ340と、キーボード346と、マウス348と、モニタ342とを含む。
Referring to FIG. 9, the
図10を参照して、コンピュータ340は、メモリポート352及びDVDドライブ350に加えて、CPU(中央処理装置)356と、CPU356、メモリポート352及びDVDドライブ350に接続されたバス366と、ブートプログラム等を記憶する読出専用メモリ(ROM)358と、バス366に接続され、プログラム命令、システムプログラム及び作業データ等を記憶するランダムアクセスメモリ(RAM)360と、ハードディスク354を含む。コンピュータシステム330はさらに、他端末との通信を可能とするネットワーク368への接続を提供するネットワークインターフェイス(I/F)344を含む。
Referring to FIG. 10, in addition to the
コンピュータシステム330を上記した実施の形態に係る文字認識装置180及び文字認識NN学習装置186の各機能部として機能させるためのコンピュータプログラムは、DVDドライブ350又はメモリポート352に装着されるDVD362又はリムーバブルメモリ364に記憶され、さらにハードディスク354に転送される。又は、プログラムはネットワーク368を通じてコンピュータ340に送信されハードディスク354に記憶されてもよい。プログラムは実行の際にRAM360にロードされる。DVD362から、リムーバブルメモリ364から又はネットワーク368を介して、直接にRAM360にプログラムをロードしてもよい。
A computer program for causing the
このプログラムは、コンピュータ340を、上記実施の形態に係る文字認識装置180及び文字認識NN学習装置186の各機能部として機能させるための複数の命令からなる命令列を含む。コンピュータ340にこの動作を行わせるのに必要な基本的機能のいくつかはコンピュータ340上で動作するオペレーティングシステム若しくはサードパーティのプログラム又はコンピュータ340にインストールされる、ダイナミックリンク可能な各種プログラミングツールキット又はプログラムライブラリにより提供される。たとえば、誤差逆伝搬法、及びL−BFGS法については市販の統計処理ライブラリにより提供されるソフトウェアツールを利用できる。したがって、このプログラム自体はこの実施の形態のシステム及び方法を実現するのに必要な機能全てを必ずしも含まなくてよい。このプログラムは、命令のうち、所望の結果が得られるように制御されたやり方で適切な機能又はプログラミングツールキット又はプログラムライブラリ内の適切なプログラムを実行時に動的に呼出すことにより、上記したシステム又は装置としての機能を実現する命令のみを含んでいればよい。もちろん、プログラムのみで必要な機能を全て提供してもよい。
This program includes an instruction sequence including a plurality of instructions for causing the
[応用例]
上記実施の形態は、手書き文字認識装置に関するものである。しかし、本発明はそのような実施の形態には限定されない。例えば、音声認識装置に用いられる音響モデル、統計的言語モデルに使用することもできる。自動翻訳装置に用いられる翻訳モデル、手書き文字以外の画像パターン認識に適用することもできる。
[Application example]
The above embodiment relates to a handwritten character recognition device. However, the present invention is not limited to such an embodiment. For example, it can also be used for acoustic models and statistical language models used in speech recognition devices. It can also be applied to recognition of image patterns other than translation models and handwritten characters used in automatic translation devices.
音響モデルの場合には、音声そのものではなく、特徴量として例えば音声信号から得られるMFCC系の特徴量、LPC系の特徴量、及びメルフィルタバンクの出力、それらの一次差分及び二次差分等、通常使用される特徴量を入力としてそのまま利用できる。入力層のノード数は特徴量ベクトルの要素数と一致させる。出力層のノード数は、想定される音素数と一致させる。 In the case of an acoustic model, instead of speech itself, as feature quantities, for example, MFCC feature quantities obtained from speech signals, LPC feature quantities, mel filter bank outputs, their primary and secondary differences, etc. Normally used feature values can be used as input. The number of nodes in the input layer is matched with the number of elements in the feature vector. The number of nodes in the output layer is matched with the assumed number of phonemes.
言語モデルの場合には例えば以下のようにする。トライグラム言語モデルであれば、想定される語彙全てからなるベクトルを考える。2語前の単語に対応する要素が1、それ以外の要素が0となる第1のベクトルと、1語前の単語に対応する要素が1、それ以外の要素が0となる第2のベクトルとを生成し、これらをつなぎあわせて1つの特徴ベクトルとする。入力層のノード数はしたがって、想定される語彙数の2倍となる。出力ノードのノード数は、想定される語彙数と一致する。 In the case of a language model, for example: In the case of a trigram language model, consider a vector consisting of all possible vocabularies. A first vector in which the element corresponding to the word two words before is 1 and the other elements are 0, and a second vector in which the element corresponding to the word one word before is 1 and the other elements are 0 Are generated and connected to form one feature vector. The number of nodes in the input layer is therefore twice the number of vocabularies assumed. The number of output nodes matches the number of vocabularies assumed.
その他、本発明は、NNを用いたあらゆる機械学習と予測装置とに適用できる。 In addition, the present invention can be applied to all machine learning and prediction devices using NN.
今回開示された実施の形態は単に例示であって、本発明が上記した実施の形態のみに制限されるわけではない。本発明の範囲は、発明の詳細な説明の記載を参酌した上で、特許請求の範囲の各請求項によって示され、そこに記載された文言と均等の意味及び範囲内での全ての変更を含む。 The embodiment disclosed herein is merely an example, and the present invention is not limited to the above-described embodiment. The scope of the present invention is indicated by each claim of the claims after taking into account the description of the detailed description of the invention, and all modifications within the meaning and scope equivalent to the wording described therein are included. Including.
180 文字認識装置
182 入力画像
184 文字認識テキスト
186 文字認識NN学習装置
208 文字認識NN
210 デコーダ
180
210 Decoder
Claims (6)
前記入力層からの出力を受けるように接続された入力を持つ非線形関数層とを含み、
前記非線形関数層は、各々が前記入力層の前記複数個の入力ノードからの出力を受けるように接続された、各々が任意の独立成分を近似可能な複数個の隠れ層を含み、
前記複数個の隠れ層の各々は、
各々が前記複数個の入力ノードに重み付きで接続された入力を持ち、活性化関数として、劣微分可能な周期関数を用いる複数個の神経細胞素子と、
同一の隠れ層内の前記複数個の神経細胞素子の出力を重み付きで受けるように接続され、活性化関数として、劣微分可能な関数を用いる出力集約素子とを含む、ニューラルネットワーク。 An input layer having a plurality of input nodes;
A nonlinear function layer having an input connected to receive the output from the input layer,
The nonlinear function layer includes a plurality of hidden layers each connected to receive outputs from the plurality of input nodes of the input layer, each capable of approximating an arbitrary independent component;
Each of the plurality of hidden layers is
A plurality of neuronal elements each having an input connected with a weight to the plurality of input nodes, and using an underdifferentiable periodic function as an activation function;
A neural network including an output aggregating element connected to receive outputs of the plurality of nerve cell elements in the same hidden layer with weights and using a subdifferentiable function as an activation function;
前記出力層は、各々が前記複数個の隠れ層の前記出力集約素子の出力を重み付きで受けるように接続された複数個の出力神経細胞素子を含む、請求項1〜請求項4のいずれかに記載のニューラルネットワーク。 And an output layer connected to receive the output of the output aggregation elements of the plurality of hidden layers,
5. The output layer according to claim 1, wherein the output layer includes a plurality of output nerve cell elements each connected to receive the output of the output aggregation element of the plurality of hidden layers with a weight. Neural network described in 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015099137A JP6521440B2 (en) | 2015-05-14 | 2015-05-14 | Neural network and computer program therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015099137A JP6521440B2 (en) | 2015-05-14 | 2015-05-14 | Neural network and computer program therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016218513A true JP2016218513A (en) | 2016-12-22 |
JP6521440B2 JP6521440B2 (en) | 2019-05-29 |
Family
ID=57578455
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015099137A Expired - Fee Related JP6521440B2 (en) | 2015-05-14 | 2015-05-14 | Neural network and computer program therefor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6521440B2 (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018109968A (en) * | 2016-12-28 | 2018-07-12 | 株式会社半導体エネルギー研究所 | Data processing device, electronic component, and electronic apparatus using neural network |
CN109272106A (en) * | 2017-07-18 | 2019-01-25 | 上海寒武纪信息科技有限公司 | Network system is passed before multinomial |
JP2019087072A (en) * | 2017-11-08 | 2019-06-06 | 株式会社アクセル | Processor, inference device, learning device, processing system, processing method, and processing program |
JP2020120075A (en) * | 2019-01-28 | 2020-08-06 | 株式会社荏原製作所 | Polishing method and polishing apparatus |
US11522671B2 (en) | 2017-11-27 | 2022-12-06 | Mitsubishi Electric Corporation | Homomorphic inference device, homomorphic inference method, computer readable medium, and privacy-preserving information processing system |
WO2023101472A1 (en) * | 2021-12-01 | 2023-06-08 | 주식회사 딥엑스 | Neural processing unit comprising programmed activation function execution unit |
KR20230082587A (en) * | 2021-12-01 | 2023-06-08 | 주식회사 딥엑스 | Neural processing unit including a programmed activation functrion execution unit |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0215718A (en) * | 1988-07-01 | 1990-01-19 | A T R Jido Honyaku Denwa Kenkyusho:Kk | Noise removing device using nerve circuit network model |
JPH0713949A (en) * | 1993-06-14 | 1995-01-17 | Motorola Inc | Neural network and its usage method |
JP2009110256A (en) * | 2007-10-30 | 2009-05-21 | Hitachi Ltd | Plant control device, and plant control device for thermal power plant |
US20120150532A1 (en) * | 2010-12-08 | 2012-06-14 | At&T Intellectual Property I, L.P. | System and method for feature-rich continuous space language models |
WO2012077476A1 (en) * | 2010-12-08 | 2012-06-14 | Necソフト株式会社 | Attribute value estimation device, attribute value estimation method, program, and recording medium |
CN104239897A (en) * | 2014-09-04 | 2014-12-24 | 天津大学 | Visual feature representing method based on autoencoder word bag |
US20150066499A1 (en) * | 2012-03-30 | 2015-03-05 | Ohio State Innovation Foundation | Monaural speech filter |
CN104408469A (en) * | 2014-11-28 | 2015-03-11 | 武汉大学 | Firework identification method and firework identification system based on deep learning of image |
CN104462066A (en) * | 2014-12-24 | 2015-03-25 | 北京百度网讯科技有限公司 | Method and device for labeling semantic role |
-
2015
- 2015-05-14 JP JP2015099137A patent/JP6521440B2/en not_active Expired - Fee Related
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0215718A (en) * | 1988-07-01 | 1990-01-19 | A T R Jido Honyaku Denwa Kenkyusho:Kk | Noise removing device using nerve circuit network model |
JPH0713949A (en) * | 1993-06-14 | 1995-01-17 | Motorola Inc | Neural network and its usage method |
JP2009110256A (en) * | 2007-10-30 | 2009-05-21 | Hitachi Ltd | Plant control device, and plant control device for thermal power plant |
US20120150532A1 (en) * | 2010-12-08 | 2012-06-14 | At&T Intellectual Property I, L.P. | System and method for feature-rich continuous space language models |
WO2012077476A1 (en) * | 2010-12-08 | 2012-06-14 | Necソフト株式会社 | Attribute value estimation device, attribute value estimation method, program, and recording medium |
US20150066499A1 (en) * | 2012-03-30 | 2015-03-05 | Ohio State Innovation Foundation | Monaural speech filter |
CN104239897A (en) * | 2014-09-04 | 2014-12-24 | 天津大学 | Visual feature representing method based on autoencoder word bag |
CN104408469A (en) * | 2014-11-28 | 2015-03-11 | 武汉大学 | Firework identification method and firework identification system based on deep learning of image |
CN104462066A (en) * | 2014-12-24 | 2015-03-25 | 北京百度网讯科技有限公司 | Method and device for labeling semantic role |
Non-Patent Citations (1)
Title |
---|
岡田隆志、中川匡弘: "周期活性化関数を用いた誤差逆伝搬法に関する研究", 電子情報通信学会技術研究報告, vol. 第96巻 第178号, JPN6019002340, 24 July 1996 (1996-07-24), JP, pages 9 - 16, ISSN: 0003964605 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018109968A (en) * | 2016-12-28 | 2018-07-12 | 株式会社半導体エネルギー研究所 | Data processing device, electronic component, and electronic apparatus using neural network |
US11195088B2 (en) | 2016-12-28 | 2021-12-07 | Semiconductor Energy Laboratory Co., Ltd. | Data processing device using neural network, electronic component, and electronic device |
JP7073090B2 (en) | 2016-12-28 | 2022-05-23 | 株式会社半導体エネルギー研究所 | Data processing equipment, electronic components, and electronic devices that utilize neural networks |
CN109272106A (en) * | 2017-07-18 | 2019-01-25 | 上海寒武纪信息科技有限公司 | Network system is passed before multinomial |
JP2019087072A (en) * | 2017-11-08 | 2019-06-06 | 株式会社アクセル | Processor, inference device, learning device, processing system, processing method, and processing program |
US11423297B2 (en) | 2017-11-08 | 2022-08-23 | Axell Corporation | Processing apparatus, processing method, and nonvolatile recording medium |
US11522671B2 (en) | 2017-11-27 | 2022-12-06 | Mitsubishi Electric Corporation | Homomorphic inference device, homomorphic inference method, computer readable medium, and privacy-preserving information processing system |
JP2020120075A (en) * | 2019-01-28 | 2020-08-06 | 株式会社荏原製作所 | Polishing method and polishing apparatus |
JP7169210B2 (en) | 2019-01-28 | 2022-11-10 | 株式会社荏原製作所 | Polishing method and polishing apparatus |
WO2023101472A1 (en) * | 2021-12-01 | 2023-06-08 | 주식회사 딥엑스 | Neural processing unit comprising programmed activation function execution unit |
KR20230082587A (en) * | 2021-12-01 | 2023-06-08 | 주식회사 딥엑스 | Neural processing unit including a programmed activation functrion execution unit |
KR102651560B1 (en) | 2021-12-01 | 2024-03-26 | 주식회사 딥엑스 | Neural processing unit including a programmed activation functrion execution unit |
Also Published As
Publication number | Publication date |
---|---|
JP6521440B2 (en) | 2019-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11816577B2 (en) | Augmentation of audiographic images for improved machine learning | |
US20240046106A1 (en) | Multi-task neural networks with task-specific paths | |
JP6521440B2 (en) | Neural network and computer program therefor | |
US10043512B2 (en) | Generating target sequences from input sequences using partial conditioning | |
WO2020088330A1 (en) | Latent space and text-based generative adversarial networks (latext-gans) for text generation | |
CN109766557B (en) | Emotion analysis method and device, storage medium and terminal equipment | |
US11488067B2 (en) | Training machine learning models using teacher annealing | |
JP2022550326A (en) | Contrasted pre-training for verbal tasks | |
US20200410365A1 (en) | Unsupervised neural network training using learned optimizers | |
Patel et al. | A hybrid CNN-LSTM model for predicting server load in cloud computing | |
CN110781686B (en) | Statement similarity calculation method and device and computer equipment | |
CN113826125A (en) | Training machine learning models using unsupervised data enhancement | |
WO2019006541A1 (en) | System and method for automatic building of learning machines using learning machines | |
Milutinovic et al. | End-to-end training of differentiable pipelines across machine learning frameworks | |
EP3803580B1 (en) | Efficient incident management in large scale computer systems | |
WO2022019913A1 (en) | Systems and methods for generation of machine-learned multitask models | |
CN111667069A (en) | Pre-training model compression method and device and electronic equipment | |
CN113011531A (en) | Classification model training method and device, terminal equipment and storage medium | |
US20220004849A1 (en) | Image processing neural networks with dynamic filter activation | |
CN111832699A (en) | Computationally efficient expressive output layer for neural networks | |
KR20210035702A (en) | Method of artificial neural network quantization and method of computation using artificial neural network | |
CN110889316B (en) | Target object identification method and device and storage medium | |
US20230107409A1 (en) | Ensembling mixture-of-experts neural networks | |
US20230088669A1 (en) | System and method for evaluating weight initialization for neural network models | |
Wu et al. | Fastfusionnet: New state-of-the-art for dawnbench squad |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180417 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190129 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190326 |
|
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: 20190409 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190419 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6521440 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |