KR102663080B1 - Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks - Google Patents

Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks Download PDF

Info

Publication number
KR102663080B1
KR102663080B1 KR1020200168245A KR20200168245A KR102663080B1 KR 102663080 B1 KR102663080 B1 KR 102663080B1 KR 1020200168245 A KR1020200168245 A KR 1020200168245A KR 20200168245 A KR20200168245 A KR 20200168245A KR 102663080 B1 KR102663080 B1 KR 102663080B1
Authority
KR
South Korea
Prior art keywords
neural network
artificial neural
activation function
layer
module
Prior art date
Application number
KR1020200168245A
Other languages
Korean (ko)
Other versions
KR20220078950A (en
Inventor
김하영
김정은
Original Assignee
연세대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 연세대학교 산학협력단 filed Critical 연세대학교 산학협력단
Priority to KR1020200168245A priority Critical patent/KR102663080B1/en
Publication of KR20220078950A publication Critical patent/KR20220078950A/en
Application granted granted Critical
Publication of KR102663080B1 publication Critical patent/KR102663080B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Neurology (AREA)
  • Image Analysis (AREA)
  • Feedback Control In General (AREA)

Abstract

본 발명은 학습이 완료된 인공 신경망이 수행하는 전체 연산을 수학적으로 다항식 형식으로 도출하고, 도출된 다항식에 대한 연산을 수행하는 연산 장치로 인공 신경망을 대체함으로써, 딥러닝 모델로서의 인공 신경망을 수학적으로 경량화하여 학습이 완료된 인공 신경망을 사용함으로써 요구되었던 연산량과 메모리 용량을 저감시키고, 연산 속도를 고속화할 수 있는 인공 신경망 수학적 경량화 장치 및 방법을 제공할 수 있다.The present invention mathematically derives the entire calculation performed by the trained artificial neural network in a polynomial format and replaces the artificial neural network with an arithmetic device that performs operations on the derived polynomial, thereby mathematically making the artificial neural network as a deep learning model lighter. Thus, by using a trained artificial neural network, it is possible to provide an artificial neural network mathematical lightweight device and method that can reduce the amount of calculation and memory capacity required and speed up the calculation speed.

Description

인공 신경망 수학적 경량화 장치 및 방법{Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks}Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks}

본 발명은 인공 신경망 수학적 경량화 장치 및 방법에 관한 것으로, 인공 신경망을 수학적으로 다항식으로 변환하여 에러를 줄이고 고속화 할 수 있는 인공 신경망 수학적 경량화 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for mathematically lightening an artificial neural network, and to an apparatus and method for mathematically lightening an artificial neural network, which can reduce errors and increase speed by mathematically converting an artificial neural network into a polynomial.

딥 러닝(Deep Learning)은 다중 레이어 구조를 갖는 인공 신경망을 기반으로 하는 머신 러닝의 한 분야로, 다량의 데이터로부터 높은 수준의 추상화 모델을 구축하고자 하는 기법이다. 현재 인공 신경망은 이미지 처리, 객체 분류, 객체 검출, 음성 인식, 자연어 처리와 같은 매우 다양한 분야에서 적용되고 있을 뿐만 아니라 그 적용 분야가 계속 확장되어 가고 있다.Deep Learning is a field of machine learning based on artificial neural networks with a multi-layer structure, and is a technique that seeks to build a high-level abstraction model from large amounts of data. Currently, artificial neural networks are not only applied in a wide variety of fields such as image processing, object classification, object detection, speech recognition, and natural language processing, but their fields of application continue to expand.

도 1은 인공 신경망의 일 예를 나타낸다.Figure 1 shows an example of an artificial neural network.

도 1에 도시된 바와 같이 딥 러닝 모델로서의 인공 신경망은 입력 레이어(Input layer)과 출력 레이어(Output layer) 사이에 다수의 히든 레이어(Hidden layer 1, Hidden layer 2)가 배치되는 구조를 갖는다. 이러한 구조의 인공 신경망에서 다수의 히든 레이어의 각 노드(뉴런 또는 커널이라고도 함)는 이전 레이어의 노드들로부터 인가되는 값에 대해 학습에 의해 결정된 가중치(weight)를 가중하고 바이어스(bias)와 합한 후, 기지정된 활성화 함수(activation function)에 따라 기지정된 연산을 수행하여 활성화하여 출력한다. 즉 인공 신경망의 경우, 다수의 레이어가 각각 이전 레이어의 노드별 연산 결과를 기반으로 순차적으로 기지정된 연산을 수행하게 된다.As shown in FIG. 1, an artificial neural network as a deep learning model has a structure in which multiple hidden layers (Hidden layer 1 and Hidden layer 2) are arranged between an input layer and an output layer. In an artificial neural network with this structure, each node (also called a neuron or kernel) of multiple hidden layers weights the weight determined by learning with respect to the values applied from the nodes of the previous layer and adds it to the bias. , performs a predetermined operation according to a predetermined activation function, activates it, and outputs it. That is, in the case of an artificial neural network, multiple layers sequentially perform predetermined operations based on the operation results for each node of the previous layer.

이와 같은 인공 신경망은 개략적인 수학식에 따라 우선 구조가 결정되고, 딥 러닝 기반 학습을 통해 수학식의 여러 파라미터로서 가중치 및 바이어스가 결정된다. 그리고 학습이 완료된 인공 신경망은 실제 이용되는 분야에서 입력되는 입력 데이터에 대해 결정된 파라미터에 따른 연산을 수행하여 연산 결과를 출력값으로 반환한다.The structure of such an artificial neural network is first determined according to a rough mathematical equation, and weights and biases are determined as various parameters of the mathematical equation through deep learning-based learning. And the artificial neural network that has completed learning performs calculations according to the parameters determined on the input data input in actual fields and returns the calculation results as output values.

이렇게 학습이 완료된 인공 신경망의 구조 그대로 인공 신경망 사용을 목표로 하는 데이터에 적용이 되기 때문에 실제 이용되는 경우에도 학습 시와 마찬가지로 다수의 레이어가 순차적으로 연산을 수행하므로 많은 연산량이 요구된다. 뿐만 아니라, 레이어별로 연산된 데이터를 임시로 저장하기 위해 대용량의 메모리가 함께 요구되며, 상당한 연산을 수행하므로 연산 시간이 길다는 문제가 있다.Since the structure of the artificial neural network that has been trained in this way is applied to the data aimed at using the artificial neural network, even when it is actually used, a large amount of calculation is required because multiple layers perform calculations sequentially, just as during learning. In addition, a large amount of memory is required to temporarily store the data calculated for each layer, and since a significant amount of calculation is performed, there is a problem of long calculation time.

한국 등록 특허 제10-2137802호 (2020.07.20 등록)Korea Registered Patent No. 10-2137802 (registered on July 20, 2020)

본 발명의 목적은 학습이 완료된 인공 신경망을 수학적으로 경량화할 수 있는 인공 신경망 수학적 경량화 장치 및 방법을 제공하는데 있다.The purpose of the present invention is to provide an artificial neural network mathematical lightweighting device and method that can mathematically lightweight a trained artificial neural network.

