Skip to main content
QUICK REVIEW

[Paper Review] Structured Attention Networks

Yoon Kim, Carl Denton|arXiv (Cornell University)|Feb 3, 2017
Topic ModelingComputer Science101 citations
TL;DR

This paper introduces structured attention networks that embed graphical-model-based attention within neural networks, enabling segmentation and parsing-aware attention by using differentiable inference (CRFs and dependency parsers) as neural layers. It demonstrates end-to-end trainable improvements over standard attention across several tasks.

ABSTRACT

Attention networks have proven to be an effective approach for embedding categorical inference within a deep neural network. However, for many tasks we may want to model richer structural dependencies without abandoning end-to-end training. In this work, we experiment with incorporating richer structural distributions, encoded using graphical models, within deep networks. We show that these structured attention networks are simple extensions of the basic attention procedure, and that they allow for extending attention beyond the standard soft-selection approach, such as attending to partial segmentations or to subtrees. We experiment with two different classes of structured attention networks: a linear-chain conditional random field and a graph-based parsing model, and describe how these models can be practically implemented as neural network layers. Experiments show that this approach is effective for incorporating structural biases, and structured attention networks outperform baseline attention models on a variety of synthetic and real tasks: tree transduction, neural machine translation, question answering, and natural language inference. We further find that models trained in this way learn interesting unsupervised hidden representations that generalize simple attention.

Motivation & Objective

  • Motivate integrating structural biases into attention mechanisms to model subsequences and latent parse structures.
  • Develop differentiable structured attention layers based on linear-chain CRFs and first-order graph-based parsers.
  • Demonstrate end-to-end training of these layers within neural networks across multiple NLP tasks.
  • Show that structured attention yields better performance and learns interpretable latent structures.

Proposed method

  • Define structured attention as a CRF over a vector of latent variables with clique potentials derived from a neural network.
  • Compute context as the marginal expectations under the CRF, using forward-backward (linear-chain CRF) or inside-outside (parsing) inference.
  • Backpropagate through the inference via differentiable routines, handling log-space computations and signed log-space for gradients.
  • Instantiate two CRF-based attention variants: linear-chain for subsequence segmentation and first-order graph-based parsers for latent dependency structures.
  • Apply the structured attention layer as a neural network module replacing standard softmax attention in encoder-decoder and QA/NLI pipelines.

Experimental results

Research questions

  • RQ1Can structured attention layers (CRF-based) be trained end-to-end inside deep networks to model subsequence segmentation and latent tree structures?
  • RQ2Do CRF-attention variants improve over standard attention on tasks requiring structural bias such as tree transduction, MT with segmentation, QA, and NLI?
  • RQ3Do learned marginals from these structured layers yield interpretable internal representations akin to parse trees or segmentations?

Key findings

  • Structured attention outperforms baseline attention on a synthetic tree-transduction task and on neural MT with segmentation.
  • In MT, the segmentation attention (two-state linear-chain CRF) improved BLEU scores over simple and sigmoid attention, with structured attention showing the best average results.
  • QA experiments using a linear-chain CRF for multi-fact inference demonstrate competitive or improved answering accuracy and inference behavior relative to Memory Networks.
  • NLI with syntactic (dependency-tree) attention yields strong internal structure and improved qualitative behavior compared to standard attention.
  • Learned internal representations under structured attention reveal latent structural biases such as boundary and tree-like patterns, beyond plain attention.

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.