Skip to main content
QUICK REVIEW

[Paper Review] iCapsNets: Towards Interpretable Capsule Networks for Text Classification

Zhengyang Wang, Hu Xia|arXiv (Cornell University)|May 16, 2020
Topic ModelingComputer Science31 references7 citations
TL;DR

This paper proposes iCapsNets, a novel interpretable capsule network for text classification that achieves both local and global interpretability through capsule-based semantic modeling and a trainable multi-head attention mechanism. The model delivers competitive classification accuracy—outperforming baselines on 4 of 7 datasets—while providing human-understandable explanations for individual predictions and overall model behavior.

ABSTRACT

Many text classification applications require models with satisfying performance as well as good interpretability. Traditional machine learning methods are easy to interpret but have low accuracies. The development of deep learning models boosts the performance significantly. However, deep learning models are typically hard to interpret. In this work, we propose interpretable capsule networks (iCapsNets) to bridge this gap. iCapsNets use capsules to model semantic meanings and explore novel methods to increase interpretability. The design of iCapsNets is consistent with human intuition and enables it to produce human-understandable interpretation results. Notably, iCapsNets can be interpreted both locally and globally. In terms of local interpretability, iCapsNets offer a simple yet effective method to explain the predictions for each data sample. On the other hand, iCapsNets explore a novel way to explain the model's general behavior, achieving global interpretability. Experimental studies show that our iCapsNets yield meaningful local and global interpretation results, without suffering from significant performance loss compared to non-interpretable methods.

Motivation & Objective

  • Address the critical need for interpretable deep learning models in text classification, where high accuracy often comes at the cost of model transparency.
  • Overcome the limitations of traditional models (e.g., bag-of-words) that lack semantic understanding and deep learning models (e.g., RNNs, CNNs) that act as black boxes.
  • Develop a capsule network architecture adapted for text that supports both local interpretability (per-sample explanation) and global interpretability (model-wide behavior explanation).
  • Bridge the performance-interpretability gap by maintaining competitive accuracy while enabling meaningful, human-understandable explanations.
  • Introduce a novel method to interpret capsule activations and attention weights in a way that reflects semantic relevance and model decision-making processes.

Proposed method

  • Adapt capsule networks (CapsNets) from computer vision to text classification by modeling semantic meaning through dynamic routing between capsules.
  • Integrate a trainable multi-head attention layer to enhance representation learning and improve interpretability by highlighting salient word and phrase features.
  • Use 1D convolutional layers to extract local n-gram features before feeding them into the capsule layer, preserving sequential structure.
  • Apply word embeddings as input, with primary capsules learning sparse, semantically distinct representations in the embedding space.
  • Leverage attention mechanisms to assign importance scores to words and phrases, enabling local interpretability by identifying key contributors to predictions.
  • Visualize capsule queries via t-SNE to demonstrate their sparse, semantically diverse distribution, supporting global interpretability.

Experimental results

Research questions

  • RQ1Can capsule networks be effectively adapted to text classification while preserving interpretability?
  • RQ2How can local interpretability be achieved in capsule-based models by identifying the most influential words or phrases per prediction?
  • RQ3Can global interpretability be achieved by analyzing the learned capsule representations and attention patterns across the entire dataset?
  • RQ4To what extent does the proposed iCapsNets model maintain competitive classification accuracy compared to non-interpretable deep learning models?
  • RQ5Can the attention mechanism and capsule routing jointly enhance both performance and interpretability in text classification tasks?

Key findings

  • iCapsNets achieve state-of-the-art or competitive accuracy on 7 benchmark text classification datasets, outperforming 12 baselines including FastText, D-LSTM, and CapsNets on 4 of them.
  • On the AG’s News dataset, iCapsNets Short achieves 99.0% test accuracy, surpassing even the original CapsNets and FastText baselines.
  • The t-SNE visualization of primary capsule queries shows a sparse, well-separated distribution in the embedding space, indicating that capsules learn distinct semantic concepts.
  • Local interpretability is effectively achieved by highlighting key words and phrases through attention weights and capsule activations, providing human-readable rationales for predictions.
  • Global interpretability is demonstrated by analyzing the learned capsule representations, revealing that different capsules specialize in different semantic features across the dataset.
  • Despite incorporating interpretability mechanisms, iCapsNets incur minimal performance loss, maintaining high accuracy comparable to non-interpretable models like char-VDCNN and D-LSTM.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.