KR20200012281A - A method for searching optimal structure of convolution neural network using genetic algorithms - Google Patents

A method for searching optimal structure of convolution neural network using genetic algorithms Download PDF

Info

Publication number
KR20200012281A
KR20200012281A KR1020180087386A KR20180087386A KR20200012281A KR 20200012281 A KR20200012281 A KR 20200012281A KR 1020180087386 A KR1020180087386 A KR 1020180087386A KR 20180087386 A KR20180087386 A KR 20180087386A KR 20200012281 A KR20200012281 A KR 20200012281A
Authority
KR
South Korea
Prior art keywords
neural network
generating
convolutional neural
chromosome
chromosomes
Prior art date
Application number
KR1020180087386A
Other languages
Korean (ko)
Other versions
KR102134472B1 (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 KR1020180087386A priority Critical patent/KR102134472B1/en
Publication of KR20200012281A publication Critical patent/KR20200012281A/en
Application granted granted Critical
Publication of KR102134472B1 publication Critical patent/KR102134472B1/en

Links

Images

Classifications

    • 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/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Abstract

The present invention relates to a method for searching for an optimal structure of a convolution neural network. The method for searching for an optimal structure of a convolution neural network using a genetic algorithm according to the present invention, comprises the steps of: generating an initial generation by initializing a convolution neural network structure, and generating chromosomes of the initial generation; generating and learning a convolution neural network for the chromosomes, and calculating and evaluating suitability in accordance with a predetermined suitability function; selecting a superior chromosome through the evaluated suitability; generating a next generation candidate group from the superior chromosome through chromosome hybridization; applying a variation to the next generation candidate group through a chromosomal variation; and repeating the evaluation step, the selection step, the step of generating the next generation candidate group and the application step a predetermined number of times.

Description

유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크의 최적 구조 탐색 방법{A METHOD FOR SEARCHING OPTIMAL STRUCTURE OF CONVOLUTION NEURAL NETWORK USING GENETIC ALGORITHMS}A METHOD FOR SEARCHING OPTIMAL STRUCTURE OF CONVOLUTION NEURAL NETWORK USING GENETIC ALGORITHMS}

본 발명은 콘볼루션 뉴럴 네트워크의 최적 구조를 탐색하기 위한 방법에 관한 것이다.The present invention relates to a method for searching for an optimal structure of a convolutional neural network.

딥러닝 기술의 발전으로 인해 콘볼루션 뉴럴 네트워크(CNN)가 영상을 다루는 컴퓨터 비전 분야의 거의 전 영역에서 사용되고 있으며, 그 범위는 영상 분류(Image Classification), 물체 인식(Object Detection), 영상 분리(Image Segmenation), 영상 초해상도(Image SuperResolution) 등 다양하다.Advances in deep learning technology have enabled Convolutional Neural Networks (CNNs) in almost all areas of computer vision to deal with images, and their ranges include image classification, object detection, and image separation. Segmenation, Image SuperResolution, etc.

AlexNet, VGG Net, Google Net 등의 초기 CNN 구조들 이후에 ResNet, DenseNet 등의 최신 뉴럴 네트워크 아키텍처들이 발전하고 있지만, CNN을 사용하는 목적과 데이터 셋에 따라 최적의 구조가 다를 수 있다.After the initial CNN structures such as AlexNet, VGG Net, and Google Net, the latest neural network architectures such as ResNet and DenseNet have evolved, but the optimal structure may differ depending on the purpose and data set of using CNN.

특히, CNN의 레이어수가 많고 깊이가 깊어질수록(필터 수가 많아질수록) 특징 추출의 성능이 높아지는 경향이 있지만, 뉴럴 네트워크 파라미터의 개수가 많아지며, 이는 알고리즘 수행 속도의 저하와 모델 용량의 증가를 가져온다.In particular, as the number of layers and depth of CNN (the number of filters) increases, the performance of feature extraction tends to increase, but the number of neural network parameters increases, which reduces the performance of algorithms and increases model capacity. Bring.

따라서 CNN 알고리즘이 탑재되는 처리장치의 처리 성능과 시스템 요구조건에 따른 알고리즘 수행 속도 제약을 지키는 CNN 구조 중, 가장 정확도가 높은 것을 사용해야 한다.Therefore, the most accurate CNN structure must be used among the CNN structure that obeys the processing performance of the processing device equipped with the CNN algorithm and the speed limit of the algorithm according to the system requirements.

또한 기존의 CNN 구조들의 경우 여러 아이디어를 통해 CNN을 만들어내고, 다양한 구조가 제안되고 있지만, 최적의 CNN 구조를 자동으로 탐색하기 위한 알고리즘은 거의 없다.In the case of existing CNN structures, CNN is generated through various ideas and various structures have been proposed, but there are few algorithms for automatically searching for the optimal CNN structure.

