KR102544700B1 - Mehtod and apparatus for detecting object contained within paragraph - Google Patents

Mehtod and apparatus for detecting object contained within paragraph Download PDF

Info

Publication number
KR102544700B1
KR102544700B1 KR1020200130364A KR20200130364A KR102544700B1 KR 102544700 B1 KR102544700 B1 KR 102544700B1 KR 1020200130364 A KR1020200130364 A KR 1020200130364A KR 20200130364 A KR20200130364 A KR 20200130364A KR 102544700 B1 KR102544700 B1 KR 102544700B1
Authority
KR
South Korea
Prior art keywords
token
tokens
vector
paragraph
input
Prior art date
Application number
KR1020200130364A
Other languages
Korean (ko)
Other versions
KR20220046987A (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 KR1020200130364A priority Critical patent/KR102544700B1/en
Publication of KR20220046987A publication Critical patent/KR20220046987A/en
Application granted granted Critical
Publication of KR102544700B1 publication Critical patent/KR102544700B1/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/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • 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

Abstract

문단 내 객체를 탐지하기 위한 방법 및 장치가 개시된다. 일 실시예에 따른 문단 내 객체 탐지 방법은, 순환 신경망(Recurrent Neural Network, RNN) 인코더를 이용하여, 입력 문단에 기초하여 생성된 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 은닉 상태 벡터(hidden state vector)를 생성하는 동작; 상기 복수의 토큰 각각에 대한 은닉 상태 벡터에 기초하여 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터(self-attention vector)를 생성하는 동작; 및 순방향 포인터 네트워크(forward pointer network) 디코더 및 역방향 포인터 네트워크(backward pointer network) 디코더를 이용하여, 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터로부터 상기 입력 문단에 포함된 하나 이상의 대상 객체를 탐지하는 동작을 포함한다.A method and apparatus for detecting an object in a paragraph are disclosed. A method for detecting an object in a paragraph according to an embodiment uses a Recurrent Neural Network (RNN) encoder to generate a hidden state vector for each of a plurality of tokens included in a token sequence generated based on an input paragraph. creating a vector); generating a self-attention vector for each of the plurality of tokens based on the hidden state vector for each of the plurality of tokens; and detecting one or more target objects included in the input paragraph from the self attention vector for each of the plurality of tokens by using a forward pointer network decoder and a backward pointer network decoder. includes

Description

문단 내 객체 탐지 방법 및 장치{MEHTOD AND APPARATUS FOR DETECTING OBJECT CONTAINED WITHIN PARAGRAPH}Method and device for detecting objects within a paragraph {MEHTOD AND APPARATUS FOR DETECTING OBJECT CONTAINED WITHIN PARAGRAPH}

개시되는 실시예들은 문단 내 객체를 탐지하기 위한 기술과 관련된다.The disclosed embodiments relate to techniques for detecting objects within paragraphs.

최근 질의-응답 시스템의 연구가 활발히 진행되고 있다. 기계독해 시스템은 질의-응답 시스템의 대표적인 작업 중 하나로, 주어진 문서에서 질문에 대한 정답을 찾는 시스템이다. 이러한 기계독해 시스템은 문서의 이해, 질문 작성 등의 작업을 통해 데이터를 수집하기 때문에, 데이터를 구축하기 위해서는 높은 비용을 요구한다. 최근 이 비용 문제를 완화하기 위해 심층 학습(Deep Learning)을 이용한 질문 자동 생성 모델이 연구되고 있다. 질문 자동 생성 모델은 단락과 정답 정보를 기반으로 정답에 적합한 질문을 생성한다. 그러나, 단락에서 정답 정보를 추출하는 작업을 수작업으로 진행하기에는 높은 비용과 시간이 요구되므로 단락에서 정답 후보를 자동으로 추출하기 위한 방안이 요구되고 있다.Recently, research on question-response systems has been actively conducted. A machine reading comprehension system is one of the representative tasks of a question-response system, and is a system that finds the correct answer to a question in a given document. Since these machine reading comprehension systems collect data through tasks such as understanding documents and writing questions, high costs are required to build data. Recently, in order to alleviate this cost problem, a model for automatically generating questions using deep learning is being studied. The automatic question generation model generates questions suitable for correct answers based on paragraphs and correct answer information. However, since it requires high cost and time to manually extract correct answer information from paragraphs, a method for automatically extracting correct answer candidates from paragraphs is required.

개시되는 실시예들은 문단 내 객체를 탐지하기 위한 방법 및 장치를 제공하기 위한 것이다.The disclosed embodiments are intended to provide a method and apparatus for detecting an object in a paragraph.

일 실시예에 따른 문단 내 객체 탐지 방법은, 순환 신경망(Recurrent Neural Network, RNN) 인코더를 이용하여, 입력 문단에 기초하여 생성된 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 은닉 상태 벡터(hidden state vector)를 생성하는 동작; 상기 복수의 토큰 각각에 대한 은닉 상태 벡터에 기초하여 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터(self-attention vector)를 생성하는 동작; 및 순방향 포인터 네트워크(forward pointer network) 디코더 및 역방향 포인터 네트워크(backward pointer network) 디코더를 이용하여, 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터로부터 상기 입력 문단에 포함된 하나 이상의 대상 객체를 탐지하는 동작을 포함한다.A method for detecting an object in a paragraph according to an embodiment uses a Recurrent Neural Network (RNN) encoder to generate a hidden state vector for each of a plurality of tokens included in a token sequence generated based on an input paragraph. creating a vector); generating a self-attention vector for each of the plurality of tokens based on the hidden state vector for each of the plurality of tokens; and detecting one or more target objects included in the input paragraph from the self attention vector for each of the plurality of tokens by using a forward pointer network decoder and a backward pointer network decoder. includes

상기 순방향 포인터 네트워크 디코더는, 상기 복수의 토큰 중 t(이때, t는 0≤t≤n인 자연수, n은 상기 복수의 토큰의 총 개수)번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 시작 위치로 하는 제1 대상 객체를 탐지하고, 상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 종료 위치로 하는 제2 대상 객체를 탐지할 수 있다.The forward pointer network decoder, when a self attention vector for the t token (where t is a natural number of 0≤t≤n, and n is the total number of the plurality of tokens) among the plurality of tokens is input, the Among one or more target objects, a first target object having the t-th token as a starting position is detected, and the reverse pointer network decoder, when a self attention vector for the t-th token is input, among the one or more target objects A second target object having the t-th token as an end position may be detected.

상기 순방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 t번째 토큰의 상기 토큰 시퀀스 내 위치에 대응되는 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제1 스코어를 산출하고, 상기 산출된 제1 스코어가 가장 높은 토큰을 상기 제1 대상 객체의 종료 위치로 결정하고, 상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제2 스코어를 산출하고, 상기 복수의 토큰 중 상기 산출된 제2 스코어가 가장 높은 토큰을 상기 제2 대상 객체의 시작 위치로 결정할 수 있다.The forward pointer network decoder calculates a first score for each of the plurality of tokens based on a self attention vector for the t-th token and a position vector corresponding to a position of the t-th token in the token sequence; A token having the highest calculated first score is determined as an end position of the first target object, and the reverse pointer network decoder determines the plurality of values based on a self-attention vector for the t-th token and the position vector. A second score for each token may be calculated, and a token having the highest calculated second score among the plurality of tokens may be determined as a start position of the second target object.

상기 토큰 시퀀스는, 상기 입력 문단을 토큰화(tokenization)하여 생성된 토큰 및 상기 입력 문단에 포함되지 않은 기 설정된 토큰을 포함하고, 상기 탐지하는 단계는, 상기 복수의 토큰 중 상기 제1 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제1 대상 객체가 존재하지 않는 것으로 판단하고, 상기 복수의 토큰 중 상기 제2 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제2 대상 객체가 존재하지 않는 것으로 판단할 수 있다.The token sequence includes a token generated by tokenizing the input paragraph and a predetermined token not included in the input paragraph, and in the detecting step, the first score is the highest among the plurality of tokens. When the high token is the preset token, it is determined that the first target object does not exist, and when the token having the highest second score among the plurality of tokens is the preset token, the second target object It can be determined that it does not exist.

상기 은닉 상태 벡터를 생성하는 동작은, 상기 입력 문단을 기 설정된 토큰 단위로 토큰화하여 상기 토큰 시퀀스를 생성하는 동작; 상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하는 동작; 및 상기 복수의 토큰 각각에 대한 토큰 벡터를 상기 RNN 인코더의 입력으로 이용하여 상기 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성하는 동작을 포함할 수 있다.The generating of the hidden state vector may include generating the token sequence by tokenizing the input paragraph in units of predetermined tokens; generating a token vector for each of the plurality of tokens; and generating a hidden state vector for each of the plurality of tokens by using the token vector for each of the plurality of tokens as an input of the RNN encoder.

상기 토큰 시퀀스를 생성하는 동작은, 상기 입력 문단을 형태소 단위로 토큰화할 수 있다.The operation of generating the token sequence may tokenize the input paragraph in units of morphemes.

상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하는 동작은, 복수의 토큰 각각에 대한 임베딩(embedding) 벡터 및 복수의 토큰 각각의 자질에 대한 자질 벡터에 기초하여 상기 복수의 토큰 각각에 대한 토큰 벡터를 생성할 수 있다.The operation of generating a token vector for each of the plurality of tokens may include generating a token vector for each of the plurality of tokens based on an embedding vector for each of the plurality of tokens and a feature vector for each of the plurality of tokens. can create

상기 복수의 토큰 각각의 자질은, 상기 복수의 토큰 각각의 품사를 포함할 수 있다.The quality of each of the plurality of tokens may include parts of speech of each of the plurality of tokens.

상기 하나 이상의 대상 객체는, 상기 입력 문단에 기초하여 생성될 질의에 대한 정답 후보일 수 있다.The one or more target objects may be correct answer candidates for a query to be generated based on the input paragraph.

상기 RNN 인코더는, 양방향 RNN 인코더일 수 있다.The RNN encoder may be a bidirectional RNN encoder.

일 실시예에 따른 문단 내 객체 탐지 장치는, 하나 이상의 명령어를 저장하는 메모리; 및 상기 하나 이상의 명령어를 실행하는 하나 이상의 프로세서를 포함하고, 상기 하나 이상의 프로세서는, 순환 신경망(Recurrent Neural Network, RNN) 인코더를 이용하여, 입력 문단에 기초하여 생성된 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 은닉 상태 벡터(hidden state vector)를 생성하고, 상기 복수의 토큰 각각에 대한 은닉 상태 벡터에 기초하여 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터(self-attention vector)를 생성하고, 순방향 포인터 네트워크(forward pointer network) 디코더 및 역방향 포인터 네트워크(backward pointer network) 디코더를 이용하여, 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터로부터 상기 입력 문단에 포함된 하나 이상의 대상 객체를 탐지한다.An apparatus for detecting an object within a paragraph according to an embodiment includes a memory storing one or more commands; And one or more processors that execute the one or more instructions, wherein the one or more processors use a Recurrent Neural Network (RNN) encoder to generate a plurality of tokens included in a token sequence generated based on an input paragraph. generating a hidden state vector for each of the plurality of tokens, generating a self-attention vector for each of the plurality of tokens based on the hidden state vector for each of the plurality of tokens, and forward One or more target objects included in the input paragraph are detected from the self-attention vector for each of the plurality of tokens using a forward pointer network decoder and a backward pointer network decoder.

상기 순방향 포인터 네트워크 디코더는, 상기 복수의 토큰 중 t(이때, t는 0≤t≤n인 자연수, n은 상기 복수의 토큰의 총 개수)번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 시작 위치로 하는 제1 대상 객체를 탐지하고, 상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 종료 위치로 하는 제2 대상 객체를 탐지할 수 있다.The forward pointer network decoder, when a self attention vector for the t token (where t is a natural number of 0≤t≤n, and n is the total number of the plurality of tokens) among the plurality of tokens is input, the Among one or more target objects, a first target object having the t-th token as a starting position is detected, and the reverse pointer network decoder, when a self attention vector for the t-th token is input, among the one or more target objects A second target object having the t-th token as an end position may be detected.

상기 순방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 t번째 토큰의 상기 토큰 시퀀스 내 위치에 대응되는 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제1 스코어를 산출하고, 상기 산출된 제1 스코어가 가장 높은 토큰을 상기 제1 대상 객체의 종료 위치로 결정하고, 상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제2 스코어를 산출하고, 상기 복수의 토큰 중 상기 산출된 제2 스코어가 가장 높은 토큰을 상기 제2 대상 객체의 시작 위치로 결정할 수 있다.The forward pointer network decoder calculates a first score for each of the plurality of tokens based on a self attention vector for the t-th token and a position vector corresponding to a position of the t-th token in the token sequence; A token having the highest calculated first score is determined as an end position of the first target object, and the reverse pointer network decoder determines the plurality of values based on a self-attention vector for the t-th token and the position vector. A second score for each token may be calculated, and a token having the highest calculated second score among the plurality of tokens may be determined as a start position of the second target object.

상기 토큰 시퀀스는, 상기 입력 문단을 토큰화(tokenization)하여 생성된 토큰 및 상기 입력 문단에 포함되지 않은 기 설정된 토큰을 포함하고, 상기 하나 이상의 프로세서는, 상기 복수의 토큰 중 상기 제1 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제1 대상 객체가 존재하지 않는 것으로 판단하고, 상기 복수의 토큰 중 상기 제2 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제2 대상 객체가 존재하지 않는 것으로 판단할 수 있다.The token sequence includes a token generated by tokenizing the input paragraph and a predetermined token not included in the input paragraph, and the one or more processors determine that the first score is the highest among the plurality of tokens. When the high token is the preset token, it is determined that the first target object does not exist, and when the token having the highest second score among the plurality of tokens is the preset token, the second target object It can be determined that it does not exist.

상기 하나 이상의 프로세서는, 상기 입력 문단을 기 설정된 토큰 단위로 토큰화하여 상기 토큰 시퀀스를 생성하고, 상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하고, 상기 복수의 토큰 각각에 대한 토큰 벡터를 상기 RNN 인코더의 입력으로 이용하여 상기 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성할 수 있다.The one or more processors tokenize the input paragraph in predetermined token units to generate the token sequence, generate a token vector for each of the plurality of tokens, and convert the token vector for each of the plurality of tokens to the RNN. A hidden state vector for each of the plurality of tokens may be generated by using it as an input of an encoder.

상기 하나 이상의 프로세서는, 상기 입력 문단을 형태소 단위로 토큰화할 수 있다.The one or more processors may tokenize the input paragraph in units of morphemes.

상기 하나 이상의 프로세서는, 복수의 토큰 각각에 대한 임베딩(embedding) 벡터 및 복수의 토큰 각각의 자질에 대한 자질 벡터에 기초하여 상기 복수의 토큰 각각에 대한 토큰 벡터를 생성할 수 있다.The one or more processors may generate a token vector for each of the plurality of tokens based on an embedding vector for each of the plurality of tokens and a feature vector for each of the plurality of tokens.

상기 복수의 토큰 각각의 자질은, 상기 복수의 토큰 각각의 품사를 포함할 수 있다.The quality of each of the plurality of tokens may include parts of speech of each of the plurality of tokens.

상기 하나 이상의 대상 객체는, 상기 입력 문단에 기초하여 생성될 질의에 대한 정답 후보일 수 있다.The one or more target objects may be correct answer candidates for a query to be generated based on the input paragraph.

상기 RNN 인코더는, 양방향 RNN 인코더일 수 있다.The RNN encoder may be a bidirectional RNN encoder.

개시되는 실시예들에 따르면, 입력 문단에서 대상 객체를 추출하기 위해 순방향 포인터 네트워크 디코더와 역방향 포인터 네트워크 디코더를 함께 이용함으로써, 입력 문단에 시작 위치 또는 종료 위치가 동일한 복수의 대상 객체가 포함되어 있는 경우에도 효과적인 대상 객체 탐지를 가능하게 된다.According to the disclosed embodiments, by using a forward pointer network decoder and a backward pointer network decoder together to extract a target object from an input paragraph, when a plurality of target objects having the same start position or end position are included in the input paragraph It also enables effective target object detection.

도 1은 일 실시예에 따른 객체 탐지 장치의 블록도이다.
도 2는 일 실시예에 따른 대상 객체 탐지 모델의 구성을 나타낸 도면이다.
도 3은 일 실시예에 따른 RNN 인코더의 구성을 나타낸 도면이다.
도 4는 일 실시예에 따른 순방향 포인터 네트워크 디코더 및 역방향 포인터 네트워크 디코더의 구성을 나타낸 도면이다.
도 5는 일 실시예에 따른 대상 객체 검출의 일 예를 나타낸 예시도이다.
도 6은 일 실시예에 따른 객체 탐지 방법의 순서도이다.
도 7은 일 실시예에 따른 은닉 상태 벡터 생성 방법을 나타낸 순서도이다.
도 8은 일 실시예에 따른 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다.
1 is a block diagram of an object detection device according to an embodiment.
2 is a diagram showing the configuration of a target object detection model according to an embodiment.
3 is a diagram showing the configuration of an RNN encoder according to an embodiment.
4 is a diagram showing configurations of a forward pointer network decoder and a backward pointer network decoder according to an embodiment.
5 is an exemplary view illustrating an example of target object detection according to an exemplary embodiment.
6 is a flowchart of an object detection method according to an embodiment.
7 is a flowchart illustrating a method for generating a hidden state vector according to an embodiment.
8 is a block diagram illustrating a computing environment including a computing device according to an exemplary embodiment.

이하, 도면을 참조하여 구체적인 실시형태를 설명하기로 한다. 이하의 상세한 설명은 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.Hereinafter, specific embodiments will be described with reference to the drawings. The detailed descriptions that follow are provided to provide a comprehensive understanding of the methods, devices and/or systems described herein. However, this is only an example and the present invention is not limited thereto.

실시예들을 설명함에 있어서, 관련된 공지기술에 대한 구체적인 설명이 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 실시예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다.In describing the embodiments, if it is determined that a detailed description of related known technologies may unnecessarily obscure the subject matter, the detailed description will be omitted. In addition, terms to be described later are terms defined in consideration of functions, which may vary according to intentions or customs of users and operators. Therefore, the definition should be made based on the contents throughout this specification. Terminology used in the detailed description is only for describing the embodiments and should in no way be limiting. Unless expressly used otherwise, singular forms of expression include plural forms. In this description, expressions such as "comprising" or "comprising" are intended to indicate any characteristic, number, step, operation, element, portion or combination thereof, one or more other than those described. It should not be construed to exclude the existence or possibility of any other feature, number, step, operation, element, part or combination thereof.

도 1은 일 실시예에 따른 객체 탐지 장치의 블록도이다.1 is a block diagram of an object detection device according to an embodiment.

도 1을 참조하면, 일 실시예에 따른 객체 탐지 장치(100)는 토큰화부(110), 임베딩부(120) 및 탐지부(130)를 포함한다.Referring to FIG. 1 , an object detection apparatus 100 according to an embodiment includes a tokenization unit 110 , an embedding unit 120 and a detection unit 130 .

일 실시예에서, 토큰화부(110), 임베딩부(120) 및 탐지부(130)는 물리적으로 구분된 하나 이상의 장치를 이용하여 구현되거나, 하나 이상의 프로세서 또는 하나 이상의 프로세서 및 소프트웨어의 결합에 의해 구현될 수 있으며, 도시된 예와 달리 구체적 동작에 있어 명확히 구분되지 않을 수 있다.In one embodiment, the tokenization unit 110, the embedding unit 120, and the detection unit 130 are implemented using one or more physically separated devices, or implemented by one or more processors or a combination of one or more processors and software. It may be, and unlike the illustrated example, it may not be clearly distinguished in specific operations.

토큰화부(110)는 입력 문단을 기 설정된 토큰(token) 단위로 토큰화(tokenization)하고, 토큰화를 통해 생성된 복수의 토큰을 포함하는 토큰 시퀀스를 생성한다.The tokenization unit 110 tokenizes the input paragraph in units of predetermined tokens, and generates a token sequence including a plurality of tokens generated through tokenization.

이때, 입력 문단은 하나 이상의 자연어 문장으로 구성될 수 있다.In this case, the input paragraph may be composed of one or more natural language sentences.

일 실시예에 따르면, 토큰화부(110)는 입력 문단에 대한 형태소 분석을 통해 입력 문단을 형태소 단위로 분할하여 입력 문단을 토큰화할 수 있다. 그러나, 입력 문단을 토큰화하기 위한 토큰 단위는 형태소 단위 외에도 어절 단위, 단어 단위 등일 수 있으며, 실시예에 따라 변경될 수 있다. According to an embodiment, the tokenization unit 110 may tokenize the input paragraph by dividing the input paragraph into morpheme units through morpheme analysis of the input paragraph. However, a token unit for tokenizing an input paragraph may be a word unit or a word unit in addition to a morpheme unit, and may be changed according to embodiments.

한편, 토큰 시퀀스는 입력 문단에 대한 토큰화를 통해 생성된 복수의 토큰을 입력 문단 내 위치의 순서대로 정렬한 것을 의미한다. 일 실시예에 따르면, 토큰 시퀀스는 입력 문단을 토큰화하여 생성된 토큰 외에도 기 설정된 하나 이상의 토큰을 포함할 수 있다. Meanwhile, the token sequence means that a plurality of tokens generated through tokenization of an input paragraph are arranged in the order of positions within the input paragraph. According to an embodiment, the token sequence may include one or more preset tokens in addition to tokens generated by tokenizing an input paragraph.

구체적으로, 일 실시예에 따르면, 토큰 시퀀스는 입력 문단의 시작을 의미하는 시작 토큰 및 입력 문단의 종료를 나타내는 종료 토큰을 포함할 수 있다.Specifically, according to an embodiment, the token sequence may include a start token indicating the start of an input paragraph and an end token indicating the end of an input paragraph.

또한, 일 실시예에 따르면, 토큰 시퀀스는 후술할 바와 같이 입력 문단을 토큰화하여 생성된 특정 토큰을 시작 위치 또는 종료 위치로 하는 대상 객체가 존재하지 않음을 나타내기 위한 토큰(이하, "no_answer 토큰"이라 지칭한다)을 포함할 수 있다.In addition, according to one embodiment, the token sequence is a token (hereinafter referred to as "no_answer token referred to as ").

임베딩부(120)는 토큰화부(110)에 의해 생성된 토큰 시퀀스에 포함된 각 토큰에 대한 토큰 벡터를 생성한다.The embedding unit 120 generates a token vector for each token included in the token sequence generated by the tokenization unit 110 .

일 실시예에 따르면, 임베딩부(120)는 토큰 시퀀스에 포함된 각 토큰에 대한 임베딩(embedding) 벡터와 각 토큰의 자질에 대한 자질 벡터를 연결(concatenation)하여 각 토큰에 대한 토큰 벡터를 생성할 수 있다.According to an embodiment, the embedding unit 120 generates a token vector for each token by concatenating an embedding vector for each token included in the token sequence and a feature vector for each token. can

이때, 각 토큰에 대한 임베딩 벡터 및 자질 벡터는 예를 들어, Word2Vec, GloVe, FastText 등과 같은 공지된 워드 임베딩(word embedding) 기술을 이용하여 생성될 수 있다. In this case, the embedding vector and feature vector for each token may be generated using a known word embedding technology such as Word2Vec, GloVe, FastText, and the like.

한편, 일 실시예에 따르면, 각 토큰의 자질은 예를 들어, 형태소 분석을 통해 각 토큰에 태깅된 품사일 수 있으며, 실시예에 따라 각 토큰의 토큰 시퀀스 내 위치에 대응되는 위치 정보를 더 포함할 수 있다. On the other hand, according to an embodiment, the quality of each token may be, for example, a part of speech tagged to each token through morphological analysis, and according to the embodiment, location information corresponding to a position of each token in a token sequence may be further included. can do.

탐지부(130)는 대상 객체 탐지 모델을 이용하여 입력 문단에 포함된 하나 이상의 대상 객체를 탐지한다.The detection unit 130 detects one or more target objects included in the input paragraph using a target object detection model.

일 실시예에 따르면, 입력 문단에 포함된 각 대상 객체는 입력 문단에 기초하여 생성될 질의에 대한 정답 후보일 수 있다. 예를 들어, 대상 객체가 탐지된 입력 문단은 탐지된 대상 객체와 함께 질의 생성 모델의 입력으로 이용될 수 있으며, 이 경우, 질의 생성 모델은 입력된 문단과 대상 객체에 적합한 질문을 생성할 수 있다.According to an embodiment, each target object included in the input paragraph may be a candidate for a correct answer to a query to be generated based on the input paragraph. For example, an input paragraph in which a target object is detected may be used as an input of a query generation model together with the detected target object, and in this case, the query generation model may generate a question suitable for the input paragraph and the target object. .

한편, 대상 객체 탐지 모델은 인공 신경망(artificial neural network) 기반의 모델로서 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 토큰 벡터를 입력받아 입력 문단에 포함된 하나 이상의 대상 객체 각각의 시작 위치와 종료 위치를 탐지하도록 사전 학습될 수 있다.On the other hand, the target object detection model is an artificial neural network-based model that receives a token vector for each of a plurality of tokens included in a token sequence, and the start position and end position of each of one or more target objects included in the input paragraph. can be pretrained to detect

도 2는 일 실시예에 따른 대상 객체 탐지 모델의 구성을 나타낸 도면이다.2 is a diagram showing the configuration of a target object detection model according to an embodiment.

도 2를 참조하면, 일 실시예에 따른 객체 탐지 모델(100)은 인코딩 계층(encoding layer)(210), 주의 집중 계층(attention layer)(220) 및 디코딩 계층(decoding layer)(230)를 포함한다.Referring to FIG. 2 , an object detection model 100 according to an embodiment includes an encoding layer 210, an attention layer 220, and a decoding layer 230. do.

인코딩 계층(210)은 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 토큰 벡터를 인코딩하는 순환 신경망(Recurrent Neural Network, RNN) 인코더를 포함할 수 있다.The encoding layer 210 may include a Recurrent Neural Network (RNN) encoder that encodes a token vector for each of a plurality of tokens included in the token sequence.

일 실시예에 따르면, RNN 인코더는 예를 들어, GRU(Gated Recurrent Unit) 또는 LSTM(Long Short-Term Memory)을 이용하여 구현된 양방향 RNN(Bidirectional RNN) 인코더일 수 있다.According to an embodiment, the RNN encoder may be, for example, a bidirectional RNN (RNN) encoder implemented using a gated recurrent unit (GRU) or long short-term memory (LSTM).

구체적으로, 도 3은 일 실시예에 따른 RNN 인코더의 구성을 나타낸 도면이다.Specifically, FIG. 3 is a diagram showing the configuration of an RNN encoder according to an embodiment.

도 3을 참조하면, 인코딩 계층(210)에 포함된 순방향 RNN(211)은 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 토큰 벡터를 토큰 시퀀스 내 순서대로 입력 받아 복수의 토큰 각각에 대한 은닉 상태 벡터(hidden state vector)를 생성한다. 구체적으로, 토큰 시퀀스 내 t(이때, t는 0≤t≤n인 자연수, n은 토큰 시퀀스에 포함된 토큰의 총 개수)번째 토큰에 대한 순방향 RNN(211)의 은닉 상태 벡터

Figure 112020106709144-pat00001
는 아래의 수학식 1과 같이 t-1번째 토큰의 토큰 벡터
Figure 112020106709144-pat00002
에 대한 순방향 RNN(211)의 은닉 상태 벡터
Figure 112020106709144-pat00003
및 t번째 토큰의 토큰 벡터
Figure 112020106709144-pat00004
를 이용하여 생성될 수 있다.Referring to FIG. 3, the forward RNN 211 included in the encoding layer 210 receives a token vector for each of a plurality of tokens included in the token sequence in order within the token sequence, and generates a hidden state vector for each of the plurality of tokens. (hidden state vector) is created. Specifically, the hidden state vector of the forward RNN 211 for the tth token in the token sequence (where t is a natural number of 0≤t≤n, and n is the total number of tokens included in the token sequence)
Figure 112020106709144-pat00001
Is the token vector of the t-1th token as shown in Equation 1 below
Figure 112020106709144-pat00002
Hidden state vector of forward RNN (211) for
Figure 112020106709144-pat00003
and the token vector of the tth token
Figure 112020106709144-pat00004
can be created using

[수학식 1] [Equation 1]

Figure 112020106709144-pat00005
Figure 112020106709144-pat00005

수학식 1에서, f는 비선형 활성화 함수(non-linear active function)를 나타내며, 예를 들어 LSTM(Long-Short Term Memory) 또는 GRU(Gated Recurrent Unit)일 수 있다. 이하, f는 동일한 의미로 사용된다.In Equation 1, f represents a non-linear active function, and may be, for example, Long-Short Term Memory (LSTM) or Gated Recurrent Unit (GRU). Hereinafter, f is used with the same meaning.

한편, 인코딩 계층(210)에 포함된 역방향 RNN(212)은 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 토큰 벡터를 토큰 시퀀스 내 순서의 역순으로 입력 받아 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성한다. 구체적으로, 토큰 시퀀스 내 t번째 토큰에 대한 역방향 RNN(212)의 은닉 상태 벡터

Figure 112020106709144-pat00006
는 아래의 수학식 2와 같이 t+1번째 토큰의 토큰 벡터
Figure 112020106709144-pat00007
에 대한 역방향 RNN(212)의 은닉 상태 벡터
Figure 112020106709144-pat00008
및 t번째 토큰의 토큰 벡터
Figure 112020106709144-pat00009
를 이용하여 생성될 수 있다.Meanwhile, the reverse RNN 212 included in the encoding layer 210 receives a token vector for each of a plurality of tokens included in the token sequence in the reverse order of the order in the token sequence, and generates a hidden state vector for each of the plurality of tokens do. Specifically, the hidden state vector of the reverse RNN 212 for the tth token in the token sequence
Figure 112020106709144-pat00006
is the token vector of the t+1th token as shown in Equation 2 below
Figure 112020106709144-pat00007
Hidden state vector of reverse RNN (212) for
Figure 112020106709144-pat00008
and the token vector of the tth token
Figure 112020106709144-pat00009
can be created using

[수학식 2][Equation 2]

Figure 112020106709144-pat00010
Figure 112020106709144-pat00010

한편, 인코딩 계층(210)은 아래의 수학식 3과 같이 순방향 RNN(211)의 은닉 상태 벡터

Figure 112020106709144-pat00011
와 역방향 RNN(212)의 은닉 상태 벡터
Figure 112020106709144-pat00012
를 연결(concatenate)한 벡터
Figure 112020106709144-pat00013
를 토큰 시퀀스에 포함된 t번째 토큰에 대한 은닉 상태 벡터로 출력할 수 있다.On the other hand, the encoding layer 210 is the hidden state vector of the forward RNN 211 as shown in Equation 3 below
Figure 112020106709144-pat00011
and the hidden state vector of the reverse RNN (212)
Figure 112020106709144-pat00012
vector concatenated
Figure 112020106709144-pat00013
can be output as a hidden state vector for the tth token included in the token sequence.

[수학식 3][Equation 3]

Figure 112020106709144-pat00014
Figure 112020106709144-pat00014

다시 도 2를 참조하면, 주의 집중 계층(220)은 인코딩 계층(210)에서 생성된 각 은닉 상태 벡터

Figure 112020106709144-pat00015
에 대한 자가 주의 집중(self-attention) 벡터를 생성한다.Referring back to FIG. 2, the attentional focus layer 220 generates each hidden state vector generated by the encoding layer 210
Figure 112020106709144-pat00015
Create a self-attention vector for .

일 실시예에 따르면, 은닉 상태 벡터

Figure 112020106709144-pat00016
에 대한 자가 주의 집중 벡터
Figure 112020106709144-pat00017
는 아래의 수학식 4에 기초하여 산출될 수 있다.According to one embodiment, the hidden state vector
Figure 112020106709144-pat00016
Self attention vector for
Figure 112020106709144-pat00017
Can be calculated based on Equation 4 below.

[수학식 4][Equation 4]

Figure 112020106709144-pat00018
Figure 112020106709144-pat00018

이때,

Figure 112020106709144-pat00019
이고,
Figure 112020106709144-pat00020
Figure 112020106709144-pat00021
의 차원(dimension)을 나타낸다. 이하, Q, K, V 및
Figure 112020106709144-pat00022
는 동일한 의미로 이용된다.At this time,
Figure 112020106709144-pat00019
ego,
Figure 112020106709144-pat00020
Is
Figure 112020106709144-pat00021
represents the dimension of Hereinafter, Q, K, V and
Figure 112020106709144-pat00022
is used with the same meaning.

한편, 일 실시예에 따르면, 은닉 상태 벡터

Figure 112020106709144-pat00023
에 대한 자가 주의 집중 벡터
Figure 112020106709144-pat00024
는 멀티-헤드 주의 집중(multi-head attention) 기법을 통해 결정될 수 있다. 구체적으로, 멀티-헤드 주의 집중 기법을 이용한 자가 주의 집중 벡터는 아래의 수학식 5에 기초하여 산출될 수 있다.On the other hand, according to an embodiment, the hidden state vector
Figure 112020106709144-pat00023
Self attention vector for
Figure 112020106709144-pat00024
may be determined through a multi-head attention technique. Specifically, the self-attention vector using the multi-head attention-focusing technique can be calculated based on Equation 5 below.

[수학식 5][Equation 5]

Figure 112020106709144-pat00025
Figure 112020106709144-pat00025

이때, N은 헤드의 개수로서 사전 설정된 값을 나타내며, Wc는 학습된 가중치 행렬을 나타낸다. At this time, N represents a preset value as the number of heads, and W c represents a learned weight matrix.

한편, 수학식 5에서

Figure 112020106709144-pat00026
는 아래의 수학식 6을 이용하여 산출될 수 있다.On the other hand, in Equation 5
Figure 112020106709144-pat00026
Can be calculated using Equation 6 below.

[수학식 6][Equation 6]

Figure 112020106709144-pat00027
Figure 112020106709144-pat00027

또한, 수학식 6에서 Qi, Ki 및 Vi는 각각 아래의 수학식 7 내지 9와 같이 Q, K 및 V를 각각 헤드의 개수인 N개로 분할한 후, 학습된 가중치 행렬

Figure 112020106709144-pat00028
,
Figure 112020106709144-pat00029
Figure 112020106709144-pat00030
를 곱함으로써 산출될 수 있다.In addition, in Equation 6, Q i , K i , and V i are learned weight matrices after dividing Q i , K i , and V i into N heads, respectively, as shown in Equations 7 to 9 below.
Figure 112020106709144-pat00028
,
Figure 112020106709144-pat00029
and
Figure 112020106709144-pat00030
It can be calculated by multiplying

[수학식 7][Equation 7]

Figure 112020106709144-pat00031
Figure 112020106709144-pat00031

[수학식 8][Equation 8]

Figure 112020106709144-pat00032
Figure 112020106709144-pat00032

[수학식 9][Equation 9]

Figure 112020106709144-pat00033
Figure 112020106709144-pat00033

디코딩 계층(230)은 순방향 포인터 네트워크(forward pointer network) 디코더 및 역방향 포인터 네트워크(backward pointer network) 디코더를 이용하여, 주의 집중 계층(220)에 의해 생성된 자가 주의 집중 벡터

Figure 112020106709144-pat00034
로부터 입력 문단에 포함된 하나 이상의 대상 객체를 탐지한다.The decoding layer 230 uses a forward pointer network decoder and a backward pointer network decoder to generate the self attention vector generated by the attention layer 220.
Figure 112020106709144-pat00034
Detect one or more target objects included in the input paragraph from

이때, 일 실시예에 따르면, 입력 문단에 포함된 하나 이상의 대상 객체는 각각 상술한 바와 같이 입력 문단에 기초하여 생성될 질의에 대한 정답 후보일 수 있다.In this case, according to an embodiment, one or more target objects included in the input paragraph may be correct answer candidates for a query to be generated based on the input paragraph, as described above.

도 4는 일 실시예에 따른 순방향 포인터 네트워크 디코더 및 역방향 포인터 네트워크 디코더의 구성을 나타낸 도면이다.4 is a diagram showing configurations of a forward pointer network decoder and a backward pointer network decoder according to an embodiment.

도 4를 참조하면, 순방향 포인터 네트워크 디코더(231)는 토큰 시퀀스에 포함된 t번째 토큰의 은닉 상태 벡터

Figure 112020106709144-pat00035
에 대한 주의 집중 벡터
Figure 112020106709144-pat00036
에 기초하여, 입력 문단에 포함된 하나 이상의 대상 객체 중 t번째 토큰을 시작 위치로 하는 대상 객체를 탐지할 수 있다.Referring to FIG. 4, the forward pointer network decoder 231 calculates the hidden state vector of the t-th token included in the token sequence.
Figure 112020106709144-pat00035
Attention vector for
Figure 112020106709144-pat00036
Based on , a target object having the tth token as a starting position among one or more target objects included in the input paragraph may be detected.

구체적으로, 순방향 포인터 네트워크 디코더(231)는 토큰 시퀀스에 포함된 t번째 토큰에 대응되는 주의 집중 벡터

Figure 112020106709144-pat00037
및 t번째 토큰의 토큰 시퀀스 내 위치인 t에 대응되는 위치 벡터
Figure 112020106709144-pat00038
에 기초하여 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 스코어를 산출할 수 있다. 이때, 위치 벡터
Figure 112020106709144-pat00039
는 토큰의 위치에 따라 특정한 값을 가지도록 사전 설정된 벡터일 수 있다.Specifically, the forward pointer network decoder 231 generates an attention vector corresponding to the t-th token included in the token sequence.
Figure 112020106709144-pat00037
and a position vector corresponding to t, the position in the token sequence of the tth token.
Figure 112020106709144-pat00038
It is possible to calculate a score for each of a plurality of tokens included in the token sequence based on. In this case, the position vector
Figure 112020106709144-pat00039
may be a vector preset to have a specific value according to the position of the token.

또한, 순방향 포인터 네트워크 디코더(231)는 토큰 시퀀스에 포함된 복수의 토큰 중 산출된 스코어가 가장 높은 토큰을 t번째 토큰을 시작 위치로 하는 대상 객체의 종료 위치로 결정할 수 있다.In addition, the forward pointer network decoder 231 may determine a token having the highest calculated score among a plurality of tokens included in the token sequence as an end position of the target object having the tth token as a start position.

구체적으로, 순방향 포인터 네트워크 디코더(231)의 은닉 상태 벡터

Figure 112020106709144-pat00040
는 아래의 수학식 10를 이용하여 산출될 수 있다.Specifically, the hidden state vector of the forward pointer network decoder 231
Figure 112020106709144-pat00040
Can be calculated using Equation 10 below.

[수학식 10][Equation 10]

Figure 112020106709144-pat00041
Figure 112020106709144-pat00041

또한, 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 스코어는 아래의 수학식 11 및 12를 이용하여 산출될 수 있다.In addition, scores for each of a plurality of tokens included in the token sequence may be calculated using Equations 11 and 12 below.

[수학식 11][Equation 11]

Figure 112020106709144-pat00042
Figure 112020106709144-pat00042

[수학식 12][Equation 12]

Figure 112020106709144-pat00043
Figure 112020106709144-pat00043

한편, 수학식 11에서

Figure 112020106709144-pat00044
는 스코어 함수를 나타내며, 이하 동일한 의미로 이용된다. 스코어 함수
Figure 112020106709144-pat00045
는 예를 들어, tanh 함수를 활성화 함수로 이용하는 앞 먹임 신경망(Feed-Forward Neural Network, FNN)로 구현될 수 있으며, 이 경우, 수학식 11은 아래의 수학식 13와 같이 표현될 수 있다. On the other hand, in Equation 11
Figure 112020106709144-pat00044
denotes a score function, and is used in the same meaning below. score function
Figure 112020106709144-pat00045
Can be implemented as, for example, a Feed-Forward Neural Network (FNN) using the tanh function as an activation function, and in this case, Equation 11 can be expressed as Equation 13 below.

[수학식 13] [Equation 13]

Figure 112020106709144-pat00046
Figure 112020106709144-pat00046

이때,

Figure 112020106709144-pat00047
Figure 112020106709144-pat00048
는 각각 학습된 가중치 행렬을 나타낸다.At this time,
Figure 112020106709144-pat00047
and
Figure 112020106709144-pat00048
denotes a learned weight matrix, respectively.

한편, 순방향 포인터 네트워크 디코더(231)는 토큰 시퀀스에 포함된 복수의 토큰 중 상술한 수학식 11 및 12에 따라 산출된 스코어가 최대인 토큰을 t번째 토큰을 시작 위치로 하는 대상 객체의 종료 위치로 결정할 수 있다.Meanwhile, the forward pointer network decoder 231 selects a token having the maximum score calculated according to Equations 11 and 12 among a plurality of tokens included in the token sequence as the end position of the target object having the t-th token as the start position. can decide

한편, 일 실시예에 따르면, 상술한 바와 같이 토큰 시퀀스에 no_answer 토큰이 포함되어 있고, 순방향 포인터 네트워크 디코더(231)에 의해 산출된 스코어 중 no_answer 토큰의 스코어가 가장 높은 경우, 탐지부(120)는 입력 문단에 t번째 토큰을 시작 위치로 하는 대상 객체가 포함되어 있지 않는 것으로 판단할 수 있다.On the other hand, according to an embodiment, as described above, when the no_answer token is included in the token sequence and the score of the no_answer token is the highest among the scores calculated by the forward pointer network decoder 231, the detection unit 120 It may be determined that the input paragraph does not include a target object starting at the tth token.

역방향 포인터 네트워크 디코더(232)는 t번째 토큰의 은닉 상태 벡터

Figure 112020106709144-pat00049
에 대한 주의 집중 벡터
Figure 112020106709144-pat00050
에 기초하여, 입력 문단에 포함된 하나 이상의 대상 객체 중 토큰 시퀀스에 포함된 t번째 토큰을 종료 위치로 하는 대상 객체를 탐지할 수 있다.The reverse pointer network decoder 232 uses the hidden state vector of the tth token
Figure 112020106709144-pat00049
Attention vector for
Figure 112020106709144-pat00050
Based on , a target object having the tth token included in the token sequence as an end position among one or more target objects included in the input paragraph may be detected.

구체적으로, 역방향 포인터 네트워크 디코더(232)는 토큰 시퀀스에 포함된 t번째 토큰에 대응되는 주의 집중 벡터

Figure 112020106709144-pat00051
및 t번째 토큰의 토큰 시퀀스 내 위치인 t에 대응되는 위치 벡터
Figure 112020106709144-pat00052
에 기초하여 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 스코어를 산출할 수 있다. Specifically, the reverse pointer network decoder 232 generates an attention vector corresponding to the tth token included in the token sequence.
Figure 112020106709144-pat00051
and a position vector corresponding to t, the position in the token sequence of the tth token.
Figure 112020106709144-pat00052
It is possible to calculate a score for each of a plurality of tokens included in the token sequence based on.

또한, 역방향 포인터 네트워크 디코더(232)는 토큰 시퀀스에 포함된 복수의 토큰 중 산출된 스코어가 가장 높은 토큰을 t번째 토큰을 종료 위치로 하는 대상 객체의 시작 위치로 결정할 수 있다.In addition, the reverse pointer network decoder 232 may determine a token having the highest calculated score among a plurality of tokens included in the token sequence as the start position of the target object having the t-th token as the end position.

구체적으로, 역방향 포인터 네트워크 디코더(232)의 은닉 상태 벡터

Figure 112020106709144-pat00053
는 아래의 수학식 14를 이용하여 산출될 수 있다.Specifically, the hidden state vector of the reverse pointer network decoder 232
Figure 112020106709144-pat00053
Can be calculated using Equation 14 below.

[수학식 14][Equation 14]

Figure 112020106709144-pat00054
Figure 112020106709144-pat00054

또한, 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 스코어는 아래의 수학식 15 및 16을 이용하여 산출될 수 있다.In addition, scores for each of a plurality of tokens included in the token sequence may be calculated using Equations 15 and 16 below.

[수학식 15][Equation 15]

Figure 112020106709144-pat00055
Figure 112020106709144-pat00055

[수학식 16][Equation 16]

Figure 112020106709144-pat00056
Figure 112020106709144-pat00056

한편, 스코어 함수

Figure 112020106709144-pat00057
가 예를 들어, tanh 함수를 활성화 함수로 이용하는 FNN으로 구현된 경우, 수학식 15는 아래의 수학식 17와 같이 표현될 수 있다. On the other hand, the score function
Figure 112020106709144-pat00057
When is implemented as an FNN using, for example, the tanh function as an activation function, Equation 15 may be expressed as Equation 17 below.

[수학식 17] [Equation 17]

Figure 112020106709144-pat00058
Figure 112020106709144-pat00058

역방향 포인터 네트워크 디코더(232)는 토큰 시퀀스에 포함된 복수의 토큰 중 상술한 수학식 15 및 16에 따라 산출된 스코어가 최대인 토큰을 t번째 토큰을 종료 위치로 하는 대상 객체의 시작 위치로 결정할 수 있다.The reverse pointer network decoder 232 determines the token having the maximum score calculated according to Equations 15 and 16 among the plurality of tokens included in the token sequence as the start position of the target object having the t-th token as the end position. there is.

한편, 일 실시예에 따르면, 상술한 바와 같이 토큰 시퀀스에 no_answer 토큰이 포함되어 있고, 역방향 포인터 네트워크 디코더(232)에 의해 산출된 스코어 중 no_answer 토큰의 스코어가 가장 높은 경우, 탐지부(120)는 입력 문단에 t번째 토큰을 종료 위치로 하는 대상 객체가 포함되어 있지 않는 것으로 판단할 수 있다.On the other hand, according to an embodiment, as described above, when the no_answer token is included in the token sequence and the score of the no_answer token is the highest among the scores calculated by the reverse pointer network decoder 232, the detection unit 120 It can be determined that the input paragraph does not include the target object whose end position is the t-th token.

도 5는 일 실시예에 따른 대상 객체 검출의 일 예를 나타낸 예시도이다.5 is an exemplary view illustrating an example of target object detection according to an exemplary embodiment.

도 5에서는 입력 문단이 하나의 문장 "세종은 조선의 4대 군주이며 언어학자이다."로 구성된 것으로 가정하고, 입력 문단에 포함된 대상 객체가 "4대 군주", "언어학자" 및 "4대 군주이며 언어학자"인 것으로 가정한다.In FIG. 5, it is assumed that the input paragraph is composed of one sentence “Sejong is the fourth monarch of Joseon and a linguist.” It is assumed that he is an overlord and a linguist".

이때, "4대 군주"와 "언어학자"는 각각 "4대 군주이며 언어학자"에 포함된 대상 객체로서 "4대 군주이며 언어학자"와 시작 위치 또는 종료 위치가 동일한 안긴 객체이다.In this case, "four monarchs" and "linguist" are target objects included in "four monarchs and linguists", respectively.

이 경우, 탐지부(130)는 순방향 포인터 네트워크 디코더(231)를 이용하여 도 5의 (a)와 같이 "4대"를 시작 위치로 하고 "학자"를 종료 위치로 하는 대상 객체인 "4대 군주이며 언어학자"와 "언어"를 시작 위치로 하고 "학자"를 종료 위치로 하는 대상 객체 "언어 학자"를 탐지할 수 있다.In this case, the detection unit 130 uses the forward pointer network decoder 231 as shown in FIG. It is a monarch and can detect the target object "linguist" with "linguist" and "language" as the starting position and "scholar" as the ending position.

즉, 순방향 포인터 네트워크 디코더(231)만을 이용하는 경우, 시작 위치가 동일한 대상 객체 "4대 군주"와 "4대 군주이며 언어학자" 중 하나만을 탐지할 수 있다.That is, in the case of using only the forward pointer network decoder 231, only one of the target objects "four monarchs" and "four monarchs and linguists" having the same start position can be detected.

한편, 탐지부(130)는 역방향 포인터 네트워크 디코더(232)를 이용하여 도 5의 (b)와 같이 "군주"를 종료 위치로 하고 "4대"를 시작 위치로 하는 대상 객체인 "4대 군주"와 "학자"를 종료 위치로 하고 "4대"를 시작 위치로 하는 대상 객체 "4대 군주이며 언어학자"를 탐지할 수 있다.On the other hand, the detection unit 130 uses the reverse pointer network decoder 232 as shown in FIG. It is possible to detect the target object "four rulers and linguists" with " and "scholar" as the end position and "four generations" as the start position.

즉, 역방향 포인터 네트워크 디코더(232)만을 이용하는 경우, 종료 위치가 동일한 대상 객체 "언어학자"와 "4대 군주이며 언어학자" 중 하나만을 탐지할 수 있다.That is, in the case of using only the reverse pointer network decoder 232, only one of the target objects "linguist" and "four monarchs and linguists" having the same end position can be detected.

도 5에 도시된 예에서 알 수 있듯이, 순방향 포인터 네트워크 디코더(231) 및 역방향 포인터 네트워크 디코더(232) 중 하나만을 이용하는 경우, 시작 위치나 종료 위치가 동일한 복수의 대상 객체를 모두 탐지할 수 없으나, 순방향 포인터 네트워크 디코더(231)와 역방향 포인터 네트워크 디코더(232)를 모두 이용하는 경우, "4대 군주", 언어학자" 및 "4대 군주이며 언어학자"를 모두 탐지할 수 있게 된다.As can be seen from the example shown in FIG. 5, when only one of the forward pointer network decoder 231 and the reverse pointer network decoder 232 is used, all of a plurality of target objects having the same start position or end position cannot be detected. In the case of using both the forward pointer network decoder 231 and the reverse pointer network decoder 232, it is possible to detect both "four monarchs", linguists and "four monarchs and linguists".

도 6은 일 실시예에 따른 객체 탐지 방법의 순서도이다.6 is a flowchart of an object detection method according to an embodiment.

도 6에 도시된 방법은 예를 들어, 도 1에 도시된 객체 탐지 장치(100)에 의해 수행될 수 있다.The method illustrated in FIG. 6 may be performed by, for example, the object detection apparatus 100 illustrated in FIG. 1 .

도 6을 참조하면, 우선, 객체 탐지 장치(100)는 RNN 인코더를 이용하여, 입력 문단에 기초하여 생성된 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성한다(610).Referring to FIG. 6 , the object detection apparatus 100 first generates a hidden state vector for each of a plurality of tokens included in a token sequence generated based on an input paragraph using an RNN encoder (610).

이때, 일 실시예에 따르면, RNN 인코더는 양방향 RNN 인코더일 수 있다. In this case, according to an embodiment, the RNN encoder may be a bidirectional RNN encoder.

이후, 객체 탐지 장치(100)는 복수의 토큰 각각에 대한 은닉 상태 벡터에 기초하여 복수의 토큰 각각에 대한 자가 주의 집중 벡터를 생성한다(620).Thereafter, the object detection apparatus 100 generates a self attention vector for each of the plurality of tokens based on the concealment state vector for each of the plurality of tokens (620).

이후, 객체 탐지 장치(100)는 순방향 포인터 네트워크 디코더 및 역방향 포인터 네트워크 디코더를 이용하여, 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 자가 주의 집중 벡터로부터 입력 문단에 포함된 하나 이상의 대상 객체를 탐지한다(630).Thereafter, the object detection apparatus 100 detects one or more target objects included in the input paragraph from the self-attention vector for each of a plurality of tokens included in the token sequence by using the forward pointer network decoder and the reverse pointer network decoder. (630).

이때, 일 실시예에 따르면, 순방향 포인터 네트워크 디코더는, 토큰 시퀀스에 포함된 복수의 토큰 중 t번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, t번째 토큰을 시작 위치로 하는 제1 대상 객체를 탐지할 수 있다. 구체적으로, 순방향 포인터 네트워크 디코더는, t번째 토큰에 대한 자가 주의 집중 벡터 및 t번째 토큰의 토큰 시퀀스 내 위치에 대응되는 위치 벡터에 기초하여 복수의 토큰 각각에 대한 스코어를 산출하고, 산출된 스코어가 가장 높은 토큰을 제1 대상 객체의 종료 위치로 결정할 수 있다.In this case, according to an embodiment, the forward pointer network decoder selects the first target object having the t-th token as a starting position when the self attention vector for the t-th token among the plurality of tokens included in the token sequence is input. can detect Specifically, the forward pointer network decoder calculates a score for each of a plurality of tokens based on a self-attention vector for the t-th token and a position vector corresponding to a position of the t-th token in the token sequence, and the calculated score is The highest token may be determined as an end position of the first target object.

또한, 일 실시예에 따르면, 역방향 포인터 네트워크 디코더는, 토큰 시퀀스에 포함된 복수의 토큰 중 t번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, t번째 토큰을 종료 위치로 하는 제2 대상 객체를 탐지할 수 있다. 구체적으로, 역방향 포인터 네트워크 디코더는, t번째 토큰에 대한 자가 주의 집중 벡터 및 t번째 토큰의 토큰 시퀀스 내 위치에 대응되는 위치 벡터에 기초하여 복수의 토큰 각각에 대한 스코어를 산출하고, 산출된 스코어가 가장 높은 토큰을 제2 대상 객체의 시작 위치로 결정할 수 있다.In addition, according to an embodiment, the reverse pointer network decoder, when the self attention vector for the t-th token among the plurality of tokens included in the token sequence is input, selects the second target object having the t-th token as an end position can detect Specifically, the reverse pointer network decoder calculates a score for each of a plurality of tokens based on a self-attention vector for the t-th token and a position vector corresponding to a position of the t-th token in the token sequence, and the calculated score is The highest token may be determined as the start position of the second target object.

한편, 일 실시예에 따르면, 토큰 시퀀스는 no_answer 토큰을 포함할 수 있다. 이 경우, 객체 탐지 장치(100)는 토큰 시퀀스에 포함된 복수의 토큰 중 순방향 포인터 네트워크 디코더에 의해 산출된 스코어가 가장 높은 토큰이 no_answer 토큰인 경우, 제1 대상 객체가 존재하지 않는 것으로 판단할 수 있다. 또한, 객체 탐지 장치(100)는 토큰 시퀀스에 포함된 복수의 토큰 중 역방향 포인터 네트워크 디코더에 의해 산출된 스코어가 가장 높은 토큰이 no_answer 토큰인 경우, 제2 대상 객체가 존재하지 않는 것으로 판단할 수 있다.Meanwhile, according to an embodiment, the token sequence may include a no_answer token. In this case, the object detection apparatus 100 may determine that the first target object does not exist when a token having the highest score calculated by the forward pointer network decoder among a plurality of tokens included in the token sequence is the no_answer token. there is. In addition, the object detection apparatus 100 may determine that the second target object does not exist when a token having the highest score calculated by the reverse pointer network decoder among a plurality of tokens included in the token sequence is a no_answer token. .

한편, 도 5에 도시된 순서도에서 적어도 일부의 단계들은 다른 단계와 결합되어 함께 수행되거나, 생략되거나, 세부 단계들로 나뉘어 수행되거나, 또는 도시되지 않은 하나 이상의 단계가 부가되어 수행될 수 있다.Meanwhile, in the flowchart shown in FIG. 5, at least some of the steps may be combined with other steps and performed together, omitted, divided into detailed steps, or performed by adding one or more steps not shown.

도 7은 일 실시예에 따른 은닉 상태 벡터 생성 방법을 나타낸 순서도이다.7 is a flowchart illustrating a method for generating a hidden state vector according to an embodiment.

도 7에 도시된 방법은 예를 들어, 도 1에 도시된 객체 탐지 장치(100)에 의해 수행될 수 있다.The method illustrated in FIG. 7 may be performed by, for example, the object detection apparatus 100 illustrated in FIG. 1 .

도 7을 참조하면, 우선, 객체 탐지 장치(100)는 입력 문단을 기 설정된 토큰 단위로 토큰화하여 토큰 시퀀스를 생성한다(710).Referring to FIG. 7 , first, the object detection apparatus 100 tokenizes an input paragraph in units of preset tokens to generate a token sequence (710).

이때, 일 실시예에 따르면, 객체 탐지 장치(100)는 입력 문단을 형태소 단위로 토큰화할 수 있다.In this case, according to an embodiment, the object detection apparatus 100 may tokenize the input paragraph in units of morphemes.

이후, 객체 탐지 장치(100)는 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 토큰 벡터를 생성한다(720).Thereafter, the object detection apparatus 100 generates a token vector for each of a plurality of tokens included in the token sequence (720).

일 실시예에 따르면, 객체 탐지 장치(100)는 복수의 토큰 각각에 대한 임베딩 벡터 및 복수의 토큰 각각의 자질에 대한 자질 벡터에 기초하여 복수의 토큰 각각에 대한 토큰 벡터를 생성할 수 있다. 이때, 복수의 토큰 각각의 자질은 복수의 토큰 각각의 품사를 포함할 수 있다.According to an embodiment, the object detection apparatus 100 may generate a token vector for each of a plurality of tokens based on an embedding vector for each of the plurality of tokens and a feature vector for each of the plurality of tokens. In this case, the quality of each of the plurality of tokens may include parts of speech of each of the plurality of tokens.

이후, 객체 탐지 장치(100)는 복수의 토큰 각각에 대한 토큰 벡터를 RNN 인코더의 입력으로 이용하여 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성한다(730).Thereafter, the object detection apparatus 100 generates a hidden state vector for each of the plurality of tokens by using the token vector for each of the plurality of tokens as an input of the RNN encoder (730).

도 8은 일 실시예에 따른 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다. 8 is a block diagram illustrating a computing environment including a computing device according to an exemplary embodiment.

도 8에 도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술된 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.In the embodiment shown in FIG. 8 , each component may have different functions and capabilities other than those described below, and may include additional components other than those described below.

도시된 컴퓨팅 환경(10)은 컴퓨팅 장치(12)를 포함한다. 일 실시예에서, 컴퓨팅 장치(12)는 도 1에 도시된 객체 탐지 장치(100)에 포함되는 하나 이상의 컴포넌트일 수 있다.The illustrated computing environment 10 includes a computing device 12 . In one embodiment, computing device 12 may be one or more components included in object detection device 100 shown in FIG. 1 .

컴퓨팅 장치(12)는 적어도 하나의 프로세서(14), 컴퓨터 판독 가능 저장 매체(16) 및 통신 버스(18)를 포함한다. 프로세서(14)는 컴퓨팅 장치(12)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(14)는 컴퓨터 판독 가능 저장 매체(16)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(14)에 의해 실행되는 경우 컴퓨팅 장치(12)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다.Computing device 12 includes at least one processor 14 , a computer readable storage medium 16 and a communication bus 18 . Processor 14 may cause computing device 12 to operate according to the above-mentioned example embodiments. For example, processor 14 may execute one or more programs stored on computer readable storage medium 16 . The one or more programs may include one or more computer-executable instructions, which when executed by processor 14 are configured to cause computing device 12 to perform operations in accordance with an illustrative embodiment. It can be.

컴퓨터 판독 가능 저장 매체(16)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능 저장 매체(16)에 저장된 프로그램(20)은 프로세서(14)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(16)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(12)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.Computer-readable storage medium 16 is configured to store computer-executable instructions or program code, program data, and/or other suitable form of information. Program 20 stored on computer readable storage medium 16 includes a set of instructions executable by processor 14 . In one embodiment, computer readable storage medium 16 includes memory (volatile memory such as random access memory, non-volatile memory, or a suitable combination thereof), one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, other forms of storage media that can be accessed by computing device 12 and store desired information, or any suitable combination thereof.

통신 버스(18)는 프로세서(14), 컴퓨터 판독 가능 저장 매체(16)를 포함하여 컴퓨팅 장치(12)의 다른 다양한 컴포넌트들을 상호 연결한다.Communications bus 18 interconnects various other components of computing device 12, including processor 14 and computer-readable storage medium 16.

컴퓨팅 장치(12)는 또한 하나 이상의 입출력 장치(24)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(22) 및 하나 이상의 네트워크 통신 인터페이스(26)를 포함할 수 있다. 입출력 인터페이스(22) 및 네트워크 통신 인터페이스(26)는 통신 버스(18)에 연결된다. 입출력 장치(24)는 입출력 인터페이스(22)를 통해 컴퓨팅 장치(12)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(24)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(24)는 컴퓨팅 장치(12)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(12)의 내부에 포함될 수도 있고, 컴퓨팅 장치(12)와는 구별되는 별개의 장치로 컴퓨팅 장치(12)와 연결될 수도 있다.Computing device 12 may also include one or more input/output interfaces 22 and one or more network communication interfaces 26 that provide interfaces for one or more input/output devices 24 . An input/output interface 22 and a network communication interface 26 are connected to the communication bus 18 . Input/output device 24 may be coupled to other components of computing device 12 via input/output interface 22 . Exemplary input/output devices 24 include a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touchpad or touchscreen), a voice or sound input device, various types of sensor devices, and/or a photographing device. input devices, and/or output devices such as display devices, printers, speakers, and/or network cards. The exemplary input/output device 24 may be included inside the computing device 12 as a component constituting the computing device 12, or may be connected to the computing device 12 as a separate device distinct from the computing device 12. may be

이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 전술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Although the present invention has been described in detail through representative examples above, those skilled in the art can make various modifications to the above-described embodiments without departing from the scope of the present invention. will understand Therefore, the scope of the present invention should not be limited to the described embodiments and should not be defined, and should be defined by not only the claims to be described later, but also those equivalent to these claims.

10: 컴퓨팅 환경
12: 컴퓨팅 장치
14: 프로세서
16: 컴퓨터 판독 가능 저장 매체
18: 통신 버스
20: 프로그램
22: 입출력 인터페이스
24: 입출력 장치
26: 네트워크 통신 인터페이스
100: 객체 탐지 장치
110: 토큰화부
120: 임베딩부
130: 탐지부
200: 대상 객체 탐지 모델
210: 인코딩 계층
220: 주의 집중 계층
230: 디코딩 계층
211: 순방향 RNN
212: 역방향 RNN
231: 순방향 포인터 네트워크 디코더
232: 역방향 포인터 네트워크 디코더
10: Computing environment
12: computing device
14: Processor
16: computer readable storage medium
18: communication bus
20: program
22: I/O interface
24: I/O device
26: network communication interface
100: object detection device
110: tokenization unit
120: embedding unit
130: detection unit
200: target object detection model
210: encoding layer
220: Attentional Hierarchy
230: decoding layer
211: forward RNN
212: reverse RNN
231: forward pointer network decoder
232: reverse pointer network decoder

Claims (20)

순환 신경망(Recurrent Neural Network, RNN) 인코더를 이용하여, 입력 문단에 기초하여 생성된 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 은닉 상태 벡터(hidden state vector)를 생성하는 동작;
상기 복수의 토큰 각각에 대한 은닉 상태 벡터에 기초하여 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터(self-attention vector)를 생성하는 동작; 및
순방향 포인터 네트워크(forward pointer network) 디코더 및 역방향 포인터 네트워크(backward pointer network) 디코더를 이용하여, 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터로부터 상기 입력 문단에 포함된 하나 이상의 대상 객체를 탐지하는 동작을 포함하고,
상기 순방향 포인터 네트워크 디코더는, 상기 복수의 토큰 중 t(이때, t는 0≤t≤n인 자연수, n은 상기 복수의 토큰의 총 개수)번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 시작 위치로 하는 제1 대상 객체를 탐지하고,
상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 종료 위치로 하는 제2 대상 객체를 탐지하는 문단 내 객체 탐지 방법.
generating a hidden state vector for each of a plurality of tokens included in a token sequence generated based on an input paragraph by using a Recurrent Neural Network (RNN) encoder;
generating a self-attention vector for each of the plurality of tokens based on the hidden state vector for each of the plurality of tokens; and
An operation of detecting one or more target objects included in the input paragraph from the self attention vector for each of the plurality of tokens using a forward pointer network decoder and a backward pointer network decoder. include,
The forward pointer network decoder, when a self attention vector for the t token (where t is a natural number of 0≤t≤n, and n is the total number of the plurality of tokens) among the plurality of tokens is input, the Detecting a first target object having the t-th token as a starting position among one or more target objects;
The reverse pointer network decoder detects a second target object having the t-th token as an end position among the one or more target objects when the self attention vector for the t-th token is input.
삭제delete 청구항 1에 있어서,
상기 순방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 t번째 토큰의 상기 토큰 시퀀스 내 위치에 대응되는 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제1 스코어를 산출하고, 상기 산출된 제1 스코어가 가장 높은 토큰을 상기 제1 대상 객체의 종료 위치로 결정하고,
상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제2 스코어를 산출하고, 상기 복수의 토큰 중 상기 산출된 제2 스코어가 가장 높은 토큰을 상기 제2 대상 객체의 시작 위치로 결정하는 문단 내 객체 탐지 방법.
The method of claim 1,
The forward pointer network decoder calculates a first score for each of the plurality of tokens based on a self attention vector for the t-th token and a position vector corresponding to a position of the t-th token in the token sequence; determining a token having the highest calculated first score as an end position of the first target object;
The reverse pointer network decoder calculates a second score for each of the plurality of tokens based on the self attention vector and the position vector for the tth token, and the calculated second score among the plurality of tokens is A method of detecting an object within a paragraph for determining a highest token as a start position of the second target object.
청구항 3에 있어서,
상기 토큰 시퀀스는, 상기 입력 문단을 토큰화(tokenization)하여 생성된 토큰 및 상기 입력 문단에 포함되지 않은 기 설정된 토큰을 포함하고,
상기 탐지하는 단계는, 상기 복수의 토큰 중 상기 제1 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제1 대상 객체가 존재하지 않는 것으로 판단하고, 상기 복수의 토큰 중 상기 제2 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제2 대상 객체가 존재하지 않는 것으로 판단하는 문단 내 객체 탐지 방법.
The method of claim 3,
The token sequence includes a token generated by tokenizing the input paragraph and a preset token not included in the input paragraph;
The detecting may include determining that the first target object does not exist when a token having the highest first score among the plurality of tokens is the predetermined token, and determining that the second target object among the plurality of tokens has the highest score. and determining that the second target object does not exist when the highest token is the preset token.
청구항 1에 있어서,
상기 은닉 상태 벡터를 생성하는 동작은, 상기 입력 문단을 기 설정된 토큰 단위로 토큰화하여 상기 토큰 시퀀스를 생성하는 동작;
상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하는 동작; 및
상기 복수의 토큰 각각에 대한 토큰 벡터를 상기 RNN 인코더의 입력으로 이용하여 상기 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성하는 동작을 포함하는 문단 내 객체 탐지 방법.
The method of claim 1,
The generating of the hidden state vector may include generating the token sequence by tokenizing the input paragraph in units of preset tokens;
generating a token vector for each of the plurality of tokens; and
and generating a hidden state vector for each of the plurality of tokens by using the token vector for each of the plurality of tokens as an input of the RNN encoder.
청구항 5에 있어서,
상기 토큰 시퀀스를 생성하는 동작은, 상기 입력 문단을 형태소 단위로 토큰화하는 문단 내 객체 탐지 방법.
The method of claim 5,
The operation of generating the token sequence tokenizes the input paragraph in units of morphemes.
청구항 5에 있어서,
상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하는 동작은, 복수의 토큰 각각에 대한 임베딩(embedding) 벡터 및 복수의 토큰 각각의 자질에 대한 자질 벡터에 기초하여 상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하는 문단 내 객체 탐지 방법.
The method of claim 5,
The operation of generating a token vector for each of the plurality of tokens may include generating a token vector for each of the plurality of tokens based on an embedding vector for each of the plurality of tokens and a feature vector for each of the plurality of tokens. How to detect objects in the paragraph you create.
청구항 7에 있어서,
상기 복수의 토큰 각각의 자질은, 상기 복수의 토큰 각각의 품사를 포함하는 문단 내 객체 탐지 방법.
The method of claim 7,
The feature of each of the plurality of tokens includes a part of speech of each of the plurality of tokens.
청구항 1에 있어서,
상기 하나 이상의 대상 객체는, 상기 입력 문단에 기초하여 생성될 질의에 대한 정답 후보인 문단 내 객체 탐지 방법.
The method of claim 1,
The method of claim 1 , wherein the at least one target object is an answer candidate for a query to be generated based on the input paragraph.
청구항 1에 있어서,
상기 RNN 인코더는, 양방향 RNN 인코더인 문단 내 객체 탐지 방법.
The method of claim 1,
The RNN encoder is a bidirectional RNN encoder.
하나 이상의 명령어를 저장하는 메모리; 및
상기 하나 이상의 명령어를 실행하는 하나 이상의 프로세서를 포함하고,
상기 하나 이상의 프로세서는,
순환 신경망(Recurrent Neural Network, RNN) 인코더를 이용하여, 입력 문단에 기초하여 생성된 토큰 시퀀스에 포함된 복수의 토큰 각각에 대한 은닉 상태 벡터(hidden state vector)를 생성하고,
상기 복수의 토큰 각각에 대한 은닉 상태 벡터에 기초하여 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터(self-attention vector)를 생성하고,
순방향 포인터 네트워크(forward pointer network) 디코더 및 역방향 포인터 네트워크(backward pointer network) 디코더를 이용하여, 상기 복수의 토큰 각각에 대한 자가 주의 집중 벡터로부터 상기 입력 문단에 포함된 하나 이상의 대상 객체를 탐지하고,
상기 순방향 포인터 네트워크 디코더는, 상기 복수의 토큰 중 t(이때, t는 0≤t≤n인 자연수, n은 상기 복수의 토큰의 총 개수)번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 시작 위치로 하는 제1 대상 객체를 탐지하고,
상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터가 입력된 경우, 상기 하나 이상의 대상 객체 중 상기 t번째 토큰을 종료 위치로 하는 제2 대상 객체를 탐지하는 문단 내 객체 탐지 장치.
a memory that stores one or more instructions; and
comprising one or more processors to execute the one or more instructions;
The one or more processors,
Using a Recurrent Neural Network (RNN) encoder, a hidden state vector for each of a plurality of tokens included in a token sequence generated based on an input paragraph is generated,
generating a self-attention vector for each of the plurality of tokens based on the hidden state vector for each of the plurality of tokens;
Detecting one or more target objects included in the input paragraph from a self attention vector for each of the plurality of tokens using a forward pointer network decoder and a backward pointer network decoder,
The forward pointer network decoder, when a self attention vector for the t token (where t is a natural number of 0≤t≤n, and n is the total number of the plurality of tokens) among the plurality of tokens is input, the Detecting a first target object having the t-th token as a starting position among one or more target objects;
The reverse pointer network decoder detects a second target object having the t-th token as an end position among the one or more target objects when the self-attention vector for the t-th token is input.
삭제delete 청구항 11에 있어서,
상기 순방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 t번째 토큰의 상기 토큰 시퀀스 내 위치에 대응되는 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제1 스코어를 산출하고, 상기 산출된 제1 스코어가 가장 높은 토큰을 상기 제1 대상 객체의 종료 위치로 결정하고,
상기 역방향 포인터 네트워크 디코더는, 상기 t번째 토큰에 대한 자가 주의 집중 벡터 및 상기 위치 벡터에 기초하여 상기 복수의 토큰 각각에 대한 제2 스코어를 산출하고, 상기 복수의 토큰 중 상기 산출된 제2 스코어가 가장 높은 토큰을 상기 제2 대상 객체의 시작 위치로 결정하는 문단 내 객체 탐지 장치.
The method of claim 11,
The forward pointer network decoder calculates a first score for each of the plurality of tokens based on a self attention vector for the t-th token and a position vector corresponding to a position of the t-th token in the token sequence; determining a token having the highest calculated first score as an end position of the first target object;
The reverse pointer network decoder calculates a second score for each of the plurality of tokens based on the self attention vector and the position vector for the tth token, and the calculated second score among the plurality of tokens is An apparatus for detecting an object within a paragraph for determining a highest token as a start position of the second target object.
청구항 13에 있어서,
상기 토큰 시퀀스는, 상기 입력 문단을 토큰화(tokenization)하여 생성된 토큰 및 상기 입력 문단에 포함되지 않은 기 설정된 토큰을 포함하고,
상기 하나 이상의 프로세서는, 상기 복수의 토큰 중 상기 제1 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제1 대상 객체가 존재하지 않는 것으로 판단하고, 상기 복수의 토큰 중 상기 제2 스코어가 가장 높은 토큰이 상기 기 설정된 토큰인 경우, 상기 제2 대상 객체가 존재하지 않는 것으로 판단하는 문단 내 객체 탐지 장치.
The method of claim 13,
The token sequence includes a token generated by tokenizing the input paragraph and a preset token not included in the input paragraph;
The one or more processors, if the token having the highest first score among the plurality of tokens is the predetermined token, it is determined that the first target object does not exist, and the second score among the plurality of tokens is and determining that the second target object does not exist when the highest token is the preset token.
청구항 11에 있어서,
상기 하나 이상의 프로세서는, 상기 입력 문단을 기 설정된 토큰 단위로 토큰화하여 상기 토큰 시퀀스를 생성하고,
상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하고,
상기 복수의 토큰 각각에 대한 토큰 벡터를 상기 RNN 인코더의 입력으로 이용하여 상기 복수의 토큰 각각에 대한 은닉 상태 벡터를 생성하는 문단 내 객체 탐지 장치.
The method of claim 11,
The one or more processors generate the token sequence by tokenizing the input paragraph in units of preset tokens;
generating a token vector for each of the plurality of tokens;
A device for detecting an object in a paragraph for generating a hidden state vector for each of the plurality of tokens by using the token vector for each of the plurality of tokens as an input of the RNN encoder.
청구항 15에 있어서,
상기 하나 이상의 프로세서는, 상기 입력 문단을 형태소 단위로 토큰화하는 문단 내 객체 탐지 장치.
The method of claim 15
The one or more processors tokenize the input paragraph in units of morphemes.
청구항 15에 있어서,
상기 하나 이상의 프로세서는, 복수의 토큰 각각에 대한 임베딩(embedding) 벡터 및 복수의 토큰 각각의 자질에 대한 자질 벡터에 기초하여 상기 복수의 토큰 각각에 대한 토큰 벡터를 생성하는 문단 내 객체 탐지 장치.
The method of claim 15
wherein the one or more processors generate a token vector for each of the plurality of tokens based on an embedding vector for each of the plurality of tokens and a feature vector for each of the plurality of tokens.
청구항 17에 있어서,
상기 복수의 토큰 각각의 자질은, 상기 복수의 토큰 각각의 품사를 포함하는 문단 내 객체 탐지 장치.
The method of claim 17
The apparatus for detecting an object in a paragraph, wherein the qualities of each of the plurality of tokens include parts of speech of each of the plurality of tokens.
청구항 11에 있어서,
상기 하나 이상의 대상 객체는, 상기 입력 문단에 기초하여 생성될 질의에 대한 정답 후보인 문단 내 객체 탐지 장치.
The method of claim 11,
The one or more target objects are candidates for an answer to a query to be generated based on the input paragraph.
청구항 11에 있어서,
상기 RNN 인코더는, 양방향 RNN 인코더인 문단 내 객체 탐지 장치.
The method of claim 11,
The RNN encoder is a bidirectional RNN encoder.
KR1020200130364A 2020-10-08 2020-10-08 Mehtod and apparatus for detecting object contained within paragraph KR102544700B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200130364A KR102544700B1 (en) 2020-10-08 2020-10-08 Mehtod and apparatus for detecting object contained within paragraph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200130364A KR102544700B1 (en) 2020-10-08 2020-10-08 Mehtod and apparatus for detecting object contained within paragraph

Publications (2)

Publication Number Publication Date
KR20220046987A KR20220046987A (en) 2022-04-15
KR102544700B1 true KR102544700B1 (en) 2023-06-20

Family

ID=81211907

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200130364A KR102544700B1 (en) 2020-10-08 2020-10-08 Mehtod and apparatus for detecting object contained within paragraph

Country Status (1)

Country Link
KR (1) KR102544700B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102514817B1 (en) * 2022-09-27 2023-03-29 한국딥러닝 주식회사 Deep learning based visual document understanding system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102033458B1 (en) * 2017-10-24 2019-11-19 강원대학교산학협력단 System and method for coreference resolution using hierarchical pointer networks
KR102116518B1 (en) * 2018-02-23 2020-05-28 주식회사 마인즈랩 Apparatus for answering a question based on maching reading comprehension and method for answering a question using thereof

Also Published As

Publication number Publication date
KR20220046987A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
US5610812A (en) Contextual tagger utilizing deterministic finite state transducer
US20180189272A1 (en) Apparatus and method for sentence abstraction
KR102116518B1 (en) Apparatus for answering a question based on maching reading comprehension and method for answering a question using thereof
US11586829B2 (en) Natural language text generation from a set of keywords using machine learning and templates
CN110196894A (en) The training method and prediction technique of language model
US20210124876A1 (en) Evaluating the Factual Consistency of Abstractive Text Summarization
US11126794B2 (en) Targeted rewrites
US11544457B2 (en) Machine learning based abbreviation expansion
KR20210138266A (en) A method for extracting keywords from texts based on deep learning
KR20230061001A (en) Apparatus and method for correcting text
KR102544700B1 (en) Mehtod and apparatus for detecting object contained within paragraph
JP2019212115A (en) Inspection device, inspection method, program, and learning device
CN109189882A (en) Answer type recognition methods, device, server and the storage medium of sequence content
US20220129644A1 (en) Apparatus and method for augmenting textual data
KR102108129B1 (en) Apparatus for interpreting meaning of text emoticon, and recording medium therefor
CN115204164B (en) Method, system and storage medium for identifying communication sensitive information of power system
KR102284903B1 (en) Mehtod and apparatus for input sequence
CN114896983A (en) Model training method, text processing device and computer equipment
KR20230059524A (en) Method and apparatus for analyzing multimodal data
KR102498670B1 (en) Mehtod and apparatus for ranking passages
US20200279024A1 (en) Non-transitory computer readable medium
KR102383043B1 (en) Learning method and cognition method for omission restoration and apparatus for executing the method
KR20190093439A (en) A method and computer program for inferring genre of a text contents
KR20230062064A (en) Method and apparatus for document summarization
US20230377358A1 (en) Method and apparatus for dechipering obfuscated text for cyber security

Legal Events

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