Neural Simulation-Based Inference for Computational Cognitive Models: A Tutorial
Organizations: Department of Psychology, University of California, Berkeley · Helen Wills Neuroscience Institute, University of California, Berkeley
Abstract
Computational cognitive modeling is an increasingly essential methodology to elucidate the mechanisms underlying human and animal cognition. By fitting models to empirical data, researchers can perform parameter estimation, model comparison, and model-based neural analyses to assess competing theories, quantify individual differences, and investigate neural representations. Typically, fitting these models relies on likelihood-dependent methods (e.g., Maximum likelihood estimation or hierarchical Bayesian methods). However, for many reasonable cognitive models, computing the likelihood is computationally intractable, in which case these methods become inadequate. This substantially limits the range of theories that researchers can investigate. Simulation-based inference with neural networks (neural SBI) has emerged as a powerful toolkit to overcome this hurdle. By training deep neural networks on datasets generated through model simulations, neural SBI learns the relation between observable data and cognitive models. This approach enables all the applications of standard modeling while bypassing the likelihood computation, without constraints on empirical data size. Despite its successful adoption across diverse scientific fields, neural SBI remains underutilized in cognitive modeling, partly due to a lack of accessible, domain-tailored guidance. This tutorial addresses this gap by providing a clear workflow for applying neural SBI to cognitive models. We also provide practical use cases and recommendations for reducing the computational and simulation burden, facilitating efficient implementation in real-world research settings. By lowering the technical barriers to neural SBI, this tutorial aims to empower cognitive scientists to investigate richer theory spaces and ultimately propel scientific discovery.
Figures & tables
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Feature Type | Example | Recommended Representation |
| Continuous | model parameter | Standardize |
| Large positive continuous | RT = 200–3000 | Standardize; possibly log-transform |
| Binary | reward = 0/1 | 0/1 |
| Nominal category | model identity | One-hot |
| Ordinal | difficulty = low/medium/high | Ordinal encoding if ordering is meaningful; otherwise one-hot |
| Feature Set | Parameter Error (RMSE) | Overall | Time | |||
| RMSE | (min) | |||||
| Base | ||||||
| Replace is_switch with block number | ||||||
| Replace is_switch with trial number | ||||||
| Remove is_switch | ||||||
| Remove prev_action | ||||||
| Hyperparameter | Sweep range | |
| # of units in RNN layer | ||
| dropout rate in RNN layer | ||
| dropout rate in 1st MLP layer | ||
| dropout rate in 2nd MLP layer | ||
| learning rate | ||
| batch size |
| Feature Set | Parameter Error (RMSE) | Overall | Time | |||
| RMSE | (min) | |||||
| Base (4) | ||||||
| + reward0_bin (5) | ||||||
| + chosen_reward_bin (6) | ||||||
| + unchosen_reward_bin (7) | ||||||
| + is_switch (8) | ||||||
Simulation-Based Inference
Simulation-based inference estimates parameters and uncertainty from simulators when evaluating a tractable likelihood is difficult or impossible.
See all 96 papers