Inter-Weighted Alignment Network for Sentence Pair Modeling

Gehui Shen, Yunlun Yang, Zhi-Hong DengEMNLP 2017

Introduction

Sentence Pair Modeling (SPM) is a foundational task in Natural Language Processing, essential for applications such as Question Answering (QA), Paraphrase Identification, and Semantic Relatedness. The core challenge lies in determining the relationship between two sentences: whether they convey the same meaning or if one serves as a valid answer to the other.

Traditional deep learning models often processed sentences in isolation, generating fixed vectors for comparison. While later "attentive" models introduced interaction, they frequently treated word importance as static or intrinsic to the sentence itself. This paper introduces the Inter-Weighted Alignment Network (IWAN), which posits that word importance is dynamic and relational—a word's weight should depend on its alignment with the partner sentence.

The IWAN Architecture

The IWAN architecture is designed to capture these dynamic interactions through a multi-layered approach.

The IWAN architecture overview.
  1. BiLSTM Layer: Sentences are processed through a shared Bi-directional Long Short-Term Memory (BiLSTM) network to generate context-aware word representations. The authors found that using these hidden states is significantly more effective than using raw word embeddings alone.
  2. Word-Level Similarity Matrix: The model computes a similarity matrix $M$ via dot products between words in sentence $S$ and sentence $T$.
  3. Alignment Layer with Orthogonal Decomposition: The model performs "soft-alignment" to find counterparts for each word. Crucially, it employs Orthogonal Decomposition, splitting the word vector into a component parallel to its counterpart (the match) and a component orthogonal to it (the residual). This allows the model to explicitly identify subtle contradictions or irrelevant information.
  4. Inter-Weighted Layer: This core novelty calculates word weights based on interaction using two strategies:
  5. Inter-Attention: Weights words in $S$ by comparing them to the global representation of sentence $T$.
  6. Inter-Skip: An efficient approximation that estimates a word's importance by measuring the change in sentence representation when that word is "skipped" relative to the partner sentence.
  7. Output Layer: Weighted features are concatenated and fed into a final neural network to predict similarity or classification.

Key Insights

The primary innovation of IWAN is the recognition that importance is interdependent. By using the partner sentence to "inter-weight" words, the model can ignore distracting details that do not contribute to the core relationship between the pair.

Visualization of inter-attention weights.

As shown in the visualization above, the model assigns different weights to words based on the context of the other sentence. For instance, in a semantic similarity task, descriptive adjectives might be down-weighted if they don't appear in the partner sentence, focusing the model on the primary action or subject.

Key Results

IWAN achieved state-of-the-art (SOTA) performance across several benchmarks at the time of its publication:

  • SICK: Achieved a Pearson’s $r$ of 0.8833, outperforming complex models like the Attentive Tree-LSTM.
  • TrecQA: Reached a Mean Average Precision (MAP) of 0.822, a significant improvement over previous benchmarks.
  • WikiQA: Achieved a MAP of 0.733, surpassing the Pairwise Word Interaction Model (PWIM).

Ablation studies confirmed that the Inter-Weighted features and the Orthogonal Decomposition strategy were critical to these gains, as removing them led to a measurable drop in performance.

Conclusion

The Inter-Weighted Alignment Network demonstrates that modeling the dynamic, relational importance of words is key to mastering sentence pair tasks. By combining context-aware BiLSTMs with novel inter-weighting and decomposition mechanisms, IWAN provides a robust framework for understanding how sentences interact. Future work may involve applying these inter-weighting concepts to Transformer-based architectures or evaluating the model on larger-scale, more diverse datasets.

Summary updated

BibTeX
@inproceedings{shen2017inter,
  author = {Gehui Shen and Yunlun Yang and Zhi-Hong Deng},
  title = {{Inter-Weighted Alignment Network for Sentence Pair Modeling}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2017},
  url = {https://openreview.net/forum?id=H1b5_Mfd-H},
}
Figure