KR20230060094A - Method and apparatus for reducing dynamic inference time using snn model - Google Patents
Method and apparatus for reducing dynamic inference time using snn model Download PDFInfo
- Publication number
- KR20230060094A KR20230060094A KR1020210144373A KR20210144373A KR20230060094A KR 20230060094 A KR20230060094 A KR 20230060094A KR 1020210144373 A KR1020210144373 A KR 1020210144373A KR 20210144373 A KR20210144373 A KR 20210144373A KR 20230060094 A KR20230060094 A KR 20230060094A
- Authority
- KR
- South Korea
- Prior art keywords
- inference
- accuracy
- exposure time
- time
- inference accuracy
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
본 명세서는 동적 추론 시간 단축 방법 및 장치에 관한 것으로, 보다 상세하게는 SNN 모델을 이용한 동적 추론 시간 단축 방법 및 장치에 관한 것이다.The present specification relates to a method and apparatus for reducing dynamic inference time, and more particularly, to a method and apparatus for reducing dynamic inference time using an SNN model.
뉴로모픽 아키텍처(Neuromorphic Architecture)는 인간의 뇌 구조를 모방한 차세대 인공지능 아키텍처로써, 많은 양의 데이터 연산과 기억을 처리한다. 뉴로모픽 칩 안에는 연산을 담당하는 코어와 메모리 칩이 존재하며, 코어는 뉴런의 역할을, 메모리 칩은 뉴런 사이를 연결하는 시냅스 역할을 한다. 코어와 메모리 칩을 잇는 구조는 병렬로 이루어져 동시에 다수의 연산이 처리되므로 처리 속도가 빠르고 소요 전력이 낮다. 이러한 이유로 뉴로모픽 아키텍처는 사물 인터넷(IoT, Internet of Things) 환경에 매우 적합하다.Neuromorphic Architecture is a next-generation artificial intelligence architecture that mimics the structure of the human brain and processes a large amount of data operations and memories. Inside the neuromorphic chip, there is a core that is in charge of calculation and a memory chip. The core acts as a neuron, and the memory chip acts as a synapse that connects neurons. Since the structure connecting the core and the memory chip is made in parallel and multiple operations are processed at the same time, the processing speed is fast and the power consumption is low. For this reason, the neuromorphic architecture is very suitable for the Internet of Things (IoT) environment.
한편, 뉴로모픽 아키텍처는 뉴로모픽 아키텍처에 입력된 데이터를 추론하여 추론에 대한 정확도를 산출할 수 있다. 구체적으로, 뉴로모픽 아키텍처는 SNN(Spiking Neural Network) 모델을 통해 스파이크 전기 신호를 누적함으로써 입력된 데이터에 대한 추론 정확도를 산출한다.Meanwhile, the neuromorphic architecture may infer data input to the neuromorphic architecture to calculate inference accuracy. Specifically, the neuromorphic architecture calculates inference accuracy for input data by accumulating spike electrical signals through a spiking neural network (SNN) model.
도 1은 SNN 모델의 정적 추론 시간과 추론 정확도의 관계를 나타낸 그래프이다.1 is a graph showing the relationship between static inference time and inference accuracy of an SNN model.
도면을 참조하면, 추론 시간이 길어짐에 따라 추론 정확도 역시 점진적으로 증가하는 것을 확인할 수 있다. Referring to the figure, it can be seen that the inference accuracy also gradually increases as the inference time increases.
(a)구간에서 일정 시간 동안은 추론의 정확도가 50% 수준에 머무른다. 이는 유사한 입력 데이터에 대하여 부분적으로 스파이크 누적량이 부족하기 때문이다. (a) For a certain period of time, the accuracy of inference remains at the 50% level. This is partly due to the lack of spike accumulation for similar input data.
이후, (a)구간 이후 추론 정확도는 점차 증가하여 (b)구간에 도달하면 80% 수준의 추론 정확도를 보인다. 그러나, (b)구간의 시작 지점에 도달하면 추론 시간이 길어져도 더 이상 추론 정확도는 크게 상승하지 않는다. 즉, 일정 추론 소요 시간 이후부터 진행되는 추론 연산은 SNN 모델의 최대 성능에 크게 영향을 미치지 않는다.After that, the inference accuracy gradually increases after section (a), and when it reaches section (b), it shows inference accuracy of 80%. However, when the starting point of section (b) is reached, the inference accuracy no longer increases significantly even if the inference time increases. That is, the inference operation that proceeds after a certain inference time does not significantly affect the maximum performance of the SNN model.
결과적으로, 추론 정확도에 영향을 주지 않는 추가적인 추론 시간은 큰 에너지를 소모하게 되며, 에너지 소모량이 매우 중요한 사물 인터넷 환경에서 이와 같은 에너지 소모는 에너지 낭비를 초래하는 문제점이 있다.As a result, additional inference time that does not affect inference accuracy consumes a large amount of energy, and in an IoT environment in which energy consumption is very important, such energy consumption causes energy waste.
따라서, 추론 시간을 추론 정확도에 따라 동적으로 조절하여 에너지 소모량을 최소화할 수 있는 방법의 필요성이 요구된다.Therefore, there is a need for a method capable of minimizing energy consumption by dynamically adjusting inference time according to inference accuracy.
본 명세서의 목적은 추론 시간을 단축함으로써 추론 정확도 성능을 보장하면서도 에너지 소모량을 최소화할 수 있는 동적 추론 시간 단축 방법 및 장치를 제공하는 것이다.An object of the present specification is to provide a dynamic inference time reduction method and apparatus capable of minimizing energy consumption while guaranteeing inference accuracy performance by reducing inference time.
또한, 본 명세서의 목적은 추론 대상 이미지의 노출 시간을 동적으로 조절하여 추론 시간을 단축할 수 있는 동적 추론 시간 단축 방법 및 장치를 제공하는 것이다.In addition, an object of the present specification is to provide a dynamic inference time reduction method and apparatus capable of reducing inference time by dynamically adjusting the exposure time of an image to be inferred.
본 명세서의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 명세서의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 명세서의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 명세서의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.Objects of the present specification are not limited to the above-mentioned purposes, and other objects and advantages of the present specification not mentioned above can be understood by the following description and will be more clearly understood by the examples of the present specification. Further, it will be readily apparent that the objects and advantages of this specification may be realized by means of the instrumentalities and combinations indicated in the claims.
본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법은 적어도 하나의 추론 대상 이미지를 SNN모델에 입력하여 추론 시간 중 제1 이미지 노출 시간 동안 제1 추론 정확도를 산출하는 단계, 제1 이미지 노출 시간, 상기 제1 추론 정확도 및 상기 제1 추론 정확도와 이전 추론 정확도의 변화 정도를 나타내는 추론 정확도 변화값에 기초하여 제2 이미지 노출 시간을 동적으로 결정하는 단계, 제2 이미지 노출 시간에 기초하여 제2 추론 정확도를 산출하는 단계 및 제2 추론 정확도가 미리 설정된 기준값에 도달할 때까지 상기 제2 이미지 노출 시간을 결정하는 단계 및 상기 제2 추론 정확도를 산출하는 단계를 반복하는 단계를 포함한다.A dynamic inference time reduction method according to an embodiment of the present specification includes the steps of inputting at least one inference target image into an SNN model and calculating a first inference accuracy during a first image exposure time during an inference time, a first image exposure time, Dynamically determining a second image exposure time based on the first inference accuracy and a change in inference accuracy indicating a degree of change between the first inference accuracy and the previous inference accuracy; and second inference based on the second image exposure time. Calculating the accuracy and repeating the steps of determining the second image exposure time and calculating the second inference accuracy until the second inference accuracy reaches a preset reference value.
또한, 본 명세서의 일 실시예에서 제2 이미지 노출 시간은 제1 추론 정확도가 상기 이전 추론 정확도보다 높을수록 길어진다.Also, in one embodiment of the present specification, the second image exposure time increases as the first inference accuracy is higher than the previous inference accuracy.
또한, 본 명세서의 일 실시예에서 제2 이미지 노출 시간은 하기의 <수학식 1>에 의해 결정된다.Also, in one embodiment of the present specification, the second image exposure time is determined by Equation 1 below.
<수학식 1><Equation 1>
여기서, 은 제2 이미지 노출 시간, 은 제1 이미지 노출 시간, 은 제1 추론 정확도, 은 n번째 추론 정확도 변화값, 은 조정 상수를 의미한다.here, is the second image exposure time, is the first image exposure time, is the first inference accuracy, is the nth inference accuracy change value, means the adjustment constant.
또한, 본 명세서의 일 실시예에서 추론 정확도 변화값은 하기의 <수학식 2>에 의해 산출된다.In addition, in an embodiment of the present specification, the inference accuracy change value is calculated by
<수학식 2><
여기서, 은 n번째 추론 정확도 변화값, 은 제1 추론 정확도, 은 이전 추론 정확도를 의미한다.here, is the nth inference accuracy change value, is the first inference accuracy, Means the previous inference accuracy.
또한, 본 명세서의 일 실시예에서 SNN모델은 복수의 MNIST 손글씨 숫자 이미지를 이용하여 학습된다.In addition, in one embodiment of the present specification, the SNN model is learned using a plurality of MNIST handwritten digit images.
또한, 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 장치는 적어도 하나의 추론 대상 이미지를 SNN모델에 입력하여 추론 시간 중 제1 이미지 노출 시간 동안 제1 추론 정확도를 산출하는 정확도 산출부 및 제1 이미지 노출 시간, 상기 제1 추론 정확도 및 상기 제1 추론 정확도와 이전 추론 정확도의 변화 정도를 나타내는 추론 정확도 변화값에 기초하여 제2 이미지 노출 시간을 동적으로 결정하는 노출 시간 결정부를 포함하고, 정확도 산출부는 상기 제2 이미지 노출 시간에 기초하여 제2 추론 정확도를 산출하고, 상기 제2 추론 정확도가 미리 설정된 기준값에 도달할 때까지 상기 제2 추론 정확도를 반복하여 산출한다.In addition, the apparatus for reducing dynamic inference time according to an embodiment of the present specification includes an accuracy calculation unit inputting at least one inference target image into an SNN model and calculating a first inference accuracy during an exposure time of a first image during inference time, and a first inference accuracy An exposure time determination unit configured to dynamically determine a second image exposure time based on an image exposure time, the first inference accuracy, and an inference accuracy change value representing a degree of change between the first inference accuracy and a previous inference accuracy; The unit calculates second inference accuracy based on the second image exposure time, and repeatedly calculates the second inference accuracy until the second inference accuracy reaches a preset reference value.
또한, 본 명세서의 일 실시예에서 제2 이미지 노출 시간은 제1 추론 정확도가 상기 이전 추론 정확도보다 높을수록 길어진다.Also, in one embodiment of the present specification, the second image exposure time increases as the first inference accuracy is higher than the previous inference accuracy.
또한, 본 명세서의 일 실시예에서 제2 이미지 노출 시간은 하기의 <수학식 1>에 의해 결정된다.Also, in one embodiment of the present specification, the second image exposure time is determined by Equation 1 below.
<수학식 1><Equation 1>
여기서, 은 제2 이미지 노출 시간, 은 제1 이미지 노출 시간, 은 제1 추론 정확도, 은 n번째 추론 정확도 변화값, 은 조정 상수를 의미한다.here, is the second image exposure time, is the first image exposure time, is the first inference accuracy, is the nth inference accuracy change value, means the adjustment constant.
또한, 본 명세서의 일 실시예에서 추론 정확도 변화값은 하기의 <수학식 2>에 의해 산출된다.In addition, in an embodiment of the present specification, the inference accuracy change value is calculated by
<수학식 2><
여기서, 은 n번째 추론 정확도 변화값, 은 제1 추론 정확도, 은 이전 추론 정확도를 의미한다.here, is the nth inference accuracy change value, is the first inference accuracy, Means the previous inference accuracy.
또한, 본 명세서의 일 실시예에서 SNN모델은 복수의 MNIST 손글씨 숫자 이미지를 이용하여 학습된다.In addition, in one embodiment of the present specification, the SNN model is learned using a plurality of MNIST handwritten digit images.
본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법 및 장치는 추론 시간을 단축함으로써 추론 정확도 성능을 보장하면서도 에너지 소모량을 최소화할 수 있다.The method and apparatus for reducing dynamic inference time according to an embodiment of the present specification can minimize energy consumption while guaranteeing inference accuracy performance by reducing inference time.
또한, 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법 및 장치는 추론 대상 이미지의 노출 시간을 동적으로 조절하여 추론 시간을 단축할 수 있다.In addition, the method and apparatus for reducing dynamic inference time according to an embodiment of the present specification may reduce inference time by dynamically adjusting an exposure time of an image to be inferred.
도 1은 SNN 모델의 정적 추론 시간과 추론 정확도의 관계를 나타낸 그래프이다.
도 2는 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 장치의 구성도이다.
도 3은 본 명세서의 일 실시예에서 제1 이미지 노출 시간, 추론 정확도 및 제2 이미지 노출 시간을 나타낸 표이다.
도 4는 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법의 순서도이다.1 is a graph showing the relationship between static inference time and inference accuracy of an SNN model.
2 is a block diagram of a device for reducing dynamic inference time according to an embodiment of the present specification.
3 is a table showing a first image exposure time, inference accuracy, and a second image exposure time according to an embodiment of the present specification.
4 is a flowchart of a method for reducing dynamic inference time according to an embodiment of the present specification.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. Like reference numerals have been used for like elements throughout the description of each figure.
제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, A, and B may be used to describe various components, but the components should not be limited by the terms. These terms are only used for the purpose of distinguishing one component from another. For example, a first element may be termed a second element, and similarly, a second element may be termed a first element, without departing from the scope of the present invention. The term and/or includes a combination of a plurality of related recited items or any one of a plurality of related recited items.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.It is understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, but other elements may exist in the middle. It should be. On the other hand, when an element is referred to as “directly connected” or “directly connected” to another element, it should be understood that no other element exists in the middle.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Terms used in this application are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, the terms "include" or "have" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that the presence or addition of numbers, steps, operations, components, parts, or combinations thereof is not precluded.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and unless explicitly defined in the present application, they should not be interpreted in an ideal or excessively formal meaning. don't
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세하게 설명한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
본 명세서에서 동적 추론 시간 단축 장치의 SNN모델에 입력되는 입력 데이터는 이미지 데이터일 수 있다. 이미지 데이터는 예컨대, 손글씨로된 MNIST 숫자 이미지일 수 있으며, SNN모델은 복수의 MNIST 손글씨 숫자 이미지를 이용하여 학습된 모델일 수 있다. 그러나, 반드시 이에 한정되는 것은 아니다.In this specification, input data input to the SNN model of the device for reducing dynamic inference time may be image data. The image data may be, for example, handwritten MNIST digit images, and the SNN model may be a model learned using a plurality of MNIST handwritten digit images. However, it is not necessarily limited thereto.
이하에서는, 설명의 편의를 위해 동적 추론 시간 단축 장치에 입력되는 입력 데이터는 추론의 대상이 되는 이미지 데이터임(이하, 추론 대상 이미지)을 전제로 하여 설명하도록 한다.Hereinafter, for convenience of description, it is assumed that the input data input to the dynamic inference time reduction device is image data to be inferred (hereinafter referred to as an inference target image).
도 2는 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 장치의 구성도이다.2 is a block diagram of a device for reducing dynamic inference time according to an embodiment of the present specification.
도면을 참조하면, 동적 추론 시간 단축 장치(100)는 정확도 산출부(110), 노출 시간 결정부(120) 및 출력부(130)를 포함한다.Referring to the drawings, the
정확도 산출부(110)는 추론 대상 이미지의 추론 결과 및 추론 정확도를 산출한다. 정확도 산출부(110)는 Nengo에서 제공하는 Loihi 에뮬레이터일 수 있으며, Loihi 에뮬레이터의 경우 최대 지원 뉴런의 수가 130k로, MNIST 숫자 이미지 크기인 28 x 28로 총 784개의 뉴런을 사용할 수 있다.The
추론 대상 이미지는 복수일 수 있고(예컨대 50개), 정확도 산출부(110)는 적어도 하나의 추론 대상 이미지를 SNN(Spiking Neural Network) 모델에 입력하여 추론 시간 동안 추론 대상 이미지의 추론 결과 및 추론 정확도를 산출한다.The inference target image may be plural (eg, 50), and the
구체적으로, 정확도 산출부(110)는 추론 대상 이미지의 추론 결과와 정답 데이터를 비교하여 일치 정도에 따라 추론 대상 이미지에 대한 추론 정확도를 산출한다.Specifically, the
여기서, 추론 시간은 추론 대상 이미지의 개수와 총 이미지 노출 시간의 곱을 의미한다. 이미지 노출 시간은 정확도 산출부(110)가 입력된 추론 대상 이미지의 정확도를 산출하는데 소요되는 시간으로써 총 이미지 노출 시간은 각각의 이미지 노출 시간을 더한 누적 시간을 의미한다. Here, the inference time means the product of the number of images to be inferred and the total image exposure time. The image exposure time is the time required for the
이미지 노출 시간 중에서 특정 이미지 노출 시간(즉, n번째 이미지 노출 시간)은 제1 이미지 노출 시간일 수 있고, 제1 이미지 노출 시간의 다음 이미지 노출 시간(즉, n+1번째 이미지 노출 시간)은 제2 이미지 노출 시간일 수 있다.Among the image exposure times, a specific image exposure time (ie, n-th image exposure time) may be the first image exposure time, and an image exposure time following the first image exposure time (ie, n+1-th image exposure time) may be the first image exposure time. 2 image exposure time.
정확도 산출부(110)는 각각의 이미지 노출 시간 동안 추론 대상 이미지의 정확도를 각각 산출할 수 있다. 예컨대, 모든 이미지 노출 시간이 0.001초로 설정된 경우, 정확도 산출부(110)는 0.001초의 제1 이미지 노출 시간 동안 추론 대상 이미지의 제1 추론 정확도(즉, n번째 추론 정확도)를 산출하고, 0.001초의 제2 이미지 노출 시간 동안 추론 대상 이미지의 제2 추론 정확도(즉, n+1번째 추론 정확도)를 산출한다. The
그러나, 일반적으로 이미지 노출 시간이 길수록 더 높은 추론 정확도가 산출되므로 추론 정확도 산출값과 관계 없이 이미지 노출 시간이 모두 동일하게 설정되는 경우 에너지 효율 측면에서 큰 낭비를 초래한다.However, in general, since a longer image exposure time yields higher inference accuracy, a large waste in terms of energy efficiency is caused when all image exposure times are set to be the same regardless of the inference accuracy calculation value.
따라서, 동적 추론 시간 단축 장치(100)는 에너지 소모량 최소화를 위해 노출 시간 결정부(120)를 통해 이미지 노출 시간을 동적으로 결정한다.Accordingly, the
노출 시간 결정부(120)는 제1 이미지 노출 시간, 제1 추론 정확도 및 제1 추론 정확도와 이전 추론 정확도의 변화 정도를 나타내는 추론 정확도 변화값에 기초하여 제2 이미지 노출 시간을 동적으로 결정한다.The
즉, 노출 시간 결정부(120)는 이전 추론 정확도가 제1 추론 정확도보다 높을수록 이미지 노출 시간이 길어지도록 제2 이미지 노출 시간을 동적으로 결정할 수 있다. That is, the
구체적으로, 제2 이미지 노출 시간은 하기의 <수학식 1>에 의해 결정될 수 있다.Specifically, the second image exposure time may be determined by Equation 1 below.
<수학식 1><Equation 1>
여기서, 은 제2 이미지 노출 시간, 은 제1 이미지 노출 시간, 은 제1 추론 정확도, 은 n번째 추론 정확도 변화값, 은 조정 상수를 의미한다. 은 제1 추론 정확도와 제1 이미지 노출 시간의 소수점 이하 자리를 맞추기 위한 조정 상수로 예컨대, 0.1일 수 있다.here, is the second image exposure time, is the first image exposure time, is the first inference accuracy, is the nth inference accuracy change value, means the adjustment constant. is an adjustment constant for adjusting the decimal point of the first inference accuracy and the first image exposure time, and may be, for example, 0.1.
한편, 추론 정확도 변화값은 하기의 <수학식 2>에 의해 산출될 수 있다.Meanwhile, the inference accuracy change value may be calculated by
<수학식 2><
여기서, 은 n번째 추론 정확도 변화값, 은 제1 추론 정확도, 은 이전 추론 정확도를 의미한다.here, is the nth inference accuracy change value, is the first inference accuracy, Means the previous inference accuracy.
이와 같이, 제2 이미지 노출 시간은 제1 이미지 노출 시간과 함께 고정된 값을 갖는 것이 아니라 제1 이미지 노출 시간, 제1 추론 정확도 및 추론 정확도 변화값에 의존하여 동적으로 결정된다.As such, the second image exposure time does not have a fixed value together with the first image exposure time, but is dynamically determined depending on the first image exposure time, the first inference accuracy, and the inference accuracy change value.
따라서, 기존의 추론 정확도와 관계 없이 이미지 노출 시간이 고정되었던 것과는 달리, 이미지 노출 시간을 지속적으로 늘려 짧은 시간 안에 추론 정확도를 향상시킬 수 있어 추론 대상 이미지에 대한 추론 시간이 단축될 수 있다.Therefore, unlike the existing image exposure time that is fixed regardless of inference accuracy, inference accuracy can be improved within a short time by continuously increasing the image exposure time, so the inference time for an image to be inferred can be shortened.
이후, 정확도 산출부(110)는 제2 이미지 노출 시간에 기초하여 제2 추론 정확도를 산출하고, 제2 추론 정확도를 미리 설정된 기준값과 비교하여 제2 추론 정확도가 미리 설정된 기준값에 도달할 때까지 제2 추론 정확도를 반복하여 산출한다. 미리 설정된 기준값은 이미지 노출 시간이 증가해도 추론 정확도가 더이상 향상되지 않는 임계값으로 예컨대, 94%일 수 있다.Thereafter, the
정확도 산출부(110)는 제2 추론 정확도가 미리 설정된 기준값에 도달하면 추론 정확도 산출을 멈추고, 출력부(130)는 제2 추론 정확도를 출력한다.The
이와 같이, 제2 이미지 노출 시간을 동적으로 결정하는 경우 제2 이미지 노출 시간이 길어짐에 따라 제2 추론 정확도를 반복 산출하는 횟수 또한 단축될 수 있다.In this way, when the second image exposure time is dynamically determined, as the second image exposure time increases, the number of iterative calculations of the second inference accuracy may also be reduced.
도 3은 본 명세서의 일 실시예에서 제1 이미지 노출 시간, 추론 정확도 및 제2 이미지 노출 시간을 나타낸 표이다.3 is a table showing a first image exposure time, inference accuracy, and a second image exposure time according to an embodiment of the present specification.
도면을 참조하면, 동적 추론 시간 단축 장치(100)는 총 6번의 추론 정확도 산출을 통해 94%의 추론 정확도를 도출하였다. 이는 총 47번의 추론 정확도 산출을 통해 94%의 추론 정확도를 도출하였던 정적 추론 시간의 기존 방법과는 달리, 이미지 노출 시간의 동적 조절을 통해 매우 적은 횟수로 동일한 추론 정확도를 도출하였음을 의미한다.Referring to the figure, the
또한, 기존 방법이 총 1.363초의 추론 시간이 소요되었던 것에 반해, 동적 추론 시간 단축 장치(100)의 경우 추론 시간은 0.13초(0.006 + 0.008 + 0.01 + 0.02 + 0.034 + 0.052)의 추론 시간이 소요되어 추론 시간 또한 현저하게 단축되었음을 확인할 수 있다.In addition, while the existing method took a total of 1.363 seconds of inference time, in the case of the dynamic inference
도 4는 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법의 순서도이다.4 is a flowchart of a method for reducing dynamic inference time according to an embodiment of the present specification.
도면을 참조하면, 동적 추론 시간 단축 장치는 적어도 하나의 추론 대상 이미지를 SNN모델에 입력하여 추론 시간 중 제1 이미지 노출 시간 동안 제1 추론 정확도를 산출한다(S110).Referring to the drawing, the apparatus for reducing dynamic inference time calculates a first inference accuracy during a first image exposure time among inference times by inputting at least one inference target image into an SNN model (S110).
이후, 동적 추론 시간 단축 장치는 제1 이미지 노출 시간, 제1 추론 정확도 및 제1 추론 정확도와 이전 추론 정확도의 변화 정도를 나타내는 추론 정확도 변화값에 기초하여 제2 이미지 노출 시간을 동적으로 결정한다(S120). 여기서, 제2 이미지 노출 시간은 제1 추론 정확도가 상기 이전 추론 정확도보다 높을수록 길어질 수 있다.Thereafter, the device for reducing dynamic inference time dynamically determines a second image exposure time based on the first image exposure time, the first inference accuracy, and the inference accuracy change value representing the degree of change between the first inference accuracy and the previous inference accuracy ( S120). Here, the second image exposure time may be longer as the first inference accuracy is higher than the previous inference accuracy.
또한, 동적 추론 시간 단축 장치는 제2 이미지 노출 시간에 기초하여 제2 추론 정확도를 산출하고(S130), 제2 추론 정확도가 미리 설정된 기준값에 도달할 때까지 제2 추론 정확도를 반복하여 산출한다(S140).In addition, the apparatus for reducing dynamic inference time calculates second inference accuracy based on the second image exposure time (S130), and repeatedly calculates the second inference accuracy until the second inference accuracy reaches a preset reference value (S130). S140).
이와 같이, 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법 및 장치는 추론 시간을 단축함으로써 추론 정확도 성능을 보장하면서도 에너지 소모량을 최소화할 수 있다.As such, the method and apparatus for reducing dynamic inference time according to an embodiment of the present specification can minimize energy consumption while guaranteeing inference accuracy performance by reducing inference time.
또한, 본 명세서의 일 실시예에 따른 동적 추론 시간 단축 방법 및 장치는 추론 대상 이미지의 노출 시간을 동적으로 조절하여 추론 시간을 단축할 수 있다.In addition, the method and apparatus for reducing dynamic inference time according to an embodiment of the present specification may reduce inference time by dynamically adjusting an exposure time of an image to be inferred.
이상과 같이 본 발명에 대해서 예시한 도면을 참조로 하여 설명하였으나, 본 명세서에 개시된 실시 예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상의 범위 내에서 통상의 기술자에 의해 다양한 변형이 이루어질 수 있음은 자명하다. 아울러 앞서 본 발명의 실시 예를 설명하면서 본 발명의 구성에 따른 작용 효과를 명시적으로 기재하여 설명하지 않았을지라도, 해당 구성에 의해 예측 가능한 효과 또한 인정되어야 함은 당연하다.As described above, the present invention has been described with reference to the drawings illustrated, but the present invention is not limited by the embodiments and drawings disclosed in this specification, and various modifications are made by those skilled in the art within the scope of the technical idea of the present invention. It is obvious that variations can be made. In addition, although the operational effects according to the configuration of the present invention have not been explicitly described and described while describing the embodiments of the present invention, it is natural that the effects predictable by the corresponding configuration should also be recognized.
Claims (10)
적어도 하나의 추론 대상 이미지를 SNN모델에 입력하여 추론 시간 중 제1 이미지 노출 시간 동안 제1 추론 정확도를 산출하는 단계;
상기 제1 이미지 노출 시간, 상기 제1 추론 정확도 및 상기 제1 추론 정확도와 이전 추론 정확도의 변화 정도를 나타내는 추론 정확도 변화값에 기초하여 제2 이미지 노출 시간을 동적으로 결정하는 단계;
상기 제2 이미지 노출 시간에 기초하여 제2 추론 정확도를 산출하는 단계; 및
상기 제2 추론 정확도가 미리 설정된 기준값에 도달할 때까지 상기 제2 이미지 노출 시간을 결정하는 단계 및 상기 제2 추론 정확도를 산출하는 단계를 반복하는 단계를 포함하는
동적 추론 시간 단축 방법.
In the dynamic inference time reduction method using a pre-learned Spiking Neural Network (SNN) model,
inputting at least one image to be inferred into an SNN model and calculating a first inference accuracy during a first image exposure time during an inference time;
dynamically determining a second image exposure time based on the first image exposure time, the first inference accuracy, and a change in inference accuracy indicating a degree of change between the first inference accuracy and a previous inference accuracy;
calculating a second inference accuracy based on the exposure time of the second image; and
And repeating the steps of determining the second image exposure time and calculating the second inference accuracy until the second inference accuracy reaches a preset reference value.
A method for reducing dynamic inference time.
상기 제2 이미지 노출 시간은
상기 제1 추론 정확도가 상기 이전 추론 정확도보다 높을수록 길어지는
동적 추론 시간 단축 방법.
According to claim 1,
The second image exposure time is
As the first inference accuracy is higher than the previous inference accuracy,
A method for reducing dynamic inference time.
상기 제2 이미지 노출 시간은
하기의 <수학식 1>에 의해 결정되는 동적 추론 시간 단축 방법.
<수학식 1>
여기서, 은 제2 이미지 노출 시간, 은 제1 이미지 노출 시간, 은 제1 추론 정확도, 은 n번째 추론 정확도 변화값, 은 조정 상수를 의미한다.
According to claim 1,
The second image exposure time is
A dynamic inference time reduction method determined by Equation 1 below.
<Equation 1>
here, is the second image exposure time, is the first image exposure time, is the first inference accuracy, is the nth inference accuracy change value, means the adjustment constant.
상기 추론 정확도 변화값은
하기의 <수학식 2>에 의해 산출되는 동적 추론 시간 단축 방법.
<수학식 2>
여기서, 은 n번째 추론 정확도 변화값, 은 제1 추론 정확도, 은 이전 추론 정확도를 의미한다.
According to claim 1,
The inference accuracy change value is
A dynamic inference time reduction method calculated by Equation 2 below.
<Equation 2>
here, is the nth inference accuracy change value, is the first inference accuracy, Means the previous inference accuracy.
상기 SNN모델은
복수의 MNIST 손글씨 숫자 이미지를 이용하여 학습된
동적 추론 시간 단축 방법.
According to claim 1,
The SNN model is
Learned using multiple MNIST handwritten digit images
A method for reducing dynamic inference time.
적어도 하나의 추론 대상 이미지를 SNN모델에 입력하여 추론 시간 중 제1 이미지 노출 시간 동안 제1 추론 정확도를 산출하는 정확도 산출부; 및
상기 제1 이미지 노출 시간, 상기 제1 추론 정확도 및 상기 제1 추론 정확도와 이전 추론 정확도의 변화 정도를 나타내는 추론 정확도 변화값에 기초하여 제2 이미지 노출 시간을 동적으로 결정하는 노출 시간 결정부를 포함하고,
상기 정확도 산출부는 상기 제2 이미지 노출 시간에 기초하여 제2 추론 정확도를 산출하고, 상기 제2 추론 정확도가 미리 설정된 기준값에 도달할 때까지 상기 제2 추론 정확도를 반복하여 산출하는
동적 추론 시간 단축 장치.
In a device for reducing dynamic inference time using a pre-learned Spiking Neural Network (SNN) model,
an accuracy calculation unit inputting at least one image to be inferred into the SNN model and calculating a first inference accuracy during a first image exposure time during an inference time; and
An exposure time determination unit configured to dynamically determine a second image exposure time based on the first image exposure time, the first inference accuracy, and an inference accuracy change value representing a degree of change between the first inference accuracy and a previous inference accuracy; ,
The accuracy calculator calculates second inference accuracy based on the second image exposure time, and repeatedly calculates the second inference accuracy until the second inference accuracy reaches a preset reference value.
A dynamic inference time-reduction device.
상기 제2 이미지 노출 시간은
상기 제1 추론 정확도가 상기 이전 추론 정확도보다 높을수록 길어지는
동적 추론 시간 단축 장치.
According to claim 6,
The second image exposure time is
As the first inference accuracy is higher than the previous inference accuracy,
A dynamic inference time-reduction device.
상기 제2 이미지 노출 시간은
하기의 <수학식 1>에 의해 결정되는 동적 추론 시간 단축 장치.
<수학식 1>
여기서, 은 제2 이미지 노출 시간, 은 제1 이미지 노출 시간, 은 제1 추론 정확도, 은 n번째 추론 정확도 변화값, 은 조정 상수를 의미한다.
According to claim 6,
The second image exposure time is
Dynamic inference time reduction device determined by Equation 1 below.
<Equation 1>
here, is the second image exposure time, is the first image exposure time, is the first inference accuracy, is the nth inference accuracy change value, means the adjustment constant.
상기 추론 정확도 변화값은
하기의 <수학식 2>에 의해 산출되는 동적 추론 시간 단축 장치.
<수학식 2>
여기서, 은 n번째 추론 정확도 변화값, 은 제1 추론 정확도, 은 이전 추론 정확도를 의미한다.
According to claim 6,
The inference accuracy change value is
Dynamic inference time reduction device calculated by Equation 2 below.
<Equation 2>
here, is the nth inference accuracy change value, is the first inference accuracy, Means the previous inference accuracy.
상기 SNN모델은
복수의 MNIST 손글씨 숫자 이미지를 이용하여 학습된
동적 추론 시간 단축 장치.
According to claim 6,
The SNN model is
Learned using multiple MNIST handwritten digit images
A dynamic inference time-reduction device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020210144373A KR102731823B1 (en) | 2021-10-27 | 2021-10-27 | Method and apparatus for reducing dynamic inference time using snn model |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020210144373A KR102731823B1 (en) | 2021-10-27 | 2021-10-27 | Method and apparatus for reducing dynamic inference time using snn model |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| KR20230060094A true KR20230060094A (en) | 2023-05-04 |
| KR102731823B1 KR102731823B1 (en) | 2024-11-19 |
Family
ID=86379776
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020210144373A Active KR102731823B1 (en) | 2021-10-27 | 2021-10-27 | Method and apparatus for reducing dynamic inference time using snn model |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR102731823B1 (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20140054267A (en) * | 2011-08-16 | 2014-05-08 | 퀄컴 인코포레이티드 | Method and apparatus for neural temporal coding, learning and recognition |
| KR20210057430A (en) * | 2019-11-12 | 2021-05-21 | 한국전자기술연구원 | Hyper-parameter optimization method for skiing neural network and the processing apparatus thereof |
-
2021
- 2021-10-27 KR KR1020210144373A patent/KR102731823B1/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20140054267A (en) * | 2011-08-16 | 2014-05-08 | 퀄컴 인코포레이티드 | Method and apparatus for neural temporal coding, learning and recognition |
| KR20210057430A (en) * | 2019-11-12 | 2021-05-21 | 한국전자기술연구원 | Hyper-parameter optimization method for skiing neural network and the processing apparatus thereof |
Non-Patent Citations (1)
| Title |
|---|
| Jeongho Kim, "Competitive Hyperparameter Balancing on Spiking Neural Network for a Fast, Accurate and Energy-Efficient Inference", Advances in Neural Networks-ISNN 2018 (2015.05.26.)* * |
Also Published As
| Publication number | Publication date |
|---|---|
| KR102731823B1 (en) | 2024-11-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Shayer et al. | Learning discrete weights using the local reparameterization trick | |
| US6151594A (en) | Artificial neuron and method of using same | |
| US20200193297A1 (en) | System and method for binary recurrent neural network inferencing | |
| CN110059733A (en) | The optimization and fast target detection method, device of convolutional neural networks | |
| CN110717585B (en) | Training methods, data processing methods and related products of neural network models | |
| JP2022501677A (en) | Data processing methods, devices, computer devices, and storage media | |
| CN117117992B (en) | Output power adjustment method, device, computer equipment and storage medium | |
| Zhang et al. | Efficient spiking neural networks with logarithmic temporal coding | |
| CN111542838B (en) | Quantification method, device and electronic equipment for convolutional neural network | |
| KR20220030108A (en) | Method and system for training artificial neural network models | |
| CN111831358B (en) | Weight precision configuration method, device, equipment and storage medium | |
| CN112215334A (en) | Neural network model compression method for event camera | |
| CN118796471B (en) | Reasoning resource optimization method, device and electronic equipment | |
| CN111898752B (en) | Apparatus and method for performing LSTM neural network operations | |
| CN110874627A (en) | Data processing method, data processing apparatus and computer readable medium | |
| CN111783935A (en) | Convolutional neural network construction method, device, equipment and medium | |
| KR102765759B1 (en) | Method and apparatus for quantizing deep neural network | |
| CN112614197A (en) | Image generation method and device, computer equipment and storage medium | |
| KR20230060094A (en) | Method and apparatus for reducing dynamic inference time using snn model | |
| US20240394534A1 (en) | Artificial neural network calculation method and device based on parameter quantization using hysteresis | |
| US11593664B2 (en) | Method and computational tool for determining transfer functions between pairs of successive layers of a neural network | |
| CN113688988A (en) | Precision adjustment method and device, and storage medium | |
| Kang et al. | A dynamic fixed-point representation for neuromorphic computing systems | |
| CN111831356A (en) | Weight accuracy configuration method, device, device and storage medium | |
| KR102637568B1 (en) | Method and apparatus of optimizing spiking neural network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20211027 |
|
| PA0201 | Request for examination | ||
| PG1501 | Laying open of application | ||
| E902 | Notification of reason for refusal | ||
| PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20240312 Patent event code: PE09021S01D |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20241111 |
|
| GRNT | Written decision to grant | ||
| PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20241114 Patent event code: PR07011E01D |
|
| PR1002 | Payment of registration fee |
Payment date: 20241115 End annual number: 3 Start annual number: 1 |
|
| PG1601 | Publication of registration |