본 발명은 전술한 문제 및 다른 문제를 해결하는 것을 목적으로 한다. 또 다른 목적은, 콘볼루션 뉴럴 네트워크 알고리즘의 목적에 맞는 뉴럴 네트워크 구조를 유전 알고리즘을 활용하여 탐색할 수 있도록 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크의 최적 구조 탐색 방법을 제공하는 것을 그 목적으로 한다.The present invention aims to solve the above and other problems. It is another object of the present invention to provide an optimal structure search method of a convolutional neural network using a genetic algorithm that enables the search of a neural network structure suitable for the purpose of the convolutional neural network algorithm using a genetic algorithm. .

상기 또는 다른 목적을 달성하기 위해 본 발명의 일 측면에 따르면, 콘볼루션 뉴럴 네트워크 구조를 초기화하여 초기 세대를 생성하고, 상기 초기 세대의 염색체들을 생성하는 단계; 상기 염색체들에 대한 콘볼루션 뉴럴 네트워크를 생성하여 학습하고, 소정 적합도 함수에 따라 적합도를 산출하여 평가하는 단계; 상기 평가한 적합도를 통해 우수 염색체를 선택하는 단계; 상기 우수 염색체로부터 염색체 교배를 통해 다음 세대 후보군을 생성하는 단계; 염색체 변이를 통해 상기 다음 세대 후보군에 대한 변이를 적용하는 단계; 및 소정 횟수만큼 상기 평가하는 단계, 선택하는 단계, 다음 세대 후보군을 생성하는 단계 및 적용하는 단계를 반복하는 단계;를 포함하는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법을 제공한다. According to an aspect of the present invention to achieve the above or another object, the step of initializing the convolutional neural network structure to generate an initial generation, generating the chromosomes of the initial generation; Generating and learning a convolutional neural network for the chromosomes, and calculating and evaluating fitness according to a predetermined fitness function; Selecting an excellent chromosome based on the evaluated goodness of fit; Generating a next generation candidate group through chromosome crossing from the superior chromosome; Applying mutations to the next generation candidate group through chromosomal mutations; And repeating the evaluating, selecting, generating and applying the next generation candidate group a predetermined number of times, and the method of searching for a convolutional neural network optimized structure using a genetic algorithm. to provide.

실시 예에 있어서, 상기 초기 세대의 염색체들은 각각 소정 개수의 유전자를 갖으며, 상기 유전자는 각각 임의의 길이의 DNA를 갖는 것을 특징으로 한다. In an embodiment, the chromosomes of the initial generation each have a predetermined number of genes, each gene is characterized in that each having a DNA of any length.

또 다른 실시 예에 있어서, 상기 DNA는 Input, Conv, Dwconv, Sum, Concat 중 하나의 타입을 가지며, 입력 레이어와 각 레이어의 파라미터에 대한 정보를 포함할 수 있다. In another embodiment, the DNA has one type of Input, Conv, Dwconv, Sum, and Concat, and may include information about an input layer and parameters of each layer.

또 다른 실시 예에 있어서, 상기 염색체들에 대한 콘볼루션 뉴럴 네트워크를 생성하여 학습하고, 소정 적합도 함수에 따라 적합도를 산출하여 평가하는 단계;는, 상기 염색체들 각각에 대하여, 염색체 내에 포함된 각 유전자의 뉴럴 네트워크 표현 사이에 전이 계층(Transition Layer)을 삽입하여, 콘볼루션 뉴럴 네트워크를 생성하는 단계;를 포함할 수 있다. In another embodiment, the step of generating and learning a convolutional neural network for the chromosomes, and calculating and assessing the fitness based on a predetermined fitness function, for each of the chromosomes, each gene included in the chromosome And inserting a transition layer between the neural network representations of to generate a convolutional neural network.

또 다른 실시 예에 있어서, 상기 콘볼루션 뉴럴 네트워크를 생성하는 단계;는 상기 전이 계층 중 요소 기반 합(Element-wise Sum) 레이어에 대하여, 서로 다른 채널수를 갖고 있는 입력들은 1x1 Conv(콘볼루션) 레이어를 추가하여, 채널수를 입력 중 가장 작은 수의 채널로 동일하게 맞춰주는 단계;를 포함할 수 있다. In another embodiment, the generating of the convolutional neural network may include: 1x1 Conv (convolution) inputs having different channel numbers for the element-wise sum layer of the transition layer; And adding the layers to equally match the number of channels to the smallest number of channels among the inputs.

본 발명에 따른 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크의 최적 구조 탐색 방법의 효과에 대해 설명하면 다음과 같다.The effects of the optimal structure search method of the convolutional neural network using the genetic algorithm according to the present invention are as follows.

본 발명의 실시 예들 중 적어도 하나에 의하면, 콘볼루션 뉴럴 네트워크 알고리즘의 목적에 맞는 뉴럴 네트워크 구조를 유전 알고리즘을 활용하여 탐색할 수 있다는 장점이 있다.According to at least one of the embodiments of the present invention, a neural network structure suitable for the purpose of the convolutional neural network algorithm may be searched using a genetic algorithm.

