Source-linked AI summary

Analysis Methods in Neural Language Processing: A Survey

Yonatan Belinkov, James Glass

arXiv:1812.08951v2cs.CLcs.LGcs.NE

TL;DR

Neural NLP models are powerful but opaque relative to feature-rich systems, raising questions about what linguistic information they capture and how they use it. The paper surveys analysis methods across representations, linguistic phenomena, visualization, evaluation, and model probing, finding substantial but uneven linguistic knowledge while highlighting limits of correlation-based analysis and language coverage. It concludes that encoded information may not be used or readily surfaced, and that causal effects and non-English resources remain important gaps.

  • Problem

    End-to-end neural NLP models do not explicitly encode linguistic features, making it difficult to determine what linguistic information they capture and how their internal components relate to language.

  • Method

    The survey organizes neural-language analysis research by methods, linguistic information sought, neural objects studied, and themes including visualization, challenge sets, adversarial examples, and explanations.

  • Results

    The surveyed studies indicate that neural networks learn substantial information about linguistic phenomena, with hierarchical representations emerging across several model types.

  • Takeaways & Limitations

    Analysis must distinguish information encoded in representations from information used by the model or surfaced in its outputs.

  • Takeaways & Limitations

    Most methods measure correlation rather than causation, and challenge-set coverage remains heavily concentrated in English.

Abstract

from arXiv · show

The field of natural language processing has seen impressive progress in recent years, with neural network models replacing many of the traditional systems. A plethora of new models have been proposed, many of which are thought to be opaque compared to their feature-rich counterparts. This has led researchers to analyze, interpret, and evaluate neural networks in novel and more fine-grained ways. In this survey paper, we review analysis methods in neural language processing, categorize them according to prominent research trends, highlight existing limitations, and point to potential directions for future work.

1 Introduction

Neural networks have improved NLP while making model behavior harder to understand than in feature-rich systems. This survey organizes emerging analysis methods, their limitations, and major research trends.

  • Motivation: End-to-end neural networks increasingly replace feature-rich NLP systems, motivating efforts to understand how they process language.
  • Motivation: Interpretability in NLP is motivated by goals including accountability, trust, fairness, safety, and reliability, alongside performance concerns.
  • Survey scope: The survey reviews analyses of linguistic information, visualization, challenge sets, adversarial examples, and explanations of model predictions.
  • Historical context: Neural-network analysis has roots predating the recent deep-learning revival, including studies of past-tense learning and recurrent language prediction.

2 What linguistic information is captured in neural networks

Research commonly probes linguistic information through representations and component correspondences, finding substantial but uneven linguistic knowledge. The survey emphasizes that encoding does not guarantee use and that causation remains undermeasured.

  • Analytical framework: The survey frames linguistic analysis around methods, sought information, and investigated neural-network objects.
  • Methods: A common method freezes a trained model, extracts representations, and trains a classifier to predict annotated linguistic properties.
  • Linguistic phenomena: Analyses cover linguistic properties from word order and morphology to syntax, semantics, phonology, speaker information, style, and accent.
  • Linguistic phenomena: Neural networks appear to learn substantial linguistic information, especially frequent properties, whereas rarer or harder cases may require direct supervision.
  • Linguistic phenomena: Several studies report hierarchical learned representations, although latent-tree models can outperform linguistically annotated trees without resembling established syntactic theories.
  • Limitations: Representation classifiers can reveal encoded information without showing that the model uses it, while most analyses measure correlation rather than causal effects on outputs.

3 Visualization

Visualization methods expose aspects of neural language models through activations, attention alignments, saliency, clustering, and interactive tools. Their evaluation remains difficult and is often limited to qualitative examples.

  • Activation and attention visualizations: Visualizations display neural activations to reveal properties such as word position and grammatical relations.Figure 1 uses blue and red to represent negative and positive activation values.
  • Activation and attention visualizations: Attention visualizations show soft alignments between source and target sentences across tasks including translation, inference, summarization, and morphological inflection.The approach originated in neural machine translation and has also been applied to social-media user matching.
  • Attribution and clustering: Saliency methods attribute predictions to input features or intermediate values, allowing important features to be visualized on selected examples.These methods include attribution techniques adapted from broader interpretability research.
  • Attribution and clustering: Clustering neural activations helps compare their organization with linguistic properties such as lexical categories, sentence-level representations, and phonemes.This strategy has been used with recurrent, multitask, and joint audio-visual models.
  • Interactive tools and evaluation: Online tools visualize recurrent activations, attention-based sequence-to-sequence modules, attention alignments, or individual neurons.Examples include LSTMVis, Seq2Seq-Vis, Rikters’s alignment tool, and NeuroX.
  • Interactive tools and evaluation: Visualization-quality evaluation is difficult, usually qualitative, and only occasionally includes human judgments.The survey notes that the practical usefulness of visualizations remains uncertain.

4 Challenge sets