본 발명의 다른 목적은 학습이 완료된 인공 신경망에서 수행되는 전체 연산을 하나의 다항식으로 도출하고, 타겟 데이터를 학습된 인공 신경망을 통해 결과값을 도출하는 대신에, 간단한 다항식 연산을 수행함으로써, 학습이 완료된 인공 신경망을 이용함으로써 요구되었던 연산량과 메모리 용량을 저감 시킬 뿐만 아니라 고속화 할 수 있는 인공 신경망 수학적 경량화 장치 및 방법을 제공하는데 있다.Another object of the present invention is to derive the entire operation performed in the trained artificial neural network as a single polynomial, and to perform a simple polynomial operation instead of deriving the result through the artificial neural network in which the target data was learned, thereby enabling learning. The goal is to provide an artificial neural network mathematical lightweight device and method that can not only reduce the amount of calculation and memory capacity required by using a completed artificial neural network, but also increase speed.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 인공 신경망 수학적 경량화 장치는 인공 신경망의 구조를 설정하기 위한 신경망 설정값을 획득하는 구조 설정 모듈; 상기 신경망 설정값에 따라 인공 신경망을 구성하는 신경망 모듈; 상기 신경망 모듈에 구성된 인공 신경망을 미리 지정된 방식으로 학습시키는 학습 모듈; 학습된 인공 신경망이 수행하는 전체 연산에 대한 연산식을 획득하는 연산식 추출 모듈; 및 획득된 연산식을 수학적으로 전개하고, 전개된 연산식을 다항식으로 간략화하여 학습된 인공 신경망에 대응하는 동작을 수행하는 간략식을 획득하는 간략식 전환 모듈을 포함한다.An artificial neural network mathematical lightweighting apparatus according to an embodiment of the present invention for achieving the above object includes a structure setting module for obtaining neural network setting values for setting the structure of the artificial neural network; a neural network module that configures an artificial neural network according to the neural network settings; a learning module that trains the artificial neural network configured in the neural network module in a predetermined manner; An equation extraction module that obtains equations for all operations performed by the learned artificial neural network; and a simplified expression conversion module that mathematically expands the obtained calculation expression, simplifies the expanded calculation expression into a polynomial, and obtains a simple expression that performs an operation corresponding to the learned artificial neural network.

상기 구조 설정 모듈은 상기 신경망 설정값으로 인공 신경망에 포함되는 레이어 개수와 각 레이어에 포함되는 노드 개수, 각 레이어별로 노드에 지정되는 활성화 함수 및 가중치 행렬과 바이어스 행렬의 초기값을 획득할 수 있다.The structure setting module can use the neural network settings to obtain the number of layers included in the artificial neural network, the number of nodes included in each layer, the activation function assigned to the node for each layer, and the initial values of the weight matrix and bias matrix.

상기 인공 신경망 수학적 경량화 장치는 상기 신경망 모듈에 구성된 인공 신경망에서 각 레이어별로 노드에 지정된 활성화 함수 중 기지정된 다항식 근사 대상 활성화 함수를 탐색하고, 탐색된 활성화 함수를 테일러 근사 기법에 따라 근사 다항식으로 치환하는 활성 함수 근사 모듈을 더 포함할 수 있다.The artificial neural network mathematical lightweight device searches for a predetermined polynomial approximation target activation function among the activation functions specified in the node for each layer in the artificial neural network configured in the neural network module, and replaces the searched activation function with an approximation polynomial according to the Taylor approximation technique. An activation function approximation module may be further included.

상기 기지정된 다항식 근사 대상 활성화 함수는 시그모이드 함수, 하이퍼볼릭 탄젠트 함수 중 하나일 수 있다.The predetermined polynomial approximation target activation function may be one of a sigmoid function and a hyperbolic tangent function.

상기 학습 모듈은 활성화 함수가 근사 다항식으로 치환된 경우, 치환된 근사 다항식에 따라 상기 인공 신경망을 학습시킬 수 있다.When the activation function is replaced with an approximate polynomial, the learning module can train the artificial neural network according to the replaced approximate polynomial.

상기 연산식 추출 모듈은 인공 신경망의 구조에 따라 입력 레이어로부터 출력 레이어까지 각 레이어에서 수행되는 연산이 순차적으로 수행되는 구조의 연산식을 추출할 수 있다.The calculation expression extraction module can extract an expression in a structure in which calculations performed in each layer from the input layer to the output layer are performed sequentially according to the structure of the artificial neural network.

상기 연산식 추출 모듈은 활성화 함수가 근사 다항식으로 치환된 경우, 치환된 근사 다항식을 적용하여 연산식을 추출할 수 있다.When the activation function is replaced with an approximate polynomial, the calculation expression extraction module can extract the calculation expression by applying the substituted approximate polynomial.

상기 목적을 달성하기 위한 본 발명의 다른 실시예에 따른 인공 신경망 수학적 경량화 방법은 인공 신경망의 구조를 설정하기 위한 신경망 설정값을 획득하는 단계; 상기 신경망 설정값에 따라 인공 신경망을 구성하는 단계; 구성된 인공 신경망을 미리 지정된 방식으로 학습시키는 단계; 학습된 인공 신경망이 수행하는 전체 연산에 대한 연산식을 획득하는 단계; 및 획득된 연산식을 수학적으로 전개하고, 전개된 연산식을 다항식으로 간략화하여 학습된 인공 신경망에 대응하는 동작을 수행하는 간략식을 획득하는 단계를 포함한다.A mathematical lightweighting method for an artificial neural network according to another embodiment of the present invention to achieve the above object includes the steps of obtaining neural network settings for setting the structure of the artificial neural network; Constructing an artificial neural network according to the neural network settings; Learning the constructed artificial neural network in a predetermined manner; Obtaining equations for all operations performed by the learned artificial neural network; And a step of mathematically expanding the obtained equation, simplifying the expanded equation into a polynomial, and obtaining a simplified equation that performs an operation corresponding to the learned artificial neural network.

따라서, 본 발명의 실시예에 따른 인공 신경망 수학적 경량화 장치 및 방법은 학습이 완료된 인공 신경망이 수행하는 전체 연산을 수학적으로 하나의 다항식 형식으로 도출하고, 도출된 다항식에 대한 연산을 수행하는 연산 장치로 인공 신경망을 대체함으로써, 딥러닝 모델로서의 인공 신경망을 수학적으로 경량화하여 학습이 완료된 인공 신경망을 이용하면서 요구되었던 연산량과 메모리 용량을 저감시키고, 연산 속도를 고속화할 수 있다.Therefore, the artificial neural network mathematical lightweighting apparatus and method according to an embodiment of the present invention is an operation device that mathematically derives the entire operation performed by the trained artificial neural network in the form of a polynomial and performs an operation on the derived polynomial. By replacing the artificial neural network, the artificial neural network as a deep learning model can be mathematically lightweight, reducing the amount of computation and memory capacity required while using a fully trained artificial neural network, and speeding up the computation speed.

도 1은 인공 신경망의 일 예를 나타낸다.
도 2는 인공 신경망에서 가중치를 설명하기 위한 도면이다.
도 3은 인공 신경망의 개별 노드의 동작을 설명하기 위한 도면이다.
도 4는 인공 신경망의 활성화 함수의 다양한 예를 나타낸다.
도 5는 본 발명의 일 실시예에 따른 인공 신경망 수학적 경량화 장치의 개략적 구조를 나타낸다.
도 6은 본 발명의 일 실시예에 따른 인공 신경망 수학적 경량화 방법을 나타낸다.
도 7은 도 6의 인공 신경망 수학적 경량화 방법을 수행하기 위한 컴퓨팅 장치의 예를 나타낸다.
Figure 1 shows an example of an artificial neural network.
Figure 2 is a diagram for explaining weights in an artificial neural network.
Figure 3 is a diagram for explaining the operation of individual nodes of an artificial neural network.
Figure 4 shows various examples of activation functions of artificial neural networks.
Figure 5 shows a schematic structure of an artificial neural network mathematical lightweight device according to an embodiment of the present invention.
Figure 6 shows a mathematical lightweighting method for an artificial neural network according to an embodiment of the present invention.
FIG. 7 shows an example of a computing device for performing the artificial neural network mathematical lightweighting method of FIG. 6.

본 발명과 본 발명의 동작상의 이점 및 본 발명의 실시에 의하여 달성되는 목적을 충분히 이해하기 위해서는 본 발명의 바람직한 실시예를 예시하는 첨부 도면 및 첨부 도면에 기재된 내용을 참조하여야만 한다. In order to fully understand the present invention, its operational advantages, and the objectives achieved by practicing the present invention, reference should be made to the accompanying drawings illustrating preferred embodiments of the present invention and the contents described in the accompanying drawings.

