Abstract
Rapid progress has been made towards question answering (QA) systems that can extract answers from text. Existing neural approaches make use of expensive bi-directional attention mechanisms or score all possible answer spans, limiting scalability. We propose instead to cast extractive QA as an iterative search problem: select the answer's sentence, start word, and end word. This representation reduces the space of each search step and allows computation to be conditionally allocated to promising search paths. We show that globally normalizing the decision process and back-propagating through beam search makes this representation viable and learning efficient. We empirically demonstrate the benefits of this approach using our model, Globally Normalized Reader (GNR), which achieves the second highest single model performance on the Stanford Question Answering Dataset (68.4 EM, 76.21 F1 dev) and is 24.7x faster than bi-attention-flow. We also introduce a data-augmentation method to produce semantically valid examples by aligning named entities to a knowledge base and swapping them with new entities of the same type. This method improves the performance of all models considered in this work and is of independent interest for a variety of NLP tasks.
Introduction
Most extractive Question Answering (QA) systems find answers by identifying a "span" of text within a document. However, these systems often face two significant hurdles: scalability and local decision-making. High-performance models frequently rely on expensive bi-directional attention mechanisms or must rank every possible start-and-end-word combination, leading to $O(N^2)$ complexity. Furthermore, many models make "local" decisions, such as picking a sentence first. If an early mistake is made, the model typically cannot recover, even if subsequent steps have low confidence.
The Globally Normalized Reader (GNR) addresses these issues by reframing extractive QA as an efficient, iterative search process that is both computationally lean and capable of recovering from early search errors.
Methodology
Iterative Search with Global Normalization
GNR decomposes the QA task into three sequential steps:
- Sentence Selection: Identifying the sentence likely to contain the answer.
- Start Word Selection: Picking the first word of the answer within that sentence.
- End Word Selection: Picking the last word.
To prevent the model from being penalized by early incorrect choices, the authors employ Global Normalization. Instead of a standard local softmax at each step, the model scores the entire path (Sentence + Start + End) and normalizes these scores across a beam search. This allows the model to "change its mind"—if a sentence initially appears less likely but contains a very high-confidence answer span, the global score will favor that path.
Type Swaps Data Augmentation
To improve robustness, the authors introduced Type Swaps, a data augmentation technique. By identifying named entities in the training data via Wikidata and swapping them with others of the same type (e.g., replacing "Ada Lovelace" with "Charles Babbage"), they created vast amounts of synthetic training data. This forces the model to focus on the semantic nature of the required entity rather than memorizing specific facts.
Results and Evaluation
The GNR was evaluated on the Stanford Question Answering Dataset (SQuAD), using Wikidata for entity replacement and pre-trained GloVe embeddings.
The model demonstrated exceptional efficiency, running 24.7x faster at inference time than the Bi-Directional Attention Flow (BiDAF) model. In terms of accuracy, GNR achieved 68.4 Exact Match (EM) and 76.21 F1 on the SQuAD leaderboard, ranking as the second-highest-performing single model at the time of publication.
The "Type Swaps" method also provided a consistent performance boost across various architectures, acting as a powerful regularizer.
Discussion and Limitations
While GNR offers significant speed and accuracy gains, it currently assumes the answer is contained within a single sentence. This constraint, while valid for SQuAD, may limit its application in tasks requiring multi-sentence reasoning. Additionally, the authors noted diminishing returns on data augmentation beyond a certain volume, likely due to a mismatch between synthetic and natural language distributions. Future work may involve applying this globally normalized search strategy to other structured prediction tasks like summarization or code generation.
Summary updated