Reward-based training of recurrent neural networks for cognitive and value-based tasks

Hui Song, Guangyu Robert Yang, Xiao‐Jing Wang

Abstract

Trained neural network models, which exhibit many features observed in neural recordings from behaving animals and whose activity and connectivity can be fully analyzed, may provide insights into neural mechanisms. In contrast to commonly used methods for supervised learning from graded error signals, however, animals learn from reward feedback on definite actions through reinforcement learning. Reward maximization is particularly relevant when the optimal behavior depends on an animal’s internal judgment of confidence or subjective preferences. Here, we describe reward-based training of recurrent neural networks in which a value network guides learning by using the selected actions and activity of the policy network to predict future reward. We show that such models capture both behavioral and electrophysiological findings from well-known experimental paradigms. Our results provide a unified framework for investigating diverse cognitive and value-based computations, including a role for value representation that is essential for learning, but not executing, a task.

Introduction

In computational neuroscience, recurrent neural networks (RNNs) serve as powerful tools for simulating brain functions such as working memory and decision-making. Traditionally, these models are trained using supervised learning, where a "teacher" signal provides the exact correct output at every time step. However, biological systems rarely have access to such precise error signals. Instead, animals learn through reinforcement learning (RL)—interacting with the environment and adjusting behavior based on rewards or punishments.

Furthermore, supervised learning is fundamentally ill-equipped to model "value-based" tasks (e.g., choosing between different types of rewards) or "confidence-based" tasks (e.g., deciding whether to bet on a previous choice). In these scenarios, there is no objective "correct" answer, only subjective preferences or internal judgments of certainty. This research, published by a team from NYU and NYU Shanghai, introduces a unified RL framework for training RNNs that bridges the gap between artificial intelligence and systems neuroscience.

The Actor-Critic Framework

The researchers utilized an actor-critic architecture, a standard reinforcement learning paradigm, but implemented it within a recurrent framework to better simulate biological neural dynamics. The system consists of two primary modules:

  1. The Policy Network (Actor): This RNN receives sensory inputs and selects actions, such as maintaining fixation or choosing a specific target.
  2. The Value Network (Critic): This network observes the activity and actions of the policy network to predict future rewards.

To ensure biological relevance, the authors replaced standard "black box" RNN units with modified Gated Recurrent Units (GRUs) featuring threshold-linear activation functions. This ensures that firing rates remain positive and exhibit the leaky dynamics characteristic of real neurons. The networks were optimized using the REINFORCE policy gradient algorithm, where the value network provides a "baseline" to reduce noise in the reward signal, making learning more efficient.

Results Across Cognitive Paradigms

The framework was tested against six classic experimental paradigms from systems neuroscience, ranging from simple perception to complex economic choice:

  • Perceptual Decision-Making: In the Random Dots Motion (RDM) task, the network learned to discriminate motion direction, reaching target performance in approximately 7,000 trials.
  • Multisensory Integration: When combining visual and auditory cues, the RNNs demonstrated "optimal integration," improving performance in a manner that mathematically matches the sum-of-variances rule—a hallmark of biological sensory processing.
  • Economic Choice: In tasks requiring a choice between different "juices" (rewards) offered in varying amounts, the value network units developed tuning patterns selective for "chosen value" or "offer value." These patterns were nearly identical to those recorded in the monkey orbitofrontal cortex (OFC).

Emergent Neural Hallmarks

One of the paper's most significant findings is that these networks spontaneously developed neural activity patterns observed in biological brains without being explicitly programmed to do so. These include:

  • Ramping Activity: Firing rates that steadily climb as evidence accumulates, similar to activity in the parietal and prefrontal cortex.
  • Mixed Selectivity: Individual neurons responding to multiple task variables simultaneously, a feature thought to increase the representational capacity of the brain.
  • Confidence as a Byproduct: In post-decision wagering tasks, the value network’s reward prediction naturally functioned as a proxy for "confidence." This suggests that the ability to report certainty may be a fundamental byproduct of the reinforcement learning process itself.

Value for Learning vs. Execution

A key insight from this study is the functional dissociation between the policy and value networks. The researchers found that while the value network is essential for the acquisition of a task, it becomes unnecessary for execution once the task is learned. This mirrors clinical observations in animals where damage to the basal ganglia or orbitofrontal cortex prevents the learning of new contingencies but leaves previously established habits intact.

Limitations and Future Directions

While this framework provides a robust bridge between RL and neuroscience, the authors acknowledge several limitations. The mechanism for updating weights—Backpropagation Through Time—remains biologically controversial, suggesting a need for more "local" learning rules in future iterations. Additionally, the current model does not strictly adhere to Dale’s Principle (the separation of excitatory and inhibitory neurons) and focuses on discrete rather than continuous actions.

Despite these limitations, the study provides a unified framework for investigating how the brain implements diverse cognitive and value-based computations, offering a new lens through which to interpret electrophysiological data from behaving animals.

Summary updated

BibTeX
@inproceedings{song2017reward,
  author = {Hui Song and Guangyu Robert Yang and Xiao‐Jing Wang},
  title = {{Reward-based training of recurrent neural networks for cognitive and value-based tasks}},
  booktitle = {eLife},
  year = {2017},
  doi = {10.7554/elife.21492},
}
Figure