From b300492fd20d10381ca38ce12aac3dcd9aa1ec7f Mon Sep 17 00:00:00 2001 From: Alex Ororbia Date: Mon, 8 Dec 2025 17:37:48 -0500 Subject: [PATCH 1/2] Sync up of main with release (#131) * Minor nudge to v3.0.1 (#129) * minor edit to math in hh-lesson doc * Fix workflow, numpy install, and pytest bug in github action workflows (#117) * Update pyproject.toml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * minor nudge/cleanup to minor patched version 2.0.1 * minor nudge/cleanup to minor patched version 2.0.3 * Merged back minor doc fix back to main (for syncing purposes) (#119) * Nudge of release to minor patched version 2.0.3 (#118) * nudge of doc to 2.0.2 (#115) Co-authored-by: Alexander Ororbia * minor edit to math in hh-lesson doc * Fix workflow, numpy install, and pytest bug in github action workflows (#117) * Update pyproject.toml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * Update python-package-conda.yml * minor nudge/cleanup to minor patched version 2.0.1 * minor nudge/cleanup to minor patched version 2.0.3 --------- Co-authored-by: Alexander Ororbia Co-authored-by: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> * fixed typo/error in doc evolving_synapses.md --------- Co-authored-by: Alexander Ororbia Co-authored-by: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> * minor clean-up in model_basics docs * minor fixes/cleanup of docs * fixed typo in integration tutorial doc * updated papers/talk page for ngclearn * Merging over v3 to main (for roll-out of v3 upgrade) (#125) * Working v3 * Undid fixed compartemts Undid the fixed compartments to work with new global constant tracking * Fixed an execution bug * ported over quad-lif to v3 - needs testing * ported over IF/quadLIF cells, minor revision to LIF cell * Start util cleanup * refactored/ported RAFCell to v3 * ported over/refactored WTASCell for v3 * wrote successful unit-test of WTASCell * put back in init-structure/pointers * fixed minor error in LIFCell, got unit-test for LIFCell to run * quad-lif test sketched * sketch of ifcell test * fixed minor bugs and tests locally pass for if, quad-lif, and lif-cells now, with minor patches to help fun and doc-strings * refactored raf-cell and test passed * refactored adex/test passed; minor cleanup in lif, raf, and wtas cells * refactored fn-cell and test passed * cleaned up lif, raf, wtas, fn, and quad-lif cells repr method * refactored and tests passed for izh and h-h cells * JaxProcess update * cleaned up dunder repr method, moved to JaxComponent parent; fixed __init__ pointer to tensorstats * refactored alpha and exp-synapses, tests passed; minor edit to __init__ for synapses * refactored short-term syn, tests passed - including stp-dense-syn and minor cleanup/edit to synapse __init__ * refactored bcm-syn and test passed * refactored exp-stdp-syn and passed tests for exp-stdp-syn and trace-stdp-syn * refactored event-stdp-syn and test passed * refactored mstdpet-syn and test passed * refactored stdp-conv-syn/conv-syn and test passed * refactored and passed test for deconv/stdp-deconv-syn and other minor cleanup for conv/deconv support * Refactoring neuronal and synaptic components (#123) - merge from fork to v3 * refactoring graded cells * update refactored models * update sLIF cell --------- Co-authored-by: Alex Ororbia * commented out deprecator in hebb-syn and exp-kernel * update hebbian synapse * update hebbian synapse * working reinforce synapse * minor edits to exp-kernel/wtas-cell * update requirements * refactored conv/deconv-hebb-syn and tests passed * update hebbian synapse reset bug * update reset methods * update patched synapse reset * add `not self.inputs.targeted and ` to required components. Fixing general `__repr__` bug in `jaxcomponent` * minor edit to lif/modulated-syn init file * fixed some minor bugs in rate-coded cells/hebb-syn * update code * minor patches to components, including hebb-syn/conv/deconv and reward-cell * minor patches to components, including hebb-syn/conv/deconv and reward-cell * update testing for graded neurons and input encoders * update phasor cell * update test bernoulli cell and poisson cell * update components and their related test cases * fixed monitor bugs from v2, tweaked unit-tests for input-encoders/latency-cell * update test case for test_sLIFCell.py * some cleanup * made revisions to components/clean-up; added back in deprecators * removed lava sub-module, and removed monitor/base-monitor legacy components * minor cleanup of inits * refactored regression module to be compliant with v3 * adjusted sphinx-docs w.r.t. new v3 refactoring * minor revision to double-exp syn pointing, mods to modeling docs * updated adex tutorial doc to v3 * revised adex and error-cell neurocog tutorials * fixed minor issues in input-encoders, further revisions to docs for v3 * revised dyn/chem-syn neurocog doc, cleaned up dynamic syn * revised fn and hh-cell neurocog docs, added some refs to distribution generator * revised integration and izh-cell neurocog docs * revised izh-cell, cleaned-up fn-cell, and revised lif neurocog docs * revised metrics/plotting neurocog docs * revised mod/reward-stdp neurocog doc * revised stp-syn neurocog doc and updated stp-syn to use proper initializer * revised elements of utils to comply with docs * revised stdp neurocog doc to v3 * revised traces neurocog tutorial to v3 * cleaned up utils.optim and wrote compliant NAG optim * cleaned up utils.optim and wrote compliant NAG optim * cleanup of components, added leaky-noise-cell, minor edits * revised leaky-noise-cell, wrote its unit test, test-passed * some revisions/updates to toc/pointer/general tutorial docs * minor revisions to pyproject/req files * update reinforce synapse * update test cases * implemented in-house gmm, in-built to ngclearn; tested on gaussian mode data * wrote gmm density estimator tutorial * patched some tests/syn/neuron components, added sketch of bmm density * fixed test_laplacianErrorCell and laplace-cell bug * fixed test_laplacianErrorCell and laplace-cell bug * made patches to bmm * updated density tutorial/neurocog doc * minor edit to gmm/bmm docs * minor edit to gmm/bmm docs * cleaned up density structure, use parent mixture class to organize model variations * cleaned up density structure, use parent mixture class to organize model variations * added basic exp-mixture to utils.density * minor edits to emm * cleaned up mixtures and finished debugging EMM/works on example * removed old weight_distribution.py, other cleanup/revisions throughout * minor edit to data-loader * revised tests to no longer use weight_distribution/revisions throughout * minor edit to emm doc * added bic calculation to metric_utils * fix ratecell ug of passing unrelated kwargs to parent class * added calc_update() co-routine to hebbian-syn component * fix weight init * integrated rbm/harmonium model-exhibit * Update __init__.py Added the config/logging back to the init * placed pointer to rao-ballard1999 exhibit; updates to docs * updates to docs/revisions * removed flag from bernoulli/latency-cells for now; minor edit to doc * updates to theory doc * updated history log * minor clean-up of ngclearn.utils.viz.dim_reduce * Update jaxComponent.py Added support for turning off autosave * update hebbian synapse saving * update saving and loading utils, making hebbian synapse use these utils for custom optimizer params saving and loading * minor revisions/polish * modded docs to include v3 foundations * updates to init for logging * Updates to lessons * final cleanup/polish/update to docs for v3 nudge * updates to museum doc for v3 * nudged citation file * minor nudge to docs/files to point to v3 --------- Co-authored-by: Will Gebhardt Co-authored-by: Alexander Ororbia Co-authored-by: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Co-authored-by: Viet Nguyen Co-authored-by: Viet Dung Nguyen * update to rbm/harmonium doc * updated leaky-noise-cell to maintain temporal derivative of state * minor revisons/updates to hebb/dense syn, metric utils * cleaned-up/revised leaky-noise-cell * cleaned-up/revised leaky-noise-cell --------- Co-authored-by: Alexander Ororbia Co-authored-by: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Co-authored-by: Will Gebhardt Co-authored-by: Viet Nguyen Co-authored-by: Viet Dung Nguyen * nudge release to v3.0.1 * minor revision of leaky-noise-cell --------- Co-authored-by: Alexander Ororbia Co-authored-by: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Co-authored-by: Will Gebhardt Co-authored-by: Viet Nguyen Co-authored-by: Viet Dung Nguyen --- ngclearn/components/neurons/graded/leakyNoiseCell.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ngclearn/components/neurons/graded/leakyNoiseCell.py b/ngclearn/components/neurons/graded/leakyNoiseCell.py index 9ccf4f8e..ab6245ed 100755 --- a/ngclearn/components/neurons/graded/leakyNoiseCell.py +++ b/ngclearn/components/neurons/graded/leakyNoiseCell.py @@ -71,7 +71,6 @@ def __init__( ): super().__init__(name, **kwargs) - self.tau_x = tau_x self.sigma_pre = sigma_pre ## a pre-rectification scaling factor self.sigma_post = sigma_post ## a post-rectification scaling factor @@ -110,7 +109,6 @@ def advance_state(self, t, dt): key, skey = random.split(self.key.get(), 2) eps_post = random.normal(skey, shape=self.x.get().shape) ## post-rectifier distributional noise - #x = _run_cell(dt, self.j_input.get(), self.j_recurrent.get(), self.x.get(), eps, self.tau_x, self.sigma_rec, integType=self.intgFlag) _step_fns = { 0: step_euler, 1: step_rk2, @@ -152,13 +150,16 @@ def help(cls): ## component help function "states": {"x": "Update to continuous noisy, leaky dynamics; value at time t"}, "outputs": - {"r": "A linear rectifier applied to rate-coded dynamics; f(z)"}, + {"r": "A linear rectifier applied to rate-coded dynamics; f(z)", + "r_prime": "Temporal derivative applied to rate-coded dynamics; f'(z)"}, } hyperparams = { "n_units": "Number of neuronal cells to model in this layer", "batch_size": "Batch size dimension of this component", "tau_x": "State time constant", - "sigma_pre": "The non-zero degree/scale of (pre-rectification) noise to inject into this neuron" + "act_fx": "Type of rectification function to use", + "sigma_pre": "The non-zero degree/scale of pre-rectification noise to inject into this neuron", + "sigma_post": "The non-zero degree/scale of post-rectification noise to inject into this neuron" } info = {cls.__name__: properties, "compartments": compartment_props, From 63a4e98fdc6cbde614868701dc02e9f83fc3c961 Mon Sep 17 00:00:00 2001 From: Alexander Ororbia Date: Mon, 8 Dec 2025 17:43:31 -0500 Subject: [PATCH 2/2] added pointer/stub for ei-rnn song-et-al in museum doc --- docs/museum/eirnn_song_etal2016.md | 12 ++++++++++++ docs/museum/index.rst | 1 + 2 files changed, 13 insertions(+) create mode 100644 docs/museum/eirnn_song_etal2016.md diff --git a/docs/museum/eirnn_song_etal2016.md b/docs/museum/eirnn_song_etal2016.md new file mode 100644 index 00000000..691be89d --- /dev/null +++ b/docs/museum/eirnn_song_etal2016.md @@ -0,0 +1,12 @@ +# Excitatory-Inhibitory Recurrent Neural Network (Song et al.; 2016) + +In this exhibit, we create, simulate, and visualize the dynamics and adaptation of the excitatory-inhibitory +recurrent neural network (EI-RNN) originally proposed in (Song et al., 2016) [1]. + +The model code for this exhibit can be found +[here](https://github.com/NACLab/ngc-museum/tree/main/exhibits/ei_rnn). + + +## References +[1] Song, H. F., Yang, G. R., & Wang, X. J. Training excitatory-inhibitory recurrent neural networks +for cognitive tasks: a simple and flexible framework. PLoS computational biology, 12(2), e1004792 (2016). diff --git a/docs/museum/index.rst b/docs/museum/index.rst index a0b58557..21541a04 100644 --- a/docs/museum/index.rst +++ b/docs/museum/index.rst @@ -16,6 +16,7 @@ of detailed walkthroughs presented in the table of contents below.) sparse_coding pc_rao_ballard1999 + eirnn_song_etal2016 snn_dc event_stdp_patches rl_snn