본 발명의 적용 가능성의 추가적인 범위는 이하의 상세한 설명으로부터 명백해질 것이다. 그러나 본 발명의 사상 및 범위 내에서 다양한 변경 및 수정은 당업자에게 명확하게 이해될 수 있으므로, 상세한 설명 및 본 발명의 바람직한 실시 예와 같은 특정 실시 예는 단지 예시로 주어진 것으로 이해되어야 한다.Further scope of the applicability of the present invention will become apparent from the following detailed description. However, various changes and modifications within the spirit and scope of the present invention can be clearly understood by those skilled in the art, and therefore, specific embodiments, such as the detailed description and the preferred embodiments of the present invention, should be understood as given by way of example only.

도 1은 본 발명에 따른 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크의 최적 구조 탐색 방법의 실시 예를 설명하기 위한 흐름도이다.
도 2는 유전 알고리즘 염색체 및 유전자의 실시 예를 설명하기 위한 도면이다.
도 3은 염색체를 콘볼루션 뉴럴 네트워크로 생성하는 방법의 실시 예를 설명하기 위한 도면이다.
1 is a flowchart illustrating an embodiment of a method for searching for an optimal structure of a convolutional neural network using a genetic algorithm according to the present invention.
2 is a diagram illustrating an embodiment of a genetic algorithm chromosome and a gene.
3 is a view for explaining an embodiment of a method for generating a chromosome as a convolutional neural network.

이하, 첨부된 도면을 참조하여 본 명세서에 개시된 실시 예를 상세히 설명하되, 도면 부호에 관계없이 동일하거나 유사한 구성요소에는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 이하의 설명에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. 또한, 본 명세서에 개시된 실시 예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 명세서에 개시된 실시 예의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 명세서에 개시된 실시 예를 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 명세서에 개시된 기술적 사상이 제한되지 않으며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. Hereinafter, exemplary embodiments disclosed herein will be described in detail with reference to the accompanying drawings, and the same or similar components will be given the same reference numerals regardless of the reference numerals, and redundant description thereof will be omitted. The suffixes "module" and "unit" for components used in the following description are given or mixed in consideration of ease of specification, and do not have distinct meanings or roles. In addition, in the following description of the embodiments disclosed herein, when it is determined that the detailed description of the related known technology may obscure the gist of the embodiments disclosed herein, the detailed description thereof will be omitted. In addition, the accompanying drawings are only for easily understanding the embodiments disclosed in the present specification, the technical idea disclosed in the specification by the accompanying drawings are not limited, and all changes included in the spirit and scope of the present invention. It should be understood to include equivalents and substitutes.

제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되지는 않는다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms including ordinal numbers such as first and second may be used to describe various components, but the components are not limited by the terms. The terms are used only for the purpose of distinguishing one component from another.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is said to be "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that another component may be present in the middle. Should be. On the other hand, when a component is said to be "directly connected" or "directly connected" to another component, it should be understood that there is no other component in between.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. Singular expressions include plural expressions unless the context clearly indicates otherwise.

본 출원에서, "포함한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.In this application, the terms "comprises" or "having" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

이하, 첨부된 도면을 참조하여 본 발명을 더욱 상세하게 기술할 것이다. 이하의 설명에서 본 발명의 모든 실시형태가 개시되는 것은 아니다. 본 발명은 매우 다양한 형태로 구현될 수 있으며, 여기에 개시되는 실시형태에 한정되는 것으로 해석되어서는 안 된다. 본 실시형태들은 출원을 위한 법적 요건들을 충족시키기 위해 제공되는 것이다. 동일한 구성요소에는 전체적으로 동일한 참조부호가 사용된다.Hereinafter, with reference to the accompanying drawings will be described in more detail the present invention. In the following description, not all embodiments of the present invention are disclosed. The invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. The present embodiments are provided to satisfy legal requirements for an application. The same reference numerals are used throughout the same component.

본 발명은 CNN 구조 탐색을 위한 유전 알고리즘, 유전 알고리즘에서의 염색체(Chromosome) 표현 방법, 각 염색체의 CNN 생성 방법으로 구성되어 있다.The present invention consists of a genetic algorithm for CNN structure search, a chromosome expression method in the genetic algorithm, and a CNN generation method for each chromosome.

유전 알고리즘은 초기화, 학습 및 성능 평가, 우수 염색체 선택, 염색체 교배, 염색체 변이로 구성되어 있으며, 사용자의 목적에 맞는 척도를 가중 지수합을 이용해 적합도 함수로 사용할 수 있다.Genetic algorithms consist of initialization, learning and performance evaluation, good chromosome selection, chromosome crossing, and chromosomal variation, and a scale that fits the user's purpose can be used as a fitness function using weighted exponential sums.

유전 알고리즘에서의 염색체 표현 방법은, 각 염색체(Chromosome)는 동일한 길이의 유전자(Gene)를 갖고 있으며, 해당 유전자의 DNA는 콘볼루션 뉴럴 네트워크의 레이어에 해당하는 정보를 갖고 있도록 하는 방법으로 구성되어 있다.The chromosome expression method in the genetic algorithm consists of a method in which each chromosome has a gene of the same length and the DNA of the gene has information corresponding to a layer of a convolutional neural network. .

각 염색체의 CNN 생성 방법은, 각 유전자의 정보를 이용해 유전자에 해당하는 뉴럴 네트워크를 생성하고, 그 사이에 전이 레이어를 이용해 전체 뉴럴 네트워크 구조를 생성하는 방법, 채널수가 맞지 않는 레이어들 간의 레이어 채널을 맞추어 주는 방법으로 구성되어 있다.The CNN generation method of each chromosome generates a neural network corresponding to a gene using information of each gene, and generates a whole neural network structure using a transition layer between them. It is organized in a way to match.

상기 또는 다른 목적을 달성하기 위해 본 발명의 일 측면에 따르면, 콘볼루션 뉴럴 네트워크 구조를 초기화하여 초기 세대를 생성하고, 상기 초기 세대의 염색체들을 생성하는 단계; 상기 염색체들에 대한 콘볼루션 뉴럴 네트워크를 생성하여 학습하고, 소정 적합도 함수에 따라 적합도를 산출하여 평가하는 단계; 상기 평가한 적합도를 통해 우수 염색체를 선택하는 단계; 상기 우수 염색체로부터 염색체 교배를 통해 다음 세대 후보군을 생성하는 단계; 염색체 변이를 통해 상기 다음 세대 후보군에 대한 변이를 적용하는 단계; 및 소정 횟수만큼 상기 평가하는 단계, 선택하는 단계, 다음 세대 후보군을 생성하는 단계 및 적용하는 단계를 반복하는 단계;를 포함하는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법을 제공한다. According to an aspect of the present invention to achieve the above or another object, the step of initializing the convolutional neural network structure to generate an initial generation, generating the chromosomes of the initial generation; Generating and learning a convolutional neural network for the chromosomes, and calculating and evaluating fitness according to a predetermined fitness function; Selecting an excellent chromosome based on the evaluated goodness of fit; Generating a next generation candidate group through chromosome crossing from the superior chromosome; Applying mutations to the next generation candidate group through chromosomal mutations; And repeating the evaluating, selecting, generating and applying the next generation candidate group a predetermined number of times, and the method of searching for a convolutional neural network optimized structure using a genetic algorithm. to provide.

실시 예에 있어서, 상기 초기 세대의 염색체들은 각각 소정 개수의 유전자를 갖으며, 상기 유전자는 각각 임의의 길이의 DNA를 갖는 것을 특징으로 한다. In an embodiment, the chromosomes of the initial generation each have a predetermined number of genes, each gene is characterized in that each having a DNA of any length.

또 다른 실시 예에 있어서, 상기 DNA는 Input, Conv, Dwconv, Sum, Concat 중 하나의 타입을 가지며, 입력 레이어와 각 레이어의 파라미터에 대한 정보를 포함할 수 있다. In another embodiment, the DNA has one type of Input, Conv, Dwconv, Sum, and Concat, and may include information about an input layer and parameters of each layer.

또 다른 실시 예에 있어서, 상기 염색체들에 대한 콘볼루션 뉴럴 네트워크를 생성하여 학습하고, 소정 적합도 함수에 따라 적합도를 산출하여 평가하는 단계;는, 상기 염색체들 각각에 대하여, 염색체 내에 포함된 각 유전자의 뉴럴 네트워크 표현 사이에 전이 계층(Transition Layer)을 삽입하여, 콘볼루션 뉴럴 네트워크를 생성하는 단계;를 포함할 수 있다. In another embodiment, the step of generating and learning a convolutional neural network for the chromosomes, and calculating and assessing the fitness based on a predetermined fitness function, for each of the chromosomes, each gene included in the chromosome And inserting a transition layer between the neural network representations of to generate a convolutional neural network.

또 다른 실시 예에 있어서, 상기 콘볼루션 뉴럴 네트워크를 생성하는 단계;는 상기 전이 계층 중 요소 기반 합(Element-wise Sum) 레이어에 대하여, 서로 다른 채널수를 갖고 있는 입력들은 1x1 Conv(콘볼루션) 레이어를 추가하여, 채널수를 입력 중 가장 작은 수의 채널로 동일하게 맞춰주는 단계;를 포함할 수 있다. In another embodiment, the generating of the convolutional neural network may include: 1x1 Conv (convolution) inputs having different channel numbers for the element-wise sum layer of the transition layer; And adding the layers to equally match the number of channels to the smallest number of channels among the inputs.

도 1은 본 발명에 따른 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크의 최적 구조 탐색 방법의 실시 예를 설명하기 위한 흐름도이다. 1 is a flowchart illustrating an embodiment of a method for searching for an optimal structure of a convolutional neural network using a genetic algorithm according to the present invention.

도 1을 참조하면, 먼저, 임의 CNN 구조 초기화 과정을 통해 초기 세대(population) 생성단계가 진행된다. 임의의 DNA로 구성된 유전자를 가진 염색체를 생성하게 된다. Referring to FIG. 1, first, an initial generation generation step is performed through an arbitrary CNN structure initialization process. It will produce a chromosome with a gene consisting of random DNA.

이어서, 세대 내의 염색체들에 대해 콘볼루션 뉴럴 네트워크를 생성하여 학습한 뒤 검증 (Validation) 데이터에 대한 성능 평가를 수행하는 단계가 진행된다. 각 염색체를 CNN 구조로 변환하여 목적에 맞게 학습하고, 정해진 적합도 함수(Fitness function)에 따라 적합도를 산정하여 평가하게 된다. Subsequently, a step of generating and learning a convolutional neural network for chromosomes in a generation is performed, and then performing a performance evaluation on validation data. Each chromosome is transformed into a CNN structure for learning according to the purpose, and the fitness is evaluated according to a defined fitness function.

이후, 평가된 적합도(fitness score)를 통해 우수 염색체를 선택하는 단계가 진행된다. 적합도가 더 높은 염색체를 더 우수한 염색체로 볼 수 있으며, 다음 염색체를 생성하기 위한 부모 염색체를 선택하는 단계이다. 적합도에 따라 선택될 확률이 분배되는 룰렛 선택(rolette-wheel selection) 방법 또는 정해진 개수를 임의로 선택한 뒤, 해당 개체들 중 가장 적합도가 높은 개체를 선택하는 토너먼트 선택(Tournament selection) 방법 등이 있다.Thereafter, the step of selecting an excellent chromosome through the evaluated fitness score proceeds. A higher fit chromosome can be seen as a better chromosome and the step of selecting the parent chromosome to produce the next chromosome. There may be a roulette selection method in which a probability to be selected according to the fitness is distributed, or a tournament selection method in which a predetermined number is arbitrarily selected and then the most suitable object among the objects is selected.

그리고, 염색체 교배를 통해 다음 세대 후보군을 생성하는 단계가 진행된다. 선택 단계에서 선택된 두 부모 염색체로부터 교배를 통해 다음 단계를 생성한다. 단일점 교배(single-point crossover)는 정해진 길이의 개체에서 특정 지점으로부터 부모의 유전자를 교차로 가져오는 방법이며, 균일 교배(Uniform crossover)의 경우 매 유전자마다 확률적으로 부모로부터 물려받는 방법이다. In addition, a step of generating a next generation candidate group through chromosome crossing is performed. The next step is generated by crossing from the two parent chromosomes selected in the selection step. Single-point crossover is a method of bringing parent's genes from a specific point in an individual of a predetermined length in a crossover fashion. In the case of uniform crossover, each gene has a probability of inheriting from a parent.

다음으로, 염색체 변이를 통해 다음 세대 후보군에 대한 변이를 적용하는 단계가 진행된다. 염색체 변이의 경우 각 유전자에 특정 DNA를 추가, 삭제 또는 변경하는 기작을 정의한 뒤, 확률적으로 변이를 적용한다. Next, the step of applying the mutation for the next generation candidate group through the chromosomal mutation proceeds. In the case of chromosomal mutations, the mutations are defined by the mechanism of adding, deleting or altering specific DNA to each gene, and then applying the mutations probabilistically.

또한 정해진 횟수만큼 평가-선택-교배-변이 과정을 반복할 수 있다. In addition, the evaluation-selection-crossing-variation process can be repeated a predetermined number of times.

적합도 함수는 다음의 수학식 1에 의해 산출될 수 있다. The goodness-of-fit function may be calculated by Equation 1 below.

Figure pat00001
Figure pat00001

위의 식은 적합도 함수를 가중 지수 합(Weighted exponential sum)으로 나타낸 것이며, p=1인 경우 일반적인 가중합(Weighted sum)과 같다.The above equation represents the goodness-of-fit function as the weighted exponential sum. If p = 1, it is the same as the normal weighted sum.

Figure pat00002
의 경우 사용자의 목적에 맞는 함수를 사용할 수 있다. 예를 들면 물체 인식 정밀도(Precision) 혹은 재현율(Recall)과 같은 정확도 지표, 알고리즘의 수행 속도, 네트워크의 파라미터 수 등을 사용한 함수를 사용할 수 있다.
Figure pat00002
In this case, you can use a function appropriate to your purpose. For example, you can use a function that uses accuracy indicators such as object recognition precision or recall, the speed of algorithm execution, the number of parameters in the network, and so on.

