Skip to main content
QUICK REVIEW

[Paper Review] Learning Compositional Structures for Deep Learning: Why Routing-by-agreement is Necessary

Sairaam Venkatraman, Ankit Anand|arXiv (Cornell University)|Oct 4, 2020
Topic ModelingComputer Science18 references7 citations
TL;DR

This paper proposes using entropy regularization of routing weights in capsule networks to enforce compositional structures, demonstrating that lower routing entropy improves detection of compositional changes in data—while maintaining classification accuracy comparable to unregularized models. The method formalizes compositionality via parse-tree structures and shows routing-by-agreement is essential for such representational learning.

ABSTRACT

A formal description of the compositionality of neural networks is associated directly with the formal grammar-structure of the objects it seeks to represent. This formal grammar-structure specifies the kind of components that make up an object, and also the configurations they are allowed to be in. In other words, objects can be described as a parse-tree of its components -- a structure that can be seen as a candidate for building connection-patterns among neurons in neural networks. We present a formal grammar description of convolutional neural networks and capsule networks that shows how capsule networks can enforce such parse-tree structures, while CNNs do not. Specifically, we show that the entropy of routing coefficients in the dynamic routing algorithm controls this ability. Thus, we introduce the entropy of routing weights as a loss function for better compositionality among capsules. We show by experiments, on data with a compositional structure, that the use of this loss enables capsule networks to better detect changes in compositionality. Our experiments show that as the entropy of the routing weights increases, the ability to detect changes in compositionality reduces. We see that, without routing, capsule networks perform similar to convolutional neural networks in that both these models perform badly at detecting changes in compositionality. Our results indicate that routing is an important part of capsule networks -- effectively answering recent work that has questioned its necessity. We also, by experiments on SmallNORB, CIFAR-10, and FashionMNIST, show that this loss keeps the accuracy of capsule network models comparable to models that do not use it .

Motivation & Objective

  • To formalize the compositional structure of neural networks using parse-tree grammars derived from spatial grammar rules.
  • To identify that convolutional neural networks (CNNs) lack mechanisms to assign importance to derivation rules, unlike capsule networks.
  • To investigate whether routing-by-agreement in capsule networks can be improved via entropy regularization of routing weights.
  • To evaluate whether entropy regularization enhances compositional generalization without degrading classification performance.
  • To demonstrate that capsule networks with low routing entropy can detect changes in compositional structure—unlike CNNs or unregularized capsule networks.

Proposed method

  • Formalize the compositional structure of CNNs and capsule networks using a grammar-based framework, where objects are represented as parse-trees of parts with allowed configurations.
  • Define routing weights in dynamic routing as indicators of consensus among predictions, with low entropy indicating strong, unambiguous routing to a single deeper capsule.
  • Introduce an entropy-loss function that penalizes high entropy in routing weights, encouraging sparse, unambiguous routing decisions.
  • Combine the entropy-loss with standard classification loss via a weighted sum, with hyperparameters tuned across schedules or fixed values.
  • Train capsule networks with and without entropy regularization on SmallNORB, CIFAR-10, and FashionMNIST, measuring both accuracy and routing entropy.
  • Use controlled data with altered compositional structures (e.g., face parts rearranged) to evaluate compositional generalization performance.

Experimental results

Research questions

  • RQ1Can a formal grammar-based description distinguish the compositional capabilities of CNNs and capsule networks?
  • RQ2Does the entropy of routing weights in capsule networks correlate with their ability to detect changes in compositional structure?
  • RQ3Can entropy regularization of routing weights improve the compositional generalization of capsule networks without sacrificing classification accuracy?
  • RQ4How does the performance of entropy-regularized capsule networks compare to unregularized capsule networks and CNNs on compositional structure detection tasks?
  • RQ5Is routing-by-agreement necessary for achieving compositional representations in capsule networks?

Key findings

  • Capsule networks with entropy-regularized routing weights detect changes in compositional structure significantly better than unregularized capsule networks or CNNs.
  • The entropy of routing weights correlates inversely with compositional generalization: higher entropy leads to poorer detection of structural changes.
  • Entropy-regularized capsule networks achieve test-set accuracy comparable to unregularized models on SmallNORB, CIFAR-10, and FashionMNIST, with mean accuracies within 1-2% across all datasets.
  • On FashionMNIST, the 0.4caps1 model achieved 90.33% accuracy with a mean entropy-loss of 0.0003, while the unregularized unregcaps1 achieved 92.73% accuracy with a higher entropy-loss of 1.05.
  • The model using the routing algorithm from Peer et al. (2018) performed similarly to regularized models, suggesting that routing mechanism design is critical for compositional learning.
  • Variability in accuracy across training runs for regularized models indicates that optimizing entropy loss across all layers remains challenging, though the core objective of compositional improvement is met.

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.