Source-linked AI summary

SG-Net: Syntax-Guided Machine Reading Comprehension

Zhuosheng Zhang, Yuwei Wu, Junru Zhou, Sufeng Duan, Hai Zhao, Rui Wang

arXiv:1908.05147v3cs.CL

TL;DR

기계 독해 모델은 긴 지문에서 불필요한 단어에 부정확하게 집중할 수 있다. SG-Net은 구문 의존성으로 Transformer attention을 유도하며, SQuAD 2.0과 RACE에서 새로운 최고 수준 또는 이에 준하는 성능을 달성한다.

  • 문제

    전통적인 attention 모델은 명시적 제약 없이 모든 단어에 주의를 기울이므로, 긴 지문에서 불필요한 단어에 부정확하게 집중할 위험이 있다.

  • 방법

    SG-Net은 각 단어의 의존성 조상과 해당 단어 자체를 기반으로 하는 syntax-guided self-attention과 기존 self-attention을 결합한다.

  • 결과

    SQuAD 2.0과 RACE에서 BERT를 사용한 실험은 span extraction과 multi-choice inference 전반에서 새로운 최고 수준 또는 이에 준하는 성능을 달성한다.

  • 시사점 및 한계

    이 결과는 난도가 높은 독해 과제에서 구문 구조 정보를 활용해 attention 학습을 유도하는 방식을 뒷받침한다.

  • 시사점 및 한계

    평가는 구문론적 발전에 초점을 맞추고 단순성을 유지하기 위해 ensemble 모델이 아닌 단일 모델을 비교한다.

Abstract

from arXiv · show

For machine reading comprehension, the capacity of effectively modeling the linguistic knowledge from the detail-riddled and lengthy passages and getting ride of the noises is essential to improve its performance. Traditional attentive models attend to all words without explicit constraint, which results in inaccurate concentration on some dispensable words. In this work, we propose using syntax to guide the text modeling by incorporating explicit syntactic constraints into attention mechanism for better linguistically motivated word representations. In detail, for self-attention network (SAN) sponsored Transformer-based encoder, we introduce syntactic dependency of interest (SDOI) design into the SAN to form an SDOI-SAN with syntax-guided self-attention. Syntax-guided network (SG-Net) is then composed of this extra SDOI-SAN and the SAN from the original Transformer encoder through a dual contextual architecture for better linguistics inspired representation. To verify its effectiveness, the proposed SG-Net is applied to typical pre-trained language model BERT which is right based on a Transformer encoder. Extensive experiments on popular benchmarks including SQuAD 2.0 and RACE show that the proposed SG-Net design helps achieve substantial performance improvement over strong baselines.

1 서론

SG-Net은 dependency syntax로 self-attention을 유도해, 길고 여러 문장으로 이루어진 machine reading comprehension 지문에서 잡음이 많고 초점이 불분명한 attention 문제를 다룬다. 이는 original self-attention과 syntax-guided self-attention을 결합해 어려운 MRC 과제에서 BERT baseline의 성능을 크게 향상한다.

  • 동기: 길고 세부적인 지문과 긴 질문은 잡음과 불명확한 attention 때문에 관련 텍스트 요소를 식별하기 어려워져 MRC 정확도를 낮춘다.기존 attentive model은 모든 단어를 동일하게 처리하고 지문을 구분되지 않은 sequence로 취급하는 경우가 많아, 문장 내부의 언어 구조를 무시한다.
  • 동기: SG-Net은 syntactically important words와 그와 관련된 하위 집합으로 attention을 명시적으로 유도해 긴 문장에서 발생하는 잡음을 줄인다.이 접근법은 dependency structure의 단서를 사용해 각 관심 단어에 대해 더 정확한 attentive signal을 생성한다.
  • 방법: SG-Net은 original self-attention network와 SDOI 기반 self-attention network를 결합해 더욱 언어학적으로 동기화된 representation을 생성한다.이 설계는 Transformer encoder의 self-attention mechanism을 명시적인 syntax-guided constraint로 확장한다.
  • 방법: Syntactic dependency of interest (SDOI)는 pre-trained dependency parse tree에서 각 단어에 조상 노드와 자기 자신을 할당한다.이 구조는 syntax-guided self-attention을 위한 syntax-related node를 식별한다.
  • 기여: 제안된 설계는 syntactic relationship을 Transformer attention에 통합하고, SG-Net을 pre-trained BERT (Devlin et al. 2018)에 적용해 어려운 MRC 과제에서 강력한 baseline의 성능을 크게 향상한다.논문은 이러한 통합을 state-of-the-art Transformer self-attention network의 성능 향상을 위한 최초의 시도로 제시한다.

2 관련 연구

MRC는 cloze-style test에서 span extraction 및 multiple-choice task로 발전해 왔으며, attentive model과 pretrained language model도 함께 발전했다. 최근 연구는 syntactic information이 language understanding에 유익함을 보여 주었고, 이는 Transformer self-attention을 개선하는 syntax-guided representation에 대한 동기를 제공한다.

  • MRC Task: MRC는 cloze-style test에서 span-based answer extraction 및 multiple-choice task로 발전했으며, 후자의 두 task가 본 연구의 초점이다.
  • Attentive Model: Attentive MRC model에는 Attention Sum Reader, Gated attention Reader, Self-matching Network, Attention over Attention Reader, Bi-attention Network가 포함된다.
  • Pretrained Language Model: ELMo, OpenAI GPT, BERT (Devlin et al. 2018)와 같은 deep contextual language model은 unlabeled data에서 universal representation을 학습하고 강력한 NLU 성능을 달성한다.
  • Syntactic Information: Neural dependency parsing은 state-of-the-art 성능에 도달했으며, neural model이 syntactic information을 무시하지 않고 활용함으로써 정확도를 높일 수 있게 한다.
  • Syntax-Guided Representation: Dependency tree는 linguistic relation을 인코딩하지만, 기존 연구는 dependency-label embedding을 word representation과 연결하는 경우가 많았다. 반면 본 연구는 Transformer SAN 개선을 위해 syntax-guided representation을 도입한다.이 접근법은 명시적 syntactic constraint하에서 dependency-tree neighbor의 정보를 사용해 각 word representation을 갱신하며, 이는 linguistically motivated한 방식이다.

3 구문 유도 네트워크

SG-Net은 구문적으로 중요한 선조 단어에 주의를 제한하는 syntax-guided self-attention으로 Transformer encoder를 확장한 뒤, syntax-guided 표현과 원래 표현을 융합해 task-specific 예측을 수행한다. 이 architecture는 span-based SQuAD 2.0 및 multi-choice RACE reading comprehension을 위해 BERT로 구현된다.

  • 일반 Architecture: SG-Net은 task-specific prediction layer 전에 syntax-guided SAN 표현과 원래 Transformer SAN 출력을 융합한다.모델은 SAN 기반 encoder 표현을 받아 syntax-guided SAN을 구축하고, 두 contextual representation을 집계한다.
  • Syntax-Guided Self-Attention: SDOI mask는 각 token의 attention을 자기 자신과 syntactic dependency tree에서의 선조 head word로 제한한다.dependency parser는 각 token의 선조 집합과 syntactically important token 중 attention이 가능한 대상을 인코딩하는 n × n mask를 생성하며, 특수 BERT token은 자기 자신에게만 attention한다.
  • Syntax-Guided Self-Attention: syntax-guided attention layer는 Transformer 출력을 multi-head query, key, value로 projection하고, dependency-masked attention을 적용하며, residual layer normalization을 포함한 feed-forward layer를 사용한다.dependency structure는 multi-head attention 내부에 통합되어 syntax-guided token representation을 생성한다.

4 실험