이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로써, 본 발명을 상세히 설명한다. 그러나, 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며, 설명하는 실시예에 한정되는 것이 아니다. 그리고, 본 발명을 명확하게 설명하기 위하여 설명과 관계없는 부분은 생략되며, 도면의 동일한 참조부호는 동일한 부재임을 나타낸다. Hereinafter, the present invention will be described in detail by explaining preferred embodiments of the present invention with reference to the accompanying drawings. However, the present invention may be implemented in many different forms and is not limited to the described embodiments. In order to clearly explain the present invention, parts not relevant to the description are omitted, and like reference numerals in the drawings indicate like members.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라, 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "...부", "...기", "모듈", "블록" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. Throughout the specification, when a part "includes" a certain element, this does not mean excluding other elements, unless specifically stated to the contrary, but rather means that it may further include other elements. In addition, terms such as "... unit", "... unit", "module", and "block" used in the specification refer to a unit that processes at least one function or operation, which is hardware, software, or hardware. and software.

여기서는 예시로서 메모리(720)를 프로세서(710)와 별도의 구성 요소로 표시하였으나, 메모리(720)는 프로세서(710)에 포함되어 구성될 수도 있다. 일 예로 메모리(720)는 프로세서(710) 내에 포함되는 캐시 메모리 등으로 구현될 수도 있다.Here, as an example, the memory 720 is shown as a separate component from the processor 710, but the memory 720 may be included in the processor 710. For example, the memory 720 may be implemented as a cache memory included in the processor 710.

도 2는 인공 신경망에서 가중치를 설명하기 위한 도면이고, 도 3은 인공 신경망의 개별 노드의 동작을 설명하기 위한 도면이다.FIG. 2 is a diagram for explaining weights in an artificial neural network, and FIG. 3 is a diagram for explaining the operation of individual nodes of an artificial neural network.

도 2에서도 간단한 일 예로서 도 1의 인공 신경망과 동일한 구조의 인공 신경망을 가정하였으며, 이에 입력 레이어(Input layer)에는 2개의 입력 노드가 포함되고, 제1 히든 레이어(Hidden layer 1)의 4개의 노드가 포함되며, 제2 히든 레이어(Hidden layer 2)의 3개의 노드가 포함된다. 그리고 출력 레이어(Output layer)에는 하나의 출력 노드가 포함된다.In Figure 2, as a simple example, an artificial neural network with the same structure as the artificial neural network in Figure 1 is assumed, where the input layer includes two input nodes and the four nodes in the first hidden layer (Hidden layer 1). A node is included, and three nodes of the second hidden layer (Hidden layer 2) are included. And the output layer includes one output node.

도 2를 참조하면, 입력 레이어(Input layer)의 2개의 입력 노드는 입력 노드의 개수에 대응하는 개수의 입력값(x1, x2)을 원소로 포함하는 입력 행렬(X) 중 대응하는 입력값을 인가받고, 인가된 입력값(x1, x2)을 제1 히든 레이어(Hidden layer 1)의 4개의 노드의 입력값으로 전달한다.Referring to FIG. 2, the two input nodes of the input layer are the corresponding inputs of the input matrix (X) containing as elements the number of input values (x 1 , x 2 ) corresponding to the number of input nodes. The value is received, and the applied input values (x 1 , x 2 ) are transmitted as input values of the four nodes of the first hidden layer (Hidden layer 1).

그리고 제1 히든 레이어(Hidden layer 1)의 4개의 노드 각각은 입력 레이어(Input layer)의 2개의 입력 노드에서 전달되는 입력값(x1, x2) 각각에 미리 수행된 학습에 의해 결정된 대응하는 가중치((w1 11, w1 21) ~ (w1 14, w1 24))를 가중한다. 여기서는 설명의 편의를 위하여 각 레이어의 식별자(i)를 위첨자로 표기하고, 서로 인접하여 배치된 2개의 레이어(i-1, i) 중 이전 배치된 레이어(i-1)의 노드 식별자(j)와 이후 배치된 레이어(i)의 노드 식별자(k)를 아래첨자로 표기하였다. 일 예로 Wi 는 i-1번째 레이어에서 i 번째 레이어로의 가중치 행렬을 나타내고, wi jk 는 i-1 번째 레이어의 j번째 노드와 i번째 레이어의 k번째 노드 사이의 가중치를 나타낸다.And each of the four nodes of the first hidden layer (Hidden layer 1) has a corresponding value determined by learning performed in advance for each of the input values (x 1 , x 2 ) transmitted from the two input nodes of the input layer. The weights ((w 1 11 , w 1 21 ) to (w 1 14 , w 1 24 )) are weighted. Here, for convenience of explanation, the identifier (i) of each layer is written as a superscript, and among the two layers (i-1, i) placed adjacent to each other, the node identifier (j) of the previously placed layer (i-1) and the node identifier (k) of the subsequently placed layer (i) are written as subscripts. As an example, W i represents the weight matrix from the i-1th layer to the i-th layer, and w i jk represents the weight between the j-th node of the i-1-th layer and the k-th node of the i-th layer.

따라서 입력 레이어(Input layer)의 2개의 입력 노드와 제1 히든 레이어(Hidden layer 1)의 4개의 노드 사이의 가중치 행렬(W1)은 수학식 1과 같이 표현될 수 있다.Therefore, the weight matrix (W 1 ) between the two input nodes of the input layer and the four nodes of the first hidden layer (Hidden layer 1) can be expressed as Equation 1.

여기서 제1 히든 레이어(Hidden layer 1)의 4개의 노드 각각은 대응하는 2개의 입력 노드에서 입력값(x1, x2)이 전달되면, 각 입력값(x1, x2)에 대응하는 가중치((w1 11, w1 21) ~ (w1 14, w1 24))를 가중하고, 가중치((w1 11, w1 21) ~ (w1 14, w1 24))가 가중된 입력값((x1w1 11, x2w1 21) ~ (x1w1 14, x2w1 24))과 학습에 의해 미리 설정된 바이어스(b1 1)를 합산하고, 합산 결과에 대해 미리 지정된 활성화 함수(f1)로 기지정된 연산을 수행하여 각 노드별로 노드 출력값(u1 1 ~ u1 4)을 제2 히든 레이어(Hidden layer 2)의 3개의 노드 각각의 입력값으로 전달한다. 여기서 제1 히든 레이어(Hidden layer 1)의 노드들이 출력하는 노드 출력값(u1 1 ~ u1 4)은 레이어 출력 행렬(U1)이라 할 수 있으며, 각 노드의 바이어스(b1 1, ~ b1 4)는 바이어스 행렬(B1)이라 할 수 있다.Here, when input values (x 1 , x 2 ) are transmitted from the corresponding two input nodes, each of the four nodes of the first hidden layer (Hidden layer 1) receives a weight corresponding to each input value (x 1 , x 2 ). ((w 1 11 , w 1 21 ) to (w 1 14 , w 1 24 )) is weighted, and the weights ((w 1 11 , w 1 21 ) to (w 1 14 , w 1 24 )) are weighted. Add the input values ((x 1 w 1 11 , x 2 w 1 21 ) to (x 1 w 1 14 , x 2 w 1 24 )) and the bias (b 1 1 ) preset by learning, and add By performing a pre-specified operation with a pre-specified activation function (f 1 ), the node output values (u 1 1 to u 1 4 ) for each node are transmitted as input values of each of the three nodes of the second hidden layer (Hidden layer 2). do. Here, the node output values (u 1 1 ~ u 1 4 ) output by the nodes of the first hidden layer (Hidden layer 1) can be called the layer output matrix (U 1 ), and the bias of each node (b 1 1 , ~ b 1 4 ) can be called the bias matrix (B 1 ).

