acceptodds
Under review as a conference paper at ICLR 2027

Hypothesis-guided discovery of cognitive algorithms via program refinement

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.

Primary area:
applications to neuroscience & cognitive science
Keywords:
Cognitive modeling, Program refinement, LLM

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 4 reviews, above 27% of the others.
Reviewer_dnzgOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
3
Read review
Paper summary

The paper proposes an LLM based pipeline for discovering cognitive models using program refinement. Their pipeline has 4 modules, 3 of which are LLM based, and one (the Inference module) uses standard methods for probabilistic inference. Using human data collected on a single task, a colored light switching puzzle, they analyze the algorithms discovered and the refinements proposed by their pipeline. They show that for many of the participants, a revised strategy proposed by their pipeline provides the overall best-fit.

Critical strengths
  1. The scientific setup of evaluating human hypotheses using LLMs for discovering better programs is useful.
Critical weaknesses
  1. The comparison is between the revised programs and the 3 original models that were refined. Some more baselines, for eg., a comparison of the programs discovered by their pipeline from scratch (instead of starting from the 3 defined models) with the 3 baseline models would be informative.
  2. Using LLMs for program refinement/discovery is not something new (e.g. [1]), and hence I'm unclear about the novelty of the proposed approach.

[1] Castro, Pablo Samuel, et al. "Discovering symbolic cognitive models from human and animal behavior." bioRxiv (2025): 2025-02.

Questions for authors

Please look at the Weaknesses section above.

1 comment

We thank the reviewer for recognizing the usefulness of combining human hypotheses with LLM-based program discovery.

De novo baseline. We added the suggested generation-from-scratch ablation in Appendix G. We removed the base cognitive program while retaining the same pipeline and six generation attempts per trajectory. Across 49 trajectories, only 69 of 294 outputs (23.5%) produced a finite maximized log likelihood, 7 (2.4%) supported the complete inference grid, and 6 (2.0%) passed all black-box validity checks. Thus, without an executable base model, the pipeline usually fails to produce a program that can be reliably compared with the three cognitive models. This result supports our central design choice: existing cognitive programs provide both theoretical guidance and the executable structure required for reliable refinement. We do not interpret this ablation as establishing the contribution of every individual pipeline module.

Relationship to Castro et al. We agree that LLM-based cognitive-program discovery is not itself novel, and we have revised Section 3 to cite and distinguish Castro et al. (2025). Their method uses evolutionary LLM-based search to discover symbolic cognitive models directly from behavioral data, whereas our framework begins with human-specified probabilistic programs and uses trajectory-level diagnosis and constrained refinement to produce interpretable extensions of existing cognitive theories. Our contribution is therefore this hypothesis-guided refinement workflow, rather than the first use of LLMs for cognitive-model discovery.

Concluding remarks We believe the new de novo ablation strengthens the motivation for refinement rather than unconstrained generation, while the comparison with Castro et al. clarifies the complementary methodological contribution of our work. We hope these additions and clarifications support acceptance.

Reviewer_86FjOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper uses LLMs to improve existing cognitive models by proposing and testing hypotheses. It modifies human-designed probabilistic programs to better explain each person's behavior over time while keeping their original structure. Their models are tested on behavioral trajectories from 150 participants who had to turn on a grid of colored lights while learning hidden dependencies between colors. Their empirical results show that the refined models improve fit for 53.2% of participants, generalize to held-out trials.

Critical strengths
  1. I think authors clearly identify the limitations of relying solely on LMs or humans to generate programs. It incorporates existing cognitive theories into model discovery instead of generating programs from behavioral data alone.
  2. The revised models fit the data better on 52.6% of held-out trials. This suggests that the behavioral patterns they capture extend beyond the sequence used to refine them.
Critical weaknesses
  1. The current results don't clearly show that whether the gains come from the framework itself or depend heavily on the specific LLM’s reasoning and coding abilities. Different LLMs could produce very different revisions and cluster structures.
  2. It's good to see that the framework also works well on held-out data. However, those data come from the same participant and use the same task structure, so the results show generalization within the task, not transfer to other participants or domains.