실험에서는 span 기반 SQuAD 2.0과 multi-choice RACE에서 fine-tuned whole-word-masking BERT와 SG-Net을 비교한다. SG-Net은 두 benchmark 모두에서 BERT 및 다른 baseline을 유의하게 능가하며, 고정된 preprocessing parser와 single-model 비교를 사용한다.

  • 데이터셋 및 baseline: 실험에서는 SQuAD 2.0과 RACE에서 fine-tuned cased whole-word-masking BERT를 baseline으로 사용하며, span 기반 및 multi-choice machine reading comprehension을 다룬다.SQuAD 2.0에서는 지문이 뒷받침하는 질문에는 답하고 지문에 답이 없으면 답변을 유보해야 하며, RACE는 middle-school 및 high-school subset으로 구성되고 accuracy를 사용한다.
  • 구현: Dependency parser는 preprocessing 중 적용되며 MRC 학습 동안 고정된 상태로 유지되고, PTB test set에서 97.00% UAS와 95.43% LAS를 달성한다.Parser는 BERT를 유일한 입력으로 사용해 constituent parsing을 공동 학습한다.
  • 구현: MRC 구현에서는 wordpiece tokenization, maximum input length 384, dual-context aggregation weight α = 0.5, 그리고 BERT와 일치하는 multi-head self-attention을 사용한다.Learning rate, batch size 및 epoch limit은 task에 따라 지정된 범위에서 선택한다.
  • SQuAD 2.0: SG-Net은 SQuAD 2.0에서 BERT baseline을 유의하게 능가하고(p-value < 0.01), 발표된 모든 연구를 앞섰으며, 제출 당시 leaderboard에서 두 번째를 기록했다.비교는 ensemble이 아닌 단일 모델을 사용하며, Table 1에는 Exact Match와 F1 점수가 보고되어 있다.
  • RACE: SG-Net은 RACE accuracy에서 BERT와 나열된 모든 baseline을 유의하게 능가하여(p-value < 0.01), syntax enhancement의 효과를 검증한다.비교에는 DCMN, OCN, RSM 및 GPT가 포함되며, Table 2는 single-model test accuracy를 보고한다.

5 논의

SG-Net은 긴 질문에서 baseline보다 견고하며, syntax-guided attention은 구문적으로 관련된 정답 단어에 집중한다. Ablation 결과, syntax-guided attention과 vanilla attention을 dual contextual attention으로 결합한 방식이 가장 우수하다.

  • 질문 길이 분석: SG-Net은 긴 SQuAD 질문에서도 견고성을 유지하는 반면, baseline 성능은 20단어를 넘어서면 급격히 하락한다.이 연구는 SQuAD development 질문을 길이에 따라 동일한 범위의 20개 subset으로 나누고, 질문 길이별 exact-match accuracy를 비교한다.
  • Attention 시각화: Syntax-guided attention은 정답을 식별하는 질문 키워드와 지문 단어를 강조한다.해당 예시에서는 “name,” “legislation,” “1850,”와 함께 “Missouri” 및 “Compromise”를 강조한다.
  • Ablation 연구: Dual contextual attention은 vanilla-only, syntax-guided-only, combined variant 중 가장 우수한 성능을 낸다.이 비교에서는 BERT 뒤에 각 추가 attention layer를 넣는 방식을 평가하며, SG-Net에서는 combined design을 채택한다.
  • Ablation 연구: Vanilla attention만으로는 개선이 없지만, syntax-guided attention만 사용하는 방식은 잡음이 많지만 다양한 정보를 제외하므로 vanilla attention과 상호보완적이다.이러한 상호보완성에 따라 dual contextual layer에서 두 representation을 통합하며, 대안적인 merging operation도 비교한 결과 dual contextual attention이 가장 우수한 성능을 보인다.

6 결론

SG-Net은 attention에 통사적 제약을 통합하고 원래 표현과 syntax-guided 표현을 융합해 Transformer 기반 encoder를 향상한다. 사전 학습된 BERT를 사용했을 때 SQuAD 2.0과 RACE에서 새로운 state-of-the-art 또는 비교 가능한 결과를 달성한다.

  • 6 결론: SG-Net은 원래 SAN 표현과 syntax-guided SAN 표현을 융합하는 dual contextual architecture를 채택한다.이 framework는 attention mechanism에 통사적 제약을 통합해 언어학적으로 동기화된 단어 표현을 생성한다.
  • 6 결론: 이 연구는 강력한 Transformer 기반 encoder를 향상하기 위한 syntax-guided text modeling을 framework로 제시한다.실험 결과는 machine reading comprehension에서 통사 구조의 효과를 뒷받침한다.
  • 6 결론: 사전 학습된 BERT를 사용한 실험은 SQuAD 2.0과 RACE에서 새로운 state-of-the-art 또는 비교 가능한 결과를 산출한다.이 benchmark는 span 기반 answer extraction과 multiple-choice inference를 포괄한다.
Loading 1908.05147v3…