Release Date: June 19, 2026
Version 2.8.0 is a broad correctness, quality, and maintainability release. It bundles an audited, library-wide bug-fix sweep — neuron and synapse dynamics, ODE/SDE/FDE integrators, the math and object-transform layer, dnn layers, optimizers and losses, analysis tooling, and the simulation runners — each accompanied by new regression tests. Alongside the fixes, the release introduces static typing with a mypy CI gate, raises test coverage from roughly 84% to over 92%, co-locates tests with the modules they cover, and removes duplicated internals by reusing the shared braintools and brainstate implementations. Documentation and the bundled examples were repaired and refreshed.
Highlights
- Audited correctness sweep across the whole library, each fix backed by regression tests.
- Static typing: type annotations for core utilities, PEP 561 (
py.typed), and a newmypycontinuous-integration gate (#834). - Test-suite overhaul: coverage raised from ~84% to 92%+ (#836), with tests co-located as
<module>_test.py(#832). - Reduced duplication: reuse
braintools(init, metric, surrogate) andbrainstatetransforms instead of maintaining forked copies (#835, #833, #831).
Bug Fixes
Neuron and synapse dynamics
CondNeuGroup: corrected synaptic-current scaling that attenuated currents by ~1000× (#842).DualExp: correct handling of equal time constants, plus per-neuron STP reset (#847).dynold: fixed STP construction, sparse-synapse drift, plasticity decay, and Bellec initialization (#848).- Rate models: fixed
RNNCell.reset_statecrash andThresholdLinearModelnoisedt-scaling (#850).
Integrators
RKF45node handling and Kl/Pl SRK diffusion weights (#841).- Fractional integrators:
CaputoEuler.resetstate desynchronization andset_default_fdeint(#846). - Prevented a
MilsteinGradFreeout-of-memory crash (#837).
Math, sparse, and object transforms
coo_to_csrbounds checking, plus a sparse/event/delay regression suite (#845).- Compatibility fixes:
geluinteger input,unflattennegative dimension,segment_meanonArray(#844). - Object transforms:
cond/ifelse, collectors, andVariableViewedge cases (#840). ShardedArraypytree flattening andremove_diagguard (#839).
Neural-network layers
BatchNormrunning-variance bias, poolingchannel_axis, andLayerNormerror handling (#843).
Optimizers and losses
- Audited correctness fixes for
Adan,SM3, and several loss functions (#838).
Analysis
- Fixed-point classification, nullcline selection, gradient-descent batching, and plotting keyword handling (#849).
Runtime and runners
DSRunner:memory_efficientoutput/monitors and eager bound-validation checks (#851).IntegratorRunner: dict-monitor regression (#854).- Runners: jit-dict mutation, dict string monitors, and multi-device parallel concatenation (#852).
- Inputs / algorithms / connectivity: deprecation aliases, regression fits, CSR guard, and dtype handling (#853).
- Earlier audited correctness, API-drift, and edge-case fixes with a regression and coverage suite (#830).
Quality and Tooling
- Added typing for core utilities, enabled PEP 561, and added a
mypyCI job (#834). - Comprehensive coverage tests, raising coverage from ~84% to 92%+ (#836).
- Co-located tests as
<module>_test.pyand removed the legacytests/trees (#832). - Reused
braintools.init/braintools.metricinbrainpy.initializeand losses (#835). - Reused
braintools.surrogateand removed the duplicatebrainpy.math.surrogate(#833). - CI: replaced
remove_vmapwithbrainstate.transform.unvmapand resolvedbrainstate0.5.1 API drift (#831); green-lighted the Dense fit-flag tracer, buffer-donation test pollution, and L1 loss contract, and restored the Codecov token (#855).
Documentation and Examples
- Converted public-API docstrings to NumPy style and enforced the convention (#856).
- Repaired documentation notebooks and fixed Hz-input and
RNNCell.reset(batch_size)bugs (#857). - Repaired six broken example scripts — API drift, data paths, and channel handling (#858).
- Updated documentation links and the Python-version requirement in
README.md; added.gitattributesfor line endings. - Served the project logo as WebP from
brainx.chaobrain.com.