따라서 제1 히든 레이어(Hidden layer 1)의 출력 행렬(U1)은 입력 행렬(X)에 가중치 행렬(W1)을 가중(X * W1)하고, 바이어스(B1)를 합산한 합산값((W1X)+B1)을 활성화 함수(f1)의 입력으로 인가된 결과이므로 수학식 2로 표현될 수 있다.Therefore, the output matrix (U 1 ) of the first hidden layer (Hidden layer 1) is the sum of the weight matrix (W 1 ) on the input matrix (X) (X * W 1 ) and the bias (B 1 ). Since this is the result of applying ((W 1

일반적으로 인공 신경망에서 동일 레이어에 포함되는 노드들은 동일한 활성화 함수를 사용하므로, 제1 히든 레이어(Hidden layer 1)의 다수의 노드에 설정된 활성화 함수(f1)는 제1 히든 레이어(Hidden layer 1)의 활성화 함수라 할 수 있다.Generally, in an artificial neural network, nodes included in the same layer use the same activation function, so the activation function (f 1 ) set for multiple nodes of the first hidden layer (Hidden layer 1) is the same as that of the first hidden layer (Hidden layer 1). It can be said to be an activation function of .

한편, 제2 히든 레이어(Hidden layer 2)의 3개의 노드 또한 제1 히든 레이어(Hidden layer 1)의 노드들과 마찬가지로, 이전 레이어인 제1 히든 레이어(Hidden layer 1)의 각 노드에서 출력되는 노드 출력값(u1 1 ~ u1 4) 각각에 수학식 3과 같이 미리 수행된 학습에 의해 결정된 가중치 행렬(W2)의 대응하는 가중치((w2 11, w2 41), (w2 12, w2 42), (w1 13, w1 43))를 가중하고, 바이어스(b2 1, ~ b2 3)와 함께 합산한 후 활성화 함수(f2)로 활성화하여 3개의 노드 출력값(u2 1 ~ u2 3)으로 구성된 레이어 출력 행렬(U2)을 출력한다.Meanwhile, the three nodes of the second hidden layer (Hidden layer 2), like the nodes of the first hidden layer (Hidden layer 1), are nodes output from each node of the previous layer, the first hidden layer (Hidden layer 1). For each of the output values (u 1 1 to u 1 4 ) , the corresponding weights ((w 2 11 , w 2 41 ), (w 2 12 , w 2 42 ), (w 1 13 , w 1 43 )) are weighted, summed with bias (b 2 1 , ~ b 2 3 ), and then activated with the activation function (f 2 ) to produce the three node output values (u Output the layer output matrix (U 2 ) composed of 2 1 ~ u 2 3 ).

따라서 제2 히든 레이어(Hidden layer 2)의 출력 행렬(U2)은 수학식 4와 같이 표현될 수 있다.Therefore, the output matrix (U 2 ) of the second hidden layer (Hidden layer 2) can be expressed as Equation 4.

그리고 출력 레이어(Output layer)의 출력 노드는 다시 이전 레이어인 제2 히든 레이어(Hidden layer 2)의 각 노드에서 출력되는 노드 출력값(u2 1 ~ u2 3) 각각에 미리 결정된 가중치 행렬(W3)의 대응하는 가중치((w3 11, w3 21, w3 31)를 가중하고, 바이어스(b3 1)와 함께 합산한 후 활성화 함수(f3)로 활성화하여 노드 출력값(u3 1)을 출력한다. And the output node of the output layer has a predetermined weight matrix (W 3 ) of the corresponding weights ((w 3 11 , w 3 21 , w 3 31 ) are weighted, summed with the bias (b 3 1 ), and then activated with the activation function (f 3 ) to produce the node output value (u 3 1 ) outputs.

결과적으로 도 3에 도시된 바와 같이, 인공 신경망에서 각 노드는 이전 배치된 레이어(i-1)에 포함된 j개의 노드 각각에서 출력되는 노드 출력값(ui-1 1 ~ ui-1 j)를 인가받아, 학습에 의해 결정된 가중치(wi 1k ~ wi jk)를 가중하고, 가중치와 마찬가지로 학습에 의해 결정된 바이어스(bi k)와 함께 합산한 후, 미리 지정된 활성화 함수(fi)로 활성화하여, 노드 출력값(ui k)을 출력한다.As a result, as shown in Figure 3, each node in the artificial neural network has a node output value (u i-1 1 ~ u i-1 j ) output from each of the j nodes included in the previously placed layer ( i-1 ). is approved, weights the weights (w i 1k ~ w i jk ) determined by learning, sums them with the bias (b i k ) determined by learning as well as the weights, and then uses a pre-specified activation function (f i ). By activating it, the node output value (u i k ) is output.

여기서는 출력 레이어(Output layer)가 하나의 출력 노드만을 포함하므로, 노드 출력값(u3 1)을 곧 레이어 출력 행렬(U3)로 볼 수 있으며, 레이어 출력 행렬(U3)은 인공 신경망의 최종 출력이므로, 인공 신경망의 출력 행렬(Y)이라 할 수 있으며, 수학식 5와 같이 계산될 수 있다.Here, since the output layer includes only one output node, the node output value (u 3 1 ) can be viewed as the layer output matrix (U 3 ), and the layer output matrix (U 3 ) is the final output of the artificial neural network. Therefore, it can be said to be the output matrix (Y) of the artificial neural network, and can be calculated as in Equation 5.

상기한 바와 같이, 인공 신경망은 다수의 레이어 각각에서 다수의 노드들이 이전 레이어(i-1)의 다수의 노드에서 출력되는 레이어 출력값(Ui-1)에 대해 지정된 가중치 행렬(Wi)을 가중하고, 바이어스 행렬(Bi)을 합산한 후, 활성화 함수에 대입하는 과정을 레이어의 수에 대응하여 반복 수행하는 연산 장치로 볼 수 있다.As described above, in the artificial neural network, multiple nodes in each of multiple layers weight the specified weight matrix (W i ) with respect to the layer output value (U i-1 ) output from multiple nodes of the previous layer (i-1). It can be viewed as an arithmetic device that repeatedly performs the process of adding up the bias matrix (B i ) and then substituting it into the activation function, corresponding to the number of layers.

따라서 학습이 완료된 인공 신경망의 경우, 수학식 5와 같이, 인공 신경망에서 수행되는 연산 전체를 수학적으로 표현할 수 있다. 다만 수학식 5에서는 인공 신경망의 구조에서 각 레이어의 배치 순서에 따라 우선 배치된 레이어의 연산이 우선 수행되고, 이후 배치된 레이어에 대한 연산들이 순차적으로 연산되는 구조이다. 이때 각 레이어(i)별 가중치 행렬(Wi)과 바이어스 행렬(Bi)이 학습에 의해 미리 결정되어 있을 뿐만 아니라 활성화 함수(fi) 또한 인공 신경망을 구성할 때 미리 결정된 함수이다.Therefore, in the case of an artificial neural network that has completed learning, the entire calculation performed in the artificial neural network can be expressed mathematically, as shown in Equation 5. However, in Equation 5, in the structure of the artificial neural network, operations on layers placed first are performed first according to the arrangement order of each layer, and operations on subsequent layers are performed sequentially. At this time, not only are the weight matrix (W i ) and bias matrix (B i ) for each layer (i) predetermined through learning, but the activation function (f i ) is also a predetermined function when configuring the artificial neural network.

따라서 인공 신경망의 출력 행렬(Y)은 수학식 5를 입력 행렬(X)에 대한 다항식 형태로 전개될 수 있다. 그리고 전개된 입력 행렬(X)에 대한 다항식에서는 레이어 배치에 따른 연산 우선 순위가 필요하지 않다. 즉 일반 다항식의 연산과 동일한 방식으로 연산이 수행될 수 있다. 그러므로 적용 대상에 학습 완료된 인공 신경망의 원 구조를 그대로 적용하지 않아도 무방하며, 더 적은 연산을 수행하면서, 기존의 연산 프로세서 등을 이용하여도 인공 신경망과 동일한 연산 결과를 도출할 수 있다.Therefore, the output matrix (Y) of the artificial neural network can be developed using Equation 5 in the form of a polynomial for the input matrix (X). And in the polynomial for the expanded input matrix (X), operation priority according to layer placement is not required. In other words, the operation can be performed in the same way as the operation of a general polynomial. Therefore, there is no need to apply the original structure of the artificial neural network that has been trained to the application target, and the same calculation results as the artificial neural network can be derived by performing fewer calculations and using an existing calculation processor, etc.

따라서 다양한 분야에서 인공 신경망의 적용이 매우 용이해질 수 있다. 뿐만 아니라, 레이어별 연산 결과를 별도로 저장할 필요가 없으므로, 연산 결과를 임시 저장하기 위해 요구되는 메모리 용량을 저감시킬 수 있고, 연산 속도를 향상시킬 수 있다.Therefore, the application of artificial neural networks in various fields can become very easy. In addition, since there is no need to separately store the calculation results for each layer, the memory capacity required to temporarily store the calculation results can be reduced and the calculation speed can be improved.

다만 활성화 함수에 따라 다항식 형태의 전개가 용이하지 않은 경우가 발행할 수 있다. 따라서 활성화 함수를 다항식으로 전개할 수 있는 방안이 고려되어야 한다.However, depending on the activation function, there may be cases where expansion of the polynomial form is not easy. Therefore, a method of expanding the activation function into a polynomial should be considered.

도 4는 인공 신경망의 활성화 함수의 다양한 예를 나타낸다.Figure 4 shows various examples of activation functions of artificial neural networks.

도 4는 일반적으로 인공 신경망에서 주로 이용되는 대표적인 3가지 활성화 함수에 대한 그래프를 도시하였다. 도 4에서 (a)는 시그모이드 함수(Sigmoid function)를 나타내고, (b)는 하이퍼볼릭 탄젠트 함수(Hyperbolic tangent/Tang function)를 나타내며, (c)는 ReLU 함수(Rectified Linear Unit function)를 나타낸다.Figure 4 shows a graph of three representative activation functions commonly used in artificial neural networks. In Figure 4, (a) represents the sigmoid function, (b) represents the hyperbolic tangent/Tang function, and (c) represents the ReLU function (Rectified Linear Unit function). .

이중 (c)에 도시된 ReLU 함수의 경우, 미분 불가능한 비선형 함수이지만 단순 구조의 함수이므로, 다항식으로의 전개가 가능하다. 그러나 (a)와 (b)의 시그모이드 함수나 하이퍼볼릭 탄젠트 함수의 경우, 다항식으로의 전개가 용이하지 않다.Among them, the ReLU function shown in (c) is a non-linear function that is not differentiable, but since it is a function of a simple structure, it can be expanded into a polynomial. However, in the case of the sigmoid function or hyperbolic tangent function in (a) and (b), it is not easy to expand into a polynomial.

따라서 본 실시예에서는 인공 신경망의 각 레이어에 설정된 활성화 함수가 다항식으로 전개가 용이하지 않은 함수인 경우, 활성화 함수(f)를 테일러 근사를 이용하여 테일러 급수 형태의 근사 다항식으로 치환함으로써, 인공 신경망의 연산이 다항식 연산으로 전환될 수 있도록 한다.Therefore, in this embodiment, when the activation function set in each layer of the artificial neural network is a function that is not easy to develop into a polynomial, the activation function (f) is replaced with an approximate polynomial in the form of a Taylor series using Taylor approximation, Allows operations to be converted to polynomial operations.

다만, 기지정된 활성화 함수로 인공 신경망을 학습 시키고, 인공 신경망의 학습이 완료된 이후, 활성화 함수(f)를 테일러 근사 기법에 따라 근사 다항식으로 치환하게 되면, 학습에 이용된 활성화 함수와 실제 적용시에 이용되는 근사 다항식 사이의 오차로 인해 인공 신경망 연산의 신뢰도가 하락하게 된다. 본 실시예에서는 이와 같이 인공 신경망의 학습과 실제 이용 시, 서로 다른 함수를 이용함으로 인해 발생할 수 있는 오차 문제를 해결하기 위해, 학습 시에도 인공 신경망의 활성화 함수를 테일러 근사 기법으로 근사한 근사 다항식으로 구성한다. 즉 인공 신경망의 활성화 함수를 미리 근사 다항식으로 치환한 후, 인공 신경망을 학습시키고, 학습 결과로 가중치와 바이어스를 획득한 후, 획득된 가중치와 바이어스가 적용된 연산식을 전개함으로써, 인공 신경망의 연산에 대응하는 다항식을 획득할 수 있다.However, when an artificial neural network is trained with a predetermined activation function, and after the learning of the artificial neural network is completed, the activation function (f) is replaced with an approximate polynomial according to the Taylor approximation technique, the activation function used for learning and the actual application The reliability of artificial neural network calculations decreases due to errors between the approximation polynomials used. In this embodiment, in order to solve the error problem that may occur due to using different functions during learning and actual use of the artificial neural network, the activation function of the artificial neural network is composed of an approximate polynomial approximated using the Taylor approximation technique even during learning. do. That is, after substituting the activation function of the artificial neural network with an approximate polynomial in advance, training the artificial neural network, obtaining weights and biases as a result of learning, and then developing an equation to which the obtained weights and biases are applied, the calculation of the artificial neural network is performed. The corresponding polynomial can be obtained.

도 5는 본 발명의 일 실시예에 따른 인공 신경망 수학적 경량화 장치의 개략적 구조를 나타낸다.Figure 5 shows a schematic structure of an artificial neural network mathematical lightweight device according to an embodiment of the present invention.

도 5를 참조하면, 본 실시예에 따른 인공 신경망 수학적 경량화 장치는 구조 설정 모듈(510), 신경망 모듈(520), 활성 함수 근사 모듈(530), 학습 모듈(540), 연산식 추출 모듈(550) 및 간략식 전환 모듈(560)을 포함할 수 있다.Referring to FIG. 5, the artificial neural network mathematical lightweight device according to this embodiment includes a structure setting module 510, a neural network module 520, an activation function approximation module 530, a learning module 540, and an expression extraction module 550. ) and a simplified conversion module 560.

구조 설정 모듈(510)은 인공 신경망의 구조에 대한 신경망 설정값을 획득한다. 이때 구조 설정 모듈(510)은 신경망 설정값으로 인공 신경망의 레이어 개수와 레이어별 노드 개수, 가중치 및 바이어스 초기값 등을 인가받아 설정할 수 있다. 또한 각 레이어의 노드에서 수행될 활성화 함수(f)를 설정한다. 여기서 신경망 설정값은 사용자 명령으로 인가되거나, 미리 저장된 메모리 등으로부터 획득될 수 있다.The structure setting module 510 acquires neural network settings for the structure of the artificial neural network. At this time, the structure setting module 510 can receive approval and set the number of layers of the artificial neural network, the number of nodes for each layer, and initial weight and bias values of the artificial neural network as neural network settings. Also, set the activation function (f) to be performed at the node of each layer. Here, the neural network settings can be applied through a user command or obtained from a pre-stored memory, etc.

그리고 신경망 모듈(520)은 구조 설정 모듈(510)에서 획득된 구조 설정값에 따라 인공 신경망을 구성한다.And the neural network module 520 configures an artificial neural network according to the structure setting values obtained in the structure setting module 510.

활성 함수 근사 모듈(530)은 구조 설정 모듈(510)에 의해 구성된 신경망 모듈(520)에서 각 레이어별 활성화 함수(f)를 확인하고, 확인된 활성화 함수 중 근사화가 요구되는 기지정된 활성화 함수가 존재하면, 테일러 근사 기법에 따라 테일러 급수 형태의 근사 다항식으로 활성화 함수를 치환한다. 여기서 근사화가 요구되는 기지정된 활성화 함수에는 시그모이드 함수, 하이퍼볼릭 탄젠트 함수 등이 포함될 수 있다.The activation function approximation module 530 checks the activation function (f) for each layer in the neural network module 520 configured by the structure setting module 510, and among the confirmed activation functions, there is a predetermined activation function that requires approximation. Then, the activation function is replaced by an approximate polynomial in the form of a Taylor series according to the Taylor approximation technique. Here, the predetermined activation function requiring approximation may include a sigmoid function, a hyperbolic tangent function, etc.

학습 모듈(540)은 기지정된 방식으로 신경망 모듈(520)을 학습시킨다. 학습 모듈(540)은 신경망 모듈(520)에 구성된 인공 신경망을 학습시키기 위해 미리 지정된 학습 방식으로 학습을 수행할 수 있으며, 지도 학습(Supervised Learning) 방식 또는 비지도 학습(Unsupervised Learning) 방식 등을 이용하여 인공 신경망을 학습시킬 수 있다. 학습 모듈(540)은 인공 신경망이 요구되는 성능을 나타낼 수 있도록, 인공 신경망의 출력에 대해 기지정된 방식으로 손실(Loss)을 계산하고, 계산된 손실을 인공 신경망으로 역전파하여 각 레이어별 노드들의 가중치와 바이어스를 반복적으로 업데이트함으로 인공 신경망을 학습시킨다.The learning module 540 trains the neural network module 520 in a predetermined manner. The learning module 540 can perform learning using a pre-specified learning method to train the artificial neural network configured in the neural network module 520, using a supervised learning method or an unsupervised learning method. In this way, an artificial neural network can be trained. The learning module 540 calculates the loss in a predetermined manner for the output of the artificial neural network so that the artificial neural network can exhibit the required performance, and backpropagates the calculated loss to the artificial neural network to determine the performance of the nodes in each layer. An artificial neural network is trained by repeatedly updating weights and biases.

한편, 학습 모듈(540)에 의해 신경망 모듈(520)의 인공 신경망에 대한 학습이 완료되면, 연산식 추출 모듈(540)은 학습된 인공 신경망 모듈(520)에서 최종 업데이트된 레이어별 가중치 행렬(W)과 바이어스 행렬(B), 그리고 활성화 함수(f)를 획득하여, 인공 신경망 전체에서 수행되는 연산에 대한 연산식을 추출한다. 이때 활성화 함수(f)에서 근사 다항식으로 치환된 경우에는 치환된 근사 다항식이 추출된다.Meanwhile, when learning of the artificial neural network of the neural network module 520 is completed by the learning module 540, the calculation expression extraction module 540 extracts the final updated weight matrix (W) for each layer in the learned artificial neural network module 520. ), the bias matrix (B), and the activation function (f) are obtained, and the calculation formula for the operation performed in the entire artificial neural network is extracted. At this time, if the activation function (f) is replaced with an approximate polynomial, the substituted approximate polynomial is extracted.

연산식 추출 모듈(550)은 수학식 5에서와 같이 인공 신경망의 구조에 따라 입력 레이어(Input Layer)로부터 출력 레이어(Output Layer)까지 각 레이어에서 수행되는 연산이 순차적으로 수행되는 구조의 연산식을 추출할 수 있다.The calculation expression extraction module 550 generates an expression in which the calculations performed in each layer are sequentially performed from the input layer to the output layer according to the structure of the artificial neural network, as shown in Equation 5. It can be extracted.

간략식 전환 모듈(560)은 연산식 추출 모듈(550)이 인공 신경망의 구조에 따라 획득한 연산식을 수학적으로 전개하고, 전개된 수학식을 간략화하여 간략화된 연산식으로 전환하여 출력한다.The simplified equation conversion module 560 mathematically develops the equation obtained by the equation extraction module 550 according to the structure of the artificial neural network, simplifies the developed equation, converts it to a simplified equation, and outputs it.

이후 인공 신경망을 적용하고자 하는 적용 대상은 신경망 모듈(520)에서 구성되는 인공 신경망 대신 간략식에 대한 연산을 수행하는 연산 모듈을 이용할 수 있다.Afterwards, an application subject who wishes to apply an artificial neural network can use an operation module that performs an operation on a simplified expression instead of the artificial neural network configured in the neural network module 520.

특히 학습 모듈(540)에 의한 학습 과정에서 인공 신경망의 활성화 함수가 미리 활성 함수 근사 모듈(530)에 의해 근사 다항식으로 치환되어 학습될 수 있으므로, 인공 신경망의 학습과 인공 신경망이 전환된 간략식 사이의 오차가 발생하는 것을 방지될 수 있다. 결과적으로 인공 신경망을 대체하여 간략식을 연산하는 연산 모듈을 이용함에 따라 적은 연산량으로 고속으로 인공 신경망과 동일한 결과를 도출할 수 있게 되며, 더 적은 메모리 용량으로 연산이 수행될 수 있다.In particular, in the learning process by the learning module 540, the activation function of the artificial neural network can be replaced by an approximate polynomial in advance by the activation function approximation module 530 and learned, so between the learning of the artificial neural network and the simplified expression to which the artificial neural network has been converted. Errors can be prevented from occurring. As a result, by using an operation module that calculates simple expressions instead of an artificial neural network, it is possible to obtain the same results as an artificial neural network at high speed with a small amount of calculation, and the calculation can be performed with less memory capacity.

도 6은 본 발명의 일 실시예에 따른 인공 신경망 수학적 경량화 방법을 나타낸다.Figure 6 shows a mathematical lightweighting method for an artificial neural network according to an embodiment of the present invention.

도 5를 참조하여, 도 6의 인공 신경망 수학적 경량화 방법을 설명하면, 우선 요구되는 인공 신경망을 구성한다(S10). 이때 인공 신경망은 지정된 신경망 설정값에 의해 구성되어진다.Referring to FIG. 5, when explaining the mathematical lightweighting method of the artificial neural network of FIG. 6, first, the required artificial neural network is constructed (S10). At this time, the artificial neural network is constructed based on the specified neural network settings.

그리고 구성된 인공 신경망에서 근사화가 요구되는 활성화 함수(f)가 존재하는지 판별한다(S20). 만일 근사화가 요구되는 활성화 함수(f)가 존재하는 것으로 판별되면, 해당 활성화 함수(f)를 테일러 근사 기법으로 근사하여 근사화 함수로 대체한다(S30).Then, it is determined whether an activation function (f) requiring approximation exists in the constructed artificial neural network (S20). If it is determined that an activation function (f) requiring approximation exists, the corresponding activation function (f) is approximated using the Taylor approximation technique and replaced with the approximation function (S30).

이후 구성된 인공 신경망을 기지정된 방식으로 학습시킨다(S40). 인공 신경망에 대한 학습이 완료되면, 학습에 의해 최종 업데이트된 가중치 행렬(W)과 바이어스 행렬(B)을 확인한다(S50). 그리고 인공 신경망의 각 레이어에서 확인된 가중치 행렬(W)과 바이어스 행렬(B) 및 활성화 함수(f)를 기반으로 인공 신경망 전체에서 수행되는 연산에 대한 연산식을 추출한다(S60).Afterwards, the constructed artificial neural network is trained in a predetermined manner (S40). When learning of the artificial neural network is completed, the weight matrix (W) and bias matrix (B) finally updated by learning are checked (S50). Then, based on the weight matrix (W), bias matrix (B), and activation function (f) identified in each layer of the artificial neural network, calculation formulas for operations performed in the entire artificial neural network are extracted (S60).

연산식이 추출되면, 추출된 연산식을 전개하고, 전개된 연산식을 수학적으로 다항식 구조로 간략화하여 간략화된 연산식을 획득한다(S70).When the operation formula is extracted, the extracted equation is expanded, and the expanded equation is mathematically simplified into a polynomial structure to obtain a simplified equation (S70).

도 7은 도 6의 인공 신경망 수학적 경량화 방법을 수행하기 위한 컴퓨팅 장치의 예를 나타낸다.FIG. 7 shows an example of a computing device for performing the artificial neural network mathematical lightweighting method of FIG. 6.

도 7을 참조하면, 본 발명의 일 실시 예에 따른 컴퓨팅 장치는 프로세서(710) 및 메모리(720)를 포함할 수 있다. 프로세서(710)는 MPU(micro processing unit), CPU(central processing unit)등으로 구현될 수 있다. 그리고 도 5에 도시된 인공 신경망 수학적 경량화 장치의 구조 설정 모듈(510), 신경망 모듈(520), 활성 함수 근사 모듈(530), 학습 모듈(540), 연산식 추출 모듈(550) 및 간략식 전환 모듈(560) 각각은 프로세서(710) 내에 구현되는 하드웨어 또는 프로세서(710) 내에서 실행되는 소프트웨어 모듈로 구현될 수 있다.Referring to FIG. 7, a computing device according to an embodiment of the present invention may include a processor 710 and a memory 720. The processor 710 may be implemented with a micro processing unit (MPU), a central processing unit (CPU), or the like. And the structure setting module 510, neural network module 520, activation function approximation module 530, learning module 540, calculation expression extraction module 550, and simplified expression conversion of the artificial neural network mathematical lightweight device shown in FIG. Each module 560 may be implemented as hardware implemented within the processor 710 or as a software module executed within the processor 710.

메모리(720)는 프로세서(710)에서 동작을 수행하기 위한 각종 데이터를 저장하여, 프로세서(710)로 저장된 데이터를 전달하거나, 프로세서(710)에서 인가되는 데이터를 저장한다. 메모리(720)는 인공 신경망의 학습 시에 프로세서(710)에서 인공 신경망의 각 레이어의 연산 결과가 도출되면, 도출된 연산 결과를 임시로 저장하고, 프로세서(710)에서 다음 레이어에 대한 연산이 수행될 때, 저장된 연산 결과를 프로세서(710)로 전달할 수 있다.The memory 720 stores various data for performing operations in the processor 710, transmits the stored data to the processor 710, or stores data received from the processor 710. When the processor 710 derives the calculation results of each layer of the artificial neural network during training of the artificial neural network, the memory 720 temporarily stores the derived calculation results, and the processor 710 performs the calculation for the next layer. When this happens, the stored operation result can be transferred to the processor 710.

본 발명에 따른 방법은 컴퓨터에서 실행시키기 위한 매체에 저장된 컴퓨터 프로그램으로 구현될 수 있다. 여기서 컴퓨터 판독가능 매체는 컴퓨터에 의해 액세스 될 수 있는 임의의 가용 매체일 수 있고, 또한 컴퓨터 저장 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함하며, ROM(판독 전용 메모리), RAM(랜덤 액세스 메모리), CD(컴팩트 디스크)-ROM, DVD(디지털 비디오 디스크)-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등을 포함할 수 있다.The method according to the present invention can be implemented as a computer program stored on a medium for execution on a computer. Here, computer-readable media may be any available media that can be accessed by a computer, and may also include all computer storage media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data, including read-only memory (ROM). It may include dedicated memory), RAM (random access memory), CD (compact disk)-ROM, DVD (digital video disk)-ROM, magnetic tape, floppy disk, optical data storage, etc.

본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다.The present invention has been described with reference to the embodiments shown in the drawings, but these are merely exemplary, and those skilled in the art will understand that various modifications and other equivalent embodiments are possible therefrom.

따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 청구범위의 기술적 사상에 의해 정해져야 할 것이다.Therefore, the true technical protection scope of the present invention should be determined by the technical spirit of the attached claims.

510: 구조 설정 모듈 520: 신경망 모듈
530: 활성 함수 근사 모듈 540: 학습 모듈
550: 연산식 추출 모듈 560: 간략식 전환 모듈
510: Structure setting module 520: Neural network module
530: Activation function approximation module 540: Learning module
550: Operational expression extraction module 560: Simple expression conversion module

Claims (15)

인공 신경망의 구조를 설정하기 위한 신경망 설정값을 획득하는 구조 설정 모듈;
상기 신경망 설정값에 따라 인공 신경망을 구성하는 신경망 모듈;
상기 신경망 모듈에 구성된 인공 신경망에서 각 레이어별로 노드에 지정된 활성화 함수 중 근사화가 요구되는 활성화 함수가 존재하는지 여부를 판단하고, 근사화가 요구되는 활성화 함수가 존재할 경우 해당 활성화 함수를 테일러 근사 기법에 따라 다항식으로 치환하는 활성 함수 근사 모듈;
상기 신경망 모듈에 구성된 인공 신경망을 미리 지정된 방식으로 학습시키는 학습 모듈;
학습된 인공 신경망이 수행하는 전체 연산에 대한 연산식을 획득하는 연산식 추출 모듈; 및
획득된 연산식을 수학적으로 전개하고, 전개된 연산식을 다항식으로 간략화하여 학습된 인공 신경망에 대응하는 동작을 수행하는 간략식을 획득하는 간략식 전환 모듈을 포함하되,
상기 학습 모듈은
활성화 함수가 근사 다항식으로 치환된 경우, 치환된 근사 다항식에 따라 상기 인공 신경망을 학습시키는 인공 신경망 수학적 경량화 장치.
A structure setting module that acquires neural network settings for setting the structure of an artificial neural network;
a neural network module that configures an artificial neural network according to the neural network settings;
In the artificial neural network configured in the neural network module, it is determined whether there is an activation function that requires approximation among the activation functions specified in the node for each layer, and if an activation function that requires approximation exists, the corresponding activation function is converted into a polynomial according to the Taylor approximation technique. The activation function approximation module replaces with;
a learning module that trains the artificial neural network configured in the neural network module in a predetermined manner;
An equation extraction module that obtains equations for all operations performed by the learned artificial neural network; and
It includes a simple expression conversion module that mathematically develops the obtained calculation expression, simplifies the developed calculation expression into a polynomial, and obtains a simple expression that performs an operation corresponding to the learned artificial neural network,
The learning module is
When the activation function is replaced by an approximate polynomial, an artificial neural network mathematical lightweight device that trains the artificial neural network according to the replaced approximate polynomial.
제1항에 있어서, 상기 구조 설정 모듈은
상기 신경망 설정값으로 인공 신경망에 포함되는 레이어 개수와 각 레이어에 포함되는 노드 개수, 각 레이어별로 노드에 지정되는 활성화 함수 및 가중치 행렬과 바이어스 행렬의 초기값을 획득하는 인공 신경망 수학적 경량화 장치.
The method of claim 1, wherein the structure setting module is
An artificial neural network mathematical lightweight device that obtains the number of layers included in the artificial neural network, the number of nodes included in each layer, the activation function assigned to the node for each layer, and the initial values of the weight matrix and bias matrix using the neural network settings.
삭제delete 제1항에 있어서, 상기 근사화가 요구되는 활성화 함수는
시그모이드 함수, 하이퍼볼릭 탄젠트 함수 중 하나인 인공 신경망 수학적 경량화 장치.
The method of claim 1, wherein the activation function requiring approximation is
An artificial neural network mathematical lightweight device that is one of the sigmoid function and hyperbolic tangent functions.
삭제delete 제1항에 있어서, 상기 연산식 추출 모듈은
인공 신경망의 구조에 따라 입력 레이어로부터 출력 레이어까지 각 레이어에서 수행되는 연산이 순차적으로 수행되는 구조의 연산식을 추출하는 인공 신경망 수학적 경량화 장치.
The method of claim 1, wherein the calculation expression extraction module
An artificial neural network mathematical lightweight device that extracts arithmetic formulas in which operations performed in each layer are performed sequentially from the input layer to the output layer according to the structure of the artificial neural network.
제6항에 있어서, 상기 연산식 추출 모듈은
활성화 함수가 근사 다항식으로 치환된 경우, 치환된 근사 다항식을 적용하여 연산식을 추출하는 인공 신경망 수학적 경량화 장치.
The method of claim 6, wherein the calculation expression extraction module
When the activation function is replaced by an approximate polynomial, an artificial neural network mathematical lightweight device that extracts the calculation formula by applying the replaced approximate polynomial.
인공 신경망 수학적 경량화 장치에서 수행되는 인공 신경망 수학적 경량화 방법으로서,
인공 신경망의 구조를 설정하기 위한 신경망 설정값을 획득하는 단계;
상기 신경망 설정값에 따라 인공 신경망을 구성하는 단계;
상기 인공 신경망을 구성하는 단계 이후, 상기 구성된 인공 신경망에서 각 레이어별로 노드에 지정된 활성화 함수 중 근사화가 요구되는 활성화 함수가 존재하는지 여부를 판단하고, 근사화가 요구되는 활성화 함수가 존재할 경우 해당 활성화 함수를 테일러 근사 기법에 따라 다항식으로 치환하는 단계;
구성된 인공 신경망을 미리 지정된 방식으로 학습시키는 단계;
학습된 인공 신경망이 수행하는 전체 연산에 대한 연산식을 획득하는 단계; 및
획득된 연산식을 수학적으로 전개하고, 전개된 연산식을 다항식으로 간략화하여 학습된 인공 신경망에 대응하는 동작을 수행하는 간략식을 획득하는 단계를 포함하되,
상기 학습시키는 단계는
활성화 함수가 근사 다항식으로 치환된 상기 인공 신경망을 학습시키는 인공 신경망 수학적 경량화 방법.
An artificial neural network mathematical lightweighting method performed in an artificial neural network mathematical lightweighting device,
Obtaining neural network settings for setting the structure of an artificial neural network;
Constructing an artificial neural network according to the neural network settings;
After the step of configuring the artificial neural network, it is determined whether there is an activation function requiring approximation among the activation functions specified in the node for each layer in the constructed artificial neural network, and if an activation function requiring approximation exists, the corresponding activation function is selected. Substituting a polynomial according to the Taylor approximation technique;
Learning the constructed artificial neural network in a predetermined manner;
Obtaining equations for all operations performed by the learned artificial neural network; and
It includes the step of mathematically developing the obtained equation, simplifying the developed equation into a polynomial, and obtaining a simplified equation that performs an operation corresponding to the learned artificial neural network,
The learning step is
An artificial neural network mathematical lightweight method for training the artificial neural network in which the activation function is replaced by an approximate polynomial.
제8항에 있어서, 상기 인공 신경망을 구성하는 단계는
상기 신경망 설정값으로 인공 신경망에 포함되는 레이어 개수와 각 레이어에 포함되는 노드 개수, 각 레이어별로 노드에 지정되는 활성화 함수 및 가중치 행렬과 바이어스 행렬의 초기값을 획득하는 인공 신경망 수학적 경량화 방법.
The method of claim 8, wherein the step of configuring the artificial neural network is
An artificial neural network mathematical lightweight method for obtaining the number of layers included in the artificial neural network, the number of nodes included in each layer, the activation function assigned to the node for each layer, and the initial values of the weight matrix and bias matrix using the neural network settings.
삭제delete 제8항에 있어서, 상기 근사화가 요구되는 활성화 함수는
시그모이드 함수, 하이퍼볼릭 탄젠트 함수 중 하나인 인공 신경망 수학적 경량화 방법.
The method of claim 8, wherein the activation function requiring approximation is
A mathematical lightweight method for artificial neural networks, one of the sigmoid function and hyperbolic tangent function.
삭제delete 제8항에 있어서, 상기 연산식을 획득하는 단계는
인공 신경망의 구조에 따라 입력 레이어로부터 출력 레이어까지 각 레이어에서 수행되는 연산이 순차적으로 수행되는 구조의 연산식을 추출하는 인공 신경망 수학적 경량화 방법.
The method of claim 8, wherein the step of obtaining the calculation formula is
A mathematical lightweight method for artificial neural networks that extracts calculation formulas in which operations performed in each layer are performed sequentially from the input layer to the output layer according to the structure of the artificial neural network.
제13항에 있어서, 상기 연산식을 획득하는 단계는
활성화 함수가 근사 다항식으로 치환된 경우, 치환된 근사 다항식을 적용하여 연산식을 추출하는 인공 신경망 수학적 경량화 방법.
The method of claim 13, wherein the step of obtaining the calculation formula is
When the activation function is replaced by an approximate polynomial, an artificial neural network mathematical lightweight method that extracts the calculation formula by applying the replaced approximate polynomial.
제8항의 인공 신경망 수학적 경량화 방법을 수행하기 위해 컴퓨팅 장치에서 판독 가능한 프로그램 명령어가 기록된 기록 매체.A recording medium on which program instructions readable by a computing device are recorded to perform the artificial neural network mathematical lightweighting method of claim 8.
KR1020200168245A 2020-12-04 2020-12-04 Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks KR102663080B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200168245A KR102663080B1 (en) 2020-12-04 2020-12-04 Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200168245A KR102663080B1 (en) 2020-12-04 2020-12-04 Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks

Publications (2)

Publication Number Publication Date
KR20220078950A KR20220078950A (en) 2022-06-13
KR102663080B1 true KR102663080B1 (en) 2024-05-02

Family

ID=81984054

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200168245A KR102663080B1 (en) 2020-12-04 2020-12-04 Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks

Country Status (1)

Country Link
KR (1) KR102663080B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102494095B1 (en) * 2022-07-06 2023-02-06 주식회사 스퀴즈비츠 Apparatus and method for learning artificial neural network

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018169960A (en) * 2017-03-30 2018-11-01 株式会社Jsol Creation system, creation method, and creation program of linear polynomial model in multilayer neural network (deep learning)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102137802B1 (en) 2019-01-21 2020-07-27 주식회사 디퍼아이 Apparatus of Acceleration for Artificial Neural Network System and Method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018169960A (en) * 2017-03-30 2018-11-01 株式会社Jsol Creation system, creation method, and creation program of linear polynomial model in multilayer neural network (deep learning)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Jun Zhou et al., "Polynomial activation neural networks: Modeling, stability analysis and coverage BP-training," Neurocomputing (2019.06.04.)*

Also Published As

Publication number Publication date
KR20220078950A (en) 2022-06-13

Similar Documents

Publication Publication Date Title
US20190050734A1 (en) Compression method of deep neural networks
WO2018131259A1 (en) Text evaluation device and text evaluation method
KR101837262B1 (en) Deep learning type classification method with feature-based weighting
JPWO2018051841A1 (en) Model learning apparatus, method thereof and program
KR20190019748A (en) Method and apparatus for generating natural language
KR102129161B1 (en) Terminal device and Method for setting hyperparameter of convolutional neural network
CN111966812A (en) Automatic question answering method based on dynamic word vector and storage medium
KR20190080818A (en) Method and apparatus of deep learning based object detection with additional part probability maps
KR102663080B1 (en) Apparatus And Method For Mathematically Light Weighting Artificial Neural Networks
AU2022221471A1 (en) Automatic photo editing via linguistic request
KR102496030B1 (en) Apparatus and method for reinforcement learning for classifying data
CN107506345A (en) The construction method and device of language model
KR101646461B1 (en) Method for korean dependency parsing using deep learning
CN113282721A (en) Visual question-answering method based on network structure search
CN115687609A (en) Zero sample relation extraction method based on Prompt multi-template fusion
CN113420117B (en) Sudden event classification method based on multivariate feature fusion
CN116702760A (en) Geographic naming entity error correction method based on pre-training deep learning
CN114970497B (en) Text classification method and word sense disambiguation method based on pre-training feature embedding
KR20230170752A (en) Hardware-aware incremental training of machine learning models
JP2019133563A (en) Information processing apparatus and information processing system
CN114758191A (en) Image identification method and device, electronic equipment and storage medium
CN110633363B (en) Text entity recommendation method based on NLP and fuzzy multi-criterion decision
KR20210079203A (en) System for multi-layered knowledge base and processing method thereof
CN112131363A (en) Automatic question answering method, device, equipment and storage medium
JP7024262B2 (en) Learning methods, how to use learning results, learning programs and learning devices

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E90F Notification of reason for final refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant