Skip to main content

Python VersionLicenseMaintenanceDocumentation StatusDOI

ngc-learn is a Python library for building, simulating, and analyzing biophysical / neurobiological systems, spiking neuronal networks, predictive coding circuitry, and biomimetic (NeuroAI) agents that learn in a biologically-plausible manner. This simulation toolkit, meant to support computational neuroscience and brain-inspired computing research, is built on top of JAX and is distributed under the 3-Clause BSD license.

It is currently maintained by the Neural Adaptive Computing (NAC) laboratory.

Documentation

Official documentation, including tutorials, can be found here. The model museum repo (ngc-museum), which implements several historical models, 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

Dependencies

ngc-learn requires:

  1. Python (>=3.10)
  2. NumPy (>=1.22.0)
  3. SciPy (>=1.7.0)
  4. ngcsimlib (>=3.1.1), (visit official page here)
  5. JAX (>=0.4.28) (to enable GPU use, make sure to install one of the CUDA variants)

ngc-learn 3.2.1 and later require Python 3.10 or newer as well as ngcsimlib >=3.1.1. ngc-learn's plotting capabilities (routines within ngclearn.utils.viz) require Matplotlib (>=3.8.0) and imageio (>=2.31.5) and both plotting and density estimation tools (routines within ngclearn.utils.density) will require Scikit-learn (>=0.24.2). Many of the tutorials will require Matplotlib (>=3.8.0), imageio (>=2.31.5), and Scikit-learn (>=0.24.2).

User Installation

Setup: The easiest way to install ngc-learn is through pip:

$ pip install ngclearn

Note that installing the official pip package without any form of JAX installed on your system will default to downloading the CPU version of ngc-learn; make sure you have installed the Cuda 12 version of Jax/Jaxlib on your system before running the above pip command if you want to use the GPU version.

The documentation includes more detailed installation instructions. Note that this library was developed on Ubuntu 20.04/22.04 and tested on Ubuntu(s) 20.04 and 22.04.

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 (you should see at the bottom of your output something akin to the right major and minor version of ngc-learn):

Python 3.11.4 (main, MONTH  DAY YEAR, TIME) [GCC XX.X.X] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ngclearn
>>> ngclearn.__version__
'3.2.1'

Note: For access to the previous Tensorflow-2 version of ngc-learn (of which we no longer support), please visit the repo for ngc-learn-legacy.

Attribution:

If you use this code in any form in your project(s), please cite its source paper (as well as ngc-learn's official software citation):

@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/NACLab/ngc-learn.git

If you are working on and developing with ngc-learn pulled from the github repo, then run the following command to set up an editable install:

$ python install -e .

Version:
3.2.1

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

Metadata

Release files for ngclearn 3.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ngclearn 3.2.1
File Size Uploaded
ngclearn-3.2.1.tar.gz 222.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ngclearn 3.2.1
File Interpreter ABI Platform
ngclearn-3.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 584.1 kB

Release files / ngclearn-3.2.1.tar.gz

Download URL ngclearn-3.2.1.tar.gz
Size 222.6 kB
Tags Source
SHA-256 checksum
How to use checksums
647a106c6d0806dd185ed83fd3f160785d7666b8b444d6c875440a85490927c3
BLAKE2b-256 checksum
How to use checksums
f216397b213e777b8798273f765b973b1a34a0a6854e9310cea78fe95d27a77f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / ngclearn-3.2.1-py3-none-any.whl

Download URL ngclearn-3.2.1-py3-none-any.whl
Size 361.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18ecd96586b995360beafe66fe9f7a892f702884b9350a3ffafa57aeaade2ace
BLAKE2b-256 checksum
How to use checksums
c8dbdeb8c106b1791129b6d7ae71c2560573e4047f46777bdbbe6eb170cd1be3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page