arXiv:2610.02523cs.AIOct 2026

Manuscript Offprint

arXiv:2610.02523

Hypothesis-guided discovery of cognitive algorithms via program refinement

Huiwen Alex Yang, Mark K. Ho, Bill D. Thompson

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.

1 Introduction

An overarching goal of modern cognitive science and artificial intelligence is to advance the science of cognitive modeling. Adaptive and scalable methods to induce interpretable cognitive models from behavioral data is a key frontier within this goal. In particular, advances that support induction of models for algorithmically-structured behaviors would enable innovation across many sub-areas, and substantively expand the reach of cognitive science. Recent advances in LLM-supported modeling (e.g. Rmus et al., 2025; Curtis et al., 2025) establish new potential for scalable generation of cognitive models. However, current methods (1) generally underutilize human expertise; (2) often produce uninteresting models that reflect the LLM's prior; and (3) have mostly been applied at scale to simpler problems than algorithm recovery. We propose a solution and evaluate it in depth on a single well-suited problem-solving paradigm. Our approach views model discovery as program refinement: a scientist's best hypothesized models are expressed as probabilistic programs and provided to a system of LLM agents with a mandate to identify targeted revisions that improve the fit between these initial proposals and human data; revised programs propagate to a probabilistic inference module that performs inference for latent variables and data likelihood computations. Our approach offers systematic integration of human expertise into LLM-supported discovery of algorithmic cognitive models.

References (52)