도 2는 유전 알고리즘 염색체 및 유전자의 실시 예를 설명하기 위한 도면이다. 2 is a diagram illustrating an embodiment of a genetic algorithm chromosome and a gene.

도 2를 참조하면, 각 염색체(Chromosome)는 특정수의 유전자(Gene)를 갖고 있으며, 각 유전자는 임의의 길이의 DNA를 갖고 있다. Referring to Figure 2, each chromosome (Chromosome) has a certain number of genes (Gene), each gene has a DNA of any length.

각 DNA는 Input/Conv/Dwconv/Sum/Concat 중의 하나의 타입을 갖고 있으며, Conv, Dwconv는 한 개의 입력 DNA를, Sum과 Concat는 두 개 이상의 입력 DNA를 갖고 있다. Each DNA has one type of Input / Conv / Dwconv / Sum / Concat, Conv and Dwconv have one input DNA, and Sum and Concat have two or more input DNAs.

Input의 경우 첫 번째 유전자(Gene)의 경우에는 이미지 입력을, 그렇지 않은 경우에는 앞 계층의 출력을 입력으로 받게 된다. In the case of input, the first gene receives an image input. Otherwise, the output of the previous layer is received as an input.

Conv/Dwconv 의 경우 각각 합성곱 계층 (Convolutional Layer) 과 깊이 분리 합성곱 계층 (Depthwise Separable Convolutional Layer)를 나타낸다. 두 경우 모두 필터의 커널 크기를 매개 변수로 갖게 되며, 합성곱 계층의 경우 필터 개수를 추가로 매개 변수로 갖게 된다.Conv / Dwconv represents a convolutional layer and a depthwise separable convolutional layer, respectively. In both cases, the kernel size of the filter is taken as a parameter, and in the case of a composite product layer, the number of filters is additionally taken as a parameter.

Sum 과 Concat의 경우 각각 요소 기반 합 (Element-wise Sum)과 연결 (Concatenation) 계층을 나타내며, 요소 기반 합 계층의 경우 두 입력 계층의 출력을 요소 기반으로 더하는 역할을, 연결의 경우 두 계층을 연결하는 역할을 수행한다.In the case of Sum and Concat, respectively, it represents an element-wise sum and a concatenation layer.In the case of an element-based sum layer, it adds the output of two input layers based on an element, and in the case of a connection, connects two layers. It plays a role.

도 3은 염색체를 콘볼루션 뉴럴 네트워크로 생성하는 방법의 실시 예를 설명하기 위한 도면이다. 3 is a view for explaining an embodiment of a method for generating a chromosome as a convolutional neural network.

도 3을 참조하면, 각 염색체는 콘볼루션 뉴럴 네트워크로 표현할 수 있다. 각 유전자의 뉴럴 네트워크 표현 사이에 있는 전이 계층(Transition Layer)을 넣어 최종 뉴럴 네트워크 구조를 생성할 수 있다. Referring to FIG. 3, each chromosome can be represented by a convolutional neural network. The transition layer between each gene's neural network representation can be inserted to create the final neural network structure.

요소 기반 합(Element-wise Sum) 레이어의 경우 입력 레이어들의 채널 수가 같아야 하므로, 서로 다른 채널 수를 갖고 있는 입력들은 1x1 Conv 레이어를 추가하여, 채널수를 입력 중 가장 작은 수의 채널로 동일하게 맞추어 줄 수 있다. For element-wise sum layers, the number of channels in the input layers must be the same, so inputs with different channel numbers add a 1x1 conv layer to equalize the number of channels to the smallest number of inputs. Can give

하나의 유전자에 해당하는 레이어들은 Stride를 1로 고정해놓기 때문에 출력 레이어의 크기가 모두 같으며, 따라서 Concat 레이어의 입력은 별도의 크기 조정 과정이 필요 없게 된다. The layers corresponding to one gene have the same stride size of 1, so the output layers are all the same size. Therefore, the input of the Concat layer does not require any resizing process.

전이 계층(Transition Layer)은 레이어의 크기를 줄이고, 상황에 따라 채널수를 줄이는 등 유전자로 표현 된 뉴럴 네트워크들 사이의 전이 역할을 해주는 레이어이다. Stride가 2인 Maxpool, Avgpool, 혹은 콘볼루션 레이어를 사용 가능하며, 여러 계층을 병렬적으로 수행한 뒤, 연결 (Concatenation) 하는 방법 또한 가능하다.The transition layer is a layer that plays a role of transition between neural networks expressed by genes such as reducing the size of the layer and reducing the number of channels according to the situation. You can use a Maxpool, Avgpool, or convolutional layer with Stride 2, or you can run multiple layers in parallel and then concatenate them.

