Table of Contents
Fetching ...

A Compare-Aggregate Model for Matching Text Sequences

Shuohang Wang, Jing Jiang

TL;DR

This paper introduces a general compare-aggregate framework for text sequence matching that performs word-level comparisons followed by CNN-based aggregation, enabling cross-task applicability to QA and textual entailment. It systematically evaluates six word-level comparison functions, with the element-wise SubMult+NN often delivering the strongest results across MovieQA, InsuranceQA, WikiQA, and SNLI. The findings demonstrate the framework's generality and competitiveness against task-specific models, while highlighting that simple, non-parameterized comparisons can outperform more complex neural interactions in some settings. The authors release code to facilitate broader adoption and future research.

Abstract

Many NLP tasks including machine comprehension, answer selection and text entailment require the comparison between sequences. Matching the important units between sequences is a key to solve these problems. In this paper, we present a general "compare-aggregate" framework that performs word-level matching followed by aggregation using Convolutional Neural Networks. We particularly focus on the different comparison functions we can use to match two vectors. We use four different datasets to evaluate the model. We find that some simple comparison functions based on element-wise operations can work better than standard neural network and neural tensor network.

A Compare-Aggregate Model for Matching Text Sequences

TL;DR

This paper introduces a general compare-aggregate framework for text sequence matching that performs word-level comparisons followed by CNN-based aggregation, enabling cross-task applicability to QA and textual entailment. It systematically evaluates six word-level comparison functions, with the element-wise SubMult+NN often delivering the strongest results across MovieQA, InsuranceQA, WikiQA, and SNLI. The findings demonstrate the framework's generality and competitiveness against task-specific models, while highlighting that simple, non-parameterized comparisons can outperform more complex neural interactions in some settings. The authors release code to facilitate broader adoption and future research.

Abstract

Many NLP tasks including machine comprehension, answer selection and text entailment require the comparison between sequences. Matching the important units between sequences is a key to solve these problems. In this paper, we present a general "compare-aggregate" framework that performs word-level matching followed by aggregation using Convolutional Neural Networks. We particularly focus on the different comparison functions we can use to match two vectors. We use four different datasets to evaluate the model. We find that some simple comparison functions based on element-wise operations can work better than standard neural network and neural tensor network.

Paper Structure

This paper contains 14 sections, 11 equations, 2 figures, 3 tables.

Figures (2)

  • Figure 1: The left hand side is an overview of the model. The right hand side shows the details about the different comparison functions. The rectangles in dark represent parameters to be learned. $\times$ represents matrix multiplication.
  • Figure 2: An visualization of the largest value of each dimension in the convolutional layer of CNN. The top figure is an example from the data set MovieQA with CNN window size 5. The bottom figure is an example from the data set InsuranceQA with CNN window size 3.