# mlech26l/ncps

PyTorch and TensorFlow implementation of NCP, LTC, and CfC wired neural models

Repository: https://github.com/mlech26l/ncps
Canonical: https://ross.abutalabs.com/products/ncps
Homepage: https://www.nature.com/articles/s42256-020-00237-3
Language: Python
License: Apache-2.0
License Family: permissive
Topics: ncp, recurrent-neural-network, nature-machine-intelligence, tensorflow, keras, cfc
Last push: 2024-08-14T13:50:44+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2199, "days_push": 749, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2345, forks 378 (observed 2026-08-28T04:06:39.821415+00:00)

## What it is
A Python package providing PyTorch and TensorFlow/Keras implementations of Neural Circuit Policies (NCPs), including liquid time-constant (LTC) and closed-form continuous-time (CfC) recurrent neural network models. It enables building sparse, biologically inspired, interpretable RNNs with configurable wiring architectures.

## Use cases
- train liquid time-constant recurrent networks in pytorch
- build sparse interpretable neural controllers for autonomous driving
- model irregularly sampled time-series with continuous-time RNNs
- implement closed-form continuous-time networks in keras
- replace LSTMs with compact wired neural networks
- train Atari agents with reinforcement learning using NCPs
- stack NCP layers with other neural network layers

## When to choose
- you need compact, interpretable recurrent models for control or time-series tasks
- you want continuous-time RNNs that handle irregular time sampling
- you work in PyTorch or TensorFlow/Keras and want published LTC/CfC implementations
- model interpretability and small parameter counts matter more than raw scale

## When to avoid
- you need large-scale transformer or LLM workloads
- you want a general-purpose AutoML or model zoo rather than specific RNN architectures
- your stack is JAX or another framework without custom porting

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, artificial-intelligence, autonomous-vehicles, time-series
- platform: python
- tags: neural-circuit-policies, liquid-time-constant-networks, recurrent-neural-networks, pytorch, tensorflow, keras, continuous-time-neural-networks, interpretable-ai

## Member repositories
- mlech26l/ncps (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:39.821415+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:37:03.070913+00:00, confidence not recorded.
  - readme: https://github.com/mlech26l/ncps (fetched 2026-08-28T04:06:39.821415+00:00, sha 82aec02a9167)
  - homepage: https://www.nature.com/articles/s42256-020-00237-3 (fetched 2026-08-29T10:18:12.600936+00:00, sha 0683ba5a957c)
  - site_page: https://www.nature.com/openresearch/about-open-access/information-for-institutions (fetched 2026-08-29T10:18:12.618434+00:00, sha 9631b227fce6)
  - registry_pypi: https://pypi.org/pypi/ncps/json (fetched 2026-08-29T10:18:12.620321+00:00, sha 79224720cbaf)
  - site_page: https://support.nature.com/en/support/home (fetched 2026-08-29T10:18:12.611404+00:00, sha c20191beeed1)
  - site_page: https://www.nature.com/npg_/company_info/index.html (fetched 2026-08-29T10:18:12.614955+00:00, sha ae41061b1af0)
  - site_page: https://www.nature.com/npg_/press_room/press_releases.html (fetched 2026-08-29T10:18:12.616638+00:00, sha 4013202e4183)
- Data as of 2026-08-30T08:39:29.467469+00:00.