본 발명에 따른 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크의 최적 구조 탐색 방법의 효과에 대해 설명하면 다음과 같다.The effects of the optimal structure search method of the convolutional neural network using the genetic algorithm according to the present invention are as follows.

본 발명의 실시 예들 중 적어도 하나에 의하면, 콘볼루션 뉴럴 네트워크 알고리즘의 목적에 맞는 뉴럴 네트워크 구조를 유전 알고리즘을 활용하여 탐색할 수 있다는 장점이 있다.According to at least one of the embodiments of the present invention, there is an advantage in that a neural network structure suitable for the purpose of the convolutional neural network algorithm can be searched using a genetic algorithm.

상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다.The foregoing detailed description should not be construed as limiting in all respects, but should be considered as illustrative. The scope of the present invention should be determined by reasonable interpretation of the appended claims, and all changes within the equivalent scope of the present invention are included in the scope of the present invention.

Claims (5)

콘볼루션 뉴럴 네트워크 구조를 초기화하여 초기 세대를 생성하고, 상기 초기 세대의 염색체들을 생성하는 단계;
상기 염색체들에 대한 콘볼루션 뉴럴 네트워크를 생성하여 학습하고, 소정 적합도 함수에 따라 적합도를 산출하여 평가하는 단계;
상기 평가한 적합도를 통해 우수 염색체를 선택하는 단계;
상기 우수 염색체로부터 염색체 교배를 통해 다음 세대 후보군을 생성하는 단계;
염색체 변이를 통해 상기 다음 세대 후보군에 대한 변이를 적용하는 단계; 및
소정 횟수만큼 상기 평가하는 단계, 선택하는 단계, 다음 세대 후보군을 생성하는 단계 및 적용하는 단계를 반복하는 단계;를 포함하는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법.
Initializing a convolutional neural network structure to generate an initial generation, and generating chromosomes of the initial generation;
Generating and learning a convolutional neural network for the chromosomes, and calculating and evaluating fitness according to a predetermined fitness function;
Selecting an excellent chromosome based on the evaluated goodness of fit;
Generating a next generation candidate group through chromosome crossing from the superior chromosome;
Applying mutations to the next generation candidate group through chromosomal mutations; And
And repeating the evaluating, selecting, generating and applying next generation candidate group a predetermined number of times.
제1항에 있어서,
상기 초기 세대의 염색체들은 각각 소정 개수의 유전자를 갖으며, 상기 유전자는 각각 임의의 길이의 DNA를 갖는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법.
The method of claim 1,
The initial generation chromosomes each have a predetermined number of genes, each gene having an arbitrary length of DNA convolutional neural network optimal structure search method using a genetic algorithm, characterized in that.
제2항에 있어서,
상기 DNA는 Input, Conv, Dwconv, Sum, Concat 중 하나의 타입을 가지며, 입력 레이어와 각 레이어의 파라미터에 대한 정보를 포함하는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법.
The method of claim 2,
The DNA has one type of Input, Conv, Dwconv, Sum, and Concat, and includes an information about an input layer and a parameter of each layer.
제1항에 있어서,
상기 염색체들에 대한 콘볼루션 뉴럴 네트워크를 생성하여 학습하고, 소정 적합도 함수에 따라 적합도를 산출하여 평가하는 단계;는,
상기 염색체들 각각에 대하여, 염색체 내에 포함된 각 유전자의 뉴럴 네트워크 표현 사이에 전이 계층(Transition Layer)을 삽입하여, 콘볼루션 뉴럴 네트워크를 생성하는 단계;를 포함하는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법.
The method of claim 1,
Generating and learning a convolutional neural network for the chromosomes, and calculating and evaluating the fitness according to a predetermined fitness function;
For each of the chromosomes, by inserting a transition layer between the neural network representation of each gene contained in the chromosome, generating a convolutional neural network; using a genetic algorithm comprising a Convolutional neural network optimal structure search method.
제4항에 있어서,
상기 콘볼루션 뉴럴 네트워크를 생성하는 단계;는
상기 전이 계층 중 요소 기반 합(Element-wise Sum) 레이어에 대하여, 서로 다른 채널수를 갖고 있는 입력들은 1x1 Conv(콘볼루션) 레이어를 추가하여, 채널수를 입력 중 가장 작은 수의 채널로 동일하게 맞춰주는 단계;를 포함하는 것을 특징으로 하는 유전 알고리즘을 활용한 콘볼루션 뉴럴 네트워크 최적 구조 탐색 방법.
The method of claim 4, wherein
Generating the convolutional neural network;
For the element-wise sum layer of the transition layer, inputs having different channel numbers add 1x1 conv layers to equalize the number of channels to the smallest number of inputs. Convolutional neural network optimal structure search method using a genetic algorithm characterized in that it comprises a;
KR1020180087386A 2018-07-26 2018-07-26 A method for searching optimal structure of convolution neural network using genetic algorithms KR102134472B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180087386A KR102134472B1 (en) 2018-07-26 2018-07-26 A method for searching optimal structure of convolution neural network using genetic algorithms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180087386A KR102134472B1 (en) 2018-07-26 2018-07-26 A method for searching optimal structure of convolution neural network using genetic algorithms

