Setting up for failure: automatic discovery of the neural mechanisms of cognitive errors

Puria Radmard, Paul M. Bays, Máté Lengyel

To understand how the brain works, neuroscientists often train Recurrent Neural Networks (RNNs) to perform cognitive tasks. Usually, these networks are trained to be "perfect"—to achieve maximum accuracy. However, biological organisms are rarely perfect; they make systematic, characteristic errors.

In their paper, "Setting up for failure: automatic discovery of the neural mechanisms of cognitive errors," Radmard et al. argue that we’ve been looking at the problem backward. By forcing RNNs to be perfect, we miss the very neural mechanisms that explain real-world behavior. Instead, they propose a framework to automatically discover these mechanisms by explicitly training networks to fail exactly like humans and animals do.

The Problem with Perfection

Traditional computational neuroscience relies on a "normative" approach: define a task, train an RNN to solve it optimally, and then see if its internal activity looks like a brain. This often fails because biological behavior is rich with "suboptimalities"—biases, variability, and systematic errors—that task-optimal networks never learn.

When researchers do try to model these errors, they usually have to hand-craft specific architectures or "break" the network in heuristic ways (e.g., adding noise or ablating connections). This is a slow, subjective, human-in-the-loop process. The gap is two-fold:

  1. Data Scarcity: We don't have enough real behavioral data to train complex RNNs from scratch.
  2. Objective Functions: Standard training objectives like Mean Squared Error (MSE) encourage "average" behavior, failing to capture complex, multimodal response distributions (like when a subject is torn between two different answers).

A Novel Framework: Generating Realistic Failures

The authors bridge this gap with two major methodological innovations:

  1. Surrogate Data via Generative Models: To solve the data scarcity problem, they use a flexible generative model (specifically a Bayesian Non-parametric model of Swap errors) to produce massive amounts of synthetic behavioral data. This model is tuned to capture the specific statistical "flavor" of biological errors.
  2. Diffusion-based RNN Training: Instead of standard regression, they adapt Denoising Diffusion Probabilistic Models (DDPMs) to the RNN setting. They treat the behavioral response as a denoising process. During the "retrieval" phase of a task, the RNN is trained to iteratively "denoise" a signal to reach a sample from the target behavioral distribution. This allows the network to learn complex, multimodal distributions that standard models cannot.
Traditional task-optimal training versus the proposed behaviorally-grounded framework.

Key Insights and Results

By testing their approach on a Visual Working Memory (VWM) task known for producing "swap errors" (recalling a distractor instead of the target), the authors uncovered several key insights:

  • Suboptimality is a Feature: The "failures" of the brain are not just noise; they are windows into its underlying architecture. Training for these failures reveals biological neural signatures that task-optimal training hides.
  • The Power of Multimodality: In tasks where subjects make swap errors, the response distribution is multimodal. Standard RNNs trained with MSE tend to "average" these modes, resulting in a single, incorrect peak. The diffusion approach allows the RNN to represent the "either-or" nature of these errors accurately.
  • Emergent Neural Geometry: By simply training the network to match the behavioral distribution, the neural representations automatically organized themselves into a specific geometric structure that matches what is seen in real macaque brains.
RNN responses accurately capture the multimodal nature of swap errors and match ground truth probabilities.

The "behaviorally realistic" RNNs captured qualitative features of macaque neural data—specifically a rapid increase in the alignment of neural "planes" representing different items—that task-optimal networks completely missed. Furthermore, the model correctly predicted that swap errors are more likely when the "probe" features of two items are similar, providing a neural explanation for why this happens.

Limitations and Future Directions

While powerful, the approach relies on having a good descriptive model of behavior to generate the surrogate data. If no such model exists for a given task, the method is harder to apply. Additionally, while successful on 2-item tasks, scaling this to more complex, high-dimensional behaviors (like natural language or complex motor control) remains a challenge.

Ultimately, by "setting up for failure," this research provides a powerful, automated pipeline for turning behavioral observations into testable hypotheses about the neural circuits that make us human—errors and all.

Summary updated

BibTeX
@inproceedings{radmard2026setting,
  author = {Puria Radmard and Paul M. Bays and Máté Lengyel},
  title = {{Setting up for failure: automatic discovery of the neural mechanisms of cognitive errors}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=NGThArVrD3},
}
Figure