Release Date: April 18, 2026
This maintenance release focuses on JAX compatibility cleanup, packaging improvements for brainevent, and documentation streamlining. It also removes duplicated internal JAXPR source-conversion code by relying on the shared brainstate implementation.
- Updated: Replaced version-specific JAX imports with
brainstate._compatible_importacross math compatibility, backend environment utilities, surrogate operators, and vmap-removal helpers- Centralizes compatibility handling for
Primitiveand backend imports across newer JAX releases
- Centralizes compatibility handling for
- Updated:
brainpy.integratorsnow importsjaxpr_to_python_codefrombrainstate.transform- Removed the duplicated local
brainpy.integrators._jaxpr_to_source_codeimplementation - Keeps integrator math-expression generation aligned with the shared
brainstateimplementation
- Removed the duplicated local
- Updated:
bm.trapznow consistently maps tojax.scipy.integrate.trapezoid
- Updated: Optional install extras now include matching
braineventextrasbrainpy[cpu]installsbrainevent[cpu]brainpy[cuda12]installsbrainevent[cuda12]brainpy[cuda13]installsbrainevent[cuda13]brainpy[tpu]installsbrainevent[tpu]
- Impact: Simplifies accelerator-specific installation and keeps event-backend dependencies aligned with the selected JAX platform
- Added: Direct link to the external
brainpy.stateAPI reference in the docs API index (#822) - Removed: Legacy
brainpyandbrainpylibhistorical changelog pages from the main documentation navigation - Removed: Advanced operator-customization tutorial notebooks for CuPy, Numba, and Taichi from the documentation tree
- Updated: Refreshed quickstart simulation notebook content and documentation structure around
brainpy.state
- Improved: Disabled JAX traceback filtering in
brainpy.dnnlinear tests to make failures easier to diagnose - Updated: Raised the Sphinx upper bound for documentation builds from
<8.2.0to<9.1.0(#820) - Updated: Bumped
styfle/cancel-workflow-actionfrom0.13.0to0.13.1in CI (#819)
Release Date: March 12, 2026
This release migrates to the new brainevent binary backend API, fixes numerous bugs across neuron models, synapse dynamics, ODE integrators, and object transforms, and raises the minimum Python version to 3.11.
- Raised: Minimum Python version from 3.10 to 3.11
- Dropped Python 3.10 support from classifiers and build metadata
- Updated: Event-driven operations to use the new
braineventbinary backendEventArrayreplaced byBinaryArrayin all event CSR and jitconn operationsJITCHomoRreplaced byJITCScalarRfor homogeneous JIT connectivity- STDP weight update functions renamed:
dense_on_pre/dense_on_post→update_dense_on_binary_pre/update_dense_on_binary_postcsr_on_pre/csr2csc_on_post→update_csr_on_binary_pre/update_csr_on_binary_post
- Affected layers:
Dense,AllToAll,MaskedLinear, and all CSR-based layers
- Fixed: All LIF-family neuron models (
LifLTC,LifRefLTC,ExpIFLTC,ExpIFRefLTC,AdExIFLTC,AdExIFRefLTC,QuaIFLTC,QuaIFRefLTC,AdQuaIFLTC,AdQuaIFRefLTC,GifLTC,GifRefLTC) now raise descriptiveValueErrormessages for invalidspk_resetmodes instead of bareValueError
- Fixed: Synaptic variable updates in
DualExpon,Alpha, andNMDAmodels- Replaced in-place
+=operator with explicit.valueassignment to prevent tracing issues under JAX transformations
- Replaced in-place
- Fixed:
BogackiShampineadaptive Runge-Kutta coefficient typo — corrected'4/0'to'4/9'in the Butcher tableau - Fixed:
set_default_odeintwas incorrectly assigning to_DEFAULT_ODE_METHODinstead of_DEFAULT_DDE_METHOD
- Fixed:
Variable.varshapeusedself.batch_sizeinstead ofself.batch_axiswhen computing non-batch shape dimensions - Fixed:
NodeDict.update()andVarDict.update()referencedargs[1]instead ofarg[1]when updating from tuple arguments - Fixed:
NodeDict.__setitem__duplicate key error message incorrectly displayed the new value instead of the existing one
- Fixed:
BPTrainerdid not raiseNoLongerSupportErrorwhenseedparameter was passed (missingraisekeyword) - Fixed:
BPTrainermetric aggregation switched fromjnp.mean(bm.as_jax(...))tonp.mean(np.asarray(...))to avoid unnecessary JAX tracing overhead
- Fixed:
ShardedArray.valuesetter used_check_tracer()instead of direct_valueaccess - Fixed:
_slice_to_numdid not handle negative step values and raised no error on zero step - Fixed:
load_statecrashed withKeyErrorwhen state dict contained missing keys; now correctly reports them as missing
- Improved: Narrowed bare
exceptclauses to specific exception types (ValueError,TypeError,ImportError,ModuleNotFoundError) in convolution layers and Flax interoperation module
- Updated:
braineventfrom>=0.0.4to>=0.0.7 - Updated:
braintoolsversion spec corrected to>=0.0.9 - Updated:
numpyminimum version set to>=1.15 - Updated:
brainpy_statefrom>=0.0.2to>=0.0.3
- Updated:
actions/upload-artifactfrom v6 to v7 (#815) - Updated:
actions/download-artifactfrom v7 to v8 (#816)
Release Date: January 21, 2026
This is a maintenance release that enhances JAX compatibility and improves CI stability across platforms.
- Fixed: ODE integrator default time parameter handling
- Ensured
tkeyword argument defaults to 0 in_call_integralmethod - Prevents errors when time parameter is not explicitly provided
- Ensured
- Updated: Backend imports for compatibility with JAX >= 0.8.0
- Updated
brainpy.math.environmentmodule to handle JAX backend changes - Improved compatibility layer for future JAX versions
- Updated
- Fixed: Explicit Runge-Kutta methods formatting in build method
- Impact: Ensures stable numerical integration across different JAX versions
- Updated:
brainpy_statefrom 0.0.1 to 0.0.3 - Enhanced: README documentation with comprehensive module overview and installation instructions
Release Date: December 25, 2025
This release focuses on improving JAX compatibility and code quality through comprehensive refactoring.
- Updated: Refined JIT wrappers for compatibility with JAX >= 0.8.2
- Refactored JIT handling across 85 files
- Updated object transformation modules for new JAX behavior
- Improved JIT compilation stability and performance
- Added: Initial
brainpy_statemodule infrastructure- Created new state management module with README documentation
- Set up module structure for future state-based functionality
- Updated: JAX backend integration
- Modernized backend import patterns
- Enhanced compatibility with JAX's evolving API
Release Date: December 2025
This release focuses on simplifying the project structure by removing the experimental brainpy.state module and consolidating documentation.
- Removed: The entire
brainpy.statemodule has been deleted- This includes all state-based neuron models (LIF variants, Izhikevich, HH)
- Removed synapse models, projections, readouts, and STP implementations
- Removed all associated test files
- Recommendation: Users should use the brainpy.state library directly for state-based neural network simulations
- Updated:
brainpy.math.defaultsis totally decoupled withbrainstatecontext management
Release Date: December 2025
This is a bug fix release that resolves critical issues with bm.for_loop and improves CI stability.
- Fixed: The
jitparameter inbm.for_loopwas accepted but never used - passingjit=Falsehad no effect - Implementation: When
jit=False, the call is now properly wrapped injax.disable_jit()context manager - Impact: Users can now debug code with
jit=Falseto see actual values instead of JIT-compiled traces
- Fixed:
ValueError: zero-length scan is not supported in disable_jit() modewhen usingjit=Falsewith zero-length inputs - Implementation: Automatically falls back to JIT mode for zero-length inputs with a warning
- Impact: Prevents crashes when
DSRunner.run(duration)results in 0 time steps (e.g.,duration=0.5, dt=1.0)
- Enhanced:
progress_barparameter inbm.for_loop()andbm.scan()now supports advanced customization - New Features:
- Accept
ProgressBarinstances for fine-grained control (freq, desc, count parameters) - Accept integers as shorthand for frequency (e.g.,
progress_bar=10means update every 10 iterations) - Full backward compatibility with existing
progress_bar=True/Falseusage
- Accept
- Export: Added
bm.ProgressBarfor easy access (from brainpy.math import ProgressBar) - Impact: Aligns with brainstate API and enables better progress tracking customization
- Removed: Unused parameters
rematandunroll_kwargsfrombm.for_loop() - Backward Compatibility:
rematparameter kept inLoopOverTime.__init__()with deprecation warning - Fixes: Resolved TypeErrors in
DSRunnerandLoopOverTimethat used these parameters
Release Date: October 16, 2025
This is a maintenance release that improves JAX compatibility and documentation.
- Updated: Made compatible with JAX >= 0.8.0
- Fixed: Updated imports and API usage for latest JAX versions
- Impact: Ensures BrainPy works correctly with the latest JAX releases
- Updated documentation and CI configuration for better clarity
- Standardized test paths across the project
- Improved core concepts documentation
- Enhanced LIF neuron dynamics documentation (#800)
- Fixed documentation bugs
- Refactored neural network classes for better maintainability
- Updated progress bar parameters for simulations
- Improved code organization and structure
Release Date: October 2025
This is a feature release that introduces new neuron and synapse models in the state-based API (brainpy.state) and enhances the Dynamics base class with improved input handling.
-
LIF (Leaky Integrate-and-Fire) Variants: Added comprehensive set of LIF neuron models
LIF: Basic LIF neuron with exponential synaptic inputLifRef: LIF with refractory periodExpIF: Exponential Integrate-and-Fire neuronExpIFRef: ExpIF with refractory periodAdExIF: Adaptive Exponential Integrate-and-Fire neuronAdExIFRef: AdExIF with refractory periodQuaIF: Quadratic Integrate-and-Fire neuronQuaIFRef: QuaIF with refractory periodAdQuaIF: Adaptive Quadratic Integrate-and-Fire neuronAdQuaIFRef: AdQuaIF with refractory periodGifRef: Generalized Integrate-and-Fire with refractory period
-
Izhikevich Neuron Models: Added new Izhikevich neuron implementations
Izhikevich: Basic Izhikevich neuron modelIzhikevichRef: Izhikevich with refractory period
-
Hodgkin-Huxley Model: Added classic biophysical neuron model
HH: Classic Hodgkin-Huxley model with Na+ and K+ channels
- BioNMDA: Biological NMDA receptor with second-order kinetics
- Implements two-state cascade dynamics (x and g variables)
- Slower rise time compared to AMPA (biologically realistic)
- Comprehensive documentation with mathematical formulation
- All new models use the brainstate ecosystem (HiddenState, ShortTermState, LongTermState)
- Proper unit support with brainunit integration
- Exponential Euler integration for numerical stability
- Batch processing support across all models
- Consistent API design following BrainPy v2.7+ architecture
- Enhanced input handling capabilities in the Dynamics base class
- Added new properties for better state management
- Improved integration with brainstate framework
- Refactored to use public methods instead of private counterparts for clarity
- Added comprehensive Examples sections to all neuron classes in
_lif.py - Each example includes:
- Import statements for required modules
- Basic usage with parameter specifications
- State initialization examples
- Update and spike generation examples
- Network integration with
brainstate.nn.Sequential - Notes highlighting key features
- All 13 neuron classes in
_lif.pynow have complete documentation - Simplified documentation paths by removing 'core-concepts' and 'quickstart' prefixes in index.rst
- Fixed import paths in
_base.py: changed references from brainstate to brainpy for consistency (057b872d) - Fixed test suite issues (95ec2037)
- Fixed test suite for proper unit handling in synapse models
- This release significantly expands the
brainpy.statemodule with biologically realistic neuron and synapse models - All new models are fully compatible with the brainstate ecosystem
- Enhanced documentation provides clear usage examples for all models
- The Dynamics class refactoring improves the foundation for future state-based model development
Release Date: October 2025
This is a patch release focusing on documentation improvements and module structure cleanup following the 3.0.0 release.
- BREAKING CHANGE: Renamed
brainpy.state_basedmodule tobrainpy.state- All functionality previously in
brainpy.state_basedis now accessible viabrainpy.state - Users should update imports from
brainpy.state_basedtobrainpy.state - This change provides a cleaner, more intuitive API structure
- All functionality previously in
- Removed
brainpy.version2module: All BrainPy 2.x functionality has been consolidated- The
version2namespace has been removed from the codebase - All version2 functionality is now directly accessible through the main
brainpymodule - Version-specific imports are no longer needed
- The
- Renamed
docs_version2todocs_classicfor BrainPy 2.x documentation - Renamed
docs_state_basedtodocs_statefor BrainPy 3.x documentation - Renamed
examples_version2toexamples_classicfor consistency - Renamed
examples_state_basedtoexamples_statefor clarity
- Updated all documentation references to use
brainpy.stateinstead ofbrainpy.state_based(#791, #790) - Updated API documentation structure for improved clarity
- Simplified API reference pages by removing redundant content
- Updated card links and descriptions for
brainpy.stateAPIs - Improved quickstart tutorial (5min-tutorial.ipynb) with clearer examples
- Updated core concepts documentation to reflect new module structure
- Enhanced tutorials with corrected module references
- Updated all example files to use new module structure
- Updated simulation examples (EI networks, COBA, CUBA models) to use new API
- Updated training examples (surrogate gradient training, MNIST models) with correct imports
- Updated gamma oscillation examples with proper module references
- Removed redundant test for abstract Neuron class that was causing conflicts (d06bb47f)
For users upgrading from BrainPy 3.0.0:
-
Update module imports: Replace
brainpy.state_basedwithbrainpy.state# New code (BrainPy 3.0.1) from brainpy.state import LIF, Expon
-
Remove version2 references: If you were using
brainpy.version2, migrate to the mainbrainpymodule# Old code (not recommended) import brainpy.version2 as bp # New code import brainpy as bp
-
Update documentation references: If you're linking to documentation, use the new paths:
- Classic docs:
docs_classic/(formerlydocs_version2/) - State-based docs:
docs_state/(formerlydocs_state_based/)
- Classic docs:
- This release maintains full backward compatibility with BrainPy 3.0.0 except for the module naming changes
- The
brainpy.state_basedtobrainpy.staterename provides a cleaner API and better reflects the module's purpose - Documentation is now better organized with clear separation between classic (2.x) and state-based (3.x) APIs
Release Date: October 2025
This is a major release with significant architectural changes and improvements. BrainPy 3.0.0 introduces a new API design while maintaining backward compatibility through the brainpy module.
- BREAKING CHANGE: All existing BrainPy 2.x functionality has been moved to
brainpymodule- Users can migrate existing code by replacing
import brainpywithimport brainpy as brainpy - The old
brainpy._srcmodule structure has been completely reorganized intobrainpy - All submodules (math, dyn, dnn, etc.) are now under
brainpy.*
- Users can migrate existing code by replacing
- Introduced simplified, streamlined API in the main
brainpynamespace - New core modules include:
- Base classes for neurons and synapses
- LIF (Leaky Integrate-and-Fire) neuron models
- Exponential synapse models
- Synaptic projection modules
- Short-term plasticity (STP) models
- Input current generators
- Readout layers
- Error handling utilities
- Updated:
brainstate>=0.2.0(was>=0.1.0) - Updated:
brainevent>=0.0.4(new requirement) - Updated:
braintools>=0.0.9(integrated into brainpy) - Removed: Hard dependency on
taichiandnumba- now optional - Updated: JAX compatibility improvements for version 0.5.0+
- Integrated
brainstatefor state management (#763) - Integrated
braineventfor event-driven computations (#771) - Integrated
braintoolsutilities and formatting (#769)
- Added event-driven sparse matrix @ matrix operators (#613)
- Added
ein_rearrange,ein_reduce, andein_repeatfunctions (#590) - Added
unflattenfunction andUnflattenlayer (#588) - Added JIT weight matrix methods (Uniform & Normal) for
dnn.linear(#673) - Added JIT connect matrix method for
dnn.linear(#672) - Replaced math operators with
braintaichifor better performance (#698) - Support for custom operators using CuPy (#653)
- Taichi operators as default customized operators (#598)
- Enhanced taichi custom operator support with GPU backend (#655)
- Support for more than 8 parameters in taichi GPU operator customization (#642)
- Rebased operator customization using MLIR registration interface (#618)
- Added transparent taichi caches with clean caches function (#596)
- Support for taichi customized op with metal CPU backend (#579)
- Improved variable retrieval system (#589)
- Improved error handling in
dnn/linearmodule (#704) - Enhanced activation functions and layers
- Refactored STDP weight update logic requiring
brainevent>=0.0.4(#771) - Fixed STDP and training workflows for JAX compatibility (#772)
- Enhanced dual exponential synapse model with
normalizeparameter - Improved alpha synapse implementation
- Added
clear_inputin thestep_runfunction (#601)
- Support for
Integrator.to_math_expr()(#674) - Fixed dtype checking during exponential Euler method
- Added
disable_jitsupport inbrainpy.math.scan(#606) - Fixed
brainpy.math.scanimplementation (#604)
- Fixed AdamW optimizer initialization where "amsgrad" was used before being defined (#660)
- Added
brainpy.tools.composeandbrainpy.tools.pipefunctions (#624)
- Updated JAX import paths for compatibility with version 0.5.0+ (#722)
- Fixed compatibility issues with latest JAX versions (#691, #708, #716)
- Replaced
jax.experimental.host_callbackwithjax.pure_callback(#670) - Fixed
test_ndarray.pyfor latest JAX version (#708)
- Fixed
CustomOpByNumbawithmultiple_results=True(#671) - Updated
CustomOpByNumbato support JAX version >= 0.4.24 (#669) - Fixed
brainpy.math.softplusandbrainpy.dnn.SoftPlus(#581) - Fixed bugs in
truncated_normaland addedTruncatedNormalinitialization (#583, #584, #585, #574, #575) - Fixed autograd functionality (#687)
- Fixed order of return values in
__load_state__(#749)
- Fixed delay bugs including DelayVar in concat mode (#632, #650)
- Fixed wrong randomness in OU process input (#715)
- Fixed progress bar display and update issues (#683)
- Fixed incorrect verbose of
clear_name_cache()(#681)
- Replaced
collections.Iterablewithcollections.abc.Iterablefor Python 3.10+ (#677) - Fixed surrogate gradient function for numpy 2.0 compatibility (#679)
- Fixed Flax RNN interoperation (#665)
- Fixed issue with external library integration (#661, #662)
- Fixed exception handling for missing braintaichi module in dependency check (#746)
- Added CI support for Python 3.12 (#705)
- Added CI support for Python 3.13
- Updated supported Python versions: 3.10, 3.11, 3.12, 3.13
- Updated GitHub Actions:
actions/setup-pythonfrom 5 to 6 (#783)actions/checkoutfrom 4 to 5 (#773)actions/first-interactionfrom 1 to 3 (#782)actions/labelerfrom 5 to 6 (#781)actions/download-artifactfrom 4 to 5 (#780)actions/stalefrom 9 to 10 (#779)docker/build-push-actionfrom 5 to 6 (#678)
- Added greetings workflow and labeler configuration
- Enhanced issue templates and CI configurations
- Introduced new BrainPy 3.0 documentation and tutorials (#787)
- Added comprehensive documentation and examples for BrainPy 3.x (#785)
- Updated documentation links for BrainPy 3.0 and 2.0 (#786)
- Implemented dynamic configuration loading for Read the Docs (#784)
- Added Colab and Kaggle links for documentation notebooks (#614, #619)
- Added Chinese version of
operator_custom_with_cupy.ipynb(#659) - Fixed various documentation build issues and path references
- Added BrainPy citation information (#770)
- Updated ACKNOWLEDGMENTS.md
- Refined installation instructions (#767)
- Updated docstring and parameter formatting (#766)
- Updated README with ecosystem information
- Enabled
clear_buffer_memory()to support clearingarray,compilation, andnames(#639) - Cleaned taichi AOT caches and enabled
numpy_func_returnsetting (#643) - Made taichi caches more transparent (#596)
- Enabled BrainPy objects as pytree for direct use with
jax.jit(#625)
- Standardized and generalized object-oriented transformations (#628)
- Updated CONTRIBUTING.md with new guidelines
- Added CODEOWNERS file
- Updated SECURITY.md
- License updated to Apache License 2.0
- Removed Docker workflow
- Removed hard dependencies on
taichiandnumba(#635) - Removed op register functionality (#700)
- Removed deprecated deprecation files and old module structure
- Removed unnecessary dependencies (#703)
For users upgrading from BrainPy 2.6.x:
-
Keep using BrainPy 2.x API: Replace imports with
brainpy# Old code (BrainPy 2.x) import brainpy as bp # New code (BrainPy 3.0 with backward compatibility) import brainpy as bp
-
Adopt new BrainPy 3.0 API: Explore the simplified API in the main
brainpynamespace for new projects -
Update dependencies: Ensure
brainstate>=0.2.0,brainevent>=0.0.4, andbraintools>=0.0.9are installed -
Review breaking changes: Check if your code uses any of the reorganized internal modules
- This release maintains backward compatibility through
brainpy - The new API in the main
brainpynamespace represents the future direction of the library - Documentation for both versions is available on Read the Docs