Hypothesis-guided discovery of cognitive algorithms via program refinement
cs.AI
Submitted: 2026-10-01
Updated: 2026-10-01
Code: https://github.com/codec-lab/flippy
License: http://creativecommons.org/licenses/by-nc-sa/4.0/
The gist: Developing cognitive models of algorithmic reasoning from behavioral data is a central problem in cognitive science that challenges current methods.
Abstract
Developing cognitive models of algorithmic reasoning from behavioral data is a central problem in cognitive science that challenges current methods. Traditional approaches to cognitive modeling are interpretable and benefit from human expertise, but lack flexibility and scalability. Emerging techniques using large language models (LLMs) for de novo generation of cognitive models are scalable and flexible, but lack a role for human expertise and have mostly been applied to simpler tasks than algorithm recovery. We propose a hybrid system that treats discovery of cognitive algorithms as a program refinement problem. Human-created cognitive models are expressed as probabilistic programs and provided to a system of LLM agents with a mandate to: identify mismatches between model and behavior; propose code-level modifications within researcher-specified constraints; and verify structural fidelity. Revisions propagate to a probabilistic inference module that performs inference for latent variables and data likelihood computations. We evaluate the pipeline on human behavior in a problem-solving paradigm that exposes a variety of cognitive algorithms. Revised models consistently improve model fit relative to ancestral models and reveal a small set of recurring innovations that capture meaningful behavioral variability in this task.
Sources
- Human-like Few-Shot Learning via Bayesian Reasoning over Natural Language
- Church: a language for generative models
- Toward an automated science of the mind
- Closing the Loop to Discover Psychological Theories with an Automated Cognitive Scientist
- Modeling Others' Minds as Code
- Finding structure in logographic writing with library learning
- Doing Experiments and Revising Rules with Natural Language and Probabilistic Reasoning
- Self-Improving Language Models for Evolutionary Program Synthesis: A Case Study on ARC-AGI
- auto-psych: Automating the science of mind using agent-driven theory discovery and experimentation
- Generating Computational Cognitive Models using Large Language Models
- A Study of LLMs' Preferences for Libraries and Programming Languages
- An Introduction to Probabilistic Programming
- Discovering Differences in Strategic Behavior Between Humans and LLMs
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems