Abstract
In this paper, we introduce Query-based Attention CNN (QACNN) for Text Similarity Map, an end-to-end neural network for question answering. This network is composed of a compare mechanism, a two-staged CNN architecture with an attention mechanism, and a prediction layer. First, the compare mechanism compares the given passage, query, and multiple answer choices to build similarity maps. Then, the two-staged CNN architecture extracts features at the word-level and sentence-level. Simultaneously, the attention mechanism helps the CNN focus more on the important parts of the passage based on the query information. Finally, the prediction layer identifies the most probable answer choice. We evaluated this model on the MovieQA dataset using Plot Synopses only, achieving 79.99% accuracy, which is the state of the art on the dataset.
Introduction
Multiple-choice question answering (MCQA) requires a model to identify the best fit between a passage, a query, and several candidate answers. Traditional "compare-aggregate" frameworks often struggle with long-form content because they treat all parts of a sequence with equal importance and are limited by the fixed receptive fields of their convolutional kernels. This is particularly problematic for long-form content like movie synopses, where the answer might depend on a specific sentence buried in a large volume of text. The QACNN addresses these issues by treating text matching as a hierarchical pattern recognition task, using query-driven attention to "zoom in" on relevant sentences and words.
The QACNN Architecture
The QACNN architecture consists of three main components designed to mimic human reading behavior: first understanding sentences, then understanding how those sentences relate to the overall story.
1. Similarity Mapping Layer
The model converts the passage ($P$), query ($Q$), and choices ($C$) into word embeddings using pre-trained GloVe vectors. It then calculates cosine similarity between every word in the passage and every word in the query and choices. This transforms the text into "similarity maps"—essentially 2D images where high-intensity pixels represent matching words. By creating these maps, the authors turn a natural language processing (NLP) problem into a computer vision problem, allowing the CNN to recognize patterns of similarity across the passage.
2. Two-Staged CNN with Attention
The core of the model is a two-staged CNN that extracts features at different granularities:
- Stage 1 (Word-to-Sentence): A CNN aggregates word-level similarities into sentence-level features. It uses a query-based attention mechanism to identify which words in a sentence are most relevant to the question.
- Stage 2 (Sentence-to-Passage): A second CNN aggregates these sentence features into a final passage-level representation. Another layer of attention is applied here to weight the importance of each sentence relative to the query.
As shown in Figure 4, the attention mechanism acts as an "active aggregation" filter. Unlike previous models that pool all features together passively, QACNN uses the query to decide which features to keep and which to ignore, solving a major flaw of earlier architectures.
3. Prediction Layer
The final representations for each choice are passed through fully-connected layers and a softmax function to determine the most probable answer.
Experimental Results
The researchers evaluated their model on two primary benchmarks: MovieQA (15,000 questions based on movie synopses) and MCTest (fictional stories for middle-school reading comprehension).
- State-of-the-Art Performance: On the MovieQA dataset, the QACNN ensemble reached 79.99% accuracy, outperforming the previous best "Convnet Fusion" model (77.63%) and significantly beating the standard "Compare-Aggregate" framework (72.9%).
- Generalization: Despite being trained on MovieQA, the model generalized well to MCTest, achieving 68.1% on MC160 and 61.5% on MC500, outperforming baseline sliding-window methods.
- Hierarchical Insights: Ablation studies demonstrated that sentence-level attention is more impactful than word-level attention. Identifying the correct sentence is often the most critical step in answering a complex question.
Conclusion
The QACNN model demonstrates that hierarchical attention and similarity mapping are highly effective for long-form question answering. By treating text as a visual pattern and applying query-driven filters, it overcomes the limitations of passive aggregation. Future work may involve using dynamic embeddings or adapting the architecture for open-ended question answering tasks.
Summary updated