Skip to content

NGC-Learn: Predictive Coding and Neurobiologically-Motivated Learning in Python

License

Notifications You must be signed in to change notification settings

NACLab/ngc-learn-legacy

 
 

Repository files navigation

Python VersionLicenseMaintenanceDocumentation StatusDOI

ngc-learn-legacy is a Python library for building, simulating, and analyzing biomimetic systems, neurobiological agents, and predictive coding models (predictive processing theory) based on the neural generative coding (NGC) computational framework. This toolkit was specificallly built on top of Tensorflow 2 and is distributed under the 3-Clause BSD license.

It was maintained by the Neural Adaptive Computing (NAC) laboratory. Note that the NAC Lab no longer maintains the Tensorflow-2 version of ngc-learn.

Documentation

Official documentation, including tutorials, can be found here.

The official blog-post related to the source paper behind this software library can be found here.
You can find the related paper right here, which was selected to appear in the Nature Neuromorphic Hardware and Computing Collection in 2023 and was chosen as one of the Editors' Highlights for Applied Physics and Mathematics in 2022.

Installation:

Setup: Ensure that you have installed the following base dependencies in your system. Note that this library was developed on Ubuntu 18.04 and tested on Ubuntu(s) 16.04 and 18.04 (and should also work on Ubuntu 20.04). ngc-learn requires:

  1. Python (>=3.7)
  2. Numpy (>=1.20.0)
  3. Tensorflow 2.0.0, specifically, tensorflow-gpu>=2.0.0
  4. scikit-learn (>=0.24.2) if using ngclearn.density (needed for the demo/tutorial files in examples/)
  5. matplotlib (>=3.4.3) (for the demo/tutorial files in examples/)
  6. networkx (>=2.6.3) (currently optional but required if using ngclearn.utils.experimental.viz_utils)
  7. pyviz (>=0.2.0) (currently optional but required if using ngclearn.utils.experimental.viz_utils)

(Which you can have setup/installed by running $ pip3 install -r requirements.txt.)

Once you have ensured that the above dependencies have been installed, you can then run the setup script at the top of the ngclearn directory to have the ngclearn package install on your system using the following bash command:

$ python setup.py install

If the installation was successful, you should see the following if you test it against your Python interpreter, i.e., run the $ python command and complete the following sequence of steps as depicted in the screenshot below:

Attribution:

If you use this code in any form in your project(s), please cite its source paper:

@article{Ororbia2022,
  author={Ororbia, Alexander and Kifer, Daniel},
  title={The neural coding framework for learning generative models},
  journal={Nature Communications},
  year={2022},
  month={Apr},
  day={19},
  volume={13},
  number={1},
  pages={2064},
  issn={2041-1723},
  doi={10.1038/s41467-022-29632-7},
  url={https://doi.org/10.1038/s41467-022-29632-7}
}

Development:

We warmly welcome community contributions to this project. For details on how to make a contribution to ngc-learn, please see our contributing guidelines.

Source Code You can check/pull the latest source code for this library via:

$ git clone https://github.com/ngc-learn/ngc-learn.git

Version:
0.5.0

Author: Alexander G. Ororbia II
Director, Neural Adaptive Computing (NAC) Laboratory
Rochester Institute of Technology, Department of Computer Science

Copyright:

Copyright (C) 2021 The Neural Adaptive Computing Laboratory - All Rights Reserved
You may use, distribute and modify this code under the terms of the BSD 3-clause license.

You should have received a copy of the BSD 3-clause license with this software.
If not, please email us

Packages

No packages published

Languages

  • Python 95.4%
  • C 3.4%
  • Other 1.2%