feat: unify parameter learning across channels, ions, synapses, and networks - #155
Merged
Conversation
TLDSZ
changed the base branch from
integration/optim-cv-runtime
to
reduction
September 8, 2026 02:02
Share Channel and Ion parameter bindings, preserve differentiable resets and derived initial values, and refresh Nernst and shell-volume dependencies. Add regression coverage and a five-example ion learning notebook.
Discover synapse parameters from constructor signatures and bind synapse fields, connection weights, and voltage thresholds to Cell-owned roots. Aggregate shared roots across Network populations and expose prepared, differentiable single-step execution with live weight reads. Preserve the exact bilinear delivery derivative for batched RTRL tangents. Add autapse, cross-cell, bidirectional-population, and parameter-fitting examples with regression tests. Update existing Design contracts and archive the original experiment records. Validation on an exported staged tree, CPU: - JAX 0.8.0 related runtime/model/trainable suites and new examples: 1523 passed, 2 skipped. - JAX 0.10.1 network/synapse/point-target suites and new examples: 175 passed, 2 skipped; 25 subtests passed. - All six synapse_learning notebook code cells executed on JAX 0.8.0. - Design/example links, Ruff 0.16.2, and applicable pre-commit hooks passed. The JAX 0.10.1 run is focused; historical combined Ion-suite dtype/cache limitations remain documented. GPU validation is outside these results.
Organize Design by module with local TODO, current, proposals, and references. Separate API contracts from architecture, retain historical plans and results in specs, and move cerebellum import progress beside the example. Add Cell unification and solver-boundary discussions plus Network random-context and plasticity proposals. Define scoped writing rules and global progress markers. Keep Developer focused on contribution workflows with links to Design. Refresh repository navigation, Vis contracts, and implementation/example documentation links. Mark Synapse/Network training shipped against 5f90f69 and record its CPU acceptance results separately from historical experiment measurements. Validation: staged Markdown links and anchors, 14-module/94-task progress structure, Cell/Synapse/trainable API snippets, and Developer HTML links passed. Sphinx HTML built with the same 18 existing import/orphan warnings. The four Python changes only update Design references in comments.
Retain the saved braincell_311 environment metadata and refreshed Ion execution outputs. Channel changes are metadata-only; Ion changes include seven output cells. All code and Markdown cell sources remain unchanged. Validate the staged notebooks with nbformat and compare cell sources, outputs, and errors structurally. Neither notebook contains error outputs. Keep the older JAX 0.8.0 measurements in Design/specs as historical records; the refreshed Ion output reports JAX 0.10.1. No runtime API change is needed.
Split prepared-network gradient checks by backend so scatter always runs and brainevent skips only when its required capability is unavailable. Simulate a missing coomv interface to verify automatic fallback and explicit-backend errors independently of the installed version. Validation: JAX 0.8.0 Network suite: 130 passed, 1 skipped. JAX 0.10.1 engine and delivery suites: 18 passed, 4 subtests passed. Both missing-coomv and unavailable-import scenarios preserve scatter coverage and skip only brainevent. Ruff and diff checks passed. Runtime, Design contracts, and example usage remain unchanged.
TLDSZ
force-pushed
the
feature/trainable-parameters
branch
from
September 8, 2026 02:43
1b5ce13 to
bd8e2f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR extends parameter learning from a small set of schema-backed channels to constructor-declared Channel, Ion, and Synapse parameters. It also adds trainable connection weights, voltage detection thresholds, and Network-wide parameter aggregation.
The implementation reuses the existing parameter sources, grouping, shared roots, and materialization pipeline. The accompanying documentation distinguishes implemented contracts from proposals and historical experiment records.
Constructor-based Channel parameter discovery
Commit:
5b390b6channel_learning.ipynbwith focused parameter-fitting examples.Ion parameter learning and differentiable initialization
Commit:
dfca5a3Synapse, Connection, and Network parameter learning
Commit:
5f90f69ExpSynandExp2Synto this contract.Network.trainables, deduplicating shared objects withoutcopying optimizer state.
Network.prepare_run()for initialization and static routing setup outside tracing, andNetwork.update()for differentiable single-step executioninside BrainState compiled loops.
Design structure, progress tracking, and contributor guidance
Commit:
99eb4d8current,proposals, andreferencescontent.docs/specs/.Saved notebook results
Commit:
20c2bc1How Has This Been Tested
Runtime and training regression tests
The functional snapshot was tested on CPU in two environments:
training example tests.
The new experiments check:
All six code cells in
synapse_learning.ipynbexecuted successfully on JAX 0.8.0.Documentation and static validation
git diff --check.nbformatand confirmed that the refreshed Channel/Ion notebooks contain no error outputs or changed cell sources.Detailed acceptance results are recorded in
docs/design/optim/current/results/synapse-network-learning.md.Types of changes
Checklist
Other information
Compatibility considerations:
parametersdictionaries with explicit constructor parameters. Dynamic states continue to usestatesdeclarations.last < threshold <= next; reaching the threshold produces an event, while remaining at equality does not repeat it.Falling detection uses the reversed comparisons.
tau1 < tau2throughout optimization.The JAX 0.10.1 result covers the focused suite listed above. Existing combined Ion-suite dtype/cache issues remain documented in the verification record.
This PR is based on
reductionand covers five commits,340f632..20c2bc1.