---
title: "Understanding Neural Networks through Representation Erasure"
description: "Representation erasure reveals which words and hidden units a neural network relies on by measuring how its predictions change when they…"
canonical: "https://research.elamur.ai/free/en/papers/li-2016-understanding-neural-networks-through-representation/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/li-2016-understanding-neural-networks-through-representation/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / Understanding Neural Networks through Representation Erasure

# Understanding Neural Networks through Representation Erasure

Paper · 2016 · Jiwei Li, Will Monroe and Dan Jurafsky

**Authors:** [Jiwei Li](https://md.research.elamur.ai/free/en/authors/jiwei-li/), Monroe, Will and [Dan Jurafsky](https://md.research.elamur.ai/free/en/authors/dan-jurafsky/) · **Year:** 2016 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**412** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2562979205) · [Cited by **185** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/li-2016-understanding-neural-networks-through-representation/cited-by/) · [arXiv (Cornell University)](https://openalex.org/S4306400194) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1612.08220)
- [arXiv 1612.08220](https://arxiv.org/abs/1612.08220)
- [OpenAlex](https://openalex.org/W2562979205)

Citations: OpenAlex, 2026-10-14.

## Summary

A neural network can assign a sentiment to a review, or a grammatical tag to a word, without giving the reader an intelligible account of its choice. Its inputs and intermediate calculations are vectors, and a particular coordinate rarely comes with a name that explains its role. Representation erasure approaches this problem through [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/) experiments on a trained network. The authors remove a selected part of its input or internal representation, run it again, and measure how the prediction changes. A drop in support for the correct answer shows that the erased part was helping on that example. An increase gives the researcher a place to look for evidence the network may have used poorly.

The authors first apply this idea to [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), vectors that represent words by lists of numbers. They measure which coordinates matter to classifiers trained on linguistic labels and other word properties. In their [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) experiments, much of the sensitivity initially falls on a coordinate associated with word frequency. Removing it and retraining exposes another frequency-related coordinate. Classifiers retrained without both can still perform well, showing that a trained network’s dependence on a coordinate and the availability of useful information elsewhere are distinct questions. Experiments with dropout, which temporarily suppresses parts of a representation during training, also produce a more even distribution of importance.

For [sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/), the authors erase words and compare the response of recurrent networks trained on the Stanford Sentiment Treebank. The bidirectional long short-term memory network is the most accurate of the tested recurrent architectures on fine-grained sentence classification, at 0.526. It also responds more strongly to the removal of selected sentiment cues. Other removals help the classifier assign more probability to the correct label. The resulting examples show how a normally positive word can mislead a network when it describes a plot detail, falls under a statement about what ought to happen, or appears in a clause that qualifies the reviewer’s main judgment.

The paper extends the method to hotel reviews, where an author can praise the location and criticize the service in the same document. A separate policy learns to remove a small set of words that changes a fixed classifier’s predicted rating for a particular aspect. In the examples the paper compares, the policy examining a memory network tends to find more aspect-specific evidence than the one examining a bidirectional recurrent network. These deletions show how the tested classifiers respond to particular changes. The search is approximate, and the selected words can be read as evidence of dependence under removal.

## Deep dive: Understanding Neural Networks through Representation Erasure

Representation erasure reveals which words and hidden units a neural network relies on by measuring how its predictions change when they are removed. · about 34 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

A classifier built around explicitly named features gives a researcher a place to begin an investigation. If a feature indicates that a word contains a certain ending, the researcher can inspect the weight attached to that feature and examine cases where it occurs. In the neural systems studied here, the comparable input may be a coordinate in a word vector, and the prediction depends on transformations of that coordinate alongside many others. Inspecting the coordinate’s value alone gives little indication of how it contributes to a label. That difficulty continues inside the network, where each hidden unit receives an already transformed representation of the input.

The paper treats several questions about that opacity as related but experimentally distinct. A researcher might ask which input coordinates a tagger depends on, whether hidden layers concentrate their dependence in a few units, or what portion of a long review supports a particular rating. The units that make those questions answerable differ. A coordinate is useful when examining a word representation, while a sequence of words can reveal a qualification or a comment about a specific hotel feature. The common problem is to connect an element of a representation with an observable consequence for the prediction.

This matters for error analysis. A wrong sentiment label gives the researcher a task to investigate, but it rarely identifies the source of the problem. A review can contain an upbeat expression in a description of its subject, an ironic compliment, or praise that the writer explicitly qualifies. Each offers a plausible reason a classifier might go wrong. A comparison between the original prediction and the prediction after a targeted edit supplies evidence about which content affected that particular decision. The same comparison can also explain a successful prediction by revealing which evidence the classifier loses when the content is removed.

#### What earlier methods made visible

The paper traces efforts to understand vector representations back to work that projected embeddings into a space with fewer dimensions so a reader could see their arrangement. Projection makes broad relationships easier to inspect. Other work asked human judges to identify a word that did not fit among words selected for a semantic dimension, connected vectors to properties from linguistic resources, or trained sparse representations in which relatively few coordinates were active. Those approaches address questions about the organization and meaning of a representation. Asking how a particular downstream classifier uses that representation calls for examining its predictions as well.

Another line of work inspected activations inside recurrent networks. An activation is the value a unit takes when the network processes an input. A recurring activation pattern can suggest that a unit tracks a recognizable property. The authors cite an analysis in which individual long short-term memory cells displayed behavior associated with opening and closing braces. They point to the close manual inspection involved in such examples. They also cite empirical work on the components of long short-term memory networks and interactive inspection of how internal states line up with annotations of the input. These studies give researchers different ways to formulate hypotheses about recurrent computation. [Visualizing and Understanding Recurrent Networks](https://md.research.elamur.ai/free/en/papers/karpathy-2015-visualizing-understanding-recurrent-networks/) and [LSTM: A Search Space Odyssey](https://md.research.elamur.ai/free/en/papers/greff-2015-lstm-search-space-odyssey/).

The paper also discusses saliency estimated from first derivatives. A derivative indicates how the decision score responds to a small change near the current value of a feature. This gives a local account of sensitivity. The authors question the assumption involved in using that local response to represent a feature’s contribution to a nonlinear prediction. Erasure asks a finite-change question. It runs the network with a coordinate suppressed or a word absent and observes the resulting score or label. The forward calculation therefore includes whatever nonlinear effects the altered input actually produces.

Attention provided another way to examine links between input and output. In the examples of [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/) and [text summarization](https://md.research.elamur.ai/free/en/concepts/text-summarization/) cited by the paper, a system can assign relative weight to parts of an input while producing an output. Those weights give a researcher a view of the alignment the architecture represents. Erasure can evaluate such architectures by intervening on the underlying content. It also applies to a classifier whose design supplies no attention weights for a reader to inspect. [Neural Machine Translation by Jointly Learning to Align and Translate](https://md.research.elamur.ai/free/en/papers/bahdanau-2014-neural-machine-translation-jointly-learning/) and [A Neural Attention Model for Abstractive Sentence Summarization](https://md.research.elamur.ai/free/en/papers/rush-2015-neural-attention-model-abstractive-sentence/).

The paper describes a closely related approach in which a separate generator selects a short portion of an input that can sustain roughly the original prediction. In that setup, the reader sees a retained passage with enough evidence to support the decision. The search in the hotel experiment finds words whose absence changes the decision. The two tests investigate different properties of the text. With redundant evidence, a passage can support a label when shown alone even though the full review can still support the label after the passage is removed. Keeping and removing evidence thus give complementary ways to investigate how the classifier uses the text.

The authors also connect their search to adversarial examples, where a small input change is sought because it alters a prediction. Their text experiment defines the changes at the level of complete words. A word deletion is a discrete operation, and its purpose here is to expose a dependence that a reader can inspect. The constrained search inherits the question of how small a successful change can be. The explanatory value then depends on what the deleted words mean in context. [Intriguing Properties of Neural Networks](https://md.research.elamur.ai/free/en/papers/szegedy-2013-intriguing-properties-neural-networks/).

### The method, step by step

#### Erasing one element

The simplest experiment starts after training. The researcher chooses a set of labeled examples and obtains the trained classifier’s score for each correct label. That score serves as the reference for a second pass. In the second pass, the researcher intervenes on a chosen part of the representation while leaving the classifier’s learned parameters fixed. The resulting difference describes how the existing classifier responds to the intervention.

For an embedding coordinate, the intervention sets the relevant value to 0. A word vector still has the same size, and the remaining coordinates are available as before. The classifier carries out its usual calculation with the modified representation. The hidden-unit experiment applies the same principle inside the network. The selected unit is suppressed at its own layer, and subsequent layers receive the changed activations. This places the intervention at a different point in the calculation. The original word input can be preserved while the test asks how much later processing depends on the selected unit.

For word-level analysis, the relevant unit is a word in a text item. A word has an entire representation, and taking it away can change what the network makes of the surrounding words. A sentiment expression can, for instance, acquire its role from the phrase it is part of. In a recurrent classifier, the revised sequence is passed through the network again. The change in the final prediction can therefore reflect both the loss of the selected word and the effect of that loss on the processing of the remaining sequence.

The authors use the probability of the correct label for the single-element experiments. That choice makes the score sensitive to changes within a predicted class. A classifier may still return the same tag after erasure while becoming much less certain of the correct label. Conversely, the probability of the correct label may increase while some other label remains the classifier’s first choice. This distinction becomes important when the paper turns to error analysis. A change favorable to the correct class is measurable even in cases where the predicted class stays the same.

#### Measuring the response to erasure

Let M be the trained classifier, e a labeled example, and c its correct label. The paper writes the reference score as follows.

```
S(e,c) = −log P(Lₑ = c)
```

S is the score for instance e and label c. P is the probability assigned by M, and the event inside it is that the label Lₑ for e takes the gold-standard value c. The logarithm transforms that probability, and the leading minus sign makes the expression a negative log probability. Under this expression, a higher probability for c corresponds to a lower score. The paper refers to the expression as a log likelihood in the surrounding discussion.

The importance calculation compares the original and erased scores for each example and then averages the relative changes.

```
I(d) = (1 / |E|) ∑ₑ∈E [(S(e,c) − S(e,c,¬d)) / S(e,c)]
```

I(d) is the importance of coordinate d. E is the set of examples included in the calculation, and |E| is the number of examples in that set. The summation runs over examples e belonging to E, and c is the correct label for the example currently being scored. S(e,c) is its original score. The additional argument ¬d in S(e,c,¬d) indicates the run in which coordinate d is suppressed. The numerator subtracts the erased score from the original score. Dividing by the original score gives a relative change before the outer factor averages those changes.

There is a sign inconsistency between the displayed equations and the paper’s explanation of its examples. Taken literally, the negative log probability decreases when erasure gives the correct label more probability. Subtracting that smaller erased value from the larger original value gives a positive contribution, assuming a positive original score. In its discussion and captions, the paper instead calls favorable erasures cases of negative importance. The results below follow the authors’ stated interpretation of those cases. The experimental comparison can be understood directly by asking whether the probability of the correct label rose or fell.

The authors use the same importance calculation with the erased unit changed from a coordinate to a word. In the word rankings, a word type receives a score aggregated over test examples that contain it. In examples displayed individually, the effect is attached to the word in its particular context. Those views answer different questions about the same classifier. The aggregated ranking brings up words that repeatedly matter across the evaluated material. The individual examples reveal what a word does in a particular phrase or sentence, including cases where its behavior differs from what its usual sentiment would suggest.

Division by the original score also affects the meaning of the average. Each intervention is assessed relative to the score for that particular unmodified example. Examples with different original scores can therefore contribute different relative changes even when their absolute score changes are similar. An importance ranking is a ranking under that normalization, on that set of examples. Its values need to be read alongside what was erased, how the scores were formed, and which examples went into the average.

#### Preparing the linguistic and sentiment classifiers

The experiments on coordinates study both sequences and isolated words. In sequence labeling, the classifier uses the embedding of the word to be labeled together with embeddings of nearby words. The authors concatenate the vectors, placing the entries of each vector alongside those of the others, using a window size of 5. For properties assigned to isolated words, the classifier receives only the target word’s representation. This difference matters when interpreting a score. Sequence labeling can draw on a word’s surroundings, while the isolated-word setup must derive its answer from the target representation.

The input vectors come from word2vec and GloVe. The authors use 50-dimensional embeddings pretrained on Gigaword-Wiki. The task network has an embedding input, intermediate transformations with a tanh activation, and an output layer. The paper specifies 2 intermediate layers with 50 hidden units in each. Training is performed for each target task, so a comparison across tasks concerns classifiers optimized for different labels even when they begin with the same family of word vectors. The architecture follows the general form of an earlier approach to neural language processing. [word2vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/) and [Natural Language Processing (almost) from Scratch](https://md.research.elamur.ai/free/en/papers/collobert-2011-natural-language-processing-almost-scratch/).

The authors also vary the training conditions. With [dropout](https://md.research.elamur.ai/free/en/papers/srivastava-2014-dropout-simple-way-prevent/), temporary suppression during training can make a usually helpful component unavailable on some passes. Other comparisons remove selected GloVe coordinates before retraining. That procedure changes what a new classifier can learn to use. Ordinary erasure after training asks about the network that already exists. Retraining after removal asks whether a new network can learn the task with the remaining representation. Identical-looking omissions can consequently support very different conclusions depending on when they are made.

For the sentence experiments, the starting material is a parse tree with sentiment annotations on its constituents. A constituent is a unit picked out by the tree, such as a phrase within a sentence. The authors turn each constituent into a sequence of tokens, then use a recurrent architecture to map the sequence into a representation for a softmax classifier. Softmax gives a probability distribution over the sentiment labels. Though the annotations come from parse trees, the tested recurrent architectures process the constituent as a sequence. [Stanford Sentiment Treebank](https://md.research.elamur.ai/free/en/papers/socher-2013-recursive-deep-models-semantic-compositionality/).

The comparisons include a standard recurrent neural network, or RNN, with tanh activations, a unidirectional long short-term memory network, or Uni-LSTM, and a bidirectional version, or Bi-LSTM. Recurrence lets previous processing affect a network’s response at later positions. An LSTM adds gates that control the flow of information through its state. The bidirectional architecture processes a sequence in both directions, making information from either side available to its representation. The importance experiment is applied to the trained classifiers. It therefore compares the resulting behavior of architectures that differ in recurrence, gating, or directionality.

#### Searching for words that change a label

The hotel-review experiment changes both the scale of the intervention and the question the authors ask. They seek a set of word positions whose joint removal changes the predicted rating. A phrase can matter as a unit even when removing each word separately leaves enough evidence for the original prediction. A long review can also repeat a judgment in several places. A useful deletion may therefore include words in a single passage or evidence spread through the document.

The paper represents the input as a word sequence.

```
e = {w₁, w₂, …, wₙ}
```

Here e is the input text. Each w is a word occurrence, with its subscript locating it in the input. The ellipsis indicates the intervening positions, and n stands for the length, written as N in the paper’s equations. The braces here enclose the words in sequence order. A repeated word can occupy multiple positions, so a deletion decision is made for an occurrence within that sequence.

The search objective is to minimize the size of the deletion while changing the predicted class.

```
min_D |D|   subject to   Lₑ₋ᴅ ≠ Lₑ
```

D is the set of word positions chosen for deletion, and |D| is the number of occurrences it contains. The minimum is taken over choices of D. The subscript e−D refers to the original sequence with those words removed. Lₑ₋ᴅ is the predicted label on that shortened sequence, and Lₑ is the predicted label on the original. The inequality is the condition that the two predictions differ. Here the labels used in the comparison come from the classifier itself. A change can satisfy the constraint whether or not the original prediction agrees with the rating assigned by the reviewer.

The number of possible deletions grows rapidly as a review gets longer. The paper therefore uses reinforcement learning, in which a policy learns from a reward delivered after its decisions are evaluated. The policy is denoted by π. For each word at position t, it receives the representation the fixed classifier produced for that position. It assigns probabilities to two choices for a variable called zₜ. A value of 1 means remove the word, and 0 means keep it. Once those decisions have been made for the whole sequence, the removed words form D. The shortened text is then classified again by the same network.

Learning which words change an aspect rating The steps in order.

#### Rewarding short, readable deletions

The basic reward grants credit only when the predicted class changes. Among successful deletions, it gives more credit to smaller sets.

```
L(e,D) = (1 / |D|) · 𝟙(Lₑ₋ᴅ ≠ Lₑ)
```

L(e,D) is the reward for deletion set D on input e. Its first factor is the reciprocal of the number of removed words. The centered dot denotes multiplication. The indicator 𝟙 has value 1 when the condition inside it holds and 0 when it fails. The two labels are the classifier’s predictions after and before deletion. The written reciprocal assumes a nonempty deletion, while the verbal rule gives no flip reward when the input is kept intact. The paper gives no separate convention in the displayed expression for evaluating the reciprocal on an empty set.

A short deletion can still be hard to read if its words are scattered through a sentence. The policy therefore pays an additional cost for switching between keeping and dropping words within sentences.

```
Ω(e,z) = γ ∑ₛ∈S ∑ₜ∈s |zₜ − zₜ₋₁|
```

Ω is the penalty on the pattern z of decisions for input e. S is the collection of sentences in e, and s is a particular sentence in that collection. The inner sum ranges over positions t within s. The two z values refer to the current and preceding decisions. The vertical bars give the absolute difference, which registers a switch between the two binary choices. The outer sum collects these contributions over the sentences, and γ scales their effect on the reward. Consecutive deletions can thus be less costly under the penalty than isolated deletions that introduce more switches. Group lasso, which encourages structure in selected features, is the inspiration the authors give for this term.

The final reward deducts the switching penalty from the label-change reward.

```
R(e) = L(e,D) − Ω(z₁:ₙ)
```

R(e) is the reward for the current sampled decision sequence on e. L(e,D) is the reward attached to the resulting deletion set. Ω is the penalty just defined, with its dependence on the input implicit here. The notation z₁:ₙ denotes the full sequence of keep or remove decisions from the first word to the last, with n again representing the paper’s N. The subtraction means that both the success of the deletion and its pattern affect the training signal.

The penalty gives the search a preference for coherent stretches of words. Shortness and coherence can pull in different directions. A scattered choice might delete fewer words, while a connected phrase might involve fewer switches. The policy optimizes the reward that combines these properties, so the deletion it proposes is shaped by the regularizer as well as by the classifier’s response. This is one reason to distinguish the result of the learned policy from the exact solution to the minimum-deletion problem.

#### Learning from complete deletion attempts

The policy’s objective is an expected reward, because its choice at each position is sampled and different attempts on the same review can remove different words.

```
J(θ) = 𝔼π[R(e) | θ]
```

J is the objective as a function of the policy parameters θ. The expectation 𝔼π is taken over decision sequences sampled from policy π. R(e) is the final reward of one such sequence on the current example. The vertical bar indicates that the sampling distribution is determined by the current parameter values θ. Optimizing J encourages the policy to assign more probability to patterns that produce better rewards on average.

The classifier’s final label gives a discrete success condition. To update the policy from sampled outcomes, the authors use a likelihood-ratio gradient estimate. In conventional notation, the estimate they describe is as follows.

```
∇θ J(θ) ≈ ∇θ log π(z₁:ₙ | θ) · (R(e) − b(e))
```

The symbol ∇θ denotes differentiation with respect to θ, and ≈ indicates a sample-based approximation to the objective’s gradient. The logarithm is applied to the probability π gives the sampled decision sequence z₁:ₙ at the current parameter values. The dot multiplies the resulting gradient by the scalar difference in parentheses. R(e) is the realized reward, and b(e) is a baseline estimate for the same input. A reward above that baseline favors decisions like the sampled ones. The baseline is intended to reduce variability in the estimate while preserving its expected value.

The paper trains another network to estimate the baseline reward under the current policy, following a precedent from sequence training. The sentiment classifier stays fixed throughout this process. Its original representations supply the inputs to the deletion policy, and its responses to shortened reviews supply the label-change signal. As the policy improves, the classifier being investigated remains the same. [Sequence Level Training with Recurrent Neural Networks](https://md.research.elamur.ai/free/en/papers/ranzato-2015-sequence-level-training-recurrent-neural/).

### Experiments and results

#### Linguistic labels and word properties

The coordinate experiments cover several kinds of supervised targets. In [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/), the classifier assigns a grammatical category to a word in context. The paper uses the Penn Treebank, with sections 0-18/19-21/22-24 for training, development, and testing, respectively. For [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), a word is assigned a label indicating a category such as person or location. The authors use the CoNLL-2003 shared-task benchmark. Chunking assigns labels that mark the beginning or interior of a phrase. For the chunking experiment, sections 15–18 of the CoNLL-2000 Wall Street Journal dataset served as training data, and section 20 served as test data. Validation data are split off from the training material. [CoNLL-2003 Shared Task on Named Entity Recognition](https://md.research.elamur.ai/free/en/papers/sang-2003-introduction-conll-2003-shared-task/).

The isolated-word tasks include properties of [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/), such as prefixes and suffixes. The authors segment words with Morfessor and retain the top 250 frequent prefixes and suffixes. They exclude single characters except for “s” and numbers. From a list of 200,000 frequent words, 51,083 match a retained prefix and 78,804 match a retained suffix. The word split into training, development, and test sets uses the ratio 0.8/0.1/0.1. These labels let the authors ask whether the embeddings carry information useful for predicting parts of a word’s form.

The other isolated-word targets are sentiment, word shape, and frequency. Lexical sentiment comes from the MPQA subjectivity lexicon, which the appendix describes as containing approximately 8,000 entries. This is a separate use of sentiment labels from the sentence experiment. For word shape, the appendix describes assigning patterns such as X, XX, or XXX according to character count. For frequency, the authors count occurrences in a Wikipedia dump and predict the logarithm of the count. Frequency is evaluated by mean squared loss on the test data, with lower values better. The classification tasks use test accuracy, for which higher values are better. [Recognizing Contextual Polarity in Phrase-Level Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/wilson-2005-recognizing-contextual-polarity-phrase-level/).

The erasure heatmaps compare the responses of the trained classifiers across embedding coordinates and tasks. With word2vec, some tasks show sensitivity at the same coordinates. Dimension 34 is important for both part-of-speech tagging and chunking. Dimensions 4 and 31 are shared examples for named entity recognition and the prefix and suffix experiments. These patterns show that the trained classifiers sometimes draw on the same part of their input representation for different targets. A coordinate’s importance can be shared without the tasks assigning it the same linguistic meaning.

GloVe shows a more concentrated pattern. In the ordinary training condition, dimension 31 dominates across most targets. After it is removed and the classifiers are retrained, dimension 26 becomes prominent. When the authors remove both and retrain, sensitivity is spread across more coordinates. The paper reports that removing the pair and retraining does not cause a performance drop. Task performance and reliance on any given coordinate are therefore separate measurements in this setup.

The frequency analysis gives a measurable clue about these coordinates. For the magnitude of GloVe dimension 31 and word frequency, the paper reports R² = 0.55 and p \< 1×10⁻⁵. For dimension 26, it reports R² = 0.27 and p \< 1×10⁻⁵. These are associations with frequency in the authors’ analysis of the embeddings. They are distinct from both the test loss in frequency regression and the relative importance values obtained by erasure. The larger reported association for dimension 31 fits the fact that this coordinate emerged first as a dominant input. The result identifies a property to which its magnitude is related, leaving its other uses open.

#### Sentiment in phrases and sentences

The Stanford Sentiment Treebank contains 215,154 phrases in 11,855 sentences, with sentiment labels attached to constituents at different scales. The benchmark includes fine-grained evaluation with labels running from very negative through neutral to very positive. It also supports a coarse positive-versus-negative evaluation. The recurrent-network comparison emphasized by the paper gives accuracy for fine-grained sentence classification. The chart uses the reported accuracy values on that scale.

Recurrent architectures on Stanford Sentiment Treebank fine-grained sentence accuracy The bidirectional LSTM has the highest sentence accuracy among the recurrent architectures tested.

**The numbers**

| System or setting | accuracy |
| --- | --- |
| Standard RNN | 0.453 |
| Unidirectional LSTM | 0.501 |
| Bidirectional LSTM (this paper) | 0.526 |

The paper also places the bidirectional result alongside earlier tree-based approaches, citing fine-grained sentence results of 50.1 and 51.0. These are the earlier scores in the form the paper gives them. The comparison establishes the predictive setting in which the authors inspect words. The importance experiment then applies a different metric to the same classifiers, measuring their sensitivity to erasure. [Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks](https://md.research.elamur.ai/free/en/papers/tai-2015-improved-semantic-representations-tree-structured/).

In the selected sentiment-word comparisons, a recurring ordering emerges. The Bi-LSTM’s score tends to change more on deleting the selected indicators than the Uni-LSTM’s score, and the standard RNN tends to respond less than either. The ranked lists and the histogram of word importance support the observation more broadly. More words fall into high-importance ranges for the Bi-LSTM. The authors also show sentence examples in which the LSTMs give noticeable importance to an exclamation mark that intensifies the sentiment. The reported fine-grained accuracy measures successful prediction, while these word effects characterize some of the evidence each classifier uses.

Erasing a word can also favor the gold label. The authors gather such cases and inspect the contexts where they occur. Some involve a positive expression used to describe what happens in a film, with little bearing on how the reviewer judges the film. Others arise when apparently favorable language is qualified by a conditional or modal construction, or when local praise is outweighed by a less favorable assessment elsewhere. These cases move the analysis from ranking sentiment words in general to identifying particular places where their usual associations can mislead the classifier.

#### Ratings for separate aspects of a hotel

The document experiment drew on about 870,000 hotel reviews from TripAdvisor, averaging 120 words per review. Reviews contain separate aspect ratings on a scale of 1 to 5. The analysis focuses on value, rooms, service, and location. Each aspect gives the classifier a different target even when the review text it reads is the same. This makes it possible to ask whether the evidence implicated by erasure changes with the target rating.

The authors report that ratings for different aspects, including the overall rating, are strongly correlated. A classifier can consequently benefit from general positive or negative language even on a task defined for one aspect. To make examples with sharper distinctions available, the authors select 50,000 reviews for each aspect. The chosen reviews are those whose rating for the target aspect deviates most from the mean rating of the other aspects. The selection favors reviews where overall tone provides a less direct shortcut to the rating being examined.

The comparison uses a plain Bi-LSTM and a memory network with attention at word and sentence level. Each produces a representation of the review for a 5-class softmax rating predictor. The paper’s appendix also describes feature-based support vector machine baselines trained with SVM-light. A support vector machine is a classifier that learns a boundary using supplied features. The appendix observes that LSTM-based systems are less competitive on the aspect task than a simple bigram-based classifier, whose features include adjacent word pairs. This result concerns rating classification performance. The learned deletion policy investigates the content the classifiers depend on. [Aspect Level Sentiment Classification with Deep Memory Network](https://md.research.elamur.ai/free/en/papers/tang-2016-aspect-level-sentiment-classification-deep/).

For the deletion comparison, the paper presents examples of rating changes. The policy using the memory network’s representations finds more focused, aspect-specific material in the cases discussed. The one using the Bi-LSTM’s representations sometimes removes more words or selects content about another aspect or the reviewer’s overall experience. The distinction the comparison illustrates is about the character of the evidence. A deletion can succeed in changing a rating while containing material unlikely to explain a human judgment of that aspect. The examples make both the successful flip and the relevance of its selected words available for inspection.

### What the ablations show

#### Reliance on a coordinate can survive as reliance on a property

The comparison between fixed-network erasure and retraining is central to the embedding analysis. Suppressing a prominent input coordinate after training reveals how much the current classifier has come to depend on it. The network enters the test with weights learned while that coordinate was available. A substantial response to its removal is evidence about this particular learned solution. Removing the coordinate before training gives a new classifier a chance to use any alternative evidence that the rest of the embedding contains.

For GloVe, that alternative evidence initially includes another dominant coordinate. The emergence of dimension 26 after removal of dimension 31 is more informative than either ranking by itself. Each coordinate is associated with word frequency, and the second becomes prominent when the first is unavailable during training. The preserved performance after removing both and retraining shows that the measured tasks can still be learned using the remaining inputs. The authors interpret this as evidence that the original representations contain redundant useful information. The experiment leaves room for classifiers retrained without the pair to exploit a different mix of clues.

Word frequency also helps explain why the first GloVe heatmap has a concentration across tasks with very different labels. Frequency can be useful to several classifiers without being identical to the property any of them predicts. The frequency regression task gives the most direct check because frequency itself is the target there. In the dropout condition, dimensions 26 and 31 lose much of their prominence on most tasks while remaining conspicuous for frequency regression. This pattern gives the frequency interpretation support from the training comparison as well as from the measured associations.

The authors suggest a reason the word2vec results look different. They point to the way word2vec omits tokens in relation to word-type frequency and propose that it may account for the absence of comparably strong frequency coordinates in their word2vec analysis. The comparison here uses the resulting embeddings. The explanation about token omission is a hypothesis about their training, and the paper presents it in those terms. [Efficient Estimation of Word Representations in Vector Space](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/).

#### Dropout and depth change how sensitivity is distributed

In the tests with word2vec, dropout produces a more even pattern of importance across coordinates. In the GloVe tests, it reduces the wide dominance of the frequency-related pair. The authors’ interpretation follows from what the classifier experiences during training. A predictor that repeatedly encounters some inputs in suppressed form has an opportunity to learn useful responses from other inputs. The erasure results track how that training condition changes the apparent dependence on individual components.

The hidden-layer analysis applies the same measurement at different depths of the tagger. In the part-of-speech experiment, the first layer shows more concentrated importance, while higher layers show generally weaker and more even responses to the removal of individual units. The appendix presents analogous views for other tasks. The authors interpret the pattern as a redistribution of useful information as it is transformed through the network. In practical terms, the reported part-of-speech decisions withstand the removal of a single selected higher-layer unit better than they withstand removal of some of the most consequential input coordinates.

The unit of this test matters. A network can be insensitive to the loss of individual units while depending strongly on the information they convey together. The heatmaps probe dimensions separately. They show where a single removal does the most damage and how that damage varies by layer. The GloVe retraining experiments complement this view because they test whether an apparent dependence can shift when training changes the available coordinates.

#### The recurrent comparisons expose different uses of sentiment cues

The Stanford Sentiment Treebank comparison tests each trained recurrent architecture on the effects of deleting sentiment indicators. The Bi-LSTM’s stronger sensitivity, along with the examples involving intensification, supports the authors’ observation that the LSTMs focus more strongly on some relevant expressions. The authors suggest that learned gates help control which information survives to influence the sentiment score. That is an explanation of the observed pattern. The comparison covers complete architectures, so it measures the joint result of their design choices and training.

The examples in which erasure improves the probability of the correct label show the other side of sensitivity. A strong response to a sentiment-bearing word can help when the sentiment is asserted straightforwardly. That response can hinder the classifier when the same kind of word carries a different function in context. The paper discusses a happy ending in a negative film judgment as an example. The ending can be described as happy while the film as a whole is judged harshly. Removing the adjective shows how descriptive content can influence the predicted evaluation.

Other cases involve a local expression whose ordinary polarity is altered by its surroundings. An approving adjective beside an insult can contribute to a very different overall reading from the adjective alone. A statement that the reviewer ought to be enjoying a film introduces an expectation, leaving the actual experience to be inferred from the broader context. The paper also discusses irony in advice to lower expectations as a way to give the film a chance. Words associated with hope and enjoyment can occur in a passage whose overall force is unfavorable.

Concessive passages provide a related test of [discourse analysis](https://md.research.elamur.ai/free/en/topics/discourse-analysis/). A reviewer can praise a performance while calling the film flat, or call parts of the experience pleasing while judging the effort mostly routine. The importance of the favorable expression depends on the proposition it modifies and on how the clauses are related. Erasure provides a way to locate an influence in these examples. Interpreting the influence requires reading the remaining text and its relation to what was deleted. The authors use the resulting cases to diagnose problems involving local meaning, modality, irony, and the organization of a judgment across clauses.

#### Aspect deletions reveal what can overturn a rating

The comparison on hotel reviews applies the same label-flip goal to different underlying predictors. For a rating about one aspect, ideally the words whose removal matters concern that aspect. A general remark about the stay might correlate with several ratings and still change one of them when removed. The paper’s examples show this kind of behavior more frequently in deletions found for the Bi-LSTM. They illustrate how an architecture can arrive at an aspect-specific output by drawing on broad evaluative content.

For the memory network, the illustrated deletions more often isolate a phrase that a reader can connect to the targeted aspect. The authors view that result as an advantage in interpretability and relate it to the representations provided by the underlying predictor. The comparison includes the policy’s own effectiveness at finding deletions from those representations. Its output shows what the investigation could recover from each classifier under a shared objective. The paper motivates the switch penalty as a way to favor connected text. The examples do not provide a separate quantitative comparison of learning with and without that penalty.

### Limitations

#### Limits identified by the authors

The paper explicitly describes the deletion search as approximate. Exhaustive comparison of word subsets is impractical for long inputs, which is why the authors use a learned policy. A successful deletion demonstrates that the classifier changes its answer on the shortened review. Establishing that the deletion is globally smallest would require a stronger verification procedure. The search can also produce a pattern favored by the contiguity term. The practical objective therefore balances successful label changes, smaller deletions, and fewer switches in the deletion pattern.

The authors treat several explanations of their findings as hypotheses. They connect the different GloVe and word2vec patterns to how the embedding algorithms handle word frequency. They also suggest that LSTM gates account for a stronger focus on sentiment cues. These interpretations are consistent with the comparisons they present. The experiments measure how complete trained systems react to erasure, and broader claims about individual training mechanisms remain open.

The sentence-level error analysis identifies difficulties that the authors leave for subsequent work in sentiment analysis. The examples involve the meaning of sentiment words under irrealis expressions, which describe possibilities or expectations, and in contexts involving irony or concession. Discovering that a deletion improves the gold-label score gives a researcher an example of the difficulty. The paper uses such discoveries to inspect the classifiers and characterize recurring types of error. Its training procedure for erasure leaves the sentiment classifier unchanged.

#### Limits of what the interventions establish

A word deletion can change the meaning and fluency of the input itself. This matters especially in a passage whose sentiment is carried by a qualification. If the deletion removes a contrast or an evaluation, a change in the predicted label may be a reasonable response to the altered passage. If the text becomes awkward or incomplete, the prediction can also reflect that disruption. The measured effect belongs to the exact operation performed on the exact text. A claim about how a human would read the original would require a judgment beyond the classifier’s response.

At the coordinate level, setting an activation to 0 imposes a particular replacement value. The other coordinates stay available, and the operation produces a vector the classifier can process. A zeroed coordinate may alter relationships between values that usually occur together. A large effect consequently shows dependence under this intervention. The link to a linguistic property requires additional evidence, such as the frequency correlations and the retraining comparisons used for GloVe. Those comparisons support an interpretation of particular coordinates in the embeddings studied.

Importance assigned to an individual coordinate also depends on the representation’s coordinate system. Information can be available across several coordinates, or a classifier can learn to recover useful clues from a different portion of the input when retrained. The experiments make that distinction visible for GloVe. They establish the importance of these coordinates for the fitted classifiers under the stated conditions. Defining a task-independent meaning for a coordinate would require evidence about its behavior across further uses and inputs.

The study measures many single-element effects. Those effects need not combine additively when several words or dimensions are erased together. With repeated evidence, each individual deletion may leave a prediction secure even though a joint deletion changes it. With a phrase whose meaning depends on its parts, removing one word may alter the role of the others. The learned deletion search addresses some such cases by allowing joint removal. For any returned set, the observed label change belongs to the set as a whole, with individual contributions left to separate tests.

The sign inconsistency in the printed importance definition matters for reproducing rankings. A reader can determine whether a deletion helps by comparing gold-label probabilities directly. Reproducing a signed ranking requires an explicit choice of score convention, because the displayed negative log probability and the prose’s interpretation assign opposite signs to a favorable removal. The normalization also presupposes a non-zero original score. For the frequency task, the appendix specifies mean squared loss as the evaluation metric. The displayed importance formula describes label probabilities, so the regression case requires a corresponding choice of score when implementing the sensitivity calculation.

#### Limits of the comparisons

The aspect analysis selects reviews with comparatively divergent aspect ratings. This gives the investigators a better opportunity to see whether a classifier responds to distinct subjects within a review. It conditions the evidence on a particular selection from the collected reviews. The selected cases can illustrate separation of aspect judgments. Their prevalence and the behavior of the deletion policy over the review collection as a whole are separate questions.

The hotel examples also provide qualitative evidence about interpretability. A phrase clearly about rooms is readily recognizable as such. That makes an illustrated deletion informative, especially alongside a competing deletion made up of diffuse or unrelated remarks. General claims about how frequently each classifier yields clean aspect explanations would require aggregate evidence about the deletions and a way to evaluate their relevance across reviews. The examples support conclusions about the cases shown and motivate the authors’ broader interpretation.

Finally, the gold-label score and the label-flip reward support different readings of success. The first evaluates movement towards or away from a reference answer. The second evaluates movement away from the classifier’s original choice, regardless of its correctness. A word whose erasure improves the probability assigned to the gold label can be a candidate for error analysis. A set of words that flips a rating tells the reader which intervention undid the original result. Determining whether the new rating is better calls for checking it against the review and the reference rating.

### What came after

Later papers citing representation erasure take up several objects of explanation. Their stated subjects range from training examples and input words to attention weights and internal units. These are recognizable extensions of the question the erasure paper made concrete. Each begins by deciding what part of a prediction process should be investigated, then asks what kind of evidence would count as an explanation at that level.

[Understanding Black-box Predictions via Influence Functions](https://md.research.elamur.ai/free/en/papers/koh-2017-understanding-black-box-predictions-influence/) approaches prediction explanations through influence functions. The object of investigation shifts towards the effect of training data on a prediction. In the erasure paper, the usual intervention concerns a component of the current input or its representation after the classifier has been trained. The training-data question reaches back to what shaped the fitted predictor. It extends the scope of dependence one can ask about when a particular output needs explaining.

[Right for the Right Reasons](https://md.research.elamur.ai/free/en/papers/ross-2017-right-right-reasons-training-differentiable/) brings explanations into training by constraining them. The erasure study shows why that move is of interest. A classifier can score well while using evidence that looks poorly related to the judgment a person would make, and single examples can expose this gap. Constraining explanations makes the desired basis for prediction part of the training problem. It thus addresses dependence at the point where it is learned.

[Attention is not Explanation](https://md.research.elamur.ai/free/en/papers/jain-2019-attention-is-not-explanation/) and [Is Attention Interpretable?](https://md.research.elamur.ai/free/en/papers/serrano-2019-is-attention-interpretable/) focus on what attention can tell a reader about predictions. The link to representation erasure is the distinction between seeing which components receive weight and examining what happens when their contribution changes. The hotel experiment supplies an especially relevant setting because one of its classifiers has attention at word and sentence level. The erasure analysis reads the affected text and checks the rating response. The later papers make the explanatory standing of attention itself the subject of investigation.

[Identifying and Controlling Important Neurons in Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/bau-2018-identifying-controlling-important-neurons-neural/) takes up importance and intervention at the level of individual neurons in translation. Representation erasure had used hidden-unit suppression to examine the distribution of dependence across layers of linguistic classifiers. The translation work’s stated aim adds control to identification. In that setting, finding an important neuron is a step toward investigating which behavior can be changed by acting on it.

[Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency](https://md.research.elamur.ai/free/en/papers/ren-2019-generating-natural-language-adversarial-examples/) connects word saliency to the generation of altered text that changes a prediction. The common element is using word-level evidence to study prediction sensitivity. In the erasure experiments, a successful deletion can be read as a clue about an original decision. In the later work, word saliency is part of generating adversarial examples. The different purpose changes what makes a result successful, even though both subjects concern decisions that can be changed by modifying a small part of a text.

[Comparing Automatic and Human Evaluation of Local Explanations for Text Classification](https://md.research.elamur.ai/free/en/papers/nguyen-2018-comparing-automatic-human-evaluation-local/) turns to how individual explanations are judged. The hotel study makes the issue tangible. A label change provides an automatic success condition, while the relevance of the removed text to service or location is something a reader can assess. Comparing automatic and human evaluation makes that relationship an explicit research question. It concerns the quality of an explanation after an intervention has already shown that the selected words affect the classifier.

[Analysis Methods in Neural Language Processing](https://md.research.elamur.ai/free/en/papers/belinkov-2019-analysis-methods-neural-language-processing/) surveys the broader area to which these experiments belong. [Neuron-level Interpretation of Deep NLP Models](https://md.research.elamur.ai/free/en/papers/sajjad-2022-neuron-level-interpretation-deep-nlp/) takes the more specific subject of interpreting individual units. Together their scopes reflect two scales already present in the erasure study. Its common measurement can be applied across tasks, while the meaning of a result depends on what was removed and what output was measured. That combination of a general intervention and a task-specific interpretation is what allows a coordinate in a tagger, a sentiment word in a sentence, and a passage in a hotel review to be investigated within the same framework.

## Cite

Cite as Jiwei Li, Will Monroe and Dan Jurafsky. 2016. Understanding Neural Networks through Representation Erasure. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1612.08220](https://doi.org/10.48550/arxiv.1612.08220) · [arXiv 1612.08220](https://arxiv.org/abs/1612.08220)

```bibtex
@misc{li2016understanding,
  title = {{Understanding Neural Networks through Representation Erasure}},
  author = {Jiwei Li, Will Monroe and Dan Jurafsky},
  year = {2016},
  doi = {10.48550/arxiv.1612.08220},
  eprint = {1612.08220},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1612.08220}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
