KR20230068989A - Method and electronic device for performing learning of multi-task model - Google Patents
Method and electronic device for performing learning of multi-task model Download PDFInfo
- Publication number
- KR20230068989A KR20230068989A KR1020220115795A KR20220115795A KR20230068989A KR 20230068989 A KR20230068989 A KR 20230068989A KR 1020220115795 A KR1020220115795 A KR 1020220115795A KR 20220115795 A KR20220115795 A KR 20220115795A KR 20230068989 A KR20230068989 A KR 20230068989A
- Authority
- KR
- South Korea
- Prior art keywords
- task
- model
- learning
- accuracy
- electronic device
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 230000006870 function Effects 0.000 claims abstract description 47
- 230000003190 augmentative effect Effects 0.000 claims description 11
- 230000008569 process Effects 0.000 description 21
- 238000004891 communication Methods 0.000 description 20
- 238000012549 training Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 10
- 238000001514 detection method Methods 0.000 description 8
- 230000011218 segmentation Effects 0.000 description 8
- 238000013528 artificial neural network Methods 0.000 description 5
- 238000003062 neural network model Methods 0.000 description 5
- 238000013473 artificial intelligence Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 230000007423 decrease Effects 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 3
- 229920001621 AMOLED Polymers 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
Description
멀티-태스크 모델의 학습을 수행하는 방법 및 전자 장치에 관한 것이다.A method and electronic device for performing multi-task model learning.
컴퓨터 비전 분야의 비약적인 발전에 따라, 다양한 비전 태스크들 각각을 수행하는 신경망 모델들이 뛰어난 수준의 정확도를 가지게 되었다. 그러나, 장면 이해를 위해, 다양한 관점에서 장면을 관찰할 수 있도록 여러 가지 신경망 모델들을 함께 사용하는 경우, 임베디드 장치의 성능과 리소스에 따른 문제가 발생할 수 있다. 이에, 멀티-태스크를 효율적이고 빠르게 수행할 수 있는 형태의 멀티-태스크 모델에 대한 관심이 고조되고 있다.With the rapid development of the computer vision field, neural network models that perform each of the various vision tasks have an excellent level of accuracy. However, when various neural network models are used together to observe a scene from various viewpoints to understand a scene, problems may occur depending on the performance and resources of an embedded device. Accordingly, interest in a multi-task model that can efficiently and quickly perform multi-tasks is growing.
본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 학습을 수행하는 방법이 제공된다. 멀티-태스크 모델의 학습을 수행하는 방법은 멀티-태스크 모델의 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당하는 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정하는 단계를 포함한다. 또한, 멀티-태스크 모델의 학습을 수행하는 방법은 멀티-태스크 모델의 손실 함수를 이용하여, 멀티-태스크 모델의 학습을 수행하는 단계를 포함한다.According to an embodiment of the present disclosure, a method for performing learning of a multi-task model is provided. A method for performing learning of the multi-task model is based on the accuracy of each task of the multi-task model and the accuracy according to the learning degree of each task, and the task corresponding to each task corresponds to the loss of each task of the multi-task model. and setting a task weight corresponding to each task of a loss function of the multi-task model corresponding to a weight sum to which weights have been applied. Also, the method of performing learning of the multi-task model includes performing learning of the multi-task model by using a loss function of the multi-task model.
본 개시의 일 실시예에 따르면, 전술한 방법을 실행시키기 위한 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록매체를 제공할 수 있다.According to one embodiment of the present disclosure, it is possible to provide a computer-readable recording medium on which a program for executing the above-described method is recorded.
본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 학습을 수행하는 전자 장치가 제공된다. 멀티-태스크 모델의 학습을 수행하는 전자 장치는 하나 이상의 인스트럭션을 저장하는 메모리 및 메모리에 저장된 하나 이상의 인스트럭션을 실행하는 프로세서를 포함한다. 프로세서는 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당하는 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정한다. 또한, 프로세서는 상기 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 손실 함수를 이용하여, 멀티-태스크 모델의 학습을 수행한다.According to an embodiment of the present disclosure, an electronic device performing learning of a multi-task model is provided. An electronic device that performs learning of the multi-task model includes a memory storing one or more instructions and a processor executing the one or more instructions stored in the memory. By executing one or more instructions, the processor sets the task weight corresponding to each task to the loss of each task of the multi-task model, based on the unique accuracy of each task of the multi-task model and the accuracy according to the learning degree of each task. Set the task weight corresponding to each task of the loss function of the multi-task model corresponding to the applied weight sum. Also, the processor performs learning of the multi-task model using the loss function of the multi-task model by executing the one or more instructions.
도 1은 멀티-태스크 모델을 설명하기 위한 도면이다.
도 2는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 방법을 설명하기 위한 흐름도이다.
도 3은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정하는 단계에 대한 상세 흐름도이다.
도 4는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하는 단계에 대한 상세 흐름도이다.
도 5는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행하는 과정을 설명하기 위한 도면이다.
도 6은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 손실 함수를 이용하여, 멀터-태스크 모델의 학습을 수행하는 단계에 대한 상세 흐름도이다.
도 7은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 셀프 학습을 수행하는 과정에서 각 태스크 손실의 일 예를 설명하기 위한 도면이다.
도 8은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 셀프 학습을 수행하는 과정에서 실제 값(ground-truth)이 있는 임의의 태스크가 포함되어 있는 경우에 각 태스크 손실의 일 예를 설명하기 위한 도면이다.
도 9는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 방법에 따라 멀티-태스크를 수행하는 비전 모델을 학습한 결과를 설명하기 위한 도표이다.
도 10은 본 개시의 일 실시예에 따른 전자 장치의 구성을 도시한 블록도이다.
도 11은 본 개시의 일 실시예에 따른 전자 장치의 일 예를 도시한 도면이다.1 is a diagram for explaining a multi-task model.
2 is a flowchart illustrating a method of performing learning of a multi-task model according to an embodiment of the present disclosure.
3 is a detailed flowchart of a step of setting a task weight corresponding to each task of a loss function of a multi-task model according to an embodiment of the present disclosure.
4 is a detailed flowchart of a step of obtaining accuracy of a single-task teaching model corresponding to each task of a multi-task model according to an embodiment of the present disclosure.
5 is a diagram for explaining a process of performing learning of a single-task teaching model corresponding to each task of a multi-task model according to an embodiment of the present disclosure.
6 is a detailed flowchart of a step of performing learning of a multi-task model using a loss function of a multi-task model according to an embodiment of the present disclosure.
7 is a diagram for explaining an example of loss of each task in a process of performing self-learning of a multi-task model according to an embodiment of the present disclosure.
8 illustrates an example of loss of each task when an arbitrary task having a ground-truth is included in a process of performing self-learning of a multi-task model according to an embodiment of the present disclosure. It is a drawing for
9 is a diagram for explaining a result of learning a vision model that performs a multi-task according to a method for learning a multi-task model according to an embodiment of the present disclosure.
10 is a block diagram illustrating the configuration of an electronic device according to an embodiment of the present disclosure.
11 is a diagram illustrating an example of an electronic device according to an embodiment of the present disclosure.
본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 개시에 대해 구체적으로 설명하기로 한다. 본 개시에서, "a, b 또는 c 중 적어도 하나" 표현은 " a", " b", " c", "a 및 b", "a 및 c", "b 및 c", "a, b 및 c 모두", 혹은 그 변형들을 지칭할 수 있다.Terms used in this specification will be briefly described, and the present disclosure will be described in detail. In this disclosure, the expression “at least one of a, b, or c” means “a”, “b”, “c”, “a and b”, “a and c”, “b and c”, “a, b” and c”, or variations thereof.
본 개시에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in the present disclosure have been selected from general terms that are currently widely used as much as possible while considering the functions in the present disclosure, but they may vary according to the intention or precedent of a person skilled in the art, the emergence of new technologies, and the like. In addition, in a specific case, there are also terms arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the corresponding description. Therefore, terms used in the present disclosure should be defined based on the meaning of the term and the general content of the present disclosure, not simply the name of the term.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 용어들은 본 명세서에 기재된 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가질 수 있다. 또한, 본 명세서에서 사용되는 '제1' 또는 '제2' 등과 같이 서수를 포함하는 용어는 다양한 구성 요소들을 설명하는데 사용할 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만 사용된다.Singular expressions may include plural expressions unless the context clearly dictates otherwise. Terms used herein, including technical or scientific terms, may have the same meaning as commonly understood by one of ordinary skill in the art described herein. Also, terms including ordinal numbers such as 'first' or 'second' used in this specification 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.
명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 "부", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.When it is said that a certain part "includes" a certain component throughout the specification, it means that it may further include other components without excluding other components unless otherwise stated. In addition, terms such as “unit” and “module” described in the specification refer to a unit that processes at least one function or operation, and may be implemented as hardware or software or a combination of hardware and software.
아래에서는 첨부한 도면을 참고하여 본 개시의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. Hereinafter, with reference to the accompanying drawings, embodiments of the present disclosure will be described in detail so that those skilled in the art can easily carry out the present invention. However, the present disclosure may be embodied in many different forms and is not limited to the embodiments described herein.
이하 첨부된 도면을 참고하여 본 개시를 상세히 설명하기로 한다.Hereinafter, the present disclosure will be described in detail with reference to the accompanying drawings.
도 1은 멀티-태스크 모델을 설명하기 위한 도면이다.1 is a diagram for explaining a multi-task model.
본 개시에서 전자 장치(100)는 스마트폰, 스마트 글래스, 웨어러블 디바이스, PDA(Personal Digital Assistant)나 모바일 스캐너와 같은 모바일 장치 등을 포함할 수 있으나, 이에 한정되는 것은 아니다. In the present disclosure, the
전자 장치(100)는 다양한 종류의 신경망(Neural Network) 모델을 탑재할 수 있다. 예를 들어, 전자 장치(100)는 DNN(Deep Neural Network), CNN(Convolution Neural Network), RNN(Recurrent Neural Network), BRDNN(Bidirectional Recurrent Deep Neural Network)과 같은 모델을 적어도 하나 탑재할 수 있고, 이들을 조합적으로 이용할 수도 있다.The
전자 장치(100)가 여러 가지 신경망 모델들이 탑재된 임베디드 장치인 경우, 전자 장치(100)의 리소스와 성능에 따른 문제가 발생할 수 있다. 이에 따라, 여러 가지 신경망 모델들에 의해 처리되는 태스크들을 효율적이고 빠르게 수행할 수 있도록, 도 1에 도시된 바와 같이, 전자 장치(100)에 멀티-태스크 모델을 탑재할 수 있다. When the
멀티-태스크 모델은 복수의 레이어들로 이루어지는 뉴럴 네트워크의 형태일 수 있다. 멀티-태스크 모델은 쉐어드 백본(shared backbone) 레이어들과 쉐어드 백본의 출력을 각각 입력으로 하는, 각 태스크 별 추가 레이어들로 이루어진 형태일 수 있다. 도 1에 도시된 바와 같이, 멀티-태스크 모델은 예측에 필요한 특징을 추출하는 특징 추출기(feature extractor)와 이로부터 추출된 특징을 이용해서 예측을 수행하는 예측기(predictor)를 포함할 수 있다. The multi-task model may be in the form of a neural network composed of a plurality of layers. The multi-task model may be composed of shared backbone layers and additional layers for each task, each of which takes an output of the shared backbone as an input. As shown in FIG. 1 , the multi-task model may include a feature extractor that extracts features necessary for prediction and a predictor that performs prediction using the features extracted therefrom.
예를 들어, 다양한 비전 분야의 태스크를 수행하는 비전 모델의 경우, 대부분의 연산은 입력 이미지에서 특징을 추출하는 부분에서 이루어지므로, 도 1에 도시된 형태와 같이, 하나의 특징 추출기에 각 태스크 별 예측 헤드(prediction head)를 연결한 형태의 멀티-태스크 모델을 사용하는 것이 매우 효과적일 수 있다.For example, in the case of a vision model that performs tasks in various vision fields, most operations are performed in the part of extracting features from an input image, so as shown in FIG. 1, one feature extractor for each task Using a multi-task model in the form of connecting prediction heads can be very effective.
설명의 편의상, 일부 설명에서 멀티-태스크 모델이 컴퓨터 비전 분야의 태스크를 수행하는 비전 모델인 것을 예로 들어 설명하나, 본 개시에서 설명하는 멀티-태스크 모델의 종류나 기능이 이에 한정되는 것은 아니며, 음성 인식, 자연어 처리 등 다양한 분야에서 활용될 수 있는 인공지능 모델일 수 있다.For convenience of description, in some descriptions, the multi-task model is a vision model that performs a task in the computer vision field as an example, but the type or function of the multi-task model described in the present disclosure is not limited thereto, and voice It can be an artificial intelligence model that can be used in various fields such as recognition and natural language processing.
멀티-태스크 모델은 특정 태스크에 편향되지 않고, 모든 태스크가 고른 성능을 가질 수 있도록 학습되어야 하기 때문에, 멀티-태스크 모델을 어떠한 손실 함수와 어떠한 데이터 세트를 이용하여 학습시킬지가 매우 중요하다.Since the multi-task model must be trained so that all tasks can have uniform performance without being biased toward a specific task, it is very important which loss function and which data set to train the multi-task model with.
멀티-태스크 모델의 손실 함수는 다음 수학식 1과 같이, 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합으로 정의할 수 있다.The loss function of the multi-task model may be defined as a weight sum obtained by applying task weights corresponding to each task to each task loss, as shown in
[수학식 1][Equation 1]
멀티-태스크 모델에서 태스크 별 정확도는 각 태스크에 대응되는 태스크 가중치를 어떻게 설정하는지에 큰 영향을 받게 된다. 멀티-태스크 모델의 각 태스크의 특성과 학습 정도를 모두 고려하여, 멀티-태스크 모델의 학습이 이루어질 수 있어야, 모든 태스크가 균형적으로 학습되어, 멀티-태스크 모델의 고른 성능을 기대할 수 있다. In the multi-task model, the accuracy of each task is greatly influenced by how the task weight corresponding to each task is set. When the multi-task model can be learned in consideration of both the characteristics and the degree of learning of each task of the multi-task model, all tasks are learned in a balanced way, and even performance of the multi-task model can be expected.
멀티-태스크 모델의 학습을 위한 멀티-태스크 데이터 세트는 다양한 태스크들을 위한 많은 양의 입력들(예를 들어, 입력 이미지들)과 어노테이션(annotation)을 요구하므로, 이러한 요구 사항을 만족하는 대규모의 데이터 세트는 현실적으로 확보하기가 어렵다. 이를 위해, 학습된 싱글-태스크 교수 모델들(single-task teacher models)을 이용하여, 일부만 레이블링이 되어 있는 입력들에서 레이블이 존재하지 않는 태스크의 입력에 대해 의사 레이블(pseudo label)을 생성함으로써, 멀티-태스크 데이터 세트를 확보하여, 멀티-태스크 모델의 학습을 수행할 수 있다.Since the multi-task data set for learning the multi-task model requires a large amount of inputs (eg, input images) and annotations for various tasks, large-scale data that satisfies these requirements A set is difficult to secure realistically. To this end, by using learned single-task teacher models, pseudo labels are generated for inputs of tasks for which labels do not exist in partially labeled inputs, By securing a multi-task data set, learning of a multi-task model may be performed.
이하, 멀티-태스크 모델의 손실 함수와 멀티-태스크 데이터 세트를 이용하여 멀티-태스크 모델을 학습시키는 방법에 대해 상세히 설명한다.Hereinafter, a method of learning a multi-task model using a loss function of the multi-task model and a multi-task data set will be described in detail.
도 2는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 방법을 설명하기 위한 흐름도이다. 2 is a flowchart illustrating a method of performing learning of a multi-task model according to an embodiment of the present disclosure.
전자 장치(100)는 멀티-태스크 모델의 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정한다.(S210) 멀티-태스크 모델의 손실 함수는 멀티-태스크 모델의 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당한다. The
멀티-태스크 모델의 각 태스크의 고유의 정확도는 멀티-태스크 모델의 학습이 충분히 이루어졌을 경우 각 태스크 별로 기대할 수 있는 정확도를 의미한다. 멀티-태스크 모델의 각 태스크의 고유의 정확도는 각 태스크 별로 다를 수 있다. 각 태스크 별로 학습 과정을 충분히 수행 하더라도, 태스크의 종류에 따라, 학습되는 수준이 다를 수 있다. 예를 들어, 제1 태스크에 대응되는 모델이 충분한 학습 과정을 거치는 경우, 제1 태스크에 대해서는 높은 정확도의 예측 값을 출력할 수 있다. 반면, 제2 태스크에 대응되는 모델이 충분한 학습 과정을 거치더라도, 학습이 어렵거나 태스크의 난이도가 높은 경우, 제2 태스크에 대해서는 출력된 예측 값의 정확도가 높지 않을 수 있다. The inherent accuracy of each task of the multi-task model means the expected accuracy of each task when the multi-task model is sufficiently trained. The inherent accuracy of each task in the multi-task model may be different for each task. Even if the learning process is sufficiently performed for each task, the learning level may be different depending on the type of task. For example, when a model corresponding to the first task undergoes a sufficient learning process, a highly accurate prediction value for the first task may be output. On the other hand, even if the model corresponding to the second task undergoes a sufficient learning process, if learning is difficult or the difficulty of the task is high, the accuracy of the predicted value output for the second task may not be high.
멀티-태스크 모델의 각 태스크의 학습 정도에 따른 정확도는 멀티-태스크 모델의 학습 과정에서 현재 학습 수준에 따른 각 태스크의 현재의 정확도를 의미한다. 태스크 별로 학습에 의한 영향을 받는 정도가 다를 수 있으므로, 각 태스크의 학습 정도에 따른 정확도는 각 태스크 별로 다를 수 있다. 예를 들어, 태스크의 난이도가 낮아 학습이 잘 이루어지는 경우, 해당 태스크의 학습 정도에 따른 정확도는 빠르게 고유의 정확도에 수렴하게 된다. 반면, 태스크의 난이도가 높아 학습이 잘 이루어지지 않는 경우, 해당 태스크의 학습 정도에 따른 정확도는 느리게 고유의 정확도에 수렴하게 된다. The accuracy according to the learning level of each task of the multi-task model means the current accuracy of each task according to the current learning level in the learning process of the multi-task model. Since the degree of influence by learning may be different for each task, the accuracy according to the learning degree of each task may be different for each task. For example, when the difficulty of the task is low and learning is successful, the accuracy according to the learning degree of the task rapidly converges to the intrinsic accuracy. On the other hand, when learning is not performed well due to the high difficulty of the task, the accuracy according to the learning degree of the task slowly converges to the intrinsic accuracy.
멀티-태스크 모델의 각 태스크의 고유의 정확도가 서로 다름에도 불구하고, 각 태스크의 현재의 정확도만 고려하여, 각 태스크의 현재의 정확도가 낮을수록 태스크 가중치를 높게 주면, 멀티-태스크 모델의 모든 태스크들에 대한 균형적인 학습이 이루어질 수 없다. 예를 들어, 고유의 정확도가 낮은 태스크의 경우, 현재의 정확도가 고유의 정확도에 근접한 상황이더라도, 현재의 정확도가 다른 태스크들보다 낮아, 태스크 가중치를 높게 주게 되면, 특정 태스크만 학습되고, 모든 태스크가 빠르게 균형적으로 학습되지 않는 문제가 발생할 수 있다.Although the intrinsic accuracy of each task in the multi-task model is different, considering only the current accuracy of each task, if the task weight is given higher as the current accuracy of each task is lower, all tasks in the multi-task model Balanced learning cannot be achieved. For example, in the case of a task with low intrinsic accuracy, even if the current accuracy is close to the intrinsic accuracy, if the current accuracy is lower than other tasks and the task weight is given high, only the specific task is learned, and all tasks are learned. A problem may occur that is not learned quickly and in a balanced way.
본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 과정에서는, 멀티-태스크 모델의 각 태스크의 학습 정도에 따른 정확도 뿐만 아니라 멀티-태스크 모델의 각 태스크의 고유의 정확도에 기초하여, 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정한다.In the process of learning the multi-task model according to an embodiment of the present disclosure, based on the unique accuracy of each task of the multi-task model as well as the accuracy according to the learning degree of each task of the multi-task model, Set the task weight corresponding to each task of the loss function of the multi-task model.
본 개시의 일 실시예에 해당하는 전자 장치(100)는 각 태스크의 고유의 정확도를 멀티-태스크 모델의 학습을 수행하기 전에 미리 획득할 수 있다. 예를 들어, 각 태스크의 고유의 정확도는 태스크 별 특성을 고려하여 관리자에 의해 소정의 값으로 설정될 수 있다. 다른 예를 들어, 각 태스크의 고유의 정확도는 소정의 과정을 거쳐 각각 획득될 수 있다. The
이하, 도 3 내지 도 5를 참고하여, 멀티-태스크 모델의 각 태스크의 고유의 정확도를 미리 획득하여, 각 태스크에 대응되는 태스크 가중치를 설정하는 예를 상세히 설명한다.Hereinafter, with reference to FIGS. 3 to 5 , an example of setting the task weight corresponding to each task by obtaining the unique accuracy of each task of the multi-task model in advance will be described in detail.
도 3은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정하는 단계에 대한 상세 흐름도이다.3 is a detailed flowchart of a step of setting a task weight corresponding to each task of a loss function of a multi-task model according to an embodiment of the present disclosure.
전자 장치(100)는 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득할 수 있다.(S310) 각각의 싱글-태스크 교수 모델은 멀티-태스크 모델의 태스크들 각각에 대응될 수 있다. 싱글-태스크 교수 모델의 정확도는 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 의미한다. 싱글-태스크 교수 모델의 학습 과정에서 계산된 손실이 최소화된 경우, 싱글-태스크 교수 모델이 학습 완료된 것으로 볼 수 있다. 또는, 학습된 싱글-태스크 교수 모델의 정확도가 소정의 조건을 만족할 때, 예를 들어, 반복 학습에 따른 정확도가 특정 값으로 수렴할 때, 싱글-태스크 교수 모델이 학습 완료된 것으로 볼 수 있다. The
전자 장치(100)는 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델을 탑재하고 있는 적어도 하나의 외부 장치와 통신을 수행할 수 있다. 전자 장치(100)는 적어도 하나의 외부 장치로부터 싱글-태스크 교수 모델의 정확도를 수신하여, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득할 수 있다.The
전자 장치(100)는 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델을 탑재할 수 있다. 전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 계산하여, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득할 수 있다. 이와 관련하여, 도 4를 참고하여 상세히 설명한다.The
도 4는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하는 단계에 대한 상세 흐름도이다.4 is a detailed flowchart of a step of obtaining accuracy of a single-task teaching model corresponding to each task of a multi-task model according to an embodiment of the present disclosure.
전자 장치(100)는 각 태스크에 대응되는 전용 학습 데이터 세트를 이용하여, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행할 수 있다.(S410) 각 태스크에 대응되는 싱글-태스크 교수 모델마다, 전용 학습 데이터 세트가 마련될 수 있다. 예를 들어, 멀티-태스크 모델이 비전 모델인 경우, 객체 검출(object detection), 세그멘테이션(segmentation), 깊이 추정(depth estimation), 광 흐름(optical flow) 등의 태스크 별로, 각각의 전용 학습 데이터 세트가 있을 수 있다. 각각의 전용 학습 데이터 세트는 태스크에 특화된 데이터 세트로서, 멀티-태스크 모델을 학습시키는데 요구되는 데이터 세트 보다 훨씬 작은 사이즈의 레이블된(labeled) 데이터 세트일 수 있다. 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행하는 과정에 대해서는 도 5를 참고하여 상세히 설명한다.The
도 5는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행하는 과정을 설명하기 위한 도면이다.5 is a diagram for explaining a process of performing learning of a single-task teaching model corresponding to each task of a multi-task model according to an embodiment of the present disclosure.
도 5를 참고하면, 멀티 태스크 모델의 태스크 A에 대응되는 싱글-태스크 교수 모델 A, 멀티 태스크 모델의 태스크 B에 대응되는 싱글-태스크 교수 모델 B, 및 멀티 태스크 모델의 태스크 C에 대응되는 싱글-태스크 교수 모델 C 각각의 학습을 수행하는 과정을 나타내고 있다. 싱글-태스크 교수 모델들의 개수는 도 5에 도시된 예에 한정되지 않으며, 멀티-태스크 모델의 태스크 개수에 따라 정해질 수 있다.Referring to FIG. 5 , a single-task instructional model A corresponding to task A of the multi-task model, a single-task instructional model B corresponding to task B of the multi-task model, and a single-task instructional model corresponding to task C of the multi-task model Task teaching model C shows the process of performing each learning. The number of single-task teaching models is not limited to the example shown in FIG. 5 and may be determined according to the number of tasks of the multi-task model.
싱글-태스크 교수 모델 A는 태스크 A에 대응되는 전용 학습 데이터 세트 A를 이용하여 학습될 수 있다. 전용 학습 데이터 세트 A는 태스크 A를 학습할 수 있는 정도의 작은 규모의 레이블된(labeled) 입력 데이터를 포함한다. 전자 장치(100)는 싱글-태스크 교수 모델 A에 대해, 실제 값과 출력 A의 차이에 해당하는 손실을 계산할 수 있다. 전자 장치(100)는 역전파(backpropagation)를 통해, 손실이 줄어드는 방향으로 싱글-태스크 교수 모델 A의 학습을 수행할 수 있다. The single-task teaching model A may be learned using a dedicated learning data set A corresponding to task A. Dedicated training data set A contains labeled input data small enough to learn task A. The
싱글-태스크 교수 모델 B는 태스크 B에 대응되는 전용 학습 데이터 세트 B를 이용하여 학습될 수 있다. 전용 학습 데이터 세트 B는 태스크 B를 학습할 수 있는 정도의 작은 규모의 레이블된(labeled) 입력 데이터를 포함한다. 전자 장치(100)는 싱글-태스크 교수 모델 B에 대해, 실제 값과 출력 B의 차이에 해당하는 손실을 계산할 수 있다. 전자 장치(100)는 역전파를 통해, 손실이 줄어드는 방향으로 싱글-태스크 교수 모델 B의 학습을 수행할 수 있다. The single-task teaching model B may be learned using a dedicated learning data set B corresponding to task B. Dedicated training data set B contains labeled input data small enough to train task B. The
싱글-태스크 교수 모델 C는 태스크 C에 대응되는 전용 학습 데이터 세트 C를 이용하여 학습될 수 있다. 전용 학습 데이터 세트 C는 태스크 C를 학습할 수 있는 정도의 작은 규모의 레이블된(labeled) 입력 데이터를 포함한다. 전자 장치(100)는 싱글-태스크 교수 모델 C에 대해, 실제 값과 출력 C의 차이에 해당하는 손실을 계산할 수 있다. 전자 장치(100)는 역전파를 통해, 손실이 줄어드는 방향으로 싱글-태스크 교수 모델 C의 학습을 수행할 수 있다. The single-task teaching model C may be learned using a dedicated learning data set C corresponding to task C. A dedicated training dataset C contains labeled input data small enough to learn task C. The
예를 들어, 객체 검출(태스크 A에 대응), 세그멘테이션(태스크 B에 대응), 및 깊이 추정(태스크 C에 대응)을 수행하는 멀티 태스크 모델이 있는 경우, 싱글-태스크 교수 모델 A는 객체 검출 모델, 싱글-태스크 교수 모델 B는 세그멘테이션 모델, 싱글-태스크 교수 모델 C는 깊이 추정 모델이 될 수 있다. 싱글-태스크 교수 모델 A(객체 검출 모델)는 객체 검출을 위한 레이블 A를 포함하는 레이블된 이미지들을 이용하여 학습될 수 있다. 싱글-태스크 교수 모델 B(세그멘테이션 모델)는 세그멘테이션을 위한 레이블 B를 포함하는 레이블된 이미지들을 이용하여 학습될 수 있다. 싱글-태스크 교수 모델 C(깊이 추정 모델)는 깊이 추정을 위한 레이블 C를 포함하는 레이블된 이미지들을 이용하여 학습될 수 있다. For example, if there is a multi-task model that performs object detection (corresponding to task A), segmentation (corresponding to task B), and depth estimation (corresponding to task C), the single-task teaching model A is an object detection model. , single-task instruction model B can be a segmentation model, and single-task instruction model C can be a depth estimation model. A single-task teaching model A (object detection model) can be learned using labeled images including label A for object detection. A single-task teaching model B (segmentation model) can be trained using labeled images including label B for segmentation. A single-task teaching model C (depth estimation model) can be learned using labeled images including labels C for depth estimation.
다시 도 4를 참고하면, 전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습이 완료되었는지 판단할 수 있다.(S420) 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습이 완료되지 않았다고 판단되는 경우, 전자 장치(100)는 학습이 완료되지 않은 싱글-태스크 교수 모델을 학습이 완료될 때까지 반복하여 수행할 수 있다.Referring back to FIG. 4 , the
전자 장치(100)는 싱글-태스크 교수 모델 A의 학습 과정에서 계산된 손실이 최소화된 경우, 싱글-태스크 교수 모델 A의 학습이 완료된 것으로 볼 수 있다. 전자 장치(100)는 싱글-태스크 교수 모델 B의 학습 과정에서 계산된 손실이 최소화된 경우, 싱글-태스크 교수 모델 B의 학습이 완료된 것으로 볼 수 있다. 전자 장치(100)는 싱글-태스크 교수 모델 C의 학습 과정에서 계산된 손실이 최소화된 경우, 싱글-태스크 교수 모델 C의 학습이 완료된 것으로 볼 수 있다. The
전자 장치(100)는 학습된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 측정할 수 있다.(S430) 전자 장치(100)는 싱글-태스크 교수 모델 A의 학습 완료 시의 정확도, 싱글-태스크 교수 모델 B의 학습 완료 시의 정확도, 싱글-태스크 교수 모델 C의 학습 완료 시의 정확도를 측정할 수 있다.The
다시 도 3을 참고하면, 전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정할 수 있다.(S320) 전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하고, 획득된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 각 태스크의 고유의 정확도로서 이용할 수 있다.Referring back to FIG. 3 , the
싱글-태스크 교수 모델의 정확도는 멀티-태스크 모델에서 해당 태스크를 수행하였을 때 기대할 수 있는 잠재적인 정확도(potential)로 볼 수 있으므로, 멀티-태스크 모델의 학습 정도에 따른 정확도의 상한(upper bound)으로 정의될 수 있다. Since the accuracy of the single-task teaching model can be viewed as the potential accuracy that can be expected when the task is performed in the multi-task model, the upper bound of the accuracy according to the learning degree of the multi-task model can be defined
본 개시의 일 실시예에 따르면, 수학식 1의 멀티-태스크 모델의 손실 함수에서 각 태스크에 대응되는 태스크 가중치는 다음과 같이 수학식 3으로 정의될 수 있다.According to an embodiment of the present disclosure, a task weight corresponding to each task in the loss function of the multi-task model of
[수학식 2][Equation 2]
-- ① -- ①
-- ② -- ②
-- ③ -- ③
수학식 2의 첫 번째 식(①)에 따르면, 전자 장치(100)는 각 태스크의 고유의 정확도()와 각 태스크의 학습 정도에 따른 정확도() 간의 정확도 차이에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정할 수 있다. 이때, 각 태스크의 고유의 정확도()는 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도에 해당할 수 있다. 전자 장치(100)는 정확도 차이에 비례하여 각 태스크에 대응되는 태스크 가중치를 조정할 수 있다.According to the first equation (①) of Equation 2, the
수학식 2의 첫 번째 식(①)은 언더피팅(underfitting)을 피하기 위해, 수학식 2의 두 번째 식(②)과 같이 정규화될 수 있다. 각 태스크의 학습이 진행될 수록, 각 태스크의 고유의 정확도()와 각 태스크의 학습 정도에 따른 정확도() 간의 정확도 차이는 감소하는 방향으로 이동하기 때문에, 각 태스의 태스크 가중치가 감소하게 되고, 이것은 학습률(learning rate)이 감소하는 것과 같은 효과를 가져온다. 각 태스크의 태스크 가중치가 감소함에 따라, 멀티-태스크 모델의 업데이트 양이 줄어들어, 멀티-태스 모델이 충분히 학습되지 못하고, 조기에 미세 조정(fine-tuning)되는 것을 방지할 필요가 있다. 이를 위해, 수학식 2의 두 번째 식(②)과 같이, 각 태스크에 대응되는 태스크 가중치의 합이 태스크의 개수가 되도록, 수학식 2의 첫 번째 식(①)을 정규화할 수 있다. The first equation (①) of Equation 2 can be normalized as the second equation (②) of Equation 2 to avoid underfitting. As learning of each task progresses, the inherent accuracy of each task ( ) and the accuracy according to the learning degree of each task ( ), the task weight of each task decreases, which has the same effect as reducing the learning rate. As the task weight of each task decreases, the update amount of the multi-task model decreases, so that it is necessary to prevent the multi-task model from not being sufficiently trained and fine-tuned at an early stage. To this end, like the second equation (②) of Equation 2, the first equation (①) of Equation 2 can be normalized such that the sum of task weights corresponding to each task becomes the number of tasks.
수학식 2의 두 번째 식(②)은 멀티-태스크 모델이 싱글-태스크 모델을 능가할 수 있도록, 수학식 2의 세 번째 식(③)과 같이, 약간의 마진(margin)을 추가한 형태로 변형할 수 있다. The second equation (②) of Equation 2 is in the form of adding a slight margin, like the third equation (③) of Equation 2, so that the multi-task model can outperform the single-task model. can transform
본 개시의 일 실시예에 따르면, 수학식 1의 멀티-태스크 모델의 손실 함수에서 각 태스크에 대응되는 태스크 가중치는 다음과 같이 수학식 3으로 정의될 수 있다.According to an embodiment of the present disclosure, a task weight corresponding to each task in the loss function of the multi-task model of
[수학식 3][Equation 3]
-- ① -- ①
-- ② -- ②
수학식 3의 첫 번째 식(①)에 따르면, 전자 장치(100)는 각 태스크의 고유의 정확도()에 대한 각 태스크의 학습 정도에 따른 정확도()의 비율에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정할 수 있다. 이때, 각 태스크의 고유의 정확도()는 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도에 해당할 수 있다. 각 태스크의 고유의 정확도()에 대한 각 태스크의 학습 정도에 따른 정확도()의 비율은 각 태스크의 학습 정도에 따른 상대적인 학습률을 의미한다. 전자 장치(100)는 각 태스크의 고유의 정확도()에 대한 각 태스크의 학습 정도에 따른 정확도()의 비율에 반비례하여 각 태스크에 대응되는 태스크 가중치를 조정할 수 있다. 전자 장치(100)는 태스크의 학습 정도에 따라 태스크의 상대적인 학습률이 낮으면, 해당 태스크의 태스크 가중치를 높이고, 태스크의 상대적인 학습률이 높으면, 해당 태스크의 태스크 가중치를 낮출 수 있다. According to the first equation (①) of Equation 3, the
수학식 3의 첫 번째 식(①)은 수학식 3의 두 번째 식(②)과 같이 정규화될 수 있다. 본 개시에서 각 태스크의 태스크 가중치는 수학식 2와 수학식 3에 나타낸 식들로 한정되는 것은 아니며, 다양한 형태로 변형 가능하다. The first equation (①) of Equation 3 can be normalized as the second equation (②) of Equation 3. In the present disclosure, the task weight of each task is not limited to the equations shown in Equations 2 and 3, and can be modified in various forms.
다시 도 2를 참고하면, 전자 장치(100)는 멀티-태스크 모델의 손실 함수를 이용하여, 멀티-태스크 모델의 학습을 수행한다.(S220) 멀티-태스크 모델의 학습을 위해서는 대규모의 멀티-태스크 학습 데이터 세트를 이용하여야 하는데, 많은 양의 입력 데이터와 복수의 태스크들에 대해 어노테이션(annotation)을 모두 수행하는 것은 시간과 비용적인 측면에서 매우 어렵다. 본 개시의 일 실시예에 따라, 일부만 레이블된 멀티-태스크 학습 데이터 세트를 이용하여, 멀티-태스크 모델의 학습을 수행하는 예를 도 6 내지 도 8을 참고하여, 상세히 설명한다.Referring back to FIG. 2 , the
도 6은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 손실 함수를 이용하여, 멀터-태스크 모델의 학습을 수행하는 단계에 대한 상세 흐름도이다.6 is a detailed flowchart of a step of performing learning of a multi-task model using a loss function of a multi-task model according to an embodiment of the present disclosure.
전자 장치(100)는 증강된 멀티-태스크 학습 데이터 세트를 각 태스크에 대응되는 싱글-태스크 교수 모델과 멀티-태스크 모델에 각각 입력할 수 있다.(S610) 멀티-태스크 학습 데이터 세트는 일부만 레이블된 입력 데이터 세트일 수 있다. 전자 장치(100)는 멀티-태스크 모델 뿐만 아니라 미리 학습된 싱글-태스크 교수 모델들에 증강된 멀티-태스크 학습 데이터 세트를 입력하 수 있다. 예를 들어, 멀티-태스크 학습 데이터 세트가 이미지들인 경우 회전, 플립, 시프팅 등의 변환을 통해 이미지들의 증강이 이루어질 수 있다. 증강된 이미지들은 각 태스크에 대응되는 싱글-태스크 교수 모델과 멀티-태스크 모델에 동일하게 입력될 수 있다.The
각 태스크에 대응되는 싱글-태스크 교수 모델은 레이블이 존재하지 않는 태스크에 대해서는 의사 레이블을 생성할 수 있다. 본 개시의 일 실시예에서는 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력은 소프트 레이블 방식에 따라 확률 값 형태로 나타내는 의사 레이블로 생성될 수 있다. 하드 레이블 방식에 따를 경우, 싱글-태스크 교수 모델의 출력의 실제 값(ground-truth)이 잘못 생성되는 문제가 발생할 수 있다. 이와 같이 잘못 생성된 실제 값이 멀티-태스크 교수 모델의 셀프 학습 및 정확도에 큰 영향을 미치게 될 수 있으므로, 그 영향을 최소화하기 위해 본 개시의 일 실시예에서는 싱글-태스크 교수 모델의 출력을 소프트 레이블 방식에 따른다. 예를 들어, 멀티-태스크 모델이 비전 모델인 경우, 각 태스크가 이미지 분류, 객체 검출, 및 세그멘테이션일 때, 이미지 분류 뿐만 아니라, 객체 검출 및 세그멘테이션에 대해서도 소프트 레이블 방식에 따른 의사 레이블을 생성한다.The single-task teaching model corresponding to each task can generate pseudo labels for tasks for which labels do not exist. In an embodiment of the present disclosure, the output of the single-task teaching model corresponding to each task may be generated as a pseudo label represented in the form of a probability value according to a soft label method. If the hard label method is followed, a problem may occur in which the ground-truth of the output of the single-task teaching model is incorrectly generated. Since such erroneously generated real values can greatly affect the self-learning and accuracy of the multi-task instructional model, in order to minimize the influence, in one embodiment of the present disclosure, the output of the single-task instructional model is set as a soft label. follow the method For example, when the multi-task model is a vision model, when each task is image classification, object detection, and segmentation, pseudo labels are generated according to the soft label method for not only image classification but also object detection and segmentation.
본 개시의 일 실시예서는 보다 효과적으로 소프트 레이블 방식에 따라 의사 레이블을 생성하기 위해, 의사 레이블을 사전에 미리 생성하여 멀티-태스크 모델의 학습을 수행하는 것이 아니라, 증강된 멀티-태스크 학습 데이터를 멀티-태스크 모델 뿐만 아니라 각 태스크에 대응되는 싱글-태스크 교수 모델에 입력하여, 다이나믹하게 의사 레벨을 생성할 수 있다.In an embodiment of the present disclosure, in order to more effectively generate pseudo labels according to the soft label method, rather than performing training of a multi-task model by generating pseudo labels in advance, augmented multi-task learning data is multi-tasked. -Pseudo-levels can be created dynamically by inputting not only the task model but also the single-task teaching model corresponding to each task.
전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력과 이에 각각 대응되는, 멀티-태스크 모델의 각 태스크의 출력 간의 차이에 해당하는 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합이 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행할 수 있다.(S620) The
각 태스크 손실은, 태스크의 실제 값이 있는지에 따라 다르게 정의될 수 있다. 실제 값이 없는 태스크의 경우, 해당 태스크에 대응되는 싱글-태스크 교수 모델이 출력한 의사 레이블과 해당 태스크에 대응되는 멀티-태스크 모델의 출력 간의 차이에 기초하여 태스크 손실이 결정될 수 있다. 실제 값이 있는 태스크의 경우, 해당 태스크에 대응되는 실제 값과 싱글-태스크 교수 모델이 출력한 의사 레이블 각각과 해당 태스크에 대응되는 멀티-태스크 모델의 출력 간의 차이에 기초하여 태스크 손실이 결정될 수 있다.Each task loss may be defined differently depending on whether there is an actual value of the task. In the case of a task having no actual value, task loss may be determined based on a difference between a pseudo label output from a single-task teaching model corresponding to the task and an output of the multi-task model corresponding to the task. In the case of a task having an actual value, the task loss may be determined based on the difference between the actual value corresponding to the task and each of the pseudo labels output by the single-task teaching model and the output of the multi-task model corresponding to the task. .
도 7은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 셀프 학습을 수행하는 과정에서 각 태스크 손실의 일 예를 설명하기 위한 도면이다.7 is a diagram for explaining an example of loss of each task in a process of performing self-learning of a multi-task model according to an embodiment of the present disclosure.
도 7을 참고하면, 전자 장치(100)는 일부만 레이블된 멀티-태스크 학습 데이터 세트를 증강시키고, 증강된 멀티-태스크 학습 데이터를 멀티-태스크 모델과 각 태스크에 대응되는 싱글-태스크 모델에 입력할 수 있다. 그 결과, 멀티-태스크 모델은 각 태스크에 대응되는 예측 값으로 출력 A, 출력 B, 및 출력 C를 출력하고, 각 태스크에 대응되는 싱글-태스크 모델은 의사 레이블 A, 의사 레이블 B, 및 의사 레이블 C를 출력한다. Referring to FIG. 7 , the
전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 모델의 출력과 이에 각각 대응되는, 멀티-태스크 모델의 각 태스크의 출력 간의 차이에 해당하는 태스크 손실()과 각 태스크의 태스크 가중치()를 획득하여, 멀티-태스크 모델의 손실 함수()를 계산할 수 있다. 전자 장치(100)는 역전파(backpropagation)를 통해, 손실 함수()가 최소화 되도록 멀티-태스크 모델의 셀프 학습을 수행할 수 있다. The
본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 손실 함수()에서 각 태스크의 태스크 가중치()는 앞서 도 3 내지 도 5의 설명에서 살펴본 바와 같이, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도에 기초하여 정의될 수 있다. 본 개시의 일 실시예에 따르면, 다음과 같은 수학식 4의 멀티-태스크 모델의 손실 함수()에서 각 태스크에 대응되는 태스크 손실은 다음과 같이 정의될 수 있다.According to an embodiment of the present disclosure, the loss function of the multi-task model ( ), the task weight of each task ( ) may be defined based on the accuracy of the single-task teaching model corresponding to each task, as discussed above in the description of FIGS. 3 to 5. According to an embodiment of the present disclosure, the loss function of the multi-task model of Equation 4 as follows ( ), the task loss corresponding to each task can be defined as follows.
[수학식 4][Equation 4]
각 태스크의 실제 값을 알 수 없는 경우, 각 태스크에 대응되는 태스크 손실은 위의 수학식 4에서와 같이 로 정의될 수 있다. 는 각 태스크에 대응되는 싱글-태스크 교수 모델이 출력한 의사 레이블과 해당 태스크에 대응되는 멀티-태스크 모델의 출력 간의 차이이다. If the actual value of each task is unknown, the task loss corresponding to each task is as shown in Equation 4 above. can be defined as is the difference between the pseudo label output by the single-task teaching model corresponding to each task and the output of the multi-task model corresponding to the corresponding task.
도 8은 본 개시의 일 실시예에 따른 멀티-태스크 모델의 셀프 학습을 수행하는 과정에서 실제 값(ground-truth)이 있는 임의의 태스크가 포함되어 있는 경우에 각 태스크 손실의 일 예를 설명하기 위한 도면이다.8 illustrates an example of loss of each task when an arbitrary task having a ground-truth is included in a process of performing self-learning of a multi-task model according to an embodiment of the present disclosure. It is a drawing for
도 8을 참고하면, 전자 장치(100)는 일부만 레이블된 멀티-태스크 학습 데이터 세트를 증강시키고, 증강된 멀티-태스크 학습 데이터를 멀티-태스크 모델과 각 태스크에 대응되는 싱글-태스크 모델에 입력할 수 있다. 태스크 A와 태스크 B는 실제 값이 각각 레이블 A 및 레이블 C이고, 태스크 B는 실제 값이 없다. 멀티-태스크 모델은 각 태스크에 대응되는 예측 값으로 출력 A, 출력 B, 및 출력 C를 출력하고, 각 태스크에 대응되는 싱글-태스크 모델은 의사 레이블 A, 의사 레이블 B, 및 의사 레이블 C를 출력한다.Referring to FIG. 8 , the
전자 장치(100)는 각 태스크에 대응되는 싱글-태스크 모델의 출력과 이에 각각 대응되는, 멀티-태스크 모델의 각 태스크의 출력 간의 차이()와 각 태스크에 대응되는 실제 값과 이에 각각 대응되는, 멀티-태스크 모델의 출력 간의 차이()의 합에 해당하는 태스크 손실()과 각 태스크의 태스크 가중치()를 획득하여, 멀티-태스크 모델의 손실 함수()를 계산할 수 있다. 전자 장치(100)는 역전파(backpropagation)를 통해, 손실 함수()가 최소화 되도록 멀티-태스크 모델의 셀프 학습을 수행할 수 있다. The
본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 손실 함수()에서 각 태스크의 태스크 가중치()는 앞서 도 3 내지 도 5의 설명에서 살펴본 바와 같이, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도에 기초하여 정의될 수 있다. 본 개시의 일 실시예에 따르면, 다음과 같은 수학식 5의 멀티-태스크 모델의 손실 함수()에서 각 태스크에 대응되는 태스크 손실은 다음과 같이 표시될 수 있다.According to an embodiment of the present disclosure, the loss function of the multi-task model ( ), the task weight of each task ( ) may be defined based on the accuracy of the single-task teaching model corresponding to each task, as discussed above in the description of FIGS. 3 to 5. According to an embodiment of the present disclosure, the loss function of the multi-task model of Equation 5 as follows ( ), the task loss corresponding to each task can be expressed as follows.
[수학식 5][Equation 5]
멀티-태스크 모델의 태스크 중 실제 값을 아는 태스크가 있는 경우, 각 태스크에 대응되는 태스크 손실은 위의 수학식 5에서와 같이 로 정의될 수 있다. 실제 값이 없는 태스크의 경우, 해당 태스크에 대응되는 싱글-태스크 교수 모델이 출력한 의사 레이블과 해당 태스크에 대응되는 멀티-태스크 모델의 출력 간의 차이()로 해당 태스크의 태스크 손실이 결정될 수 있다. 실제 값이 있는 태스크의 경우, 해당 태스크에 대응되는 실제 값과 해당 태스크에 대응되는 멀티-태스크 모델의 출력 간의 차이()와 싱글-태스크 교수 모델이 출력한 의사 레이블과 해당 태스크에 대응되는 멀티-태스크 모델의 출력 간의 차이()의 합으로 해당 태스크의 태스크 손실이 결정될 수 있다.If there is a task that knows the actual value among the tasks of the multi-task model, the task loss corresponding to each task is as shown in Equation 5 above. can be defined as In the case of a task without an actual value, the difference between the pseudo label output by the single-task teaching model corresponding to the task and the output of the multi-task model corresponding to the task ( ), the task loss of the corresponding task may be determined. In the case of a task with an actual value, the difference between the actual value corresponding to the task and the output of the multi-task model corresponding to the task ( ) and the difference between the pseudo label output by the single-task teaching model and the output of the multi-task model corresponding to the task ( ), the task loss of the corresponding task may be determined.
수학식 4와 수학식 5를 비교해보면, 멀티-태스크 모델의 각 태스크 중 실제 값이 있는 임의의 태스크의 경우, 실제 값과 해당 임의의 태스크의 출력 간의 차이()에 해당하는 해당 임의의 태스크의 태스크 손실에 해당 임의의 태스크에 대응되는 태스크 가중치()를 적용한 가중치 합도 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행하는 것임을 알 수 있다.Comparing Equation 4 and Equation 5, in the case of an arbitrary task having an actual value among each task of the multi-task model, the difference between the actual value and the output of the corresponding arbitrary task ( ), the task weight corresponding to the arbitrary task corresponding to the task loss of the corresponding arbitrary task ( ), it can be seen that self-learning of the multi-task model is performed so that the sum of the weights applied is also minimized.
도 9는 본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 방법에 따라 멀티-태스크를 수행하는 비전 모델을 학습한 결과를 설명하기 위한 도표이다.9 is a diagram for explaining a result of learning a vision model that performs a multi-task according to a method for learning a multi-task model according to an embodiment of the present disclosure.
도 9를 참고하면, 객체 검출, 세그멘테이션, 깊이 추정을 수행하는 비전 모델을 멀티-태스크 모델의 학습을 수행하는 다양한 방법들(weighted sum, GLS, GradNorm, IMTL_G, IMTL, DTP), 본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 방법(PAL, potential-aware multi-task loss), 및 본 개시의 일 실시예에 따른 멀티-태스크 모델의 학습을 수행하는 방법에 소프트 레이블 방식에 따른 의사 레이블을 이용하여 멀티 태스크 모델의 셀프 학습을 더 수행한 방법(PAL-ST, potential-aware multi-task loss with self training)에 따라 학습한 결과를 보여주고 있다.Referring to FIG. 9, various methods (weighted sum, GLS, GradNorm, IMTL_G, IMTL, DTP) for learning a multi-task model of a vision model performing object detection, segmentation, and depth estimation, one of the present disclosure A method for learning a multi-task model (PAL, potential-aware multi-task loss) according to an embodiment, and a method for learning a multi-task model according to an embodiment of the present disclosure include a soft label method. It shows the result of learning according to the method (PAL-ST, potential-aware multi-task loss with self training) in which self-learning of the multi-task model is further performed using the pseudo-labels according to the method.
총 측정 항목(total metric)을 보면, 본 개시의 일 실시예에 따른 PAL과 PAL-ST는 다른 방법들 보다, 전체 태스크가 균형적으로 학습되어, 비교적 높은 정확도를 가짐을 알 수 있다. PAL-ST는 PAL에 비해 멀티 태스크 모델의 셀프 학습을 더 수행함으로써, 더 좋은 학습 결과를 보임을 알 수 있다. PAL-ST는 각 태스크에 대해 각각의 싱글 교수 모델을 이용하는 방식과 비교할 때, 97.83%의 높은 정확도를 달성하면서도, 연산량은 매우 줄어드는 효과가 있었다.Looking at the total metric, it can be seen that PAL and PAL-ST according to an embodiment of the present disclosure have relatively high accuracy because the entire task is learned in a balanced manner, compared to other methods. It can be seen that PAL-ST shows better learning results by performing more self-learning of the multi-task model than PAL. Compared to the method using each single teaching model for each task, PAL-ST achieves a high accuracy of 97.83%, but has the effect of significantly reducing the amount of computation.
도 10은 본 개시의 일 실시예에 따른 전자 장치(100)의 구성을 도시한 블록도이다.10 is a block diagram illustrating the configuration of an
도 10을 참고하면, 일 실시예에 따른 전자 장치(100)는 메모리(110), 프로세서(120)를 포함할 수 있다.Referring to FIG. 10 , an
메모리(110)는 프로세서(120)가 판독할 수 있는 명령어들, 데이터 구조, 및 프로그램 코드(program code)가 저장될 수 있다. 프로세서(120)가 수행하는 동작들은 메모리(110)에 저장된 프로그램의 명령어들 또는 코드들을 실행함으로써 구현될 수 있다.The
메모리(110)는 플래시 메모리 타입(flash memory type), 하드디스크 타입(hard disk type), 멀티미디어 카드 마이크로 타입(multimedia card micro type), 카드 타입의 메모리(예를 들어 SD 또는 XD 메모리 등)를 포함할 수 있으며, 롬(ROM, Read-Only Memory), EEPROM(Electrically Erasable Programmable Read-Only Memory), PROM(Programmable Read-Only Memory), 자기 메모리, 자기 디스크, 광디스크 중 적어도 하나를 포함하는 비 휘발성 메모리 및 램(RAM, Random Access Memory) 또는 SRAM(Static Random Access Memory)과 같은 휘발성 메모리를 포함할 수 있다.The
일 실시예에 따른 메모리(110)는 전자 장치(100)가 멀티-태스크 모델의 학습을 수행하도록 제어하는 하나 이상의 인스트럭션 및/또는 프로그램을 저장할 수 있다. 예를 들어, 메모리(110)에는 모델 학습 모듈이 저장될 수 있다. The
프로세서(120)는 메모리(110)에 저장된 명령어들이나 프로그램화된 소프트웨어 모듈을 실행함으로써, 전자 장치(100)가 수행하는 동작이나 기능을 제어할 수 있다. 프로세서(120)는 산술, 로직 및 입출력 연산과 시그널 프로세싱을 수행하는 하드웨어 구성 요소로 구성될 수 있다. 예를 들어, 프로세서(120)는 메모리(110)에 저장된 모델 학습 모듈을 불러와 실행할 수 있다.The
프로세서(120)는 예를 들어, 중앙 처리 장치(Central Processing Unit), 마이크로 프로세서(microprocessor), 그래픽 처리 장치(Graphic Processing Unit), ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 애플리케이션 프로세서(Application Processor), 신경망 처리 장치(Neural Processing Unit) 또는 인공지능 모델의 처리에 특화된 하드웨어 구조로 설계된 인공지능 전용 프로세서 중 적어도 하나로 구성될 수 있으나, 이에 제한되는 것은 아니다. 프로세서(120)를 구성하는 각 프로세서는 소정의 기능을 수행하기 위한 전용 프로세서일 수 있다.The
프로세서(120)는 메모리(110)에 저장된 하나 이상의 인스트럭션(instructions)을 실행함으로써, 전자 장치(100)가 멀티-태스크 모델의 학습을 수행하거나 멀티-태스크 모델을 이용하여 태스크를 처리하기 위한 전반적인 동작들을 제어할 수 있다. The
본 개시의 일 실시예에 따른 프로세서(120)는 메모리(110)에 저장된 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정한다. 멀티-태스크 모델의 손실 함수는 멀티-태스크 모델의 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당할 수 있다. The
일 실시예에 따른 프로세서(120)는 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정할 수 있다. 프로세서(120)는 정확도 차이에 비례하여 각 태스크에 대응되는 태스크 가중치를 조정할 수 있다. 일 실시예에 따른 프로세서(120)는 각 태스크의 고유의 정확도에 대한 각 태스크의 학습 정도에 따른 정확도의 비율에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정할 수 있다. 프로세서(120)는 각 태스크의 고유의 정확도에 대한 각 태스크의 학습 정도에 따른 정확도의 비율에 반비례하여 각 태스크에 대응되는 태스크 가중치를 조정할 수 있다.The
일 실시예에 따른 프로세서(120)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하고, 획득된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 각 태스크의 고유의 정확도로서 이용할 수 있다. 프로세서(120)는 각 태스크에 대응되는 전용 학습 데이터 세트를 이용하여, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행할 수 있다. 프로세서(120)는 학습된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 측정함으로써, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득할 수 있다.
일 실시예에 따른 프로세서(120)는 메모리(110)에 저장된 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 손실 함수를 이용하여, 멀티-태스크 모델의 학습을 수행한다. 프로세서(120)는 증강된 멀티-태스크 학습 데이터 세트를 멀티-태스크 모델의 각 태스크에 대응되는 싱글-태스크 교수 모델과 멀티-태스크 모델에 각각 입력할 수 있다. 프로세서(120)는 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력과 싱글-태스크 교수 모델의 출력에 각각 대응되는, 멀티-태스크 모델의 각 태스크의 출력 간의 차이에 해당하는 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합이 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행할 수 있다. 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력은 소프트 레이블 방식에 따라 확률 값 형태로 나타내는 의사 레이블일 수 있다. The
프로세서(120)는 멀티-태스크 모델의 각 태스크 중 실제 값이 있는 임의의 태스크의 경우, 실제 값과 임의의 태스크의 출력 간의 차이에 해당하는 임의의 태스크의 태스크 손실에 임의의 태스크에 대응되는 태스크 가중치를 적용한 가중치 합도 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행할 수 있다. 실제 값을 아는 태스크의 경우, 해당 태스크에 대응되는 실제 값과 싱글-태스크 교수 모델이 출력한 의사 레이블 각각을 해당 태스크에 대응되는 멀티-태스크 모델의 출력과 비교하여, 태스크 손실이 결정될 수 있다. 실제 값을 알지 못하는 태스크의 경우, 해당 태스크에 대응되는 싱글-태스크 교수 모델이 출력한 의사 레이블과 해당 태스크에 대응되는 멀티-태스크 모델의 출력을 비교하여, 태스크 손실이 결정될 수 있다. In the case of an arbitrary task having an actual value among tasks of the multi-task model, the
도 11은 본 개시의 일 실시예에 따른 전자 장치(100)의 일 예를 도시한 도면이다.11 is a diagram illustrating an example of an
전자 장치(100)에 탑재된 멀티-태스크 모델이 비전 모델인 경우, 도 11에 도시된 바와 같이, 일 실시예에 따른 전자 장치(100)는 메모리(110), 프로세서(120), 카메라(130), 디스플레이(140), 통신 인터페이스(150)를 포함할 수 있다. When the multi-task model loaded in the
메모리(110) 및 프로세서(120)에 대해서는 도 10에서 설명한 것과 중복되는 내용은 이하 그 설명을 제외한다. 메모리(110)에는 모델 학습 모듈, 모델 실행 모듈이 저장될 수 있다. 프로세서(120)는 메모리(110)로부터 모델 학습 모듈이나 모델 실행 모듈을 불러와 실행할 수 있다.Regarding the
카메라(130)는 이미지를 획득하는 하드웨어 모듈이다. 카메라(130)는 사진이나 동영상과 같은 이미지를 촬영할 수 있다. 카메라(130)는 적어도 하나의 카메라 모듈을 구비할 수 있으며, 전자 장치(100)의 사양에 따라, 접사, 심도, 망원, 광각, 초광각 등의 기능을 지원할 수 있다. The
디스플레이(140)는 정보나 영상을 제공하는 출력부를 포함하며, 입력을 수신하는 입력부를 더 포함한 형태일 수 있다. 출력부는 표시 패널 및 표시 패널을 제어하는 컨트롤러를 포함할 수 있으며, OLED(Organic Light Emitting Diodes) 디스플레이, AM-OLED(Active-Matrix Organic Light-Emitting Diode) 디스플레이, LCD(Liquid Crystal Display) 등과 같은 다양한 방식으로 구현될 수 있다. 입력부는 사용자로부터 다양한 형태의 입력을 받을 수 있으며, 터치 패널, 키패드, 펜 인식 패널 중 적어도 하나를 포함한 형태일 수 있다. 디스플레이(140)는 표시 패널과 터치 패널이 결합된 터치 스크린 형태로 제공될 수 있으며, 유연하게(flexible) 또는 접을 수 있게(foldable) 구현될 수 있다.The
통신 인터페이스(150)는 다른 장치 또는 네트워크와 유무선 통신을 수행할 수 있다. 통신 인터페이스(150)는 다양한 유무선 통신 방법 중 적어도 하나를 지원하는 통신 회로 또는 통신 모듈을 포함할 수 있다. 예를 들어, 통신 인터페이스(150)는 예를 들어, 유선 랜, 무선 랜(Wireless LAN), 와이파이(Wi-Fi), 블루투스(Bluetooth), 지그비(ZigBee), WFD(Wi-Fi Direct), 적외선 통신(IrDA, infrared Data Association), BLE (Bluetooth Low Energy), NFC(Near Field Communication), 와이브로(Wireless Broadband Internet, Wibro), 와이맥스(World Interoperability for Microwave Access, WiMAX), SWAP(Shared Wireless Access Protocol), 와이기그(Wireless Gigabit Alliances, WiGig) 및 RF 통신을 포함하는 데이터 통신 방식 중 적어도 하나를 이용하여, 전자 장치(100)와 다른 장치들 간의 데이터 통신을 수행할 수 있다.The
일 실시예에 따른 통신 인터페이스(150)는 멀티-태스크 모델의 학습을 수행하기 위해 이용되는 인공지능 모델(예를 들어, 멀티-태스크 모델이나 싱글-태스크 모델)이나 학습용 데이터 세트를 외부 장치와 송수신할 수 있다. 통신 인터페이스(150)는 서버(미도시)로 전자 장치(100)의 카메라(130)를 통해 촬영한 이미지를 전송하거나, 서버(미도시)에서 학습된 인공지능 모델이나 데이터 세트를 수신할 수 있다. The
프로세서(120) 또는 프로세서(120)를 구성하는 제1 프로세서는 모델 학습 모듈을 실행하여, 멀티-태스크 모델을 학습시킬 수 있다. 멀티-태스크 모델의 학습은 멀티-태스크 학습 데이터를 이용하여 수행될 수 있다. 프로세서(120) 또는 제1 프로세서는 모델 학습 모듈을 실행하여, 멀티-태스크 모델의 각 태스크에 대응되는 싱글 태스크 모듈을 학습시킬 수 있다. 학습된 싱글 태스크 모듈은 각 태스크에 대응되는 고유의 정확도를 획득하는데 이용될 수 있고, 멀티-태스크 모델의 셀프 학습에도 이용될 수 있다.The
프로세서(120) 또는 제1 프로세서는 학습 데이터 세트를 이용하여 멀티-태스크 모델 또는 싱글-태스크 모델을 학습시킬 수 있다. 프로세서(120) 또는 제1 프로세서는 각 태스크의 처리에 이용되는 기준들과 관련된 학습 데이터를 이용하여, 멀티-태스크 모델 또는 싱글-태스크 모델을 학습시킬 수 있다. 학습 데이터 세트는 데이터가 생성된 시간이나 장소, 크기, 생성자, 데이터 종류 등의 데이터 속성 정보에 따라 분류되어, 모델의 학습에 이용될 수 있다. The
예를 들어, 멀티-태스크 모델 또는 싱글 태스크 모델이 비전 모델인 경우, 프로세서(120) 또는 제1 프로세서는 모델의 학습을 위해 복수의 이미지들을 획득할 수 있다. 프로세서(120) 또는 제1 프로세서는 전자 장치(100)의 카메라(130)를 통해 이미지를 획득하거나, 통신 인터페이스(150)를 통해 외부 장치로부터 이미지를 획득할 수 있다. 프로세서(120) 또는 제1 프로세서는 획득된 이미지에 대해 전처리 과정을 거치거나 학습 데이터 세트에서 모델을 학습하기 위한 입력 데이터들을 선별할 수 있다. For example, when the multi-task model or the single-task model is a vision model, the
프로세서(120) 또는 제1 프로세서는 오류 역전파법(error back-propagation) 또는 경사 하강법(gradient descent)을 포함하는 학습 알고리즘 등을 이용하여 멀티-태스크 모델 또는 싱글 태스크 모델을 학습시킬 수 있다.The
프로세서(120) 또는 프로세서(120)를 구성하는 제2 프로세서는 모델 실행 모듈을 실행하여, 멀티-태스크 모델의 각각의 태스크를 처리할 수 있다. 프로세서(120) 또는 제2 프로세서는 각 태스크의 처리에 필요한 입력 데이터를 획득할 수 있다. 프로세서(120) 또는 제2 프로세서는 입력 데이터를 멀티-태스크 모델에 입력하여, 각 태스크에 대응되는 결과를 출력할 수 있다. 학습된 멀티-태스크 모델은 각 태스크에 대응되는 입력에 대한 응답으로 각 태스크에 대응되는 예측 또는 추론 값을 출력할 수 있다. 프로세서(120) 또는 제2 프로세서는 출력 값에 대해 추가 프로세싱 작업을 거쳐 소정의 서비스를 제공할 수 있다.The
도 11에 도시된 바와 달리, 모델 학습 모듈 및 모델 실행 모듈 중 하나는 전자 장치(100)에 탑재되고, 나머지 하나는 서버에 탑재될 수 있다. 이 경우, 전자 장치(100)와 서버는 통신을 통하여, 어느 장치에 탑재된 모델 학습 모듈에서 구축된 모델에 관한 정보를 다른 장치에 탑재된 모델 실행 모듈에 제공할 수 있다. 또는, 전자 장치(100)와 서버는 통신을 통하여, 어느 장치에 탑재된 모델 실행 모듈에 입력된 데이터 세트를 다른 장치에 탑재된 모델 학습 모듈에 제공할 수 있다.Unlike shown in FIG. 11 , one of the model learning module and the model execution module may be installed in the
한편, 본 개시의 실시예들은 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행 가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스 될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독 가능 매체는 컴퓨터 저장 매체 및 통신 매체를 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독 가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독 가능 명령어, 데이터 구조, 또는 프로그램 모듈과 같은 변조된 데이터 신호의 기타 데이터를 포함할 수 있다.Meanwhile, the embodiments of the present disclosure may be implemented in the form of a recording medium including instructions executable by a computer, such as program modules executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. Also, computer readable media may include computer storage media and communication 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. Communication media may typically include computer readable instructions, data structures, or other data in a modulated data signal such as program modules.
또한, 컴퓨터에 의해 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.Also, the computer-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-temporary storage medium' only means that it is a tangible device and does not contain signals (e.g., electromagnetic waves), and this term refers to the case where data is stored semi-permanently in the storage medium and temporary It does not discriminate if it is saved as . For example, a 'non-temporary storage medium' may include a buffer in which data is temporarily stored.
일 실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments disclosed in this document may be provided by being included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. A computer program product is distributed in the form of a device-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store or between two user devices (eg smartphones). It can be distributed (e.g., downloaded or uploaded) directly or online. In the case of online distribution, at least a part of a computer program product (eg, a downloadable app) is stored on a device-readable storage medium such as a memory of a manufacturer's server, an application store server, or a relay server. It can be temporarily stored or created temporarily.
본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 학습을 수행하는 방법이 제공된다. 멀티-태스크 모델의 학습을 수행하는 방법은 멀티-태스크 모델의 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당하는 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정하는 단계를 포함한다. 또한, 멀티-태스크 모델의 학습을 수행하는 방법은 멀티-태스크 모델의 손실 함수를 이용하여, 멀티-태스크 모델의 학습을 수행하는 단계를 포함한다.According to an embodiment of the present disclosure, a method for performing learning of a multi-task model is provided. A method for performing learning of the multi-task model is based on the accuracy of each task of the multi-task model and the accuracy according to the learning degree of each task, and the task corresponding to each task corresponds to the loss of each task of the multi-task model. and setting a task weight corresponding to each task of a loss function of the multi-task model corresponding to a weight sum to which weights have been applied. Also, the method of performing learning of the multi-task model includes performing learning of the multi-task model by using a loss function of the multi-task model.
또한, 본 개시의 일 실시예에 따르면, 각 태스크에 대응되는 태스크 가중치를 설정하는 단계는, 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정한다.In addition, according to an embodiment of the present disclosure, the step of setting a task weight corresponding to each task may include corresponding to each task based on an accuracy difference between an accuracy inherent in each task and an accuracy according to a learning degree of each task. Set the task weight to be
또한, 각 태스크에 대응되는 태스크 가중치를 설정하는 단계는, 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이에 비례하여 각 태스크에 대응되는 태스크 가중치를 조정한다.In addition, the step of setting the task weight corresponding to each task adjusts the task weight corresponding to each task in proportion to a difference in accuracy between the unique accuracy of each task and the accuracy according to the learning degree of each task.
또한, 본 개시의 일 실시예에 따르면, 각 태스크에 대응되는 태스크 가중치를 설정하는 단계는, 각 태스크의 고유의 정확도에 대한 각 태스크의 학습 정도에 따른 정확도의 비율에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정한다.In addition, according to an embodiment of the present disclosure, setting a task weight corresponding to each task may include corresponding to each task based on a ratio of accuracy according to a learning degree of each task to unique accuracy of each task. Set the task weight to be
또한, 각 태스크에 대응되는 태스크 가중치를 설정하는 단계는, 각 태스크의 고유의 정확도에 대한 각 태스크의 학습 정도에 따른 정확도의 비율에 반비례하여 각 태스크에 대응되는 태스크 가중치를 조정한다.In the step of setting the task weight corresponding to each task, the task weight corresponding to each task is adjusted in inverse proportion to the ratio of the accuracy according to the learning degree of each task to the unique accuracy of each task.
또한, 본 개시의 일 실시예에 따르면, 각 태스크에 대응되는 태스크 가중치를 설정하는 단계는, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하는 단계를 포함한다. 또한, 각 태스크에 대응되는 태스크 가중치를 설정하는 단계는, 획득된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정하는 단계를 포함한다.In addition, according to an embodiment of the present disclosure, the step of setting task weights corresponding to each task may include a single-task teaching model corresponding to each task. and obtaining accuracy. In addition, the step of setting the task weight corresponding to each task may include the obtained single-task teaching model corresponding to each task. and setting a task weight corresponding to each task of the loss function of the multi-task model based on the accuracy and the accuracy according to the learning degree of each task.
또한, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하는 단계는, 각 태스크에 대응되는 전용 학습 데이터 세트를 이용하여, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행하는 단계를 포함한다. 또한, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하는 단계는, 학습된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 측정하는 단계를 포함한다.In addition, the step of acquiring the accuracy of the single-task teaching model corresponding to each task includes the step of learning the single-task teaching model corresponding to each task using a dedicated training data set corresponding to each task. include Also, acquiring the accuracy of the single-task teaching model corresponding to each task includes measuring the accuracy of the learned single-task teaching model corresponding to each task when learning is completed.
또한, 본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 학습을 수행하는 단계는, 증강된 멀티-태스크 학습 데이터 세트를 각 태스크에 대응되는 싱글-태스크 교수 모델과 멀티-태스크 모델에 각각 입력하는 단계를 포함한다. 또한, 멀티-태스크 모델의 학습을 수행하는 단계는, 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력과 싱글-태스크 교수 모델의 출력에 각각 대응되는, 멀티-태스크 모델의 각 태스크의 출력 간의 차이에 해당하는 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합이 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행하는 단계를 포함한다. 또한, 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력은 소프트 레이블 방식에 따라 확률 값 형태로 나타내는 의사 레이블이다.In addition, according to an embodiment of the present disclosure, the step of learning the multi-task model includes inputting the augmented multi-task learning data set to a single-task teaching model and a multi-task model corresponding to each task, respectively. It includes steps to In addition, the step of performing learning of the multi-task model may include a difference between the output of the single-task teaching model corresponding to each task and the output of each task of the multi-task model corresponding to the output of the single-task teaching model. and performing self-learning of the multi-task model so that a weight sum obtained by applying a task weight corresponding to each task to each task loss corresponding to is minimized. In addition, the output of the single-task teaching model corresponding to each task is a pseudo label represented in the form of a probability value according to the soft label method.
또한, 멀티-태스크 모델의 셀프 학습을 수행하는 단계는, 멀티-태스크 모델의 각 태스크 중 실제 값이 있는 임의의 태스크의 경우, 실제 값과 임의의 태스크의 출력 간의 차이에 해당하는 임의의 태스크의 태스크 손실에 임의의 태스크에 대응되는 태스크 가중치를 적용한 가중치 합도 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행한다.In addition, the step of performing self-learning of the multi-task model may include, in the case of an arbitrary task having an actual value among tasks of the multi-task model, a random task corresponding to a difference between the actual value and the output of the arbitrary task. Self-learning of the multi-task model is performed so that the weight sum obtained by applying the task weight corresponding to an arbitrary task to the task loss is also minimized.
본 개시의 일 실시예에 따르면, 전술한 방법을 실행시키기 위한 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록매체를 제공할 수 있다.According to one embodiment of the present disclosure, it is possible to provide a computer-readable recording medium on which a program for executing the above-described method is recorded.
본 개시의 일 실시예에 따르면, 멀티-태스크 모델의 학습을 수행하는 전자 장치(100)가 제공된다. 멀티-태스크 모델의 학습을 수행하는 전자 장치(100)는 하나 이상의 인스트럭션을 저장하는 메모리(110) 및 메모리(110)에 저장된 하나 이상의 인스트럭션을 실행하는 프로세서(120)를 포함한다. 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도에 기초하여, 멀티-태스크 모델의 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당하는 멀티-태스크 모델의 손실 함수의 각 태스크에 대응되는 태스크 가중치를 설정한다. 또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 손실 함수를 이용하여, 멀티-태스크 모델의 학습을 수행한다.According to an embodiment of the present disclosure, an
또한, 본 개시의 일 실시예에 따르면, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정한다.In addition, according to an embodiment of the present disclosure, the
또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크의 고유의 정확도와 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이에 비례하여 각 태스크에 대응되는 태스크 가중치를 조정한다.Also, by executing one or more instructions, the
또한, 본 개시의 일 실시예에 따르면, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크의 고유의 정확도에 대한 각 태스크의 학습 정도에 따른 정확도의 비율에 기초하여, 각 태스크에 대응되는 태스크 가중치를 설정한다.In addition, according to an embodiment of the present disclosure, the
또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크의 고유의 정확도에 대한 각 태스크의 학습 정도에 따른 정확도의 비율에 반비례하여 각 태스크에 대응되는 태스크 가중치를 조정한다.Also, by executing one or more instructions, the
또한, 본 개시의 일 실시예에 따르면, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하고, 획득된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 각 태스크의 고유의 정확도로서 이용한다.In addition, according to an embodiment of the present disclosure, the
또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크에 대응되는 전용 학습 데이터 세트를 이용하여, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습을 수행한다. 또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 학습된, 각 태스크에 대응되는 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 측정함으로써, 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득한다.In addition, the
또한, 본 개시의 일 실시예에 따르면, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 증강된 멀티-태스크 학습 데이터 세트를 각 태스크에 대응되는 싱글-태스크 교수 모델과 멀티-태스크 모델에 각각 입력한다. 또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력과 싱글-태스크 교수 모델의 출력에 각각 대응되는, 멀티-태스크 모델의 각 태스크의 출력 간의 차이에 해당하는 각 태스크 손실에 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합이 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행한다.In addition, according to an embodiment of the present disclosure, the
또한, 각 태스크에 대응되는 싱글-태스크 교수 모델의 출력은 소프트 레이블 방식에 따라 확률 값 형태로 나타내는 의사 레이블이다.In addition, the output of the single-task teaching model corresponding to each task is a pseudo label represented in the form of a probability value according to the soft label method.
또한, 프로세서(120)는 하나 이상의 인스트럭션을 실행함으로써, 멀티-태스크 모델의 각 태스크 중 실제 값이 있는 임의의 태스크의 경우, 실제 값과 임의의 태스크의 출력 간의 차이에 해당하는 임의의 태스크의 태스크 손실에 임의의 태스크에 대응되는 태스크 가중치를 적용한 가중치 합도 최소화되도록, 멀티-태스크 모델의 셀프 학습을 수행한다.In addition, the
전술한 본 개시의 설명은 예시를 위한 것이며, 본 개시가 속하는 기술분야의 통상의 지식을 가진 자는 본 개시의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The description of the present disclosure described above is for illustrative purposes, and those skilled in the art can understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present disclosure. will be. Therefore, the embodiments described above should be understood as illustrative in all respects and not limiting. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as distributed may be implemented in a combined form.
본 개시의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 개시의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present disclosure is indicated by the following claims rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the claims and equivalent concepts should be interpreted as being included in the scope of the present disclosure. do.
Claims (20)
멀티-태스크 모델의 각 태스크의 고유의 정확도와 상기 각 태스크의 학습 정도에 따른 정확도에 기초하여, 상기 멀티-태스크 모델의 각 태스크 손실에 상기 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당하는 상기 멀티-태스크 모델의 손실 함수의 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S210); 및
상기 손실 함수를 이용하여, 상기 멀티-태스크 모델의 학습을 수행하는 단계(S220);
를 포함하는, 방법.In the method of performing the learning of the multi-task model,
Based on the unique accuracy of each task of the multi-task model and the accuracy according to the learning degree of each task, corresponding to the weight sum obtained by applying the task weight corresponding to each task to the loss of each task of the multi-task model. Setting the task weight corresponding to each task of the loss function of the multi-task model (S210); and
Performing learning of the multi-task model using the loss function (S220);
Including, method.
상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S210)는,
상기 각 태스크의 고유의 정확도와 상기 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이(accuracy difference)에 기초하여, 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는, 방법.According to claim 1,
In the step of setting the task weight corresponding to each task (S210),
The method of setting the task weight corresponding to each task based on an accuracy difference between the unique accuracy of each task and the accuracy according to the learning degree of each task.
상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S210)는,
상기 정확도 차이에 비례하여 상기 각 태스크에 대응되는 상기 태스크 가중치를 조정하는, 방법.According to claim 2,
In the step of setting the task weight corresponding to each task (S210),
Adjusting the task weight corresponding to each task in proportion to the accuracy difference.
상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S210)는,
상기 각 태스크의 고유의 정확도에 대한 상기 각 태스크의 학습 정도에 따른 정확도의 비율에 기초하여, 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는, 방법.According to claim 1,
In the step of setting the task weight corresponding to each task (S210),
The method of setting the task weight corresponding to each task based on the ratio of the accuracy according to the learning degree of each task to the unique accuracy of each task.
상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S210)는,
상기 비율에 반비례하여 상기 각 태스크에 대응되는 상기 태스크 가중치를 조정하는, 방법.According to claim 4,
In the step of setting the task weight corresponding to each task (S210),
Adjusting the task weight corresponding to each task in inverse proportion to the ratio.
상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S210)는,
상기 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하는 단계(S310); 및
상기 획득된, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 정확도와 상기 각 태스크의 학습 정도에 따른 정확도에 기초하여, 상기 멀티-태스크 모델의 손실 함수의 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는 단계(S320)를 포함하는, 방법. According to any one of claims 1 to 5,
In the step of setting the task weight corresponding to each task (S210),
of the single-task teaching model corresponding to each task Acquiring accuracy (S310); and
of the obtained single-task teaching model corresponding to each task and setting the task weight corresponding to each task of the loss function of the multi-task model based on the accuracy and the accuracy according to the learning degree of each task (S320).
상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 정확도를 획득하는 단계(S310)는,
상기 각 태스크에 대응되는 전용 학습 데이터 세트를 이용하여, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 학습을 수행하는 단계(S410); 및
상기 학습된, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 측정하는 단계(S420, S430)를 포함하는, 방법.According to claim 6,
Acquiring the accuracy of the single-task teaching model corresponding to each task (S310),
performing learning of the single-task teaching model corresponding to each task by using a dedicated learning data set corresponding to each task (S410); and
and measuring an accuracy of the learned single-task teaching model corresponding to each task when learning is completed (S420, S430).
상기 멀티-태스크 모델의 학습을 수행하는 단계(S220)는,
증강된 멀티-태스크 학습 데이터 세트를 상기 각 태스크에 대응되는 싱글-태스크 교수 모델과 상기 멀티-태스크 모델에 각각 입력하는 단계(S610); 및
상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 출력과 상기 싱글-태스크 교수 모델의 출력에 각각 대응되는, 상기 멀티-태스크 모델의 상기 각 태스크의 출력 간의 차이에 해당하는 상기 각 태스크 손실에 상기 각 태스크에 대응되는 상기 태스크 가중치를 적용한 상기 가중치 합이 최소화되도록, 상기 멀티-태스크 모델의 셀프 학습을 수행하는 단계(S620)를 포함하고,
상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 출력은 소프트 레이블 방식에 따라 확률 값 형태로 나타내는 의사 레이블인, 방법.According to any one of claims 1 to 7,
In the step of performing the learning of the multi-task model (S220),
inputting the augmented multi-task learning data set to the single-task teaching model and the multi-task model corresponding to each task (S610); and
The loss of each task corresponding to the difference between the output of the single-task instruction model corresponding to each task and the output of each task of the multi-task model, respectively, corresponding to the output of the single-task instruction model. Performing self-learning of the multi-task model so that the sum of the weights to which the task weights corresponding to each task is applied is minimized (S620);
The output of the single-task teaching model corresponding to each task is a pseudo label represented in the form of a probability value according to a soft label method.
상기 멀티-태스크 모델의 셀프 학습을 수행하는 단계(S620)는,
상기 멀티-태스크 모델의 상기 각 태스크 중 실제 값(ground-truth)이 있는 임의의 태스크의 경우, 상기 실제 값과 상기 임의의 태스크의 출력 간의 차이에 해당하는 상기 임의의 태스크의 태스크 손실에 상기 임의의 태스크에 대응되는 태스크 가중치를 적용한 가중치 합도 최소화되도록, 상기 멀티-태스크 모델의 셀프 학습을 수행하는, 방법.According to claim 8,
Performing self-learning of the multi-task model (S620),
In the case of an arbitrary task having a true value (ground-truth) among the respective tasks of the multi-task model, the task loss of the arbitrary task corresponding to the difference between the actual value and the output of the arbitrary task corresponds to the ground-truth. A method for performing self-learning of the multi-task model so that the sum of weights obtained by applying task weights corresponding to the tasks of is also minimized.
하나 이상의 인스트럭션을 저장하는 메모리(110); 및
상기 메모리(110)에 저장된 상기 하나 이상의 인스트럭션을 실행하는 프로세서(120)를 포함하고,
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
멀티-태스크 모델의 각 태스크의 고유의 정확도와 상기 각 태스크의 학습 정도에 따른 정확도에 기초하여, 상기 멀티-태스크 모델의 각 태스크 손실에 상기 각 태스크에 대응되는 태스크 가중치를 적용한 가중치 합에 해당하는 상기 멀티-태스크 모델의 손실 함수의 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하고, 상기 손실 함수를 이용하여, 상기 멀티-태스크 모델의 학습을 수행하는, 전자 장치(100). In the electronic device 100 that performs learning of the multi-task model,
memory 110 for storing one or more instructions; and
a processor (120) to execute the one or more instructions stored in the memory (110);
The processor 120, by executing the one or more instructions,
Based on the unique accuracy of each task of the multi-task model and the accuracy according to the learning degree of each task, corresponding to the weight sum obtained by applying the task weight corresponding to each task to the loss of each task of the multi-task model. The electronic device 100 configured to set the task weight corresponding to each task of the loss function of the multi-task model and perform learning of the multi-task model using the loss function.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 각 태스크의 고유의 정확도와 상기 각 태스크의 학습 정도에 따른 정확도 간의 정확도 차이에 기초하여, 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는, 전자 장치(100).According to claim 11,
The processor 120, by executing the one or more instructions,
The electronic device 100 that sets the task weight corresponding to each task based on an accuracy difference between accuracy inherent in each task and accuracy according to a learning degree of each task.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 정확도 차이에 비례하여 상기 각 태스크에 대응되는 상기 태스크 가중치를 조정하는, 전자 장치(100).According to claim 12,
The processor 120, by executing the one or more instructions,
The electronic device 100 that adjusts the task weight corresponding to each task in proportion to the accuracy difference.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 각 태스크의 고유의 정확도에 대한 상기 각 태스크의 학습 정도에 따른 정확도의 비율에 기초하여, 상기 각 태스크에 대응되는 상기 태스크 가중치를 설정하는, 전자 장치(100).According to claim 11,
The processor 120, by executing the one or more instructions,
The electronic device 100 that sets the task weight corresponding to each task based on a ratio of accuracy according to the learning degree of each task to the unique accuracy of each task.
상기 프로세서는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 비율에 반비례하여 상기 각 태스크에 대응되는 상기 태스크 가중치를 조정하는, 전자 장치(100).According to claim 14,
By executing the one or more instructions, the processor:
The electronic device 100 that adjusts the task weight corresponding to each task in inverse proportion to the ratio.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 각 태스크에 대응되는 싱글-태스크 교수 모델의 정확도를 획득하고, 상기 획득된, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 정확도를 상기 각 태스크의 고유의 정확도로서 이용하는, 전자 장치(100).According to any one of claims 11 to 15,
The processor 120, by executing the one or more instructions,
of the single-task teaching model corresponding to each task Accuracy is obtained, and the obtained single-task instruction model corresponding to each task The electronic device 100, using accuracy as the unique accuracy of each task.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 각 태스크에 대응되는 전용 학습 데이터 세트를 이용하여, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 학습을 수행하고, 상기 학습된, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 학습 완료 시의 정확도를 측정함으로써, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 정확도를 획득하는, 전자 장치(100).According to claim 16,
The processor 120, by executing the one or more instructions,
Learning of the single-task teaching model corresponding to each task is performed using a dedicated learning data set corresponding to each task, and learning of the learned single-task teaching model corresponding to each task The electronic device 100, which obtains the accuracy of the single-task teaching model corresponding to each task by measuring the accuracy upon completion.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
증강된 멀티-태스크 학습 데이터 세트를 상기 각 태스크에 대응되는 싱글-태스크 교수 모델과 상기 멀티-태스크 모델에 각각 입력하고, 상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 출력과 상기 싱글-태스크 교수 모델의 출력에 각각 대응되는, 상기 멀티-태스크 모델의 상기 각 태스크의 출력 간의 차이에 해당하는 상기 각 태스크 손실에 상기 각 태스크에 대응되는 상기 태스크 가중치를 적용한 상기 가중치 합이 최소화되도록, 상기 멀티-태스크 모델의 셀프 학습을 수행하는, 전자 장치(100).According to any one of claims 11 to 17,
The processor 120, by executing the one or more instructions,
The augmented multi-task learning data set is input to the single-task teaching model and the multi-task model corresponding to each task, and the output of the single-task teaching model corresponding to each task and the single-task The multi-task model minimizes the sum of the weights obtained by applying the task weight corresponding to each task to the task loss corresponding to the difference between the outputs of the respective tasks of the multi-task model, respectively corresponding to the outputs of the teaching model. - The electronic device 100, which performs self-learning of the task model.
상기 각 태스크에 대응되는 상기 싱글-태스크 교수 모델의 출력은 소프트 레이블 방식에 따라 확률 값 형태로 나타내는 의사 레이블인, 전자 장치(100).According to claim 18,
The electronic device 100, wherein the output of the single-task teaching model corresponding to each task is a pseudo label represented in the form of a probability value according to a soft label method.
상기 프로세서(120)는 상기 하나 이상의 인스트럭션을 실행함으로써,
상기 멀티-태스크 모델의 상기 각 태스크 중 실제 값이 있는 임의의 태스크의 경우, 상기 실제 값과 상기 임의의 태스크의 출력 간의 차이에 해당하는 상기 임의의 태스크의 태스크 손실에 상기 임의의 태스크에 대응되는 태스크 가중치를 적용한 가중치 합도 최소화되도록, 상기 멀티-태스크 모델의 셀프 학습을 수행하는, 전자 장치(100).According to claim 18,
The processor 120, by executing the one or more instructions,
In the case of an arbitrary task having an actual value among the respective tasks of the multi-task model, the task loss of the arbitrary task corresponding to the difference between the actual value and the output of the arbitrary task corresponds to the arbitrary task The electronic device 100 that performs self-learning of the multi-task model so that the sum of weights to which task weights are applied is also minimized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/KR2022/014988 WO2023085610A1 (en) | 2021-11-11 | 2022-10-05 | Method and electronic device for performing multi-task model learning |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20210154475 | 2021-11-11 | ||
KR1020210154475 | 2021-11-11 |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20230068989A true KR20230068989A (en) | 2023-05-18 |
Family
ID=86545433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020220115795A KR20230068989A (en) | 2021-11-11 | 2022-09-14 | Method and electronic device for performing learning of multi-task model |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20230068989A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102633937B1 (en) * | 2023-07-06 | 2024-02-07 | (주)트루엔 | Electronic device and method for obtain attribute information related to object using the same |
-
2022
- 2022-09-14 KR KR1020220115795A patent/KR20230068989A/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102633937B1 (en) * | 2023-07-06 | 2024-02-07 | (주)트루엔 | Electronic device and method for obtain attribute information related to object using the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11557085B2 (en) | Neural network processing for multi-object 3D modeling | |
WO2021136365A1 (en) | Application development method and apparatus based on machine learning model, and electronic device | |
US11960843B2 (en) | Multi-module and multi-task machine learning system based on an ensemble of datasets | |
US11367271B2 (en) | Similarity propagation for one-shot and few-shot image segmentation | |
KR102532749B1 (en) | Method and apparatus for hierarchical learning of neural networks based on weak supervised learning | |
US11651214B2 (en) | Multimodal data learning method and device | |
US11559887B2 (en) | Optimizing policy controllers for robotic agents using image embeddings | |
US10970900B2 (en) | Electronic apparatus and controlling method thereof | |
US20200202226A1 (en) | System and method for context based deep knowledge tracing | |
US11741398B2 (en) | Multi-layered machine learning system to support ensemble learning | |
US11688077B2 (en) | Adaptive object tracking policy | |
JP2017224027A (en) | Machine learning method related to data labeling model, computer and program | |
CN110728319B (en) | Image generation method and device and computer storage medium | |
US10438088B2 (en) | Visual-saliency driven scene description | |
KR20190140519A (en) | Electronic apparatus and controlling method thereof | |
US20220366244A1 (en) | Modeling Human Behavior in Work Environment Using Neural Networks | |
JP2018163444A (en) | Information processing apparatus, information processing method and program | |
US11556848B2 (en) | Resolving conflicts between experts' intuition and data-driven artificial intelligence models | |
KR20230068989A (en) | Method and electronic device for performing learning of multi-task model | |
US20230021551A1 (en) | Using training images and scaled training images to train an image segmentation model | |
KR20200088682A (en) | Electronic apparatus and controlling method thereof | |
KR102348368B1 (en) | Device, method, system and computer readable storage medium for generating training data of machine learing model and generating fake image using machine learning model | |
US11636022B2 (en) | Server and control method thereof | |
CN112749978A (en) | Detection method, apparatus, device, storage medium, and program product | |
Newnham | Machine Learning with Core ML: An iOS developer's guide to implementing machine learning in mobile apps |