---
title: "RANCC: Rationalizing Neural Networks via Concept Clustering"
description: "RANCC explains text classifications by selecting words, grouping them around learned class concepts, and testing their influence on predictions."
canonical: "https://research.elamur.ai/free/en/papers/bashier-2020-rancc-rationalizing-neural-networks-concept/"
---
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/bashier-2020-rancc-rationalizing-neural-networks-concept/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / RANCC: Rationalizing Neural Networks via Concept Clustering

# RANCC: Rationalizing Neural Networks via Concept Clustering

Paper · 2020 · Housam Khalifa Bashier, Mi-Young Kim and Randy Goebel

**Authors:** [Housam Khalifa Bashier](https://md.research.elamur.ai/free/en/authors/housam-khalifa-bashier/), [Mi-Young Kim](https://md.research.elamur.ai/free/en/authors/mi-young-kim/) and [Randy Goebel](https://md.research.elamur.ai/free/en/authors/randy-goebel/) · **Year:** 2020 · **Venue:** Proceedings of the 28th International Conference on Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 28th International Conference on Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2020.coling-main.286/)
- [PDF](https://aclanthology.org/2020.coling-main.286.pdf)
- [DOI 10.18653/v1/2020.coling-main.286](https://doi.org/10.18653/v1/2020.coling-main.286)

## Summary

A classifier can label a review as positive without telling the reader what in the review supports that judgment. RANCC tackles this problem in [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) by making the evidence part of the prediction process. The system selects a short set of words from the input, assigns those words importance scores, and uses them to predict a class. It also learns a vector for each class so that a reader can examine how the evidence from one document relates to evidence from other documents. The paper calls the selected words a rationale and the learned class representation a concept vector.

These explanations answer different questions. The rationale shows which words the classifier passes on to its decision stage. The importance scores show which words the selector favors in that particular input. The concept representation gives an analyst a way to compare rationales across examples, such as reviews that express approval in different language. RANCC learns the word selector from classification outcomes without annotations specifying which words to keep. The concept vectors are tied to the task's existing labels, and an additional training objective draws a rationale towards its class vector when the classifier gets the label right.

The authors test the approach on IMDB movie reviews and AGnews articles. On the IMDB test set, RANCC using the top 10% of words reaches accuracy similar to that of a recurrent baseline using the full experimental input. The paper also reports stronger accuracy than an earlier rationale selector across the tested word budgets. In separate tests that mask highly ranked words, RANCC's rankings produce larger changes in the predicted probabilities than the attribution methods in the comparison. Plots of correctly classified rationales show separation between the sentiment classes and among the news classes. These results concern predictive evidence under the authors' tests, with the plots offering a qualitative view of how the learned representations organize it.

The class vectors also support a simpler classifier. It averages the input's word vectors and assigns the class whose learned vector is most similar to that average. This version reuses the vectors from full RANCC without another training run. In the AGnews comparison paired with the 40% rationale setting, the full system has accuracy of 0.87 and the compressed version has accuracy of 0.866. This result shows how closely the simpler decision rule can approach the original in that setting. The authors leave the explainability of the compressed version for further investigation.

## Deep dive: RANCC: Rationalizing Neural Networks via Concept Clustering

RANCC explains text classifications by selecting words, grouping them around learned class concepts, and testing their influence on predictions. · about 36 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

#### What an explanation needs to expose

In a text classification task, a prediction may be easy to read and hard to account for. A label gives the outcome, such as the sentiment of a movie review or the topic of a news item. It leaves open which part of the input mattered, how much it mattered, and whether the system relies on similar evidence elsewhere. The authors situate this problem in [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/) and point to law and medicine as settings where a prediction can influence a consequential decision. Their experiments use movie reviews and news, where these questions about evidence can be asked using familiar labels and recognizable language.

An explanation for an individual case can begin by pointing to words in the input. This is useful because a reader can return to the original text and see them in context. But identifying words leaves a question about how the classifier puts them together. A review may express approval through a favorable description of the acting, a recommendation to watch the film, or enthusiasm about seeing it again. The words can differ while the reasons a reader would group them under positive sentiment remain recognizable. The paper asks whether a classifier can supply a record of the words it used and a representation that relates evidence across documents.

This is where the distinction between a rationale and a concept matters. A rationale comes from an individual text. A concept persists across texts and corresponds to a class in the task. If an analyst opens a review, the rationale gives them something concrete to inspect. If they examine many reviews, the learned class vectors and the associated plots let them ask whether similar judgments are supported by recognizably related material. The authors' motivation for offering alternative explanations is that a user may need to move between these views to understand a prediction.

The explanations also differ in their granularity. A word score is finer grained than a selected rationale because it lets the reader inspect how the selector ranked individual positions. A plot of concept clusters is coarser grained because it summarizes how rationales are distributed across examples. The paper's case for producing these views together rests on the questions each can answer. Looking across a collection can reveal which cases warrant closer reading. Looking at the corresponding rationale then lets the analyst examine the words that fed the prediction.

#### Explaining a classifier after training

The paper describes a substantial line of earlier work that estimates feature importance after a predictor has already been trained. Perturbation methods change part of the input and observe the resulting prediction. For text, the relevant unit might be a word whose presence or removal affects the score of a class. The general-purpose explanation method LIME appears both in the paper's account of earlier work and in its experiments. It represents the perturbation family in the comparison. [Why Should I Trust You? Explaining the Predictions of Any Classifier](https://md.research.elamur.ai/free/en/papers/ribeiro-2016-why-should-i-trust-explaining/)

Other attribution methods use gradients or propagate evidence through the network to assign importance to the input. A gradient describes how an output responds locally to a change in a numerical input. The paper also discusses relevance propagation and work that explains predictions from recurrent networks in sentiment analysis. These methods address how to attribute a prediction when the calculation has already been specified by the classifier. The architecture that makes the original prediction can therefore remain in place while a separate procedure works out how to explain it. [Learning Important Features Through Propagating Activation Differences](https://md.research.elamur.ai/free/en/papers/shrikumar-2017-learning-important-features-through-propagating/), [Explaining Recurrent Neural Network Predictions in Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/arras-2017-explaining-recurrent-neural-network-predictions/)

The authors note that some explanations obtained this way can be costly to compute. They also describe methods that decompose the output of a long short-term memory network, or LSTM, into contributions involving words. An LSTM is a recurrent network that updates an internal state as it reads a sequence. Such a decomposition gives an analyst a way to inspect the result of that sequence calculation. RANCC takes its word scores from a different place in the process. The selector learns scores it can use to decide which evidence to pass forward, and those same scores are available for inspection.

The related work also includes approaches to explanation based on word vectors and on graph-based analysis with autoencoders. The point of mentioning these lines of research is that the paper treats explanation as a question about representations as well as about the contribution of individual words. Its own design connects those questions through the selected text. The words are intelligible as text, and their numerical representations can be compared with learned class vectors.

#### Selecting evidence during prediction

The nearest predecessors in the paper's account are systems that learn to select a rationale while learning the classification task. The earlier architectures use a rationale network to define selection decisions over the input. During training, the network samples from its selection distribution. At inference, it can choose the most probable assignments. The classifier then operates on the selected evidence. This makes it possible to inspect the subset of the original input on which the downstream decision is based. [Rationalizing Neural Predictions](https://md.research.elamur.ai/free/en/papers/lei-2016-rationalizing-neural-predictions/), [Interpretable Neural Predictions with Differentiable Binary Variables](https://md.research.elamur.ai/free/en/papers/bastings-2019-interpretable-neural-predictions-differentiable-binary/)

RANCC takes up the authors' question about the next stage. A small subset is easier to examine than an entire document, but the downstream network still transforms that subset before assigning a class. The concept objective gives this transformation a class-level companion that can be inspected across documents. At the same time, the selector's probabilities give a finer view of the choice that produced the subset. The proposal therefore concerns what a rationale-based classifier makes available for analysis at several points in the same prediction.

The paper also distinguishes its use of concepts from earlier work it describes as using individual words to represent concepts. Here, the central object is a class vector, and each rationale can consist of several selected words that contribute to its representation. The relation to [topic modeling](https://md.research.elamur.ai/free/en/concepts/topic-modeling/) is similarly specific. RANCC learns class-linked clusters together with the selector and the predictor using the classification task. The structure of the supervised task determines the inventory of concepts available to the system. [Latent Dirichlet Allocation](https://md.research.elamur.ai/free/en/papers/blei-2003-latent-dirichlet-allocation/)

The authors acknowledge a separate debate about whether attention weights can support explanations and leave that debate outside their study. RANCC's immediate question is about a selector that explicitly restricts the word sequence sent to the recurrent classifier. This architectural choice makes evidence selection an observable operation. The experiments can then ask how well the selected evidence supports classification and how much predictions change when highly ranked words are masked. [Attention Is Not Explanation](https://md.research.elamur.ai/free/en/papers/jain-2019-attention-is-not-explanation/), [Is Attention Interpretable?](https://md.research.elamur.ai/free/en/papers/serrano-2019-is-attention-interpretable/)

### The method, step by step

#### From a document to a prediction and an explanation

Start with a news item whose category has to be predicted. RANCC first represents each word as a vector. It examines the input sequence with a convolution, a learned operation that produces numerical features from the sequence. The selector reduces these features to a score for each word position and turns the scores into probabilities. It uses those probabilities to choose a rationale whose length has been set in advance. The chosen words can be shown to the reader, while their numerical representations continue through the classifier.

RANCC gives the retained word vectors different weights according to their selection probabilities. An LSTM reads the resulting sequence and produces a representation for the prediction stage. That stage assigns a probability to each class-linked concept. There is also a learned vector associated with each concept. When the predicted class agrees with the training label, RANCC uses the rationale and that class vector in a distance calculation. This teaches the system to organize evidence for the same label around a shared vector.

The sequence of operations matters for interpreting the result. The convolution scores words while it has access to the input. The classifier receives the selected, weighted word vectors. The concept loss then relates a summary of those vectors to a class vector. An analyst can inspect the scores, the words that survive selection, and the example's place in the concept visualization. The visualization comes from the learned vectors and a simple calculation on them.

How RANCC selects evidence and learns class concepts The steps in order.

#### Representing the input and its possible labels

The authors begin with the usual setup for a classifier with mutually exclusive categories. An input is an ordered sequence whose entries are written as xᵢ. Its length is ℓ, and the entire sequence is x. A neural network produces a probability distribution from that sequence. The paper writes the general prediction problem as follows.

```
y | x ∼ Cat(F(x; θ))
```

Here y is the categorical outcome, with the network supplying the probabilities of its possible values. The vertical bar means the outcome is conditioned on x. The sign ∼ means that the outcome follows the specified distribution, and Cat denotes a categorical distribution. F is the function that returns class probabilities. Its learned parameters are θ. The paper also uses y when discussing the vector of output probabilities. In the training equations, the true class or its indicator is distinguished from the probabilities returned by the concept predictor.

At the input to the selector, wᵢ denotes the word at position i and, in the vector calculations, its embedding. [Word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) represent words as fixed-length arrays of numbers. Each wᵢ is a member of ℝᵈ, the space of real vectors with d coordinates. Stacking the vectors in sequence order gives a matrix with ℓ rows and d columns. The row index tracks position in the text and the column index tracks an embedding coordinate.

The paper calls the convolutional function φ. Applied to the input embedding matrix, φ produces v feature maps. Each map carries features indexed by position and coordinate, so the complete array has shape ℓ × d × v. The authors illustrate these dimensions with a review of 50 words and a feature dimension of 100. In that example the feature array has shape 50 × 100 × v. This illustration explains the axes of the array. The experiments specify their own embedding dimension and input lengths.

The maps are aggregated into a matrix Z̄ of shape ℓ × d. Each row still corresponds to a word position. The paper describes the aggregation by its output and how that output is used in scoring. The essential point for the next operation is that there is now a row of features available for each word, with larger values in that row favoring selection.

#### Turning numerical features into a rationale

A rationale has a fixed budget for a given setting. The selector needs a distribution that lets it compare the positions competing for that budget. The paper's word-scoring expression can be written by making the position index explicit.

```
pγ(wᵢ | x) = exp(Σⱼ Z̄ᵢⱼ) / Σᵣ exp(Σⱼ Z̄ᵣⱼ)
```

The notation pγ denotes the selector's distribution, and γ identifies its learned parameters. The expression wᵢ refers to the word at position i in x. The matrix entry Z̄ᵢⱼ is the aggregated feature at position i and coordinate j. Both sums over j run over the d coordinates. In the denominator, r runs over all ℓ word positions, and Z̄ᵣⱼ is the corresponding entry in row r. The function exp is the exponential. The numerator supplies the positive weight for the candidate position. The denominator divides by the total weight across positions, making the scores a probability distribution over words in that input.

This calculation is a softmax over the row scores. A word's probability depends on the scores of the other words in the same example. A high probability therefore answers a question about the selector's priorities in this input. A word appearing in another article, with different surrounding material and different competing positions, can receive a different score. This is the sense in which RANCC's word importance is dynamic.

During training, the paper describes selecting words by sampling from the distribution.

```
τ ∼ pγ(w₁, …, wℓ | x)
```

Here τ is the sampled rationale. The expression w₁, …, wℓ lists the words in x, the vertical bar marks conditioning, and ∼ denotes sampling. The notation pγ refers to the position distribution used for selection. The user specifies the number of words to retain, written ℓ̂. The sampled rationale contains ℓ̂ rows of embeddings, each with d coordinates. The training description gives the sampling operation at this level. It provides no detailed rule for handling repeated draws or preserving original positions in the returned sequence.

At test time, the authors describe choosing the most likely assignment for each rationale entry by argmax, the operation that finds an index at which a score is greatest. The experimental comparisons are presented in terms of percentages of extracted words. The paper's description conveys the intended high-probability selection at inference, while leaving details such as the treatment of tied scores unspecified.

The rationale and the importance scores are related outputs. The rationale records the words that made it into the classifier's input. The distribution gives a view of their relative priority as well as the priority of positions that were left out. During training, sampling allows a selected word to have less than the highest probability. In the downstream calculation, the probabilities of the retained words continue to matter even after the selection decision has been made.

#### Weighting the words and predicting a class-linked concept

The authors collect the retained words' selection probabilities in a vector called β. It has an entry βᵢ for each row of τ. To form the input to the recurrent encoder, the method multiplies the entire word vector in each row by that word's probability.

```
τ̄ᵢ = βᵢ τᵢ
```

Here i indexes an entry in the rationale, τᵢ is its original embedding row, and βᵢ is the corresponding scalar probability. The weighted row is τ̄ᵢ, and stacking the weighted rows gives τ̄. Weighting scales all d coordinates of a selected word by the same amount. The recurrent encoder can therefore receive different magnitudes for selected words even when the selection decision has already admitted them all.

The encoder is written as ψ and is implemented with an LSTM in the experiments. It receives τ̄ and returns hidden states Ĥ, with a state ĥᵢ at each position i in the rationale. The states in the paper's mathematical description have d coordinates, giving Ĥ shape ℓ̂ × d. RANCC uses the final state ĥℓ̂ as the sequence representation for predicting the concept. Through the recurrence, that state can reflect interactions among the retained words.

The authors initialize a matrix C with shape m × d, where m is the number of concepts and also the number of target classes. A row cᵢ is the vector for the concept associated with class i. A separate array of parameters, δconcept, maps the recurrent state to scores for those classes. Making the class index explicit, the prediction rule is as follows.

```
pδ(yconcept = k | τ̄) = exp(ĥℓ̂ · δconcept[:, k]) / Σⱼ exp(ĥℓ̂ · δconcept[:, j])
```

The notation pδ refers to the probability distribution for concept prediction. The variable yconcept denotes the concept outcome here, and k indexes a candidate concept. The weighted rationale τ̄ is what the prediction is conditioned on. The final recurrent state is ĥℓ̂, where ℓ̂ is the number of retained words. The parameters δconcept have shape d × m. The notation [:, k] selects the full column for concept k, and [:, j] selects the column for candidate j in the denominator. The dot · denotes a dot product, which combines a state and a column into a scalar score. The function exp exponentiates the score. The sum over j ranges across the m concepts. Normalization gives the probability for k as one entry in the output vector.

The paper describes taking a predicted concept from this distribution. If s is the index of that concept, the corresponding vector is cₛ, the row of C associated with it. The score for the prediction comes from the recurrent state and the parameters δconcept. The row cₛ is the class representation used in clustering. Keeping these two quantities distinct is important for understanding the compressed system, which can classify by comparing directly with the rows of C.

#### Learning which words to select

The selector is called unsupervised in the sense that it receives no examples of human-chosen rationales. Classification labels still provide the signal for learning useful selections. The rationale loss favors selections that led to a correct answer. If the system can often identify the right topic from words associated with a news domain, that outcome can reinforce the probability of choosing those words in comparable inputs.

The paper writes the rationale objective using a batch sum. The example index is made explicit on the input and selected probabilities below.

```
Lrationale = λ (−Σᵢ Aᵢ log p(β⁽ⁱ⁾ | x⁽ⁱ⁾))
```

Here Lrationale is the loss for rationale selection. The multiplier λ controls the weight of this loss in the joint objective. The sum over i runs through the examples of a training batch. The input for instance i is x⁽ⁱ⁾, and β⁽ⁱ⁾ denotes its selected word probabilities. The paper writes p for the probability term of the selected evidence conditional on that input. The function log takes its logarithm. The scalar Aᵢ weights the contribution of that example. In the experiments, Aᵢ is 1.0 for a correct class prediction and 0.0 otherwise. The minus sign makes greater probability for a rewarded selection correspond to a smaller loss. The paper gives this objective in terms of the selected probabilities without spelling out a separate factorization of their joint probability.

Selecting a word by sampling introduces a discrete operation. The paper describes a custom gradient for passing updates through that operation. A gradient value of 1 is assigned to each selected input position and 0 to each other position. This rule defines how the selection step passes a training signal in the authors' implementation. It also explains why the selection mechanism and its training procedure need separate descriptions. The forward pass chooses words, while the backward pass uses the custom assignment to update the network through that choice.

The reward for correct predictions and the training of the classifier act at different points. The reward weights the objective for the selected evidence. The classification objective compares the concept probabilities with the known label. A mistaken prediction can therefore provide a classification error even though the corresponding choice earns no reward from the rationale loss. This matters for a joint system that has to learn usable evidence and a way to map that evidence to a label.

#### Drawing rationales toward a concept vector

A rationale is initially a short sequence of vectors. For the clustering objective it is summarized as a single vector, τ̂. The paper obtains τ̂ by averaging the entries in each column of τ̄ across the selected words. The result has d coordinates, allowing it to be compared with the d-dimensional concept vector. This comparison uses the weighted rationale before the recurrent encoder's final state. The clustering view therefore summarizes the selected embeddings, while the class probabilities come from the recurrent calculation.

The distance is based on cosine similarity. The cosine compares the direction of two vectors after normalizing for their lengths. When the classifier is correct, the loss encourages the rationale summary to point in a similar direction to its class vector.

```
Lclusters = { 1 − (cₛ · τ̂) / (‖τ̂‖ ‖cₛ‖)   if s = yᵢ
            { 0                              otherwise
```

Here Lclusters is the clustering loss for a rationale. The predicted concept index is s, its vector is cₛ, and τ̂ is the summary of the weighted rationale. The operation · is the dot product. The expressions between double bars are vector lengths, with ‖τ̂‖ referring to the rationale summary and ‖cₛ‖ to the class vector. The fraction is cosine similarity, which is subtracted from 1 to form cosine distance. In the condition, yᵢ represents the known class of the input. If the predicted concept index matches that label, the example contributes the distance. Otherwise, its clustering loss is 0.

This condition determines which examples help shape the centers. A correctly classified business article can pull its rationale representation toward the business vector. If the article is assigned to another category, the clustering term leaves that rationale out of the update. The classification term can still penalize the assignment. The rule prevents the clustering objective from treating a mistaken assignment as positive evidence for the predicted class vector.

For visualization, the authors add the rationale summary τ̂ to the associated concept vector cₛ. They compute the mean and standard deviation of the coordinates of the resulting vector. The mean supplies the horizontal coordinate and the standard deviation the vertical one. Each plotted point therefore depends on evidence from a specific rationale and the vector of the concept assigned to it. The system learns the vectors as part of classification training and can construct the plot from those quantities without fitting a separate clustering algorithm.

#### Training the three objectives together

The prediction term is cross-entropy, a loss that penalizes a low predicted probability for the true class. The authors include a scaling factor based on the number of classes.

```
Lclassify = −(1/m) Σᵢ yᵢ log(yᵢconcept)
```

Here Lclassify is the classification loss, and m is the number of classes. The sum over i ranges across those classes. In this equation yᵢ is the indicator of whether class i is the true class, and yᵢconcept is the predicted probability of class i. The function log is the logarithm. The minus sign makes a low probability assigned to the true class incur a larger penalty. The multiplier 1/m follows the paper's normalization. The index i serves a different purpose here from the batch index in the rationale objective.

The authors train with the sum of the three terms.

```
L = Lclassify + Lrationale + Lclusters
```

Here L is the joint training objective. Lclassify supervises the probability of the target label, Lrationale reinforces selections associated with successful decisions, and Lclusters brings correctly classified evidence into alignment with a class vector. The plus signs indicate that the training uses these objectives together. In this setup the inventory of concepts comes from the label set, while the representation for each concept and the evidence that supplies it are learned from the classification data.

The reported optimizer is Adam, with a learning rate of 1e − 3 and a batch size of 256. The experimental input lengths are 50 words for IMDB and 20 words for AGnews. The embedding dimension, the concept vector dimension, and the LSTM hidden dimension are each 300. The rationale budget varies across the experiments. The authors report using standard training practices with limited tuning, and they make the implementation available under the name `rancc`.

#### Reusing the concept vectors for a cheaper decision

Once the full network has been trained, a simpler classifier can use the embeddings and the rows of C. It averages the raw embeddings of the input and compares the average with each concept vector using cosine similarity. The class attached to the vector with the greatest similarity is the output. The procedure bypasses the convolutional selection step, the recurrent encoder, and the learned mapping from its final state to concept probabilities.

The paper describes this compression as reuse of quantities already available after training. The embedding average is computed directly from the input. The class vectors were learned with the original rationale and clustering objectives. Consequently, the reduced computation at inference comes with a changed decision rule. The full classifier has a learned sequence of operations that selects and weighs words before predicting, whereas the compressed version makes a nearest-vector decision from raw embeddings.

The two reports of a rationale percentage in the compression comparison identify the paired settings of the trained RANCC system. The paper describes the compressed rule in terms of the average of the input embeddings. Thus the percentage in a pair identifies the rationale budget associated with the trained system from which the comparison starts. It would take a different procedure to interpret the percentage as a word budget actively enforced by the compressed classifier itself.

### Experiments and results

#### Measuring how much evidence the classifier needs

The main accuracy comparisons use IMDB for [sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/) and AGnews for news classification. IMDB uses positive and negative labels. The paper reports 25, 000 instances in the training split and 25, 000 instances in the test split. AGnews contains 127,600 samples in 4 categories. The authors use 80% of those samples for training and 20% for testing. Its categories cover world news, sports, science and technology, and business. [Learning Word Vectors for Sentiment Analysis](https://md.research.elamur.ai/free/en/papers/maas-2011-learning-word-vectors-sentiment-analysis/), [Character-level Convolutional Networks for Text Classification](https://md.research.elamur.ai/free/en/papers/zhang-2015-character-level-convolutional-networks-text/)

The authors evaluate classification accuracy across rationale budgets. Accuracy measures how frequently the predicted class agrees with the test label. A budget determines how much of the experimental input the rationale system can pass on. Varying that budget lets the authors test how much predictive information the selector can concentrate in a short rationale. The full-text LSTM supplies a reference with access to all words in its experimental input. The rationale method of Bastings and colleagues supplies a reference that also learns to choose evidence. The authors report using the earlier work's suggested settings for implementing that comparison.

On IMDB, RANCC with the top 10% of input words achieves test accuracy similar to that of the full-text LSTM. The paper reports that RANCC exceeds the accuracy of the Bastings method throughout the tested selection settings. The 10% finding is about the input used in this experiment, whose reported length for IMDB is 50 words. It describes how much of the configured input reaches the downstream predictor. The selection probabilities are computed from the input sequence before the budget is applied.

The AGnews test comparison extends the same question to topic categories. The paper reports an advantage for RANCC against the full-text LSTM and the earlier rationale method in its comparison of accuracy across extraction budgets. Here the experimental input length is 20 words. The accuracy curves are described in terms of the ordering of the systems and the tradeoff with retained text. The discussion gives the IMDB 10% reference point in terms of similar accuracy and leaves the exact accuracy at that point to the figure. The tabulated AGnews compression experiment provides exact values for a different comparison.

The authors frame predictive accuracy as a condition for useful rationalization. A list of recognizable words is poor evidence that the system can do the task if the resulting label is frequently wrong. Accuracy with a restricted input tests whether the selected information is sufficient for a trained classifier to perform well under that restriction. The comparison with another rationale selector adds a test of whether the same amount of exposed text supports similar levels of predictive performance.

#### Testing importance by removing high-ranked words

A separate experiment asks whether the importance ranking tracks the behavior of the classifier. The paper calls this question faithfulness. The test starts with the original input and its predictions, ranks the words by importance, and replaces the highest-ranked positions with zero padding. The altered input is then passed through the predictor. As the number of masked words grows, the experiment measures how strongly the predicted scores change. IMDB and AGnews use the same data splits as the accuracy experiments.

The comparisons include the gradient-based methods ε-LRP, Grad*Input, and Intgrad. These offer different ways of deriving scores from a trained classifier's calculation. The authors also include LIME as a perturbation-based scorer. Each scorer proposes an order in which to remove words. The masking procedure then evaluates how effectively that order identifies positions whose removal changes the prediction. For RANCC, the proposed order comes from the learned probabilities of the word selector.

One measure follows the score of the predicted class using log odds. Log odds express how much probability the classifier assigns to an event relative to the remaining probability, on a logarithmic scale. The authors compare the original prediction with the prediction after masking. In the AGnews figure, their criterion favors a lower log-odds score after removing important words. They report that RANCC reaches the lowest score in the comparison, with the greatest reported change from the unmasked prediction. They also report coincident performance for Grad*Input and ε-LRP in that test.

This experiment asks what the classifier does when its apparent evidence is removed. For example, masking a strongly ranked business term can deprive the selector and predictor of a cue they used to support that class. The resulting change can reflect the lost word and the altered choice of evidence from the remaining input. The experiment measures the behavior of that whole calculation after intervention. Its finding is that removing words in RANCC's order causes a larger decrease in support for the class under the reported criterion.

The paper also compares the entire class probability distributions before and after masking. The measure in this case is Jensen–Shannon divergence, or JSD. It measures how far apart two probability distributions are. Tracking the entire output lets this measure register a redistribution among classes even when attention to a single class probability would give an incomplete picture of the change. A large divergence serves as evidence that masking the selected words substantially altered the decision process.

In the reported JSD comparisons on IMDB and AGnews, the output changes more under RANCC's ranking than under those of the included attribution methods. The two masking analyses thus address related aspects of the prediction. The log-odds comparison follows support for a particular class. JSD follows the full output distribution. The authors attribute the stronger changes to the role of word selection in joint training, offering that connection as an explanation of the result.

#### Inspecting what the class vectors organize

The concept visualization turns each rationale and its associated vector into a point. The principal plot focuses on correctly classified examples. On IMDB, the authors describe visible separation between rationales associated with positive reviews and those associated with negative reviews. On AGnews, the plot shows 4 groups corresponding to its categories. The clusters can be inspected collectively, with individual rationales supplying the language that gives examples within a group their interpretation.

The paper compares these plots with principal component analysis, or PCA, and t-SNE. Both can display high-dimensional data in fewer coordinates. PCA uses directions that capture variation in the data. t-SNE provides a way to display relationships among nearby examples. RANCC's plotted coordinates come from the mean and standard deviation of the combined rationale and class vector. The authors judge the class separation in those plots clearer than in their PCA and t-SNE comparisons. The result is a visual assessment of the organization of the points.

The selected vocabulary gives the analyst material to interpret the groups. Among AGnews examples, the paper associates Microsoft, software, and internet with the science and technology concept. It describes company, oil, and price as examples of business evidence. President and government appear in the discussion of world news, and game and team exemplify sports evidence. These examples help a reader connect the class assigned by the system with the evidence it recognizes in particular news items.

The sentiment examples make the complementary point that words useful for one concept can serve different roles in actual sentences. The positive list includes words such as interesting, original, and great. Examples associated with the negative concept include waste, boring, and awful. The paper also displays highlighted rationales of different lengths for reviews assigned the positive concept. The examples include approval expressed through praise of characters, the merits of a film, or the desire to watch it again. The selected material gives the analyst a way to inspect how such differing expressions end up associated with a shared class vector.

#### Measuring the compressed classifier on AGnews

The compression experiment compares full RANCC with the classifier that uses raw embedding averages and class vectors. The evaluation is on AGnews, with pairs drawn from the reported 10% and 40% rationale settings. Accuracy is the share of correctly labeled examples. F1 summarizes precision and recall, with precision measuring the reliability of predicted positives and recall measuring how many actual positives are recovered. The paper gives these metrics for the multiclass experiment without specifying how the per-class quantities are averaged.

AGnews test accuracy for full and compressed RANCC The compressed classifier comes closer to the full system in the larger rationale setting.

**The numbers**

| System or setting | accuracy |
| --- | --- |
| Full RANCC, 10% rationale (this paper) | 0.86 |
| Compressed RANCC, paired with 10% rationale | 0.827 |
| Full RANCC, 40% rationale | 0.87 |
| Compressed RANCC, paired with 40% rationale | 0.866 |

AGnews test F1 for full and compressed RANCC The full classifier leads in both comparisons, with closer F1 scores at the larger rationale setting.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Full RANCC, 10% rationale (this paper) | 0.856 |
| Compressed RANCC, paired with 10% rationale | 0.827 |
| Full RANCC, 40% rationale | 0.876 |
| Compressed RANCC, paired with 40% rationale | 0.865 |

For the AGnews comparison paired with the 10% rationale budget, the paper reports recall of 0.857 for each system and precision of 0.858 for each. For the pair associated with the 40% budget, it reports recall of 0.876 for full RANCC and 0.866 for compressed RANCC. Precision in that pair is 0.878 for full RANCC and 0.866 for compressed RANCC. These figures are the paper's reported aggregate metrics. The averaging convention and underlying class counts would be needed to reconstruct how they relate to the overall F1 and accuracy results.

The comparison demonstrates that the learned class vectors retain information that is useful under a much simpler rule. Performance is especially close in the reported pair associated with the larger rationale budget. The reduced classifier requires an embedding average and comparisons with the class vectors. The experiments quantify the predictive performance of that substitution. The paper discusses the potential deployment value in terms of reduced computation, with the reported measurements focused on classification scores.

### What the ablations show

#### How prediction changes when the evidence budget changes

The paper offers controlled comparisons of rationale budgets, word removal, and compressed inference, with no component-by-component training ablation. The budget comparison examines how much evidence can reach the classifier. The masking comparison examines which evidence matters to its predictions. The compression comparison examines how much useful information survives when the original computation is replaced with a simpler decision rule. Each comparison varies a different part of the system or its input.

The rationale-budget experiments compare predictive performance when the classifier receives short and longer sets of selected words. The full-text LSTM shows how performance with restricted evidence relates to performance with the complete experimental input. The earlier rationale selector helps put the tradeoff in context at comparable budgets. These comparisons support the claim that RANCC can concentrate discriminating cues in the words it passes forward. The IMDB result with the top 10% of words is particularly informative about sufficiency under a short budget because it is anchored to the full-input reference.

Several parts of the system could contribute to that performance. The convolution produces the scores, the custom gradient determines how learning passes through selection, the probabilities reweight the retained words, and the recurrent network turns them into class scores. The clustering term also participates in the joint objective. The comparisons show what the system achieves with those parts working together. The curves leave the separate contribution of each part undetermined, including whether the clustering loss itself improves accuracy at a given budget.

The budget also controls a specific stage of information access. A short rationale limits the words handed to the prediction network. The selector can still use the input to determine which words qualify and how to weight them. A performance result at a small budget therefore tells the reader how much selected text supports the decision in this architecture. It leaves open how the classifier would perform if every stage had to operate from the outset on the same small subset.

#### What the masks test about the importance scores

Changing the rationale budget tests classification with selected evidence available. Masking tests the effect of taking evidence away. Those treatments need separate interpretation. A short set can be sufficient to produce a label even when other words in the original are also sufficient. Conversely, a word can be influential in its original context even when it would make a poor explanation on its own. The masking experiment evaluates a ranking by how quickly predictions change as its most important words disappear.

RANCC's larger changes in log odds and JSD support the authors' reading of its selection scores as informative about the classifier's behavior. The comparison holds the broad intervention fixed and varies the priority assigned to words. It therefore gives the score a behavioral test beyond looking at whether high-ranked terms seem relevant to a person. A reader can distinguish the empirical finding that removing these words shifts a probability distribution from the qualitative finding that the words look appropriate for their concepts.

The comparison also uses attribution methods whose scores are produced differently from RANCC's. The other methods explain a predictor through attribution procedures, while RANCC's distribution is involved in producing the evidence seen by its downstream classifier. The experiment shows how these rankings fare in the authors' masking setup. A matched training comparison with the word-scoring objective changed in isolation would be needed to assign the result specifically to joint training. The authors' account of that mechanism remains an interpretation of the observed difference.

#### What can be learned from the clusters

The visualization comparison asks whether the representations make classes visible at a glance. Its informative cases include rationales whose words differ but whose points lie with the same concept. That is pertinent to the initial motivation. RANCC aims to let an analyst compare evidence across texts, and a plot coupled with the actual words lets the analyst inspect both the distribution and its language. The comparisons with PCA and t-SNE provide reference displays for the authors' qualitative judgment about separation.

The error visualization applies the idea to mistaken predictions. Knowing that a news item was classified incorrectly tells the analyst that the assigned label disagrees with the target. Looking at where its rationale appears can help identify the class to which the system sent it and which errors deserve closer examination. The authors highlight difficulties involving business in AGnews and positive sentiment in IMDB. Their discussion presents these as examples revealed by inspecting the plots.

The visualizations of typical words and individual positive rationales complement those aggregate views. A clearly separated cloud gives little information on its own about the language shared by the examples. A list of typical words gives little information about how consistently those examples are grouped. Reviewing the selected words alongside their cluster assignment supplies both kinds of evidence in particular cases. The paper uses those views for inspection, with its judgments about the usefulness of the plots grounded in the displayed examples.

#### What the smaller classifier preserves

The compression comparison removes several operations together. It allows the authors to test whether the embedding space and learned class vectors are sufficient for a simpler predictor to come close to full RANCC on AGnews. The scores answer that question most favorably for the setting paired with the 40% rationale budget. Because the simpler rule discards the sequence encoder and the selector together, the results reflect the net effect of replacing the decision procedure.

The comparison can also be read as a test of whether the class vectors carry usable information outside their visualization role. A point in a scatter plot can look consistent with its class even if the same vectors would perform poorly as the basis of a prediction. Here the compressed rule must choose a class using the vectors directly. Its performance offers a separate indication that the vectors encode discriminating information. The experiment leaves open which part of the original training contributed most to that property.

Compression also changes the relationship between an explanation and a decision. In full RANCC, the rationale is selected and supplied to the recurrent classifier. In the compressed version, the direct evidence is an average over the raw embedding features of the input. Similarity to a concept can still be inspected, but the full system's selected rationale would refer to a different computation. The classification scores establish how the simpler procedure performs. The authors identify its own explainability as a question for future work.

### Limitations

#### Limits the authors identify

The authors place the emphasis on explanation and report limited tuning for predictive performance. The accuracy comparisons establish how the tested implementations fare in the reported setups. They give less information about the best accuracy attainable by each architecture after a broader search. This distinction is relevant on both datasets because the rationale comparison varies retention budgets within a particular training procedure and set of input lengths.

The paper explicitly limits the coverage of the faithfulness comparison. The authors point to the number of available methods, difficulties obtaining source code, and space constraints. The masking results concern the gradient, relevance, and perturbation methods they implemented for the study. The comparison can support an ordering among those methods under the test, while broader rankings would depend on additional methods and evaluation conditions.

The authors also identify unresolved questions about the meaning of distance in the learned representation. The optimization uses cosine distance between a rationale summary and a concept vector, but the paper leaves a fuller account of that distance for future investigation. It singles out the relationship between individual words and their concept vectors as another question. The selected-word examples make the learned concepts intelligible in some cases, while the semantic interpretation of those distances remains open.

Finally, the authors propose studying explainability in the compressed version and trying the approach on other tasks, such as natural language inference and domain-specific generation. The experiments cover sentiment and news classification. The medical and legal examples explain the motivation for interpretability and the authors' interest in future applications. The study's results provide measurements for neither domain.

#### Limits of the classification and masking evidence

A limitation of the accuracy experiment follows from what is being measured. Correct classification with a small rationale establishes that the trained predictor can use that evidence to select the expected label. Annotated human explanations would be needed to measure agreement with human judgments about what should be selected. The study makes its case through prediction accuracy, masking effects, and inspection of examples. Those forms of evidence leave agreement with human-selected rationales unmeasured.

The input lengths also bound what the rationale percentages describe. The paper specifies 50 words for IMDB and 20 words for AGnews. The reported fractions apply to the inputs used in the experiment. Inferring how much of an original review or article the selector would require calls for information about handling longer documents. Likewise, a fixed budget specifies how many words may pass to the next stage, while the amount of context available to the scorer is governed by the input and feature calculation.

The importance probabilities have a related constraint. The distribution ranks positions relative to the other positions in an example. The full prediction then depends on which words pass selection, their weights, and the recurrent representation. A score can guide attention to influential candidates. It cannot by itself identify a word's independent contribution across all possible inputs. For an analyst, it is evidence about how the selector operated on the particular text.

Zero padding is a specific treatment of a masked word. Replacing several important positions can produce an input that differs from examples seen in training in ways that go beyond the loss of their meanings. It can also change how the selector scores the remaining positions and what evidence is available to the recurrent stage. A large change in log odds or JSD therefore shows sensitivity to this intervention. The study leaves the results under other interventions, such as meaning-preserving substitutions, unmeasured.

Log odds and JSD also concern what happens to the probabilities, while the purpose of the original task is to assign a correct label. A large change can reveal dependence on the removed words whether the unmasked decision was correct or mistaken. This makes output sensitivity informative about the predictor's behavior, with a different evidentiary role from accuracy or evaluation by a reader. The masking results support faithfulness in this behavioral sense, within the reported procedure.

#### Limits of the concept interpretation

The association between a class and a concept is specified in advance. There is a single learned vector for each class, and the label set determines which concepts the predictor can return. In IMDB, for instance, favorable opinions about acting and favorable opinions about a story can help support positive sentiment without being represented as separate concepts. That design serves the paper's aim of grouping rationales by a common class. It places a limit on claims about discovering finer distinctions within a class or concepts shared across several classes.

The clustering objective also uses labels to decide which examples apply pressure to the class vectors. A rationale contributes cosine distance when its predicted concept agrees with the target. The main visualization emphasizes correctly classified rationales, which are the examples most directly aligned by that objective. Class separation in this view is consistent with successful class-conditioned training. It gives a limited view of how the representation organizes ambiguous inputs or cases on which the classifier fails.

The plotted point also contains the concept vector itself. Adding a class-specific vector to a rationale summary can affect its plotted mean and spread. Separation in those coordinates therefore reflects the construction of the visualization as well as the organization of the rationales. The comparison with PCA and t-SNE is a comparison of the resulting views. Without a quantitative clustering assessment or a matched visualization that isolates the effect of adding the class vector, the plots leave the extent of separation in the rationale representations alone unresolved.

The examples of salient words support an interpretation of particular groups, with familiar terms anchoring the class names. Some words occur in several contexts and can contribute differently depending on how they are used. A top-word list therefore provides a vocabulary-level view. The individual rationales add context, but the displayed examples supply qualitative evidence rather than a systematic assessment of semantic consistency. The paper's error plots likewise show ways to inspect failures while leaving their prevalence and the effect on debugging time unmeasured.

#### Limits of the reproduction and deployment evidence

Some details of the selection procedure are described at the level of the main operations. The paper tells the reader how the word scores are normalized, how the rationale length is set, how sampling is used in training, and how the authors pass a custom gradient through selection. Details of repeated draws, ties, and ordering are left open in that description. Those details matter when reproducing a selector that must return a sequence of the intended length to a recurrent encoder.

The reported compression results come from AGnews and the paired rationale settings in the comparison. The paper motivates compression with resource-restricted deployments and describes a simpler computation using the learned vectors. It does not report timing, memory use, device measurements, or a service benchmark. The data establish that the simpler classifier can retain much of the reported predictive performance on AGnews. Deployment performance would depend on hardware and the implementation of the embedding and similarity calculations.

The compression scores also provide no direct check that full and compressed RANCC make the same decisions on the same articles. Similar aggregate accuracy can occur even when classifiers correctly label different instances. Agreement on individual predictions and similarity of their explanations would require separate evidence. This is especially relevant given that the two systems read the input differently and that the paper leaves explanation for the compressed classifier as an open problem.

### What came after

There are no documented follow-up studies to discuss.

## Cite

Cite as Housam Khalifa Bashier, Mi-Young Kim and Randy Goebel. 2020. RANCC: Rationalizing Neural Networks via Concept Clustering. Proceedings of the 28th International Conference on Computational Linguistics.

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

```bibtex
@inproceedings{bashier2020rancc,
  title = {{RANCC: Rationalizing Neural Networks via Concept Clustering}},
  author = {Housam Khalifa Bashier, Mi-Young Kim and Randy Goebel},
  booktitle = {Proceedings of the 28th International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.286},
  url = {https://doi.org/10.18653/v1/2020.coling-main.286}
}
```

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