New Package for Cognitive Modeling with PyMC: HSSM

Using PyMC for computational modeling in Cognitive or Neuroscience?

We are excited to announce an alpha release of our new HSSM (Hierarchical Sequential Sampling Modeling) toolbox for Hierarchical Bayesian Inference with Models of Cognition!

HSSM is a PyMC5 based replacement of the widely used HDDM package (developed originally by Thomas Wiecki and based on PyMC2). HSSM is a much more general and computationally efficient successor, adds many new functionalities and now plays well with the whole PyMC eco-system. HSSM facilitates flexible model fitting and evaluation for a large range of cognitive process models and to explore the influence of neural signals on these processes. It is designed a priori to allow for a continually expanding core model-space, while providing an easy to use interface for complex hierarchical model building (we rely on BAMBI for the construction of parameter-wise hierarchical bayesian regression models).

Expert users can directly benefit from convenience utilities for the definition of PyMC distributions based on their own likelihoods and use these to define arbitrary PyMC models.

HSSM is a BRAINSTORM project in collaboration with the Center for Computation and Visualization and the Center for Computational Brain Science within the Carney Institute for Brain Science at Brown University. Project leads are Alexander Fengler, Paul Xu and Aisulu Omar, who were responsible for the main software engineering and technical developments supervised by Professor Michael J Frank, Director of the Center for Computational Brain Science .

We kindly thank Tomas Capretto for his contributions to BAMBI in response to our many requests for extra functionality to enable HSSM in its current form. Moreover, we thank Thomas Wiecki for his advice concerning basic design choices for the HSSM package. We also want to thank the PyMC core developers for providing such a stable and flexible backend for Bayesian Computation in the Python universe.

Features at a glance:

  • Bank of available cognitive process models hosted on Hugging Face (users can contribute). These include neural network approximations to likelihood free generative models.

  • Define mixtures between your process model and any lapse distribution

  • Parameter-wise Bayesian Hierarchical Regression via BAMBI

  • Multiple levels of user interface, from extremely simple one-line model definitions to low level access to the basic distribution constructors.

To come:

  • Addition of reinforcement learning (RL) models that can be estimated with all same functionality with or without other cognitive process models as choice function. Users will be able to configure any RL model in combination with any cognitive process model.

  • Many more relevant cognitive process models are coming which are applicable to other cognitive domains (e.g., circular diffusion model for continuous report tasks such as visual working memory)

  • Closer integration with support packages to allow empower simulation based inference (SBI)

Help us improve HSSM and/or get engaged with the community: