---
title: "Explaining Predictions of Non-Linear Classifiers in NLP (2016)"
description: "Arras and colleagues use layer-wise relevance propagation to explain topic classifications and test which highlighted words support or oppose…"
canonical: "https://research.elamur.ai/free/en/papers/arras-2016-explaining-predictions-non-linear-classifiers/"
---
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/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/arras-2016-explaining-predictions-non-linear-classifiers/)

[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/) / Explaining Predictions of Non-Linear Classifiers in NLP

# Explaining Predictions of Non-Linear Classifiers in NLP

Paper · 2016 · Leila Arras, Franziska Horn, Grégoire Montavon et al.

**Authors:** [Leila Arras](https://md.research.elamur.ai/free/en/authors/leila-arras/), Franziska Horn, Grégoire Montavon, [Klaus-Robert Müller](https://md.research.elamur.ai/free/en/authors/klaus-robert-muller/) and [Wojciech Samek](https://md.research.elamur.ai/free/en/authors/wojciech-samek/) · **Year:** 2016 · **Venue:** Proceedings of the 1st Workshop on Representation Learning for NLP · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **40** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/arras-2016-explaining-predictions-non-linear-classifiers/cited-by/) · Proceedings of the 1st Workshop on Representation Learning for NLP · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/W16-1601/)
- [PDF](https://aclanthology.org/W16-1601.pdf)
- [DOI 10.18653/v1/w16-1601](https://doi.org/10.18653/v1/w16-1601)

## Summary

A document classifier can give the right label while leaving an important question unanswered. Which words led it there? The question matters when a document mentions several topics, when a decision looks surprising, or when a reader wants to know whether a term counted for or against a category. Arras and colleagues study this problem in [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) using a convolutional neural network trained on 20Newsgroups. They adapt layer-wise relevance propagation (LRP), an explanation technique used in image classification, to assign a signed contribution to each word in a document for a selected category. They compare it with sensitivity analysis (SA), which ranks words by how strongly small changes to their numerical representations would affect the same category score.

The distinction is easiest to see when the selected category changes. A word can support a motorcycle classification and count against a different category in the same document. LRP can express that change with a change of sign. The paper’s version of SA squares the derivatives it uses, so its highlights express the size of a local response without distinguishing support from opposition. The authors illustrate the difference with a correctly classified space newsgroup document that contains the word *ride*. LRP assigns the word strong negative relevance for the illustrated targets other than `rec.motorcycles`, while SA gives it some positive highlighting.

The authors also test the rankings by replacing selected word vectors with zeros and rerunning the classifier. For initially correct test documents, removing words in descending order of LRP relevance makes accuracy fall faster than removing words in SA order or at random. For initially incorrect documents, removing the lowest-ranked LRP words improves accuracy. Both experiments explain the score for the true category. The second therefore asks which parts of a misclassified document counted against the category it should have received.

A further experiment uses the explanations to weight word vectors before visualizing the test documents. When each word receives a single weight, standard SA and LRP produce plots of similar quality. When weighting takes place separately in each embedding dimension, LRP produces the clearest clusters in the authors’ visual comparison. Together, the experiments show where signed relevance helps on this task and where the choice between the two methods depends on how the explanation will be used.

## Deep dive: Explaining Predictions of Non-Linear Classifiers in NLP

Arras and colleagues use layer-wise relevance propagation to explain topic classifications and test which highlighted words support or oppose a decision. · 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

#### Explaining a decision about a particular document

The paper addresses [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/) at the level of an individual prediction. A document goes into a classifier, and the classifier produces numerical scores associated with possible categories. A category label tells the reader which score won. An explanation connects a selected score to the words in the document. The selected score can belong to the winning category, the known category of a misclassified document, or another category the reader wants to examine. That freedom matters because a display of important words is interpretable only once the reader knows what those words are supposed to explain.

A topic classifier has an especially natural unit of explanation. The reader sees words and can consider their meaning in context, while the network receives numerical coordinates and processes them through several layers. The paper treats that mismatch as part of the problem. It starts with scores for individual input coordinates and pools them into scores for words. A reader can then inspect the original sequence with highlights, and an experiment can use the same scores to choose words to perturb. The explanation and its evaluation consequently refer to the same visible units of text.

Nonlinearity complicates the assignment. In the network studied here, a word can participate in different local windows, a rectifier can suppress a response, and a pooling operation can choose a response from one location over responses elsewhere. The contribution attributed to a word can therefore depend on which other words occur nearby and which feature responses win across the document. An account of a particular decision has to follow the computation for that document. A list of terms associated with a category across the dataset would answer a broader question and could miss their role in the case at hand.

Arras and colleagues formulate the explanation around a scalar output. This keeps the task specific even though the classifier can score many categories. A word’s assigned relevance has meaning relative to that scalar, and separate explanations can be produced for separate categories without changing the document. A reader investigating an error might first ask what supported the winning category, then ask what reduced the score for the known category. The paper’s experiments use this ability to select a target deliberately, with a different target policy for deletion and document visualization.

#### From image regions to words

The authors place their study in a period when neural approaches were receiving growing attention in [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/). They point to Bengio and colleagues and to Collobert and colleagues as influential earlier work. Collobert’s work is also relevant to the particular network studied here because the authors adopt the idea of pooling a feature across the length of a text. [A Neural Probabilistic Language Model](https://md.research.elamur.ai/free/en/papers/bengio-2003-neural-probabilistic-language-model/) and [Natural Language Processing (almost) from Scratch](https://md.research.elamur.ai/free/en/papers/collobert-2011-natural-language-processing-almost-scratch/) supply that background.

The paper traces much of the impetus for visual explanations to computer vision. Earlier work had examined neural classifiers through visualizations, and the authors also mention decision tree extraction as another approach to understanding trained networks. The visualization line is particularly close to their question. An image display can group the numerical channels of a pixel and show where a classifier responds. In text, the analogous grouping puts the coordinates of a word vector back together and displays the resulting value at that word’s position. The paper situates this idea alongside [Visualizing and Understanding Convolutional Networks](https://md.research.elamur.ai/free/en/papers/zeiler-2013-visualizing-understanding-convolutional-networks/) and [Deep Inside Convolutional Networks](https://md.research.elamur.ai/free/en/papers/simonyan-2013-deep-inside-convolutional-networks-visualising/).

For earlier attempts to explain neural text classifiers, the authors emphasize gradient-based work by Denil and colleagues and by Li and colleagues. A gradient describes the immediate response of an output to changes in its input coordinates. It supplies a direct way to make a highlight because a large derivative identifies a coordinate at which a small change can affect the output. Once coordinates are grouped by word, the researcher can compare the sensitivity of different positions in a document. How the coordinate derivatives are grouped, and whether their signs survive that grouping, determines what the highlight represents.

LRP came to this NLP study from earlier work on explanations of nonlinear classifiers. The approach had already been formulated as a redistribution of a prediction score, and the authors cite image classification studies that evaluated the resulting explanations. They ask whether the same principle works with sequences of vectors standing for words. The move from images to text preserves the idea of grouping numerical inputs into readable units. It also gives the authors a domain-specific intervention for testing the rankings. They can zero the vector at a word position and observe what happens to the classification.

#### Sensitivity and evidence

The two approaches give the word *important* different operational meanings. For SA, a word is important when the output has a large local gradient with respect to that word’s coordinates. The gradient is evaluated at the document being explained. For LRP, a word is important when it receives a substantial share of the selected output during redistribution through the active network. The shares can be signed. This gives LRP a way to distinguish evidence that raises a particular score from evidence that reduces it, according to the propagation rule.

A local change and a contribution to the current score are different quantities. A derivative describes what happens in the vicinity of the current input along a specified direction. A word vector has many coordinates, so those directions need not correspond to familiar changes such as replacing a word with a synonym. Squaring and pooling the derivatives further turns the answer into a magnitude. LRP starts from the score already assigned and works back through the network’s computation. The authors’ evaluation asks how these different definitions behave when used to rank whole words. That question can be addressed even when there is no annotated list of the words a classifier actually used.

### The method, step by step

#### Turning a newsgroup document into category scores

The classifier starts from a cleaned and shortened document. The authors strip message headers, then use the recommended sentence and word tokenizers in NLTK version 3.1. Their filtering rule keeps tokens containing at least one alphabetic character and permits alphabetic characters together with apostrophes, hyphens and dots. This describes the treatment of punctuation more precisely than a blanket removal rule because a retained word can contain some of those marks. The authors cap the resulting sequence at the first 400 tokens. All relevance in the study refers to the input after these operations.

They represent the retained words with 300-dimensional pretrained word2vec [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/). For each document, the vectors are placed side by side in the order of the words. A column represents a word at a particular position, and its entries are the coordinates the network receives. This arrangement preserves the local order the convolution will use. The authors use the GoogleNews word2vec vectors and hold the input embeddings fixed during training.

The convolution moves along the sequence. At each position, a filter covers the full embedding dimension and spans two consecutive words. It can therefore respond to a combination of numerical features across adjacent word vectors. The bank has 800 filters, and each produces its own sequence of responses. The rectified linear unit, or ReLU, follows convolution. It keeps positive responses and sets negative responses to zero, so a strong response at one location can remain available for pooling while a negative response is suppressed.

The next operation, called 1-Max-Pool, takes the largest activation for each filter across the available positions in the text. A filter may have responded at several locations, but the value carried into the final layer is its maximum. Different filters can select different locations. A fully connected linear layer combines the pooled responses into the classifier’s category scores. This layout gives the authors a particular route for tracing a score back to the text. The final layer determines how the pooled responses contribute, and the pooling choices determine where those responses came from.

The training split supplies the documents and category labels used to fit the classifier. The authors train with stochastic mini-batch gradient descent and momentum, using an ℓ₂-norm penalty and dropout. In mini-batch training, each update draws on a group of training examples. Momentum carries information from previous updates, while the penalty and dropout are training regularizers. The experiments explain the resulting classifier after training. The network and its word representation provide common inputs to both explanation methods, so an LRP ranking and an SA ranking can be compared for the same document and selected score.

From a newsgroup document to a word explanation The steps in order.

#### The score being explained

The authors write the selected output as a function of the network input. A document has many category scores, so choosing the target fixes which one enters this function. The decomposition LRP seeks is:

```
f(x) = ∑ₐ Rₐ
```

Here `x` is the complete numerical input for the document, and `f(x)` is the output for the selected category. The index `a` runs through individual input variables, which in this classifier are the embedding coordinates at all word positions. `Rₐ` is the relevance assigned to input variable `a`, and `∑ₐ` adds those values across the input.

The equation states a conservation property. The explanation redistributes a specified numerical amount, and the final relevance values collectively account for that amount. With signed values, substantial positive and negative contributions can cancel. A whole document can consequently contain strong assigned evidence in both directions even though its contributions add to a modest score. Reading the score and reading its decomposition answer related questions about the same forward computation.

The decomposition begins at the chosen output and proceeds backward, layer by layer, over the connections that carried information forward. It helps to distinguish an activation from a relevance value. The activation is the value a unit computed from the document. Its relevance is the amount of the selected output attributed to that unit during the backward pass. An activation can be shared across explanations for several target classes. The relevance assigned to it can change with the target because each explanation starts from a different output.

#### How relevance passes through a unit

The authors describe the propagation rule for a unit that first forms a weighted sum and then applies an increasing activation function. They spread the unit’s bias evenly over the inputs for the purpose of constructing the contributions. The resulting contribution for an individual connection is:

```
zᵢⱼ = xᵢ wᵢⱼ + bⱼ/n
```

Here `i` indexes an input unit and `j` indexes the unit that receives it. `xᵢ` is the forward activation of input unit `i`, `wᵢⱼ` is the weight on the connection from `i` to `j`, and `bⱼ` is the bias for receiving unit `j`. `n` is the number of inputs to that unit. `zᵢⱼ` is the contribution of input `i` to the pre-activation of `j`, including its share of the bias.

The unit adds those contributions before applying its activation function:

```
zⱼ = ∑ᵢ zᵢⱼ
```

Here `zⱼ` is the pre-activation of receiving unit `j`. `zᵢⱼ` is the contribution from input unit `i`, and `∑ᵢ` sums the contributions of all the inputs to `j`. Since each input was assigned an equal portion of the bias, the sum includes the full bias.

The forward activation is:

```
xⱼ = g(zⱼ)
```

Here `xⱼ` is the activation produced by unit `j`, `g` is the increasing activation function in the authors’ description of the rule, and `zⱼ` is the pre-activation just defined. In the classifier’s convolutional stage, rectification is the operation that converts the weighted response into the activation available to pooling.

This setup gives the backward pass information about the contributions that actually occurred for the input. A weight describes a connection shared across examples. The product of a weight and an activation describes what that connection contributed for the current example. The relevance rule uses these products, together with the allocated bias, to determine how much relevance the predecessors receive. Signed connection contributions can yield signed messages.

The authors stabilize the denominator used in the redistribution. Their stabilizer is:

```
s(zⱼ) = ε · (𝟙[zⱼ ≥ 0] − 𝟙[zⱼ < 0])
```

Here `s(zⱼ)` is the stabilizing quantity for unit `j`, and `ε` is set to `0.01` in the paper. `𝟙` is an indicator, which takes the value one when its bracketed condition holds and zero otherwise. `zⱼ` is the unit’s pre-activation, `≥` means greater than or equal to, `<` means less than, and `·` indicates multiplication. The stabilizer is positive for a non-negative pre-activation and negative for a negative one, which moves the denominator away from zero.

Each input receives this message from the receiving unit:

```
Rᵢ←ⱼ = [(zᵢⱼ + s(zⱼ)/n)/(∑ᵢ′ zᵢ′ⱼ + s(zⱼ))] Rⱼ
```

Here `Rᵢ←ⱼ` is the relevance sent back from unit `j` to input unit `i`, as indicated by the left arrow. `Rⱼ` is the relevance already assigned to `j`. `zᵢⱼ` is the forward contribution associated with the connection being credited, and `s(zⱼ)/n` apportions the stabilizer using the number `n` of inputs to `j`. The index `i′` runs over those inputs in the denominator, with `zᵢ′ⱼ` denoting each contribution. The denominator adds the stabilizer to the sum of forward contributions.

The denominator expresses the common total against which the individual numerators are measured. The stabilizing amount appears in the denominator and is distributed among the numerators. Summing the numerators for the inputs therefore reconstructs the denominator, giving the local conservation relation:

```
∑ᵢ Rᵢ←ⱼ = Rⱼ
```

Here `∑ᵢ` adds the messages to all input units `i` of unit `j`. Each `Rᵢ←ⱼ` is the amount sent to a particular input, and `Rⱼ` is the unit’s incoming relevance. The relation describes preservation of the total across all the messages, even when individual messages differ in sign.

An input can contribute to several units above it. Its relevance includes every message routed to it:

```
Rᵢ = ∑ⱼ Rᵢ←ⱼ
```

Here `Rᵢ` is the relevance accumulated by lower-layer unit `i`. `∑ⱼ` adds messages from the upper-layer units `j` that receive input from `i`, and `Rᵢ←ⱼ` denotes each one of those backward messages. This accumulation matters for convolution because a word coordinate can appear in overlapping windows and in computations associated with different filters.

At the level of a whole layer, the conservation statement is:

```
∑ᵢ Rᵢ = ∑ⱼ Rⱼ
```

Here `i` indexes the units in the receiving layer of the backward pass, and `j` indexes those in the sending layer. `Rᵢ` and `Rⱼ` are the respective unit relevances. The two summation signs total the relevance on each side of the propagation step. Repeating such steps carries the selected output back to the input.

Max pooling uses a separate routing rule. The activation selected as the maximum in the forward pass receives all the relevance assigned to that pooling output. This concentrates the explanation on the positions that supplied the pooled features. A window can matter to the explanation through one filter even when it failed to win for another. Once the backward pass reaches the convolutional inputs, the contributions associated with all the routes to a particular embedding coordinate have been accumulated.

The paper identifies the Layer-wise Relevance Propagation Toolbox as an implementation of LRP and describes the available code at the time as oriented towards images. In this application the object of explanation is a sequence of word2vec columns. The propagation produces values in that numerical layout, and the next part of the method converts them to scores at positions a reader can locate in the text.

#### How sensitivity is calculated

Sensitivity analysis uses the same selected output and evaluates how it changes locally with an input coordinate. The paper’s standard coordinate-level score is:

```
Rₐˢᴬ = (∂f(x)/∂xₐ)²
```

Here `Rₐˢᴬ` is the sensitivity assigned to coordinate `a`. `f(x)` is the selected category output for the complete input `x`, and `xₐ` is the particular coordinate under consideration. The partial derivative `∂f(x)/∂xₐ` measures the local rate of change of that output as the coordinate varies with the other coordinates held fixed. The square marks the multiplication of the derivative by itself.

Squaring gives derivatives of equal magnitude the same sensitivity regardless of sign. In this calculation, a strongly negative derivative and a strongly positive derivative receive equal emphasis if their magnitudes agree. The result is a measure of responsiveness. In the paper’s comparison, this is the reason an SA highlight cannot by itself say whether a highlighted word counted for or against the target.

The coordinate scores add up to a total connected to the size of the gradient:

```
‖∇ₓ f(x)‖₂² = ∑ₐ Rₐˢᴬ
```

Here `∇ₓ f(x)` is the gradient of the selected output with respect to all coordinates of input `x`. The notation `‖ ‖₂` denotes the Euclidean norm, and its superscript `²` squares that norm. `∑ₐ` runs through all input coordinates, and `Rₐˢᴬ` is the squared derivative assigned to coordinate `a`. This equality gives SA an additive coordinate total tied to the gradient.

For LRP, the relevant total is the category output that is being explained. For SA, the total concerns the size of that output’s immediate response to changes in the input. The paper uses the squared norm in most of its SA experiments because it can be written as a sum of coordinate scores. That choice makes the aggregation by word straightforward while preserving the distinction between the quantity SA measures and the quantity LRP redistributes.

#### From coordinates to words

The word-level explanation groups together all the coordinates at one position. The paper expresses the aggregation as:

```
R(wₜ) = ∑ᵢ₌₁ᴰ Rᵢ,ₜ
```

Here `wₜ` is the embedding for the word at position `t`, and `R(wₜ)` is the resulting score for that occurrence. `D` is the number of coordinates in an embedding. The sum starts at coordinate `1` and runs through coordinate `D`, with `i` identifying the current coordinate. `Rᵢ,ₜ` is the coordinate relevance previously obtained for that coordinate and position, whether by propagation or by squared derivatives.

The calculation attaches explanations to occurrences. The same word can appear at multiple positions, and each occurrence has its own coordinate scores because it participates in a different part of the computation. In the LRP version, summing at a position combines potentially opposing coordinate contributions into a net signed value for that word. In the SA version, the coordinate scores are non-negative, so a higher word score means a larger total of squared derivatives.

The SA aggregation can also be written directly in terms of a word gradient:

```
Rˢᴬ(wₜ) = ‖∇wₜ f(d)‖₂²
```

Here `Rˢᴬ(wₜ)` is standard SA relevance at position `t`, and `d` denotes the document with its sequence of embeddings. `f(d)` is the selected output evaluated on that document. `∇wₜ` indicates a gradient with respect to the coordinates of `wₜ` alone. `‖ ‖₂²` is the squared Euclidean norm, which adds up the squared derivatives for that word.

For document visualization, the authors also use ordinary Euclidean length as a word weight:

```
Rˢᴬ⁽ℓ₂⁾(wₜ) = ‖∇wₜ f(d)‖₂
```

Here `Rˢᴬ⁽ℓ₂⁾(wₜ)` is the alternative word score, `wₜ` is the embedding at position `t`, and `∇wₜ f(d)` is the gradient of the document’s selected output with respect to that embedding. `‖ ‖₂` is the Euclidean norm without the final square. The paper calls the variant SA(l₂). The magnitudes still order the words by the same underlying gradient length, but squaring changes the relative weights when the values themselves are used.

#### Using relevance to describe a whole document

For the visualization experiment, the authors create a new vector by combining the original word vectors. The first version attaches the same weight to all the coordinates of a word:

```
d′ = ∑ₜ₌₁ᴺ R(wₜ) · wₜ
```

Here `d′` is the resulting document vector. The index `t` runs from the first word, `1`, to the number `N` of words in the document. `R(wₜ)` is the word-level relevance, `wₜ` is the embedding at that position, and `·` denotes multiplication of a vector by a scalar. The summation adds the resulting scaled vectors. With LRP, a negative score gives the corresponding vector a negative coefficient in the sum.

The second version gives each coordinate of a word vector its own weight. Its coordinate form is:

```
(d′ₑ.𝓌.)ᵢ = ∑ₜ₌₁ᴺ Rᵢ,ₜ · (wₜ)ᵢ
```

Here `d′ₑ.𝓌.` is the element-wise weighted document vector, with the subscript standing for element-wise. The outer index `i` denotes a coordinate of that vector. `Rᵢ,ₜ` is the relevance of coordinate `i` at word position `t`, `(wₜ)ᵢ` is the original value of that embedding coordinate, and `·` multiplies the two values. The sum runs from word position `1` through `N`, the number of words. Keeping the coordinate weights allows different parts of the same embedding to make different contributions to the document representation.

Both representations use the classifier’s predicted category as the target when calculating relevance. The authors also add embeddings with uniform weights, a comparison they call SUM. After weighting, they normalize the resulting document vectors to unit ℓ₂ norm and project them with principal component analysis (PCA). The projection displays variation in the document vectors on a small number of axes, allowing the authors to inspect how documents from coarse topic groups are arranged. The weighted vectors belong to this analysis. They are constructed from the explanation of the trained classifier’s output.

### Experiments and results

#### The classifier and the test collection

The authors use the 20news-bydate version of 20Newsgroups. The training split has 11,314 documents and the test split has 7532 documents, distributed evenly across twenty fine-grained categories. The classifier reaches 80.19% classification accuracy on the test set. The score establishes how often the underlying classifier chose the recorded category before the explanation methods were applied. All the explanations in the study refer to this trained classifier, including explanations of cases in which that choice was wrong.

For context, the authors cite 83.0% as the best published accuracy on 20Newsgroups known to them. Their classifier uses a simplified, fixed-length document representation, and they treat the published figure as a reference for classification performance. The controlled comparisons of explanation methods use their own classifier throughout. The published result supplies historical context on the dataset and its numerical distance from the authors’ result is unnecessary for interpreting the explanation tests.

Reported 20Newsgroups classification accuracy for the study classifier and the published reference The published reference reports higher accuracy than the classifier used to compare the explanations.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Study CNN on the 20news-bydate test split (this paper) | 80.19 |
| Best published 20Newsgroups accuracy cited by the authors | 83.0 |

The experiments on explanation quality use different kinds of evidence. The deletion experiment measures classification accuracy after a ranked set of word vectors has been zeroed. The highlighted document shows the kinds of signals a reader can see once relevance is displayed in context. The projection experiment compares the apparent arrangement of categories under different ways of aggregating relevance. A method can fare differently in these settings because each setting uses the scores for a different purpose.

#### Ranked deletion on initially correct documents

The deletion experiments use test documents with a preprocessed length of at least 100 tokens, yielding 4963 documents that meet the restriction. The paper divides these documents according to the classifier’s initial correctness. The group assignment is made before perturbing the input, so the two curves answer questions about distinct starting conditions. Within each group, the classifier is then evaluated as successive word positions are zeroed.

For each document, the authors first calculate word scores for the true category. They then follow the resulting ranking and simulate deletion by replacing the whole vector at a chosen position with zeros. The positions remain in the input. As more vectors are zeroed, the classifier processes the altered document and its predicted category can change. The measured quantity is classification accuracy on the starting group at each deletion step. The explanation score provides the ordering, while the perturbed classifications provide the outcome.

In the initially correct group, the authors remove the highest-ranked words first. A useful ranking for this condition should identify words whose loss makes the classifier less likely to retain its correct decision. They compare LRP’s descending signed relevance order, SA’s descending sensitivity order, and random word selection. The random-deletion curve is averaged over 10 runs, and the paper reports a standard deviation below 0.0141 for that baseline. This control shows the effect of removing word vectors without a relevance-based ordering.

LRP gives the steepest decline in accuracy in the authors’ comparison. SA also produces a faster decline than random deletion, indicating that the gradient ranking identifies words whose removal matters to the prediction. The SA curve stays above the LRP curve in the reported comparison. Since the experiment starts from correct decisions and is intended to remove support for them, the lower curve describes the stronger ranking in this setting. The decline measures how quickly the perturbation breaks the decisions rather than how well the original classifier performs.

The result gives a behavioral check on what high positive LRP relevance signifies in this application. The local redistribution was calculated on the original document and assigns much of the target score to particular words. The deletion curve then measures how the classifier behaves when those words are suppressed. Agreement between the ordering and the ensuing loss of accuracy supports the use of the positive end of the ranking to find words on which the correct classifications depended.

#### Ranked deletion on initially incorrect documents

For the initially incorrect group the authors retain the true category as the explanation target. That decision shapes the entire test. At the starting point, the true category is a losing output. The explanation can still assign relevance to its score, and under LRP it can identify words that contribute negatively to it. The experiment removes the lowest-ranked words first to see whether the altered document becomes easier to classify into its true category.

The polarity of the scores makes the comparison different from the descending-order experiment. At the low end of the LRP ranking are words with the most negative assigned contributions when such contributions are present. A small SA value means the gradient has a small magnitude at that word. The small value gives a reason to expect a weak local response under SA’s definition. This establishes why low-ranked words under the two methods can play different roles even though both lists are traversed in ascending order.

Accuracy increases when the lowest-ranked LRP words are removed. The authors interpret the rise as evidence that negative relevance identifies words inhibiting the true category decision. Removing the least sensitive SA words has less influence on classification performance than random word selection in this experiment. That result fits the interpretation of the low end of the SA ranking as a collection of relatively unresponsive input positions. It also helps explain why the corresponding deletion policy is a poor way to find opposition to the true category.

The output of the experiment is still a classification decision across all categories. Zeroing a vector can affect several scores, and a case counts as recovered when the true category becomes the predicted one. The increase in accuracy therefore establishes recovery under a relevance-guided intervention. The paper uses the pattern across documents to support the interpretation of negative relevance. The curve descriptions establish the ordering and direction of effects, with no exact deletion-step accuracies stated in the prose.

#### Reading the highlighted document

The qualitative example is the correctly classified test document `sci.space 61393`. The authors display word highlights for several selected categories and compare LRP and SA on the same text. The display maps positive relevance to red and negative relevance to blue. Each heatmap is tied to the target score identified beside it. This is important even for a correctly classified test case, since the word roles in the heatmap can change when the target category changes.

The authors single out *ride*. In the LRP views, the word receives strongly negative relevance for the illustrated targets outside `rec.motorcycles`. In the SA views it gets a positive highlight, although the emphasis is modest. Under SA that positive value indicates some sensitivity. Under LRP the negative value expresses an assigned contribution against the selected score. The two annotations use color to show values whose meanings arise from different calculations.

The example helps a reader interpret the two ends of the LRP deletion lists. A dark highlight can be relevant because it marks strong evidence against a category that someone is investigating. The same visual vocabulary can represent evidence for a category through the opposite sign. The paper uses one document to demonstrate the readability of this distinction. The deletion experiment separately tests whether the rankings are informative over a larger group of documents.

#### Comparing document projections

The document visualization experiment asks whether relevance can help construct vectors that reveal topical structure. The authors form weighted sums of the word2vec embeddings for test documents, then use a 2D PCA projection and color or label the arrangement by five top-level categories. The labels used to interpret the plot are therefore coarser than the classifier’s twenty categories. The relevance weights themselves were calculated for the predicted category of each document before the projection.

The baselines serve distinct purposes. SUM weights every word uniformly and provides a view of the structure retained by a plain sum of embeddings. The [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) comparison uses a different word weighting scheme and yields a projection the authors describe as very similar to SUM. The SA and LRP representations use weights tied to a classifier output. The visualizations use equal axis scales, allowing the authors to compare spread and separation without one plot receiving a more favorable scale.

For word-level weighting, standard SA and LRP give projections the authors regard as similar in quality. The ordinary-norm SA variant gives denser, partly overlapping clusters. The paper judges all these relevance-weighted word-level projections better than the uniformly weighted view. The comparison indicates that a useful word weight can come from either method in this setup, even though the deletion results favor LRP as a ranking of words that support a classification.

The authors report that weighting each element individually yields slightly more distinct clusters for SA and makes the cluster structure clearer for LRP. Here the improvement concerns the appearance of a projection after a change to the representation of each document. The authors give a visual assessment of the layouts. The strength of the effect is described through the overlap and separation of the plotted groups, and the finding belongs to this particular view of the test documents.

Taken together, the experiments establish different levels of agreement. The deletion ordering favors LRP in both starting groups, and the highlighted word illustrates the signed distinction that helps interpret the result on initially wrong documents. The projection comparison depends on the weighting procedure. It yields similar visual quality for the standard methods at word level and a clearer reported structure for LRP when coordinate scores are retained.

### What the ablations show

#### Ranking, sign and the random control

The paper offers controlled comparisons of explanations and ways to aggregate them. Its central control holds the trained classifier fixed and changes the ordering in which the word vectors are zeroed. The random ordering provides a reference for the effects of the intervention on its own. When removal guided by SA or LRP breaks correct classifications faster, the ordering is carrying information beyond the mere fact that some word vectors were removed. The difference between the relevance-guided curves shows how effectively each ordering serves the particular goal of the test.

The experiment on errors makes the role of sign especially clear. The low end of a magnitude ranking is the natural place to look for the least sensitive positions. The low end of a signed contribution ranking is the natural place to look for opposition to the target. Holding the true category fixed as the target lets the authors give those two readings concrete consequences. For LRP the low end contains words whose removal can help recover the true class, while for SA the low end offers little leverage in changing the output decision.

This comparison supports the authors’ interpretation of sign, while the methods also differ in what they calculate before any word-level pooling. LRP distributes an existing category score and uses activation-dependent contributions and pooling routes. SA uses a local derivative and squares it. The paper compares those complete procedures. A direct estimate of the isolated contribution of sign would require a comparison that changes sign handling alone. The authors accordingly explain the result in part through signed relevance and more generally through the distinction between score decomposition and local sensitivity.

The two starting groups also control the direction in which a relevant perturbation is expected to move accuracy. In the initially correct group, success for the explanation takes the form of breaking an existing classification. In the initially wrong group, success takes the form of recovering the recorded category. The tests look at complementary uses of a ranking. They are conducted on different documents and in different ranking directions, so the size of one change cannot serve as a matched estimate of the size of the other.

#### Why the gradient norm matters in one experiment

The comparison between ordinary and squared Euclidean norms is a more focused change. At word level both functions increase with gradient magnitude. Ranking a list by one therefore gives the same order as ranking it by the other, with ties preserved. The authors explicitly observe that the difference has no effect on the deletion analysis. The intervention needs an ordering, and both versions supply the same ordering of positions.

The projection experiment uses the numerical weights themselves when combining embeddings. Squaring gives comparatively more influence to words with larger gradient magnitudes within the document. Even after normalization, the resulting vector can point in a different direction because its components came from a different mixture of embeddings. The authors’ observation that ordinary-norm SA produces a denser and partly overlapping display belongs to that change in the mixture. A downstream procedure that uses the strength of a score can react to a change that leaves a rank-based procedure unaffected.

This comparison also clarifies why the visual and deletion findings can coexist. Two methods can yield similar-looking clusters after each document has been compressed into a single vector without ordering the words in the same way. Similarly, two weighting functions can take the same word ordering and still produce visibly different clusters. The resulting plot reflects the weights, the embeddings and the projection. The deletion curves reflect the rankings and the classifier’s response to altered inputs.

#### What survives aggregation

The word-level and element-wise comparisons change where aggregation occurs. When the scores are pooled first, a word’s single relevance value scales its entire embedding. When coordinate scores are retained, each coordinate is weighted separately before the word vectors are combined. A positive contribution in one coordinate and a negative contribution in another can offset one another in the first procedure. The second procedure carries the separately weighted coordinates into the document vector.

The clearest LRP cluster structure appears with the element-wise procedure. In this experiment, the finer relevance values retain information useful for the displayed separation. The comparison does not identify which embedding coordinates account for particular topic groups. It shows the practical effect of using the coordinate-level output of the explanation method for representation, where collapsing that output into a readable word score had been useful for the deletion experiment and heatmaps.

The paper’s uniform and TF-IDF comparisons help locate the role of the classifier in that result. A plain sum gives every retained word the same say in the document representation, and TF-IDF supplies a conventional weighting independent of the category score being explained. The relevance weights depend on the document and the selected output. The authors’ visual assessment places the relevance-weighted layouts ahead of uniform weighting, with the element-wise LRP representation showing the clearest group structure under their chosen projection.

### Limitations

#### Limits stated by the authors

The paper sets out to explain the decisions of a classifier whose document representation was simplified for the study. The authors acknowledge that their classifier’s accuracy is below the best published 20Newsgroups figure they knew. Their goal is to test explanations for the classifications this network actually makes. The reported accuracy is useful context for that goal because the explanation experiments deliberately include decisions from a network that makes errors.

The authors reserve other architectures and other NLP tasks for future work. They specifically mention character-based and recurrent architectures. The demonstrated setup is a word-based convolutional classifier with global maximum pooling, trained on topic categories. Its particular feature routing is important to the explanation because the backward pass sends max-pool relevance to the winning position. Applying the general idea to a different computational structure would introduce other operations and would require evidence from that setting.

The paper also treats the use of explanations to improve training or predictions as future work. Its main experiments explain a completed training run. The deletion test can convert some wrong decisions to correct ones when it uses a ranking calculated for the true category, an experimental condition in which the target label is already known. The projection experiment builds alternative document vectors for inspection. Neither result measures what a relevance-guided training procedure would achieve.

The authors describe differences in the objectives of LRP and SA as part of their interpretation. That distinction limits the scope of a general performance claim. A test that asks which words sustain or inhibit a category score is closely related to the signed contribution addressed by LRP. SA’s local responsiveness is a different property and remains interpretable on its own terms. The study establishes that LRP better serves the paper’s deletion criteria for this classifier, alongside visual comparisons whose outcome depends on aggregation.

#### Limits that follow from the setup

The deletion results apply directly to the longer test documents included by the authors. All documents first pass through the same cleaning and length cap, and the deletion experiment further selects a minimum preprocessed length. Short documents could differ in the number of available windows, the relative effect of removing one position and the alternatives available to each max-pooling operation. The experiment gives no direct measurement for that group. Similarly, a token outside the retained portion of a document has no contribution to assign in this classifier because it never enters the computation.

Zeroing an embedding is a precise intervention on the input array. It differs from removing a word from running prose and joining the words on either side. When a vector is zeroed, the neighboring positions keep their original spacing, and the convolution processes the altered windows at their original locations. A maximum can also move to a different window after a deletion. The resulting accuracy thus reflects the classifier’s response to a sequence of numerical edits, including any changes in which responses win at pooling. This is the scope within which the paper tests faithfulness.

The rankings are calculated on the document being explained, while later steps in the deletion process apply them to an increasingly changed input. As edits accumulate, the selected category can be supported by a different combination of windows. Contributions can interact when several words share an active window. A curve therefore measures the usefulness of following the original ranking through a series of perturbations. It gives less direct information about the separate effect of a particular word in every altered document.

Accuracy also compresses the outcome. A category score can change substantially while the winning label stays the same, or a small change can reverse a close decision. With several categories, deleting a word can raise the true category’s relative standing by affecting competing outputs. The observed pattern supports the authors’ interpretation of the rankings at the level of decisions across documents. It does not trace each recovered or broken classification to a measured change in the true-category score alone.

The visual results answer separate, narrower questions. The document highlight shows that marked support and opposition can be read in context, using one test case and a particular word. There is no reader study in that experiment to establish how consistently people understand those signals or whether the highlights help them diagnose errors. The PCA plots provide a visual comparison of broad categories after compression to 2D. They do not measure downstream classification or quantify separation in the full embedding space. The figure’s equal axis scales make the displayed comparison more interpretable within those bounds.

A further distinction concerns the target available in practice. The deletion experiment uses the recorded true category so it can ask what helped a correct output or what inhibited a missed one. The visualization experiment uses the predicted category to construct its weights. These choices answer different questions using the same attribution methods. An explanation of a missed category requires specifying which category to inspect, and the recovery result is measured with that information supplied by the experiment.

Finally, the study operationalizes relevance in terms of a trained classifier. The signed contributions say how the propagation rule accounts for a category score, and the deletion curves relate the ordering of those contributions to changes in classification. Human judgments of what a document is really about would be a different target for validation. A topical association that seems sensible in the heatmap can make the display easier to read. The experimental claim remains about the behavior of the classifier on this corpus under the stated interventions.

### What came after

#### Evaluating explanations from more than one direction

The later citing works take up several questions raised by the study. The clearest connections concern how local explanations are evaluated, what counts as evidence that an input mattered, and how a person might use the explanation of an error. The citation establishes a connection to the paper. Where the later work’s title identifies its subject, it also gives a basis for relating that subject to the earlier experiments.

[Comparing Automatic and Human Evaluation of Local Explanations](https://md.research.elamur.ai/free/en/papers/nguyen-2018-comparing-automatic-human-evaluation-local/) brings automatic and human assessment into the same study of text classification explanations. The distinction matters in the earlier work because its deletion test measures how a classifier responds, while its highlights are designed to be read. A perturbation result can show that a ranking has consequences for the classifier. Human evaluation addresses what people can understand or do with a local explanation. The later comparison makes the relationship between those forms of evaluation its subject.

[Evaluating recurrent neural network explanations](https://md.research.elamur.ai/free/en/papers/arras-2019-evaluating-recurrent-neural-network-explanations/) connects to a direction the authors explicitly left open. The original experiments evaluate explanations for a convolutional network whose strongest filter responses are selected over the document. The later work addresses the evaluation of explanations for recurrent networks. The citation and the topic establish continuity in the evaluation question across architectures, while the specific procedures and outcomes of the recurrent study are beyond the findings of the earlier paper.

#### What an internal signal can tell a reader

[Is Attention Interpretable?](https://md.research.elamur.ai/free/en/papers/serrano-2019-is-attention-interpretable/) takes up the meaning of attention as an interpretive signal. Its connection to the LRP paper is the question of what a numerical emphasis can establish about an individual prediction. Arras and colleagues give their scores a precise computational meaning and evaluate how a ranking derived from them behaves under perturbation. Attention raises a related question about when an internal quantity can be read as evidence of which input mattered. The focus of the later work is attention’s interpretability, with no basis here for attributing the earlier propagation rule to it.

[Pathologies of Neural Models Make Interpretations Difficult](https://md.research.elamur.ai/free/en/papers/feng-2018-pathologies-neural-models-make-interpretations/) connects the difficulty of interpretation to the behavior of the classifier being examined. That complements the logic of the deletion tests. Those tests judge a word ranking through the response of the classifier after its input has been changed. The later title points to behavior that can itself make interpretation difficult, highlighting why the meaning of a perturbation depends on how the underlying system handles the resulting input. The citation connects the questions without specifying a shared implementation or a common experimental result.

#### From explaining a score to using an explanation

[Explanation-Based Human Debugging of NLP Models](https://md.research.elamur.ai/free/en/papers/lertvittayakumjorn-2021-explanation-based-human-debugging-nlp/) places explanations in the setting of human debugging. The earlier paper’s signed highlights give a person a way to examine apparent support or opposition for a selected class, including a true class the classifier missed. A survey on debugging broadens the purpose of that inspection to understanding what went wrong and informing a response to it. The deletion curves in the earlier work establish behavior under an intervention and leave this human use open.

[CometKiwi’s Quality Estimation Shared Task submission](https://md.research.elamur.ai/free/en/papers/rei-2022-cometkiwi-ist-unbabel-2022-submission/) cites the paper from a quality estimation setting. Its title identifies a different task from the topic classification on which Arras and colleagues tested their method. The citation establishes that the earlier study was referenced in that setting. The title and citation alone do not establish whether CometKiwi used LRP, borrowed its deletion test, or cited it for the broader problem of explaining an output.

These links trace the reach of the original question more clearly than they trace any single implementation. Later works cite the study in connection with local explanation evaluation, attention, difficult classifier behavior, recurrent networks, human debugging and quality estimation. The original paper’s contribution to that discussion is specific. It shows how to trace a selected category score back to words, how signed and magnitude-only explanations support different readings, and how to check the resulting rankings against the behavior of a classifier when the ranked inputs are changed.

## Cite

Cite as Leila Arras, Franziska Horn, Grégoire Montavon, Klaus-Robert Müller and Wojciech Samek. 2016. Explaining Predictions of Non-Linear Classifiers in NLP. Proceedings of the 1st Workshop on Representation Learning for NLP.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/w16-1601](https://doi.org/10.18653/v1/w16-1601)

```bibtex
@inproceedings{arras2016explaining,
  title = {{Explaining Predictions of Non-Linear Classifiers in NLP}},
  author = {Leila Arras, Franziska Horn, Grégoire Montavon, Klaus-Robert Müller and Wojciech Samek},
  booktitle = {Proceedings of the 1st Workshop on Representation Learning for NLP},
  year = {2016},
  doi = {10.18653/v1/w16-1601},
  url = {https://doi.org/10.18653/v1/w16-1601}
}
```

> 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)