Publications (2)

Publication Number Publication Date
KR20200012281A true KR20200012281A (en) 2020-02-05
KR102134472B1 KR102134472B1 (en) 2020-07-15

Family

ID=69514919

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180087386A KR102134472B1 (en) 2018-07-26 2018-07-26 A method for searching optimal structure of convolution neural network using genetic algorithms

Country Status (1)

Country Link
KR (1) KR102134472B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819161B (en) * 2021-02-02 2021-08-31 四川大学 Neural network construction system, method and storage medium for variable-length gene genetic algorithm
KR20210108779A (en) 2020-02-26 2021-09-03 동아대학교 산학협력단 Apparatus and method for determining optimized learning model based on genetic algorithm
CN114184861A (en) * 2021-11-28 2022-03-15 辽宁石油化工大学 Fault diagnosis method for oil-immersed transformer
WO2023075393A1 (en) * 2021-10-26 2023-05-04 연세대학교 산학협력단 Database tuning method and device based on machine-learning
US11910083B2 (en) 2020-11-06 2024-02-20 Samsung Electro-Mechanics Co., Ltd. Method and system with optimization of lens module assembly

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102465676B1 (en) 2022-03-31 2022-11-11 주식회사 에너자이(ENERZAi) A method for weight lightening of a time series anomaly detection model, and a device for weight lightening of a time series anomaly detection model

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003508835A (en) * 1999-09-01 2003-03-04 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ A method for improving the architecture of neural networks using evolutionary algorithms

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003508835A (en) * 1999-09-01 2003-03-04 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ A method for improving the architecture of neural networks using evolutionary algorithms

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Gao Huang 외 3명. Densely Connected Convolutional Networks. 2017년 *
서기성. CNN 구조의 진화 최적화 방식 분석. 2018년6월 *
위키백과: 유전 알고리즘. 2018.05.18. *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210108779A (en) 2020-02-26 2021-09-03 동아대학교 산학협력단 Apparatus and method for determining optimized learning model based on genetic algorithm
US11910083B2 (en) 2020-11-06 2024-02-20 Samsung Electro-Mechanics Co., Ltd. Method and system with optimization of lens module assembly
CN112819161B (en) * 2021-02-02 2021-08-31 四川大学 Neural network construction system, method and storage medium for variable-length gene genetic algorithm
WO2023075393A1 (en) * 2021-10-26 2023-05-04 연세대학교 산학협력단 Database tuning method and device based on machine-learning
CN114184861A (en) * 2021-11-28 2022-03-15 辽宁石油化工大学 Fault diagnosis method for oil-immersed transformer

Also Published As

Publication number Publication date
KR102134472B1 (en) 2020-07-15

Similar Documents

Publication Publication Date Title
KR102134472B1 (en) A method for searching optimal structure of convolution neural network using genetic algorithms
CN106815252B (en) Searching method and device
EP3345104B1 (en) Media unit retrieval and related processes
Piao et al. An ensemble correlation-based gene selection algorithm for cancer classification with gene expression data
CN107451894B (en) Data processing method, device and computer readable storage medium
CN111798921A (en) RNA binding protein prediction method and device based on multi-scale attention convolution neural network
CN109189991A (en) Repeat video frequency identifying method, device, terminal and computer readable storage medium
KR102092263B1 (en) How to find K poles within a certain processing time
CN109829162A (en) A kind of text segmenting method and device
CN110008973B (en) Model training method, method and device for determining target user based on model
CN114419509B (en) Multi-mode emotion analysis method and device and electronic equipment
EP4064071A1 (en) Text search method, device, server, and storage medium
CN113268656A (en) User recommendation method and device, electronic equipment and computer storage medium
Chen et al. Deep learning models for disease-associated circRNA prediction: a review
US20230274151A1 (en) Multi-modal neural network architecture search
CN114283888A (en) Differential expression gene prediction system based on hierarchical self-attention mechanism
Yu et al. SANPolyA: a deep learning method for identifying poly (A) signals
CN110222838B (en) Document sorting method and device, electronic equipment and storage medium
CN106776757B (en) Method and device for indicating user to complete online banking operation
CN115455171A (en) Method, device, equipment and medium for mutual retrieval and model training of text videos
CN113656699B (en) User feature vector determining method, related equipment and medium
Baten et al. Fast splice site detection using information content and feature reduction
US10949759B2 (en) Identification of a series of compatible components using artificial intelligence
Platon et al. IRSOM, a reliable identifier of ncRNAs based on supervised self-organizing maps with rejection
CN111260056B (en) Network model distillation method and device

Legal Events

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