NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Discovering Symbolic Cognitive Models from Human and Animal Behavior

Pablo Samuel Castro, Nenad Tomasev, Ankit Anand, Navodita Sharma, Rishika Mohanta, Aparna Dev, Kuba Perlin, Siddhant Jain, Kyle Levin, Noemi Elteto, Will Dabney, Alexander Novikov, Glenn C Turner, Maria K Eckstein, Nathaniel D. Daw, Kevin J Miller, Kim Stachenfeld

The Interpretability-Performance Trade-off

In cognitive science, researchers seek to understand the brain by building mathematical models of behavior. Traditionally, this is a "human-first" process: a scientist formulates a hypothesis (e.g., "the brain uses Q-learning with a forgetting rate"), translates it into an equation, and fits it to experimental data.

However, human creativity has limits. Scientists often default to simple, familiar models that may fail to capture the full complexity of real-world behavior. Conversely, Recurrent Neural Networks (RNNs) can fit behavioral data incredibly well, but they act as "black boxes"—it is nearly impossible to inspect millions of weights to understand why a subject made a specific choice.

To tackle this interpretability-performance trade-off, researchers have developed CogFunSearch, an AI-driven tool that uses Large Language Models (LLMs) to automatically write Python programs explaining human and animal behavior. These AI-generated "symbolic" models outperform traditional human-designed theories while remaining fully interpretable.

Methods: The CogFunSearch Pipeline

CogFunSearch adapts a technique called FunSearch, operating as a bilevel optimization loop to discover and refine cognitive models:

  1. Outer Loop (Evolution): An LLM acts as a "mutator." It takes existing Python programs, analyzes their performance, and suggests improved versions, effectively exploring a massive space of symbolic logic.
  2. Inner Loop (Parameter Fitting): For every program the LLM generates, the system uses gradient descent to fine-tune its internal parameters (like learning rates) to fit the specific behavior of individual subjects. Crucially, the programs are written in JAX, making them differentiable and allowing for efficient parameter optimization.
Overview of the CogFunSearch pipeline, showing how LLMs evolve programs that are then fit to behavioral data.

Datasets

The researchers tested CogFunSearch on three large-scale datasets involving "Dynamic Multiarmed Bandit Tasks"—games where a subject must choose between different options to maximize rewards that change over time:

  • Human Dataset: 862 participants performing an online task (617,871 trials).
  • Rat Dataset: 20 rats in a nose-poke task (over 1 million trials).
  • Fruit Fly Dataset: 347 flies in a Y-maze (68,000 trials).

Key Insights and Results

In all three species, the AI-discovered programs significantly outperformed the best models previously designed by human experts. In 35 out of 36 experimental runs, the AI successfully found a model that beat the human-designed state-of-the-art.

  • Likelihood Gains: The best discovered programs improved normalized likelihood scores by 5.17% for humans, 0.54% for rats, and 0.48% for fruit flies over established baselines.
  • Closing the RNN Gap: While RNNs remain the gold standard for raw predictive power, CogFunSearch bridged the majority of the performance gap while keeping the models symbolic and readable.
Comparison showing that CogFunSearch programs outperform human-designed baselines across human, rat, and fly datasets.

Beyond raw performance, the discovered programs contained interpretable "motifs" rather than random noise. For example, in the human dataset, the AI discovered that tracking choice history (what the subject did previously) was more important than just tracking rewards. Furthermore, models discovered by CogFunSearch were able to generate synthetic data that perfectly mimicked the reward-seeking and perseveration patterns seen in real biological subjects.

Limitations and Future Work

Despite these successes, the authors acknowledge several hurdles:

  • Compute Cost: Finding the best models required hundreds of thousands of LLM calls, which is expensive and energy-intensive.
  • Code Quality: While the logic is symbolic, the generated code can sometimes be messy, containing redundant variables or "dead" code that doesn't affect the output.
  • The "Best" Model Ambiguity: Because the AI generates many high-performing models, scientists face a new challenge in deciding which of these valid hypotheses is the truest representation of underlying biology.

Future work will focus on improving the interpretability of the generated code and applying this method to more complex cognitive tasks beyond simple reward learning.

Summary updated

BibTeX
@inproceedings{castro2025discovering,
  author = {Pablo Samuel Castro and Nenad Tomasev and Ankit Anand and Navodita Sharma and Rishika Mohanta and Aparna Dev and Kuba Perlin and Siddhant Jain and Kyle Levin and Noemi Elteto and Will Dabney and Alexander Novikov and Glenn C Turner and Maria K Eckstein and Nathaniel D. Daw and Kevin J Miller and Kim Stachenfeld},
  title = {{Discovering Symbolic Cognitive Models from Human and Animal Behavior}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=dhRXGWJ027},
}
Figure