Challenge sets complement average-case corpus benchmarks by targeting selected linguistic phenomena under controlled evaluation conditions. The survey categorizes them by task, phenomena, languages, size, construction, and evaluation, while identifying uneven coverage and methodological trade-offs.

  • Purpose and scope: Challenge sets provide controlled, systematic evaluation of linguistic phenomena that corpus benchmarks may fail to capture broadly.They can include negative data and diverge from natural frequency distributions.
  • Purpose and scope: Challenge sets are categorized by task, linguistic phenomena, languages, size, construction method, and performance evaluation.The survey compiles these criteria in supplementary Table SM2.
  • Tasks and phenomena: NLI and MT are the most targeted challenge-set tasks, while reading comprehension and question answering receive less attention.Their appeal is linked to evaluating inferences at multiple linguistic levels.
  • Tasks and phenomena: Challenge sets target properties ranging from agreement and morphology to lexical semantics, logic, knowledge, and other linguistic phenomena.Examples include five MT properties, 14 morphological properties, more than 30 NLI phenomena, and a 120-phenomenon MT test suite.
  • Construction and evaluation: Programmatic construction generally yields less fine-grained properties, whereas manual construction represents more diverse phenomena.Datasets may also combine automatic example generation with manual verification.
  • Language coverage: The vast majority of challenge sets are in English, leaving a need for more non-English challenge sets and larger non-English datasets beyond machine translation.A notable multilingual exception evaluates number agreement in English, Russian, Hebrew, and Italian.
  • Construction and evaluation: Construction methods trade off scale, control, and naturalness, while evaluation may use automatic metrics or human judgments.Template generation offers vocabulary control but can make examples less natural; automatic metrics are cheap but may miss aspects captured by human evaluation.

5 Adversarial examples

The survey examines adversarial examples in NLP, where discrete inputs make perturbation measurement and gradient-based optimization difficult. It organizes attacks by adversary knowledge, targeting, linguistic unit, and task, while noting evaluation challenges.

  • Text attacks are harder to formulate than image attacks because inputs are discrete, complicating both distance measurement and gradient-based optimization.The survey identifies these as two central difficulties in generating adversarial examples for text.
  • The survey categorizes NLP attacks by adversary knowledge, attack specificity, modified linguistic unit, and the model’s task.The taxonomy distinguishes white-box from black-box access and targeted from non-targeted objectives.
  • White-box methods adapt gradients through word embeddings or edit-operation representations, while black-box methods use human-like edits, latent-space perturbations, or population-based search.Embedding perturbations may not correspond to valid words, motivating dictionary search and alternative representations.
  • Most NLP adversarial work modifies characters or words and targets classification, reading comprehension, or machine translation, with less work on lower-level tasks.Other transformations include inserted text, paraphrases, and targeted image-captioning perturbations.
  • Evaluating text attacks is difficult because small changes can be perceptible, and human classification accuracy alone does not measure perceptibility.The survey calls for more evaluations of grammaticality and similarity to the original text.

6 Explaining predictions

The survey reviews methods for explaining individual neural predictions, including generated explanations and input-based rationales. It concludes that prediction explanations in NLP remain limited, especially regarding internal computations.

  • Explaining individual deep-network predictions is difficult because highly nonlinear computations are not trivial to expose.Interpretability work treats such explanations as desirable for accountability.
  • Generating explanations alongside predictions can require manually annotated explanations, which may be difficult to collect.
  • Input-based methods use text fragments, perturbations, or accumulated segments as candidate rationales for predictions.These approaches include sentiment analysis and sequence-to-sequence settings.
  • These input-segment explanations do not substantially illuminate the network’s internal computations.
  • The survey states that NLP currently has limited ability to explain neural-network predictions.

7 Other methods

The survey also covers component-erasure studies, human intrusion tasks for embeddings, and analyses of formal-language learning. These methods probe model behavior through interventions, human judgments, or formal capabilities.

  • Erasure studies mask embedding dimensions, hidden units, or words and measure resulting changes in label probabilities.
  • Intrusion tasks evaluate embedding interpretability by asking humans to identify an anomalous word selected from embedding dimensions.Higher human success in identifying intruders is treated as greater interpretability.
  • Research continues to test modern neural architectures on formal languages and to examine the formal properties they possess.

8 Conclusion

The survey organizes neural NLP analysis around language-specific phenomena, model behavior, and failure modes, while showing that general analysis techniques often require textual adaptations. It identifies gaps in theoretical grounding, evaluation, prediction explanations, language coverage, and task coverage.

  • The survey synthesizes analysis work around linguistic information captured by neural networks, phenomena they handle successfully, and where they fail.It also notes that challenge sets and test suites may extend beyond NLP to other domains.
  • Auxiliary classification tasks for identifying captured linguistic properties lack theoretical foundation and stronger empirical validation of their link to the original task.
  • Analysis evaluation is often limited or qualitative, particularly for visualization techniques, motivating newer forms of evaluation.
  • Prediction explanations remain relatively scarce beyond visualizations, despite increasing demand for explanations of algorithmic choices.
  • Much analysis focuses on English, while more resources and evaluations are needed for other languages and for challenge sets beyond NLI and MT.
  • Because the field is rapidly evolving, the survey may omit relevant recent work, although its thematic organization is intended as a guide for researchers.

Supplementary Materials

The supplementary materials categorize analysis-related work across linguistic-information studies, challenge-set evaluations, and adversarial-example methods. These categorizations organize methods by the components, phenomena, languages, datasets, attacks, and tasks they address.

  • Table SM1 categorizes work on linguistic information in neural networks by investigated component, sought linguistic property, and analysis method.
  • Table SM2 categorizes challenge sets by NLP task, linguistic phenomenon, represented language, dataset size, and construction method.
  • Table SM3 categorizes adversarial-example methods by adversary knowledge, attack specificity, modified linguistic unit, and attacked task.
Loading 1812.08951v2…