Skip to main content
QUICK REVIEW

[Paper Review] The geometry of integration in text classification RNNs

Kyle Aitken, Vinay Ramasesh|arXiv (Cornell University)|Oct 28, 2020
Neural Networks and Applications17 references4 citations
TL;DR

This paper reveals that recurrent neural networks (RNNs) for multi-class text classification implement a low-dimensional, geometry-driven integration mechanism via attractor manifolds in hidden state space. The dimensionality and shape of these manifolds—simplex for categorical, planar for ordered, hypercube-like for multi-label—depend on dataset structure, with dimensionality equal to N−1 for N-class classification and reducible by class correlations, as predicted by word-count statistics.

ABSTRACT

Despite the widespread application of recurrent neural networks (RNNs) across a variety of tasks, a unified understanding of how RNNs solve these tasks remains elusive. In particular, it is unclear what dynamical patterns arise in trained RNNs, and how those patterns depend on the training dataset or task. This work addresses these questions in the context of a specific natural language processing task: text classification. Using tools from dynamical systems analysis, we study recurrent networks trained on a battery of both natural and synthetic text classification tasks. We find the dynamics of these trained RNNs to be both interpretable and low-dimensional. Specifically, across architectures and datasets, RNNs accumulate evidence for each class as they process the text, using a low-dimensional attractor manifold as the underlying mechanism. Moreover, the dimensionality and geometry of the attractor manifold are determined by the structure of the training dataset; in particular, we describe how simple word-count statistics computed on the training dataset can be used to predict these properties. Our observations span multiple architectures and datasets, reflecting a common mechanism RNNs employ to perform text classification. To the degree that integration of evidence towards a decision is a common computational primitive, this work lays the foundation for using dynamical systems techniques to study the inner workings of RNNs.

Motivation & Objective

  • To understand the dynamical mechanisms underlying RNNs in multi-class text classification beyond binary sentiment.
  • To identify whether and how low-dimensional, interpretable dynamical systems emerge in trained RNNs across diverse text classification tasks.
  • To characterize the geometry and dimensionality of attractor manifolds in RNN hidden states and link them to training dataset statistics.
  • To demonstrate that simple word-count statistics can predict the reduction in attractor manifold dimensionality due to class correlations.
  • To validate findings using synthetic datasets that replicate the dynamical behaviors seen in natural data.

Proposed method

  • The authors analyze trained RNNs (GRUs and LSTMs) on natural and synthetic datasets across three classification types: categorical, ordered, and multi-labeled.
  • They identify low-dimensional subspaces containing hidden state trajectories and locate manifolds of approximately stable fixed points via linearization of network dynamics.
  • The geometry of the attractor manifold is inferred from the distribution of fixed points and validated using principal component analysis of hidden states.
  • They compute word-count statistics on training data to predict the dimensionality and shape of the attractor manifold, particularly for correlated class pairs.
  • Synthetic datasets are constructed with controlled class correlations to reproduce observed dynamical behaviors and validate the proposed mechanism.
  • Speed functions are defined to quantify the slowness of points in the attractor manifold, identifying regions of near-stability.

Experimental results

Research questions

  • RQ1How do the dynamical patterns in RNNs for multi-class text classification compare to those in binary sentiment classification?
  • RQ2What determines the dimensionality and geometric structure of the attractor manifold in RNNs for different text classification tasks?
  • RQ3To what extent can the geometry and dimensionality of the attractor manifold be predicted from simple statistics of the training dataset?
  • RQ4How do class correlations in the dataset influence the shape and dimensionality of the integration manifold?
  • RQ5Can synthetic datasets be designed to reproduce the same dynamical behaviors as natural datasets, confirming the underlying mechanism?

Key findings

  • For N-class categorical classification, RNNs form (N−1)-dimensional simplex attractor manifolds, with the dimensionality reflecting the number of scalar evidence quantities the network retains.
  • In ordered classification tasks, the attractor manifold takes a planar geometry, consistent with the ordinal structure of the classes.
  • For multi-label classification, the attractor manifold assumes a geometry resembling a hypercube, reflecting the independent labeling of classes.
  • Class correlations—especially negative correlations between word evidence for different classes—reduce the effective dimensionality of the attractor manifold, with the reduction predictable from word-count statistics.
  • The geometry of the attractor manifold in real datasets, such as the AG News 4-class dataset, matches predictions based on correlations: e.g., strong negative correlations between 'Sports' and 'Business' lead to maximal repulsion in the manifold.
  • Synthetic datasets with controlled class correlations reproduce the same manifold geometries and dynamical behaviors as natural datasets, confirming the mechanism's robustness.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.