Questions for authors
  1. All LLM-based modules in the paper use GPT-5.4, so the discovered revision patterns may partly depend on this specific model. I was wondering whether the same recurring revision clusters would still be discovered if GPT-5.4 were replaced with a different LLM.
  2. If I understand correctly, the experiment already collects a strategy description after the scored trials. I think this provides another source of evidence about what participants thought they were doing. Do the discovered revised strategies agree with participants' own strategy descriptions?
  3. The paper shows that their framework can generate revised models with better fit, but its broader practical value for cognitive science is less clear. I would like to know whether it changes how researchers build theories, discover new mechanisms. What does this framework actually enable cognitive scientists to do?
1 comment

We thank the reviewer for recognizing the value of grounding LLM-based discovery in existing cognitive theories.

LLM dependence. We agree that the specific proposals and cluster frequencies may depend on GPT-5.4. We have clarified in the Methods section 4.2 that all LLM modules used GPT-5.4 and that the empirical results are conditional on this implementation. The framework permits other LLMs to instantiate these modules, but we have not established cross-LLM invariance. Comparing execution validity, model fit, and cluster stability across LLMs is an important direction for future work.

Separate-trial evaluation. We agree that these trials do not establish transfer to new participants, tasks, or domains. We have renamed this analysis a retrospective separate-trial model-library evaluation in Section 5.4 and Appendix E, removed claims of held-out prediction or generalization, and clarified in the text and figure caption that the best candidate is selected on each evaluation trajectory. The revised paper now states that this analysis measures the descriptive coverage of the expanded model library on a separate trial, not prospective prediction by an independently selected model.

Participant descriptions. Participants provided strategy descriptions, but we did not use them in model generation or formally analyze their correspondence with the discovered programs. We agree that such a comparison could provide valuable convergent evidence, while recognizing that retrospective verbal reports may be incomplete. We regard this as a useful independent validation analysis for future work.

Practical value. The framework is intended as a hypothesis-generation tool, not an autonomous theory-discovery system. It converts mismatches between an executable cognitive theory and behavior into concrete, inspectable program modifications. Researchers can use recurring proposals—such as damage-sensitive repair and deterministic ordering in our results—to identify candidate mechanisms for subsequent confirmatory modeling and targeted experiments. Our new de novo ablation further shows why grounding this process in an executable cognitive model matters: only 6 of 294 programs generated without a base model passed the complete validity criteria.

Concluding remarks We agree that cross-LLM replication, self-report correspondence, and transfer to new tasks would strengthen empirical validation. Nevertheless, we believe the current work makes a useful methodological contribution by demonstrating a structured way to transform existing cognitive theories into interpretable, executable candidate refinements. We hope these clarifications and the added ablation support acceptance.

Reviewer_qy24OpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes a hypothesis-guided framework for discovering cognitive algorithms through probabilistic program refinement. Starting from human-written cognitive models, LLM-based modules analyze behavioral trajectories, propose targeted modifications, implement them, and audit the resulting programs. The authors select 24 representative revised programs and report improved best-model fit for approximately half of the original and held-out trajectories.

Critical strengths
  1. Starting from established cognitive models provides a meaningful structure for LLM-generated revisions.
  2. The task involves exploration, dependencies between actions, and potentially hierarchical strategies, making it an interesting setting for cognitive program discovery.
  3. The inclusion of held-out trajectories and synthetic recovery experiments is valuable, and the authors acknowledge limitations and unsuccessful outcomes.
Critical weaknesses
  1. Appendix E.2 selects the best model separately for each held-out trajectory from either three base models or the expanded collection of 27 models. Since the expanded collection contains the base models, the reported improvement is necessarily nonnegative. The proportion of trajectories with positive improvement therefore combines the usefulness of the revisions with the advantage of selecting among more candidates on the evaluation data. Marginalizing latent variables within individual models does not remove this between-model selection effect. 
  2. There are no controlled comparisons against equal-budget direct LLM generation, unconstrained refinement, or simple manually specified repair variants. Consequently, it is unclear how much the proposed constraints and modular architecture contribute beyond expanding the model library.
Questions for authors
  1. Can the authors report held-out predictive performance when model selection or model averaging weights are determined independently of the test trajectories? Does the improvement persist against a control with a comparable number of candidate models and generation budget? 
  2. Are there controlled results comparing the proposed approach with direct generation or unconstrained refinement using the same LLM and budget? Such evidence would materially affect the assessment of the hypothesis-guided design. 
  3. Section 4.5 states that observing yellow turning off green eliminates orderings placing yellow before green, which appears inconsistent with the task definition in Section 4.4.1. Is this a textual error, or does it also occur in the implementation? Please also specify the latent-variable priors, marginal-likelihood inference procedure, and checks used to establish numerical reliability. 
  4. Please clarify the transition from 733 audited programs to 462 clustered proposals, the discrepancy between 74 participants in the main text and 75 in Table 4, and the difference between 111 programs outperforming CB and 109 showing positive recovery in Appendix F.3. Do these differences affect the reported results?
1 comment

We would like to thank the reviewer for the careful reading and constructive questions.

  1. Held-out evaluation. We agree that selecting the best model separately on each evaluation trajectory confounds the usefulness of the revisions with the larger candidate library. Marginalizing uncertainty within a program does not remove this between-model selection effect. We have therefore relabeled this analysis as a retrospective model-library evaluation and removed claims that it establishes model-level out-of-sample prediction. It shows that the expanded library contains programs capable of describing behavior on a separate trial, but not that a model selected independently would predict that trial.

  2. Controlled baseline. We added a de novo-generation ablation that removes the base cognitive program while retaining the same pipeline and six candidate-generation attempts per trajectory. Across 49 trajectories in one condition, only 6 of 294 generated programs (2.0%) passed the full black-box validity criteria, and only 69 (23.5%) produced a finite maximized log likelihood. These results provide direct evidence that executable cognitive-model scaffolding is important for producing valid, evaluable programs. We agree that this ablation does not separately establish the contributions of every architectural constraint, and we now state this limitation explicitly.

We have added the main result to Section 5.2 and provide the complete protocol, validation criteria, and failure analysis in a new Appendix G. We also clarify that this ablation does not replace comparisons with non-LLM mutation, symbolic search, or exactly complexity-matched alternatives. Accordingly, we have narrowed our claim to the practical value of hypothesis-guided program refinement within the present pipeline.

  1. TwoPhase description and inference. The yellow/green statement is a textual reversal. If yellow turns off green, orderings placing green before yellow should be eliminated. The implementation records the clicked color as preceding the color it turns off and therefore uses the correct direction. We have fixed this textual error in Section 4.5. We also added a paragraph in Section 4.5 to clarify the inference procedure: program-internal stochastic choices are marginalized by FlipPy, while the reported fit is maximized over the enumerated discrete parameter grid. For example, lapse probabilities are evaluated over {0,.1,.2,.3,.4,.5}\{0,.1,.2,.3,.4,.5\}; TwoPhase additionally enumerates switch points and feasible topological orders. Thus, these fitted quantities are more precisely described as maximized log likelihoods rather than prior-averaged model evidence. We report non-finite fits explicitly; two of 141 trajectories were excluded from the primary comparison for this reason.

  2. Count clarifications. Of the 846 generated programs, 733 passed execution auditing. Among these, 271 represented no_change decisions, leaving 462 substantive revision proposals for clustering. We added this to Section 5.2 to clarify. Table 4 contains 75 revised-model winners because it includes one participant whose base-model fits were all -infinite but whose revised-model fit was finite; the finite-fit comparison therefore contains 74 revised winners among 139 participants. Finally, “109 programs” in Appendix F.3 was a reporting error: the correct number with positive recovery is 111/215 (51.6%), consistent with the likelihood comparison and recovery-bin counts. None of these corrections changes the substantive conclusions.

Concluding remarks We appreciate that the principal concerns concern the scope and interpretation of the evaluation rather than the technical feasibility of the framework. We have narrowed our claims accordingly and believe the paper still makes a useful contribution by introducing a concrete methodology for hypothesis-guided refinement of executable cognitive models, demonstrating recurring and interpretable revisions, and identifying both the potential and current limitations of this approach. We hope these clarifications and additional evidence support acceptance.

