TL;DR
When trained to solve the same task, different recurrent neural network (RNN) architectures develop vastly different representational geometries, yet they converge on nearly identical dynamical topologies. This discovery serves as a cautionary tale for using popular geometric metrics like CCA to compare neural representations, while positioning dynamical systems theory as a powerful framework for uncovering universal computational mechanisms across artificial and biological brains.
What Problem Does This Paper Address?
In computational neuroscience, researchers increasingly train recurrent neural networks (RNNs) on cognitive tasks to serve as models for biological brain regions. To determine if a trained RNN is a "good" model, they typically compare the low-dimensional state-space representations of the artificial network with actual neural recordings using geometric similarity metrics like Canonical Correlation Analysis (CCA).
However, a fundamental question remains unanswered: Does training a network on a specific task uniquely determine its internal dynamics, or are these dynamics highly sensitive to arbitrary modeling choices (such as choosing an LSTM over a Vanilla RNN, or a ReLU over a tanh activation)? If the internal representations are highly sensitive to architecture, geometric similarity metrics might simply be measuring engineering choices rather than fundamental neurobiological truths.
Methods
To investigate this, the authors conducted a massive empirical study, training 2,880 networks per task across a wide hyperparameter grid:
- Four Architectures: Vanilla RNN, Update-Gate RNN (UGRNN), Gated Recurrent Unit (GRU), and Long Short-Term Memory (LSTM).
- Two Activation Functions: Hyperbolic tangent (tanh) and Rectified Linear (relu).
- Varying Sizes & Regularizations: Network widths of 64, 128, and 256 units; four levels of L2 regularization; and 30 random seeds per configuration.
They compared these networks using two distinct lenses:
- Representational Geometry: Using Singular Vector Canonical Correlation Analysis (SVCCA) and Centered Kernel Alignment (CKA) to measure how well the state spaces align via linear transformations.
- Dynamical Systems Topology: Finding the networks' fixed points (and approximate fixed points), constructing transition graphs between them, and analyzing the linearized dynamics (Jacobians and eigenvalues) around those points.
They visualized the resulting network-to-network similarity matrices using Multi-Dimensional Scaling (MDS) to project the high-dimensional relationships into 2D space.
Datasets
The networks were trained on three canonical, neuroscientifically motivated tasks that exemplify foundational elements of neural computation:
- $K$-bit Flip-Flop ($K=3$): A discrete memory task where the network must remember the last non-zero pulse (+1 or -1) for $K$ independent channels.
- Frequency-Cued Sine Wave: A pattern generation task where a static input cue dictates the frequency of a generated sine wave output.
- Context-Dependent Integration (CDI): An analog memory task where the network must integrate a noisy white-noise stream from a cued channel while completely ignoring an uncued channel.
Key Insights and Ideas
- Geometry is Individual; Topology is Universal: The most striking finding is that representational geometry varies wildly across architectures and activation functions, causing networks to cluster cleanly by their structural design. In contrast, the underlying topological scaffold—the arrangement of fixed points and the pathways between them—is nearly identical across all trained networks regardless of architecture.
- A Cautionary Tale for CCA/CKA: Because geometric metrics are highly sensitive to activation functions and gating mechanisms, they can yield misleading conclusions.
As shown in Figure 4, an untrained ReLU network can appear more geometrically similar to a trained ReLU network than a trained tanh network is, despite the untrained network failing completely at the task.
- Gated Universality: Even though gated networks (LSTMs, GRUs) possess much more complex internal equations, they implement the exact same qualitative dynamical solutions as vanilla RNNs, though they sometimes distribute the computation across a higher-dimensional linear subspace.
Key Results
- Clustering Behavior: MDS visualizations of SVCCA/CKA distances show distinct, isolated clusters corresponding to architecture type and activation function. Conversely, MDS plots based on fixed-point topology show a single, unified cloud, demonstrating universality.
- Algorithmic Convergence: In the 3-bit flip-flop task (Figure 1), every single architecture successfully constructed an elegant 3D computational cube featuring 8 stable fixed points (the memories) interconnected by a network of saddle points that route the inputs.
- Integration Strategies: In the context-dependent integration task, Vanilla RNNs utilize a strict 1-dimensional line attractor strategy (one eigenvalue exactly at 1). Gated architectures approximate the same line attractor but distribute it across multiple eigenvalues near 1, utilizing a higher-dimensional integration strategy to achieve the same functional outcome.
Limitations and Future Work
The primary limitation acknowledged by the authors is that their current topological analysis framework requires different networks to have the exact same number of fixed points to compute a direct graph-isomorphism distance. While the vast majority of successfully trained networks in this study naturally converged to the same number of fixed points, developing comparison metrics that are robust to differing numbers of fixed points is a crucial direction for future work.
Summary updated