Morse Code Recognition
Initial implementation. 5-neuron canonical circuit based on the Münster model.
- 5-neuron circuit (AN1, LN2, LN3, LN5, ON1)
- Basic Morse code encoding/decoding
- Criterion benchmarks (0.175 µs/step)
- 0 false positives during silence
Adaptive neuromorphic signal processing. Hardwired core + optional STDP plasticity. Inspired by 200 million years of cricket evolution.
Watch the 5-neuron Münster circuit process signals in real-time. ON1 fires only when it detects sustained 4500 Hz via delay-line coincidence detection.
Five neurons connected by six delay synapses. Inhibitory paths (red) suppress noise, the excitatory path (green) drives the output.
The hardwired core is built on four equations. Optional STDP plasticity enables online weight adaptation.
Frequency selectivity. w = 0.1 gives ±10% bandwidth. At 20% deviation, match < 0.02.
When resonating: amplitude grows proportionally to match strength, capped at 1.0.
Exponential moving average locks the neuron's phase to the input signal.
Output fires only when BOTH current and delayed amplitude exceed threshold. Prevents false positives.
CricketBrain is not competing with deep learning. It proves that useful inference is possible at a fundamentally different scale.
| Property | CricketBrain | Deep Learning |
|---|---|---|
| Latency | 0.175 µs/step | ~10 ms |
| Memory | ~1 KB | ~800 GB |
| Training | Optional STDP | Months on cluster |
| GPU required | No | Yes |
| Deterministic | Yes | No |
| no_std / Embedded | Yes | No |
| Explainable | Fully | Black box |
| False positives in silence | 0 | N/A |
Initial implementation. 5-neuron canonical circuit based on the Münster model.
Multi-frequency token vocabulary and parallel resonator banks.
Temporal pattern matching with confidence scoring and privacy mode.
Full workspace with cross-platform bindings, STDP plasticity, and research-grade benchmarks.
#![deny(unsafe_code)]All results measured in real-time on this codebase using internationally recognised methodologies. Fully reproducible with deterministic seeding.
CricketBrain vs Matched Filter, Goertzel (FFT), and IIR Bandpass under identical noise conditions. Source: examples/baselines.rs
| SNR (dB) | CricketBrain TPR | CricketBrain FPR | Matched Filter TPR | Goertzel TPR | IIR Bandpass FPR |
|---|---|---|---|---|---|
| −10 | 1.000 | 0.000 | 0.000 | 0.000 | 0.992 |
| −5 | 1.000 | 0.000 | 0.000 | 0.000 | 0.867 |
| 0 | 1.000 | 0.000 | 0.000 | 0.017 | 0.558 |
| +5 | 1.000 | 0.000 | 0.008 | 0.025 | 0.325 |
| +10 | 1.000 | 0.000 | 0.992 | 0.942 | 0.150 |
| +20 | 1.000 | 0.000 | 1.000 | 1.000 | 0.125 |
| +30 | 1.000 | 0.000 | 1.000 | 1.000 | 0.108 |
CricketBrain achieves TPR=1.0 / FPR=0.0 across all SNR levels. Matched Filter and Goertzel fail below +10 dB. IIR Bandpass has persistent false positives (FPR up to 99%).
Sensitivity index (Green & Swets, 1966). Target vs Silence: AUC = 1.000. Rating: EXCELLENT (near ceiling). 500+500 trials at 100 ms.
Minimum detectable gap (Plomp, 1964; Fitzgibbons & Wightman, 1982). Human MDG at 4 kHz: 2–3 ms. Cricket biology: ~5 ms.
Coefficient of variation over 1000 trials (Gerstner & Kistler, 2002). Deterministic: zero jitter. With noise (0.02): CV = 0.097, matching biological range.
Just Noticeable Difference (Levitt, 1971 staircase). Weber fraction: 1.96% (narrow-band). Human at 4 kHz: ~9 Hz (0.2%). Bandwidth-tunable.
Standard neuromorphic computing metric. CricketBrain runs on a general-purpose CPU — dedicated silicon (ASIC/FPGA) would yield dramatically higher SynOPS/W.
| System | SynOPS | Power | SynOPS/W | Bytes/Neuron |
|---|---|---|---|---|
| CricketBrain (5N) | 6.43e7 | ~15 W | 4.29e6 | 186 |
| CricketBrain (40kN) | 2.99e8 | ~15 W | 1.99e7 | 364 |
| TrueNorth (IBM) | 4.60e10 | 0.07 W | 6.58e11 | ~256 |
| Loihi (Intel) | 3.00e10 | 0.10 W | 3.00e11 | ~140 |
| SpiNNaker | 6.00e9 | 1.0 W | 6.00e9 | ~800 |
| GPU A100 | 3.12e14 | 400 W | 7.80e11 | ~4 |
Timesteps from signal onset to first ON1 spike at 4500 Hz. Wall-clock: 3.1 µs. Real-time factor: 2897x faster than real-time.
Steps per second (5-neuron canonical circuit). 0.175 µs per step on a single CPU thread. No GPU, no SIMD required.
Total RAM for 5-neuron circuit (186 bytes/neuron). Fits in L1 cache. 40k-neuron scale: 14.2 MB (364 bytes/neuron).
Inter-spike interval pattern on sustained 4500 Hz: ISI = 1.00 ms, CV = 0.000. Classification: CLOCK-LIKE (CV < 0.01).
Systematically disabling circuit components to measure individual contributions. Source: examples/ablation_study.rs
| Configuration | SNR 0 dB TPR | SNR 0 dB FPR | SNR +10 dB TPR | SNR +20 dB TPR |
|---|---|---|---|---|
| Full circuit (baseline) | 1.000 | 0.000 | 1.000 | 1.000 |
| Without LN2 (inh, 3 ms) | 1.000 | 0.000 | 1.000 | 1.000 |
| Without LN3 (exc, 2 ms) | 0.440 | 0.000 | 0.010 | 0.005 |
| Without LN5 (inh, 5 ms) | 1.000 | 0.000 | 1.000 | 1.000 |
| Without coincidence gate | 1.000 | 0.000 | 1.000 | 1.000 |
| Without delay lines (d=1) | 1.000 | 0.000 | 1.000 | 1.000 |
LN3 (excitatory path) is critical — removing it drops TPR to 44% at SNR 0 dB and near-zero at higher SNR. All other components show redundancy at these SNR levels but contribute at extreme conditions.
cargo run --release --example bench_sdt # Signal Detection Theory
cargo run --release --example bench_synops # SynOPS Efficiency
cargo run --release --example bench_jnd # Just Noticeable Difference
cargo run --release --example bench_gap # Gap Detection
cargo run --release --example bench_latency # Spike Latency & Precision
cargo run --release --example bench_patterns # Pattern Separation
cargo run --release --example baselines # vs Classical Detectors
cargo run --release --example ablation_study # Component Analysis
All benchmarks are deterministic (seeded RNG), fully reproducible, and generate identical results across Linux, macOS, and Windows. References: Green & Swets (1966), Levitt (1971), Plomp (1964), Merolla (2014), Davies (2018), Gerstner & Kistler (2002), Yassa & Stark (2011).
# Clone and run
git clone https://github.com/BEKO2210/cricket-brain.git
cd cricket-brain
cargo run
# Full roundtrip demo
cargo run --example live_demo -- "HELLO WORLD"
# Sequence prediction
cargo run --example sequence_predict
# 40k neuron benchmark
cargo run --release --example scale_test
# Run all 122 tests
cargo test --workspace