Reviewer_Div1OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

The paper proposes an LLM-based framework for refining human-specified cognitive models expressed as probabilistic programs. The approach is promising and combines human theoretical knowledge with automated model discovery.

Critical strengths

Interesting and potentially useful approach to automated cognitive modeling, an emerging research topic in the behavioral sciences. The proposed pipeline is coherent and produces interpretable modifications to existing models. The added held-out and synthetic recovery experiments are quite nice.

Critical weaknesses
  1. The held-out evaluation selects the best-fitting model among 27 candidates on the held-out trials themselves. This does not establish genuine out-of-sample predictive improvements and could be improved.
  2. Comparisons against simpler program-search procedures and complexity-controlled alternatives are missing, making it difficult to establish the contribution of the LLM-based refinement. How does this pipeline compare to other model search frameworks?
  3. In the synthetic experiments, only 8.4% of revised programs recover at least 75% of the predictive gap, raising concerns about whether the approach reliably discovers underlying cognitive mechanisms. Can you say more about model recovery?
  4. Evaluation on a single task with relatively simple initial models makes broader claims about cognitive theory discovery difficult. Can you show that this works on more tasks?
Questions for authors

How much of the improvement is attributable specifically to LLM-guided refinement? Can you show that this works in other domains?

1 comment

We thank you for the thoughtful review and for highlighting the promise, interpretability, and coherence of our framework.

  1. Held-out evaluation. We agree that selecting the best-fitting model among all 27 candidates on each separate trial does not establish unbiased out-of-sample prediction. The revised-model library was fixed without using these trials, but the winning model was selected using the evaluation trajectory itself. We have revised Sections 4.3 and 5.4 to characterize this analysis as a separate-trial model-library evaluation, rather than model-level predictive evaluation. The result shows that a fixed library developed from other trajectories contains revised strategies that explain behavior on separate trials; it does not show that a model selected in advance predicts unseen behavior better.

  2. Simpler generation baseline. To evaluate the contribution of base-program scaffolding, we added a de novo ablation on all 49 trajectories in one of the three conditions. We retained the LLM pipeline, six candidate generations per trajectory, and maximum repair budget, but supplied no human-written base cognitive program. Across 294 generated programs, 70 (23.8%) executed on the first attempt and 128 (43.5%) executed after repair. Only 69 (23.5%) returned a finite maximum log-likelihood. Under a conservative black-box criterion requiring sufficient output to verify maximum selection and probability normalization, 6 programs (2.0%) passed end-to-end validation.

Most remaining programs were unverifiable, rather than demonstrably mathematically incorrect, because they did not expose sufficient likelihood information. We therefore interpret this analysis as showing that base-program scaffolding is practically important for reliably producing immediately executable and evaluable inference programs.

We have added the main result to Section 5.2 and provide the complete protocol, validation criteria, and failure analysis in a new Appendix G. We also clarify that this ablation does not replace comparisons with non-LLM mutation, symbolic search, or exactly complexity-matched alternatives. Accordingly, we have narrowed our claim to the practical value of hypothesis-guided program refinement within the present pipeline.

Concluding remarks We appreciate that the primary concerns relate to the scope of the empirical evaluation rather than the technical soundness of the framework. We addressed the evaluation-protocol and baseline concerns by reframing the separate-trial analysis as a retrospective model-library evaluation and adding a de novo generation ablation. We agree that demonstrating generalization across additional tasks and richer initial models would substantially strengthen the work. Such evaluation requires new task-specific models, data, and experiments beyond the current project’s scope, so we have instead narrowed our claims and stated this limitation explicitly.

At the same time, we hope the paper can be evaluated as introducing a methodology for hypothesis-guided refinement of executable cognitive models. We believe the current results establish the feasibility of this approach, produce recurring and interpretable cognitive hypotheses, and demonstrate the practical value of human-specified program scaffolding. We hope these revisions and clarifications support reconsideration of the paper for acceptance.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.