Skip to content

⬆️ bump braintrace from 0.1.2 to 0.2.0#87

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/braintrace-0.2.0
Open

⬆️ bump braintrace from 0.1.2 to 0.2.0#87
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/braintrace-0.2.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 28, 2026

Bumps braintrace from 0.1.2 to 0.2.0.

Release notes

Sourced from braintrace's releases.

BrainTrace 0.2.0 is a major step forward. It adds a family of spiking neural network (SNN) online-learning algorithms, rewrites the eligibility-trace compiler around primitive-type dispatch, generalizes every ETP primitive to support multiple trainable inputs (fixing a silent bias-gradient drop), delivers substantial performance gains for D-RTRL and multi-step rollouts, and hardens the package with PEP 561 typing and a BPTT-oracle-backed test suite.

Highlights

New: SNN online-learning algorithms

Five SNN online-learning algorithms ship as flat ETraceVjpAlgorithm subclasses, all exported at the top level: EProp, OSTL (OSTLRecurrent / OSTLFeedforward), OTPE, OTTT, and OSTTP. A new _compute_learning_signal hook supports target-projection algorithms (OSTTP), and new trace helpers (PresynapticTrace, KappaFilter, FixedRandomFeedback) back them. The algorithms are cross-checked for regime equivalence and verified to decrease loss in integration smoke tests.

ETP compiler rewrite

The eligibility-trace compiler now dispatches on primitive-type identity rather than string-matching op/trace names, with structured, leveled diagnostics (DiagnosticKind, DiagnosticLevel, CompilationRecord) replacing ad-hoc warnings. New compile-time diagnostics surface previously silent issues — e.g. TRAINABLE_INVAR_NOT_PARAMSTATE flags a trainable input (such as a constant bias) that does not trace to a ParamState.

Multi-trainable-input ETP primitives (bias gradients)

Every ETP primitive was generalized from a single-weight assumption to an arbitrary named dict of trainable inputs, fixing a silent bias-gradient drop and a LoRA executor signature mismatch in one coherent refactor. All built-in primitives (elemwise, dense mm/mv, conv, sparse mm/mv, lora) now have first-class bias gradient support, each verified element-wise against a BPTT oracle. Layout-aware conv axis handling (NHWC/NCHW, OIHW/HWIO) and non-square dense weight broadcasting were also fixed.

Performance

  • D-RTRL einsum fast path (fast_solve=True, default on): direct einsum kernels for mm/mv/elemwise replace nested vmap-of-vjp and per-step lax.cond overhead.
  • Reduced-precision trace storage (trace_dtype, e.g. bf16/fp16) halves the dominant B*N^2 trace bandwidth while keeping Jacobians, learning signals, and final gradients in fp32.
  • Multi-step trace fusion: the per-step eligibility-trace roll for exact algorithms is threaded into the forward scan, eliminating an O(T × Jacobian) HBM round-trip.

Typing, testing & packaging

  • The package is now PEP 561 compliant (ships py.typed), with a pragmatic mypy config and CI type/packaging checks.
  • A BPTT gradient oracle and a layered correctness suite (P2–P8) cover per-operator rules, public-API contracts, exact-class element-wise equivalence, approximate-class direction alignment, transform/integration invariance, and per-cell compiler relation guardrails.
  • All public-API docstrings converted to NumPy-doc style with math, references, and runnable examples.

Deprecations

The entire v0.1.x class-based operator/parameter API is deprecated in favor of the new primitive-based ETP user-API. The legacy classes still work (as thin shims that route through the new primitives) but each emits a DeprecationWarning on first use and will be removed in a future release.

Deprecated (v0.1.x) Use instead (v0.2.0)
MatMulOp braintrace.matmul
ElemWiseOp braintrace.element_wise
ConvOp braintrace.conv
SpMatMulOp braintrace.sparse_matmul
LoraOp braintrace.lora_matmul
ETraceParam / ElemWiseParam brainstate.ParamState + an ETP primitive function
NonTempParam brainstate.ParamState + plain JAX ops

