Skip to main content
QUICK REVIEW

[Paper Review] An Introductory Survey on Attention Mechanisms in NLP Problems

Dichao Hu|arXiv (Cornell University)|Nov 12, 2018
Topic ModelingComputer Science25 references40 citations
TL;DR

This paper surveys attention mechanisms in NLP, detailing the basic formulation, variants (multi-dimensional, hierarchical, self-, memory-based, task-specific), applications, evaluation approaches, and connections to pre-training and ensembles.

ABSTRACT

First derived from human intuition, later adapted to machine translation for automatic token alignment, attention mechanism, a simple method that can be used for encoding sequence data based on the importance score each element is assigned, has been widely applied to and attained significant improvement in various tasks in natural language processing, including sentiment classification, text summarization, question answering, dependency parsing, etc. In this paper, we survey through recent works and conduct an introductory summary of the attention mechanism in different NLP problems, aiming to provide our readers with basic knowledge on this widely used method, discuss its different variants for different tasks, explore its association with other techniques in machine learning, and examine methods for evaluating its performance.

Motivation & Objective

  • Explain the basic form of attention and its mathematical formulation.
  • Catalog and describe key attention variants used for different NLP tasks.
  • Explore how attention interacts with other ML techniques (pre-training, ensembles).
  • Survey evaluation methodologies for attention mechanisms across tasks.

Proposed method

  • Present the basic attention formulation with attention scores e_i, normalized weights α_i, and context vector c.
  • Introduce and explain variations: multi-dimensional, hierarchical, self-attention, memory-based, and task-specific attention.
  • Describe extensions used in self-attention (Transformer) including positional encoding and masking.
  • Discuss memory-based attention with multi-hop updates and key-value designs.
  • Link attention to ensemble, gating, and pre-training applications, including BERT and GPT.

Experimental results

Research questions

  • RQ1What is the core mathematical formulation of attention in NLP?
  • RQ2What are the main variants of attention and their task-specific use cases?
  • RQ3How do attention mechanisms integrate with other techniques like pre-training and ensembles?
  • RQ4How are attention mechanisms evaluated, both intrinsically and extrinsically?

Key findings

  • Attention provides a way to compute a contextual representation by weighting input elements according to learned alignment scores.
  • Multiple attention variants have been proposed to tackle increasingly complex NLP tasks (e.g., hierarchical and memory-based attention).
  • Self-attention and Transformer-based architectures enable parallel computation and deep contextualization of tokens.
  • Attention-based pre-training models (e.g., BERT, OpenAI GPT) achieve strong performance by jointly learning representations and contextual dependencies.
  • Qualitative visualization (heatmaps) and quantitative metrics are used to evaluate attention, with intrinsic alignment-based and extrinsic task-based assessments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.