[Paper Review] SG-Net: Syntax-Guided Machine Reading Comprehension
This paper proposes SG-Net, a syntax-guided neural network that enhances BERT-based machine reading comprehension by integrating syntactic dependency structures into the self-attention mechanism. By introducing Syntactic Dependency of Interest (SDOI) to constrain attention to linguistically relevant word spans, SG-Net improves representation learning, achieving state-of-the-art performance on SQuAD 2.0 and RACE benchmarks with significant gains over strong baselines.
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.
Motivation & Objective
- To address the limitation of standard self-attention in Transformer models, which attend uniformly to all words without linguistic prioritization, leading to noise sensitivity in long or complex passages.
- To improve machine reading comprehension performance by incorporating syntactic structure as explicit guidance for attention, focusing on linguistically relevant word spans.
- To design a dual-context architecture that fuses standard self-attention with syntax-guided self-attention for richer, more linguistically informed representations.
- To empirically validate that syntactic structure enhances attention mechanisms in pre-trained models like BERT, especially for long or complex questions.
Proposed method
- Introduce Syntactic Dependency of Interest (SDOI) as the set of all ancestor nodes and the word itself in a dependency parsing tree, defining the syntactic context for each word.
- Design a syntax-guided self-attention network (SDOI-SAN) that restricts attention computation to only the SDOI-relevant words, reducing noise and improving focus.
- Construct SG-Net as a dual-context encoder combining the original BERT self-attention layer and the SDOI-SAN layer, using weighted fusion to preserve both general and syntax-informed representations.
- Apply the SG-Net framework to the BERT architecture, fine-tuning on SQuAD 2.0 and RACE benchmarks to evaluate performance gains.
- Use dependency parsing to extract SDOI for each word, with special tokens (e.g., [CLS], [PAD]) constrained to attend only to themselves.
- Employ a dual contextual aggregation layer that combines representations from both attention mechanisms using learnable weights, outperforming concatenation or bi-attention.
Experimental results
Research questions
- RQ1Can syntactic structure be effectively used to guide attention in Transformer-based models for improved machine reading comprehension?
- RQ2Does constraining attention to syntactically relevant word spans (via SDOI) reduce noise and improve model robustness on long or complex questions?
- RQ3How does the fusion of standard self-attention and syntax-guided self-attention compare to using either mechanism alone in terms of performance and representation quality?
- RQ4To what extent does the dual-context architecture enhance performance on span-based and multi-choice reading comprehension tasks?
Key findings
- SG-Net achieves a 1.0-point absolute improvement in exact match (EM) and 1.1-point improvement in F1 score on the SQuAD 2.0 dev set compared to the BERT baseline, reaching 85.1 EM and 87.9 F1.
- The model shows robustness to long questions, with performance positively correlating with question length, unlike the baseline which degrades significantly on questions longer than 20 words.
- The ablation study confirms that the dual-context mechanism outperforms both single-attention variants and alternative fusion methods like concatenation or bi-attention.
- Visualization of attention weights confirms that syntax-guided attention highlights key content such as 'Missouri Compromise' and '1850', aligning with correct answer spans.
- Adding a vanilla self-attention layer after BERT provides no performance gain, indicating that the original attention is already sufficient and that syntax-guided attention adds complementary, non-reduundant information.
- The method is effective across diverse MRC tasks, achieving state-of-the-art or competitive results on both span-based (SQuAD 2.0) and multi-choice (RACE) benchmarks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.