Charting and Navigating the Space of Solutions for Recurrent Neural Networks

Elia Turner, Kabir Vinay Dabholkar, Omri Barak

This paper explores a fundamental question in machine learning and neuroscience: when we train a Recurrent Neural Network (RNN) to perform a task, does it always find the same "solution," or is there a vast, diverse landscape of ways to solve the same problem? The researchers demonstrate that RNNs trained on the same task often develop qualitatively different internal "algorithms" and dynamical structures—a phenomenon known as underspecification.

By introducing a novel "reduced dynamics" tool, the authors show how to map this space of solutions and even predict a network's underlying strategy based on its neural activity.

The Challenge of Underspecification

In computational neuroscience, researchers often train RNNs to mimic animal behavior and then compare the "neural" activity of the network to real brain recordings. This approach usually rests on an implicit assumption: that the solution found by the network is "universal"—meaning any network trained on that task would solve it the same way.

However, both animals and machine learning models exhibit significant variability. In machine learning, this is called underspecification: many different sets of parameters can achieve the same low error on a training set. The authors argue that if we want to use RNNs to understand the brain, we must first "chart" the space of possible solutions to understand which features are essential to the task and which are just artifacts of a specific training run.

Charting the Solution Space

The authors investigate this "solution space" through several layers of complexity, relying on synthetic, parametric tasks common in systems neuroscience (such as Delayed Discrimination and Interval Reproduction). These tasks have clear mathematical structures, allowing researchers to precisely control the "challenge" and observe how the network's internal logic changes.

  1. The 2-Neuron Toy Model: They start with a minimal 2-neuron RNN to visualize the parameter space directly, training 10,000 versions of this tiny network to reach a specific state.
  2. Neuroscience-Inspired Tasks: They scale up to 400 "Vanilla" RNNs (and later GRUs/LSTMs) trained on classic timing and discrimination tasks.
  3. Extrapolation Testing: To see "under the hood," they test trained networks on inputs outside their training range (e.g., much longer delays). This "perturbation" often reveals hidden dynamical structures like limit cycles that aren't obvious during normal task performance.

Key Insights and Dynamical Fingerprints

Discrete "Islands" of Solutions Even in the simplest 2-neuron model, solutions aren't just a smooth continuum. They cluster into discrete regimes. Some networks use stable fixed points, others use limit cycles (oscillations), and others use transient amplification. In the 2D toy model, a 2D plane could explain 94% of the variance across all 10,000 solutions, providing a literal map of the solution space.

A 2-neuron toy model demonstrates how different network initializations lead to distinct dynamical regimes, such as stable fixed points or limit cycles, to solve the same task.

Extrapolation as a Diagnostic Two networks might look identical while performing a task they were trained on, but behave completely differently when pushed outside their comfort zone. This reveals that they have learned fundamentally different underlying "algorithms." For example, in the Interval Reproduction task, some networks "count down" from a maximum delay, while others use circular, oscillatory trajectories to track time.

Reduced Dynamics as a "Fingerprint" The paper's most novel contribution is an algorithm that compresses a complex network's high-dimensional state space into a compact directed graph. In this graph, nodes represent functional states (inputs/outputs) and edges represent the autonomous transitions between them. This tool allows researchers to categorize hundreds of different networks into a handful of "types." For the Interval Reproduction task, 93% of the 400 networks fell into just four major dynamical types.

Predictability and Architecture Bias The authors showed that by extracting features from the neural activity during the training phase, they could partially predict which "reduced dynamics" type the network belonged to. Furthermore, while different architectures (Vanilla RNN, GRU, LSTM) can often find the same solutions, they have different "biases." A specific oscillatory solution might be common in GRUs but almost never appear in Vanilla RNNs.

Limitations and Future Directions

The authors acknowledge several limitations in their current framework:

  • Hyperparameter Constancy: The study focused on variability arising from random initialization. It did not systematically explore how changing network size, learning rates, or specific loss functions might further expand or contract the solution space.
  • Reachability: The "Reduced Dynamics" tool relies on trajectories reachable by task-consistent inputs. It might miss "hidden" parts of the state space that the network never enters during normal operation.
  • The "Why" of Task Diversity: While the paper shows that some tasks have more diverse solutions than others, it doesn't fully explain why. They conjecture that tasks requiring an informative output at every time step might have less variability than tasks that only require an output at the very end.

Ultimately, this work serves as a cautionary tale and a roadmap: when an RNN "solves" a task, it is just one of many possible solutions. Understanding that diversity is key to making meaningful comparisons between artificial and biological intelligence.

Summary updated

Abstract

In recent years Recurrent Neural Networks (RNNs) were successfully used to model the way neural activity drives task-related behavior in animals, operating under the implicit assumption that the obtained solutions are universal. Observations in both neuroscience and machine learning challenge this assumption. Animals can approach a given task with a variety of strategies, and training machine learning algorithms introduces the phenomenon of underspecification. These observations imply that every task is associated with a space of solutions. To date, the structure of this space is not understood, limiting the approach of comparing RNNs with neural data. Here, we characterize the space of solutions associated with various tasks. We first study a simple two-neuron network on a task that leads to multiple solutions. We trace the nature of the final solution back to the network’s initial connectivity and identify discrete dynamical regimes that underlie this diversity. We then examine three neuroscience-inspired tasks: Delayed discrimination, Interval discrimination, and Time reproduction. For each task, we find a rich set of solutions. One layer of variability can be found directly in the neural activity of the networks. An additional layer is uncovered by testing the trained networks' ability to extrapolate, as a perturbation to a system often reveals hidden structure. Furthermore, we relate extrapolation patterns to specific dynamical objects and effective algorithms found by the networks. We introduce a tool to derive the reduced dynamics of networks by generating a compact directed graph describing the essence of the dynamics with regards to behavioral inputs and outputs. Using this representation, we can partition the solutions to each task into a handful of types and show that neural features can partially predict them. Taken together, our results shed light on the concept of the space of solutions and its uses both in Machine learning and in Neuroscience.
BibTeX
@inproceedings{turner2021charting,
  author = {Elia Turner and Kabir Vinay Dabholkar and Omri Barak},
  title = {{Charting and Navigating the Space of Solutions for Recurrent Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=SQm_poGrlj},
}

Loading related content...

Figure