Breaking changes

  1. OSTL factory removed — use OSTLRecurrent or OSTLFeedforward directly.
  2. OTTT and OTPE require an explicit leak — no longer inferred from model.states(); both reject hidden groups with num_state > 1 at compile time.
  3. Unit dependency changebrainunit replaced by saiunit.
  4. ETPPrimitiveSpec removed — custom primitives register layout metadata via register_primitive keyword arguments (trainable_invars_fn, x_invar_index, y_outvar_index).

See the full changelog for the complete migration guide.

Version 0.1.3

What's Changed

... (truncated)

Changelog

Sourced from braintrace's changelog.

Version 0.2.0

This release is a major step for BrainTrace. It adds a family of spiking neural network (SNN) online-learning algorithms, rewrites the eligibility-trace compiler around primitive-type dispatch, generalizes every ETP primitive to support multiple trainable inputs (fixing a silent bias-gradient drop), delivers substantial performance gains for D-RTRL and multi-step rollouts, and hardens the package with PEP 561 typing and a BPTT-oracle-backed test suite.

Major Changes

New: SNN Online-Learning Algorithms

  • Added five SNN online-learning algorithms as flat ETraceVjpAlgorithm subclasses: EProp, OSTL (OSTLRecurrent / OSTLFeedforward), OTPE, OTTT, and OSTTP. All are exported at the top level.
  • Added a _compute_learning_signal hook to ETraceVjpAlgorithm to support target-projection algorithms (OSTTP) without disrupting the existing D-RTRL and pp-prop paths.
  • Added supporting trace helpers: PresynapticTrace, KappaFilter, FixedRandomFeedback, and target-signal extraction utilities.
  • Algorithms are cross-checked for regime equivalence and verified to decrease loss in integration smoke tests.

ETP Compiler Rewrite

  • Rewrote the eligibility-trace compiler to dispatch on primitive-type identity rather than string-matching op or trace names, with structured, leveled diagnostics (DiagnosticKind, DiagnosticLevel, CompilationRecord) replacing ad-hoc warnings.
  • Added compile-time diagnostics that surface previously silent issues — e.g. TRAINABLE_INVAR_NOT_PARAMSTATE flags a trainable input (such as a constant bias) that does not trace to a ParamState, so users can wrap it intentionally instead of silently losing its gradient.

Multi-Trainable-Input ETP Primitives (Bias Gradients)

  • Generalized every ETP primitive from a single-"weight" assumption to an arbitrary named dict of trainable inputs. This fixes a silent bias-gradient drop and a LoRA executor signature mismatch in one coherent refactor.
  • Migrated all built-in primitives (elemwise, dense mm/mv, conv, sparse mm/mv, and lora) to the dict-based rule API with first-class bias gradient support, each verified element-wise against a BPTT oracle.
  • Fixed layout-aware axis handling in conv primitives (1D/2D, NHWC/NCHW, OIHW/HWIO kernel layouts) that previously corrupted gradients on non-default layouts, and fixed non-square dense weight broadcasting in _mm_yw_to_w.
  • Eligibility traces are now stored as per-key dicts; the transitional legacy-array adapter has been fully removed.

Performance

... (truncated)

Commits
  • d0627d4 ci: fix Publish.yml version check and merge CI workflows (#101)
  • 651584b docs: comprehensively cover and restructure docs/apis (#100)
  • 2aae3e0 docs: complete public-API docstrings + 0.2.0 changelog (#99)
  • 799d59d feat: braintrace.compile() entry point + deprecate v0.1.x legacy shims (#98)
  • 01250c3 test/p8 diagnostic exploration (#97)
  • 317a4ee test: pin per-cell compiler relation guardrails tied to the cell registry (P7...
  • 7486d19 test: verify L4 transform/integration invariance of online algorithms (P6) (#95)
  • 8378794 test: verify approximate-class online gradients are direction-aligned with BP...
  • a1e1e32 perf: fuse multi-step eligibility-trace roll into the forward scan (#93)
  • 43f0825 test: prove exact-class online gradients match BPTT (P4 L3-A/B) (#92)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [braintrace](https://github.com/chaobrain/braintrace) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/chaobrain/braintrace/releases)
- [Changelog](https://github.com/chaobrain/braintrace/blob/main/changelog.md)
- [Commits](chaobrain/braintrace@v0.1.2...v0.2.0)

---
updated-dependencies:
- dependency-name: braintrace
  dependency-version: 0.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants