Magnitude homology is graded by length and knows nothing of persistence. Its persistent refinement knows nothing of where its bars begin and end. We show that the two are one construction: filtering the length nerve by sublevel sets of the length yields the persistence module, and the associated graded of that filtration is the magnitude complex. A long exact sequence exchanges them, and each side gains what it lacked. Magnitude homology locates the critical values of the barcode, so a graded computation lists the lengths at which an endpoint can occur, and the barcode acquires a stability estimate of $(n+1)δ$ in degree $n$ under a perturbation of size $δ$, while a computed perturbation moves a barcode by more than $δ$, so the factor cannot be dropped. We apply this to quantitative equational theories, whose free algebras are metric spaces built from syntax: an inclusion of theories induces a morphism of the presenting monads and a comparison of barcodes with an explicit bound, so the invariant measures axiomatic strength. Four examples are computed, one in every degree.
Sichao He, Aiersi Tuerhong, Shangjun She +4q-bio.NC cs.LG cs.NE
Continuous attractor neural networks (CANNs) are the canonical computational framework for how the brain encodes continuous variables such as spatial position, head direction, and movement direction, and explain the activity of hippocampal place cells, entorhinal grid cells, and head-direction cells. CANN research, however, is fragmented: most results rest on lab-specific implementations, general-purpose simulators lack CANN-specific abstractions, and the path from spike trains to attractor geometry in real recordings lacks a standardized toolkit. Here, we present a comprehensive open-source toolkit that unifies the full CANN research workflow. It combines three tightly integrated components: 1) canns, a Python library on BrainPy/JAX that provides standardized 1D/2D CANNs, spike-frequency-adaptation variants, grid cell networks, hierarchical path-integration models, and brain-inspired attractor architectures, together with curated datasets, task generators, an analyzer module and trainer modules for biologically plausible plasticity; 2) canns-lib, a Rust acceleration backend delivering hundreds-of-times speedups for spatial-navigation workloads and modest gains for Ripser-based persistent homology; 3) ASA (Attractor Structure Analyzer), a PySide6 pipeline applying persistent homology and cohomology to experimental neural recordings to detect ring-like and toroidal attractor signatures in real data. The toolkit ships with full-detail reproducible pipelines that recover recent CANN results including SFA-driven anticipative tracking, theta sweeps in head-direction/place/grid systems, and hierarchical path integration.