Marine Acoustic Event Triage
4-channel ResonatorBank flags which frequency-stable acoustic event is dominant on a hydrophone stream — fin-whale pulses, blue-whale A-calls, ship cavitation, humpback tonal components — in 3,800 bytes. Designed as a sub-mW triage front-end for a solar-powered smart buoy.
Validation status: synthetic MBARI-style hydrophone streams only. Real MARS archive validation is planned.
Triage, not species ID. Flags acoustic-frequency signatures only — no source localisation (TDOA / bearing), no rich-spectrogram analysis (humpback song phrases, dolphin whistles), not a substitute for PAMGuard or full-size marine CNNs. Targets the earlier layer in the bioacoustic monitoring chain.
v0.2 update: wider Gaussian tuning recovers boundary frequencies · multi-label output flags whale and ship simultaneously
Key Metrics
Measured 2026-04-24 on synthetic MBARI MARS-style hydrophone streams spanning fin whale 20-Hz pulses, blue whale A-calls, ship cavitation, and humpback song.
Classification Results
| Event | Frequency | TP | FP | Precision | Recall | F1 |
|---|---|---|---|---|---|---|
| Ambient | — | 19 | 1 | 0.950 | 0.950 | 0.950 |
| Fin Whale | 20 Hz | 19 | 3 | 0.864 | 0.950 | 0.905 |
| Blue Whale (A-call) | 80 Hz | 17 | 3 | 0.850 | 0.850 | 0.850 |
| Ship Noise | 140 Hz | 17 | 3 | 0.850 | 0.850 | 0.850 |
| Humpback Song | 200 Hz | 18 | 0 | 1.000 | 0.900 | 0.947 |
Ship Traffic & Stress Tests
Ship Transits (vessel sailing past the hydrophone)
| Transit Length | Ship Windows | Total Windows | Ship Ratio |
|---|---|---|---|
| 500 steps | 7 | 10 | 70.0% |
| 1500 steps | 20 | 30 | 66.7% |
| 3000 steps | 39 | 60 | 65.0% |
| 5000 steps | 59 | 100 | 59.0% |
Every closest-point-of-approach window is flagged as Ship Noise. Approach and recede tails produce Ambient — the physically correct answer because the ship is below the noise floor at those ranges.
Noise Resilience
| Noise Level | Accuracy | Verdict |
|---|---|---|
| 0% | 100% | OK |
| 10% | 96% | OK |
| 20% | 90% | DEGRADED |
| 30% | 82% | DEGRADED |
| 50% | 76% | DEGRADED |
The 50-step energy accumulation window averages short random transients. Sustained broadband contamination (storms, surf) above ~20 % degrades accuracy.
Sea-State Compensation
| Sea State | Ambient preserved | False-positive species |
|---|---|---|
| 0 (calm) | 100% | 0 |
| 2 | 100% | 0 |
| 4 | 100% | 0 |
| 6 (rough) | 100% | 0 |
| 8 (very rough) | 100% | 0 |
det.set_sea_state(state) raises the ambient threshold 25 % per step on the Douglas scale. Zero false alarms across all five states on 1000-step ambient-noise runs.Whale Under Ship Noise
Fin-whale pulses interleaved with a simultaneous ship passage (2000-step mixed recording).
| Event | Windows |
|---|---|
| Fin Whale | 32 |
| Ship Noise | 8 |
In the synthetic mixed scene, fin-whale pulses remain separately detectable during overlapping ship-noise windows. Real-ocean masking behaviour is pending MARS validation.
Remaining Limitations
| Limitation | Status | Impact |
|---|---|---|
| Single-label output | Fixed in v0.2 | step_multi() flags whale + ship together (100% coverage) |
| Boundary frequencies | Fixed in v0.2 | with_bandwidth(0.20) catches 110 Hz and 170 Hz (50 Hz still Ambient) |
| No source localisation | Open | Answers what, not where or how far |
| Synthetic data only | Open | Real MARS hydrophone data validation pending |
v0.2 Improvements
Two additive, backwards-compatible API extensions address the biggest v0.1 limitations identified in review. All 20 v0.1 tests still pass; 5 new v0.2 tests cover the new paths (25 / 25 green).
1. Wider Gaussian Tuning — with_bandwidth(0.20)
Each Neuron::bandwidth is writable through the public API. v0.2 widens every channel past the library's auto-clamped 0.10 so the between-channel gaps no longer fall through to Ambient.
| Input Frequency | v0.1 (bw=0.10) | v0.2 (bw=0.20, recommended) | v0.2 (bw=0.30) |
|---|---|---|---|
| 50 Hz | Ambient | Ambient | Ambient |
| 110 Hz (between Blue & Ship) | Ambient | Ship Noise | Ship Noise |
| 170 Hz (between Ship & Hump) | Ambient | Humpback | Humpback |
| 260 Hz (above Hump) | Ambient | Ambient | Humpback |
| 15 Hz (below Fin) | Ambient | Ambient | Fin Whale |
| 80 Hz (exact Blue) | Blue Whale | Blue Whale | Blue Whale |
Bandwidth vs. CSV accuracy — sweet spot at 0.20
| Bandwidth | CSV Accuracy | Verdict |
|---|---|---|
| 0.10 (v0.1 default) | 90.0% | strict — drops boundary signals |
| 0.15 | 90.0% | partial recovery |
| 0.20 (v0.2 recommended) | 90.0% | catches 110 Hz + 170 Hz, no regression |
| 0.22 | 89.0% | slight regression starts |
| 0.25 | 79.0% | 200 Hz channel picks up 260 Hz noise |
| 0.30 | 75.0% | too wide — false positives on ambient |
2. Multi-Label Output — step_multi()
Thresholds every channel independently and returns a MultiLabelDecision listing all active sources — so a fin whale calling through a simultaneous ship passage produces the label [FinWhale, ShipNoise].
| Whale-under-ship scene (2,000 steps) | Windows flagging BOTH species | Coverage |
|---|---|---|
| v0.1 single-label | 0 / 40 | 0% |
| v0.2 multi-label (bw=0.20) | 40 / 40 | 100% |
| v0.2 multi-label (bw=0.30) | 40 / 40 | 100% |
Regression check: zero false-positive species on 2,000 steps of pure ambient ocean at bandwidth 0.20 — the multi-label path is strictly additive.
Usage
// v0.2: wider Gaussian tuning + multi-label output
let mut det = MarineDetector::with_bandwidth(0.20);
while let Some(d) = det.step_multi(freq) {
// d.events may be [FinWhale, ShipNoise] simultaneously
// d.energies == [FIN, BLUE, SHIP, HUMP] snapshot
}
Reproduce the full comparison locally: cargo run --release --example marine_v02.
Remaining Gap — 50 Hz
The 50 Hz window (between Fin=20 and Blue=80) is still reported as Ambient even at bandwidth 0.30 — the relative gap (80–20)/20 = 300% is too wide for any reasonable Gaussian to bridge. Species in this range (sei whale downsweeps 40–60 Hz) would need their own dedicated channel in a 5- or 6-channel bank.
How It Compares
Against classical DSP (Goertzel / matched filter), TinyML stacks (TensorFlow Lite Micro, Edge Impulse) and full-size marine CNNs. All TinyML numbers from vendor docs; all CNN numbers from peer-reviewed papers.
RAM, ROM & Latency
| System | RAM | Flash / ROM | Latency |
|---|---|---|---|
| CricketBrain UC03 v0.2 | 3.7 KB | ~20 KB | 49 ms (10 µs compute) |
TFLite Micro — micro_speech | 10 KB | 22 KB | ~1 s audio window |
| Edge Impulse audio — Cortex-M7 @ 216 MHz | 19.6 KB | 47.3 KB | 54 ms + 1 s buffer |
| Edge Impulse audio — Cortex-M4F @ 80 MHz | 19.6 KB | 47.3 KB | 225 ms + 1 s buffer |
| Typical TinyML audio CNN | 20-100 KB | 50-500 KB | 10-100 ms |
| Humpback CNN (Allen 2021) | >100 MB | >100 MB | GPU / Jetson only |
CricketBrain is ~3× smaller than TFLite Micro's smallest audio example and ~5× smaller than a typical Edge Impulse audio model.
Average Power at 1 Hz Decision Rate
| System | Active power | Duty cycle | Average power |
|---|---|---|---|
| CricketBrain — STM32F0 @ 48 MHz | ~15 mW | 0.001% | < 0.5 µW compute |
| Edge Impulse — Cortex-M7 @ 216 MHz | ~100 mW | 5.4% | ~5.4 mW |
| Edge Impulse — Cortex-M4F @ 80 MHz | ~50 mW | 22.5% | ~11 mW |
| TFLite Micro — STM32F1 continuous | ~30 mW | ~100% | ~30 mW |
| DeepAcoustics / ORCA-SPOT (RPi-class) | ~5 W | ~10% | ~500 mW |
Edge Impulse doesn't publish mW numbers directly; estimates use the documented latency × ST datasheet power curves. At sub-1 mW budgets a solar-charged smart buoy can afford CricketBrain but not Edge Impulse.
Training Data & Accuracy Trade-off
| System | Training data | Reported accuracy |
|---|---|---|
| CricketBrain UC03 v0.2 | Zero | 90.0% (4 classes), d' = 6.18 |
| Classical Goertzel / matched filter | Zero | ~85-90% on clean fin-whale 20 Hz |
| Edge Impulse audio | ~100-1,000 clips/class | typical 85-95% |
| TFLite Micro keyword | ~1,000 clips/class | typical 90-95% |
| Humpback CNN (Allen 2021) | 187,000 h labelled | AP 0.97, AUC 0.992 |
| Custom mel-spectrogram CNN | Large corpus | 98.92% (FN 0.75%) |
| Marine mammal DNN (Shiu 2020) | Large corpus | F1 0.87 over 32 species |
On complex spectrograms (humpback song) CNNs beat CricketBrain on accuracy. On frequency-stable tonal signals (fin whale 20-Hz pulse, ship cavitation) the gap closes — and CricketBrain pulls ahead on every non-accuracy axis. Schall et al. (2024) note in their baleen-whale benchmark that deep-learning detectors "tend to be too computationally expensive to run on existing wildlife monitoring systems".
When to Pick Which
| Scenario | Recommendation |
|---|---|
| Solar buoy, < 1 mW budget, multi-year deployment | CricketBrain |
| Known frequency-stable sources (fin whale, ship cavitation) | CricketBrain |
| No labelled training data exists | CricketBrain |
| Regulatory / auditable / explainable required | CricketBrain |
| Power budget > 10 mW, complex spectrogram classes | Edge Impulse / TFLite Micro |
| Post-hoc analysis of archived hydrophone data | PAMGuard / Jetson CNN |
| Research-grade accuracy (> 95%) on 30+ species | Jetson / RPi CNN |
Full sourced breakdown (vendor docs, peer-reviewed papers): docs/competitive_analysis.md.
Dataset & License
| Field | Value |
|---|---|
| Dataset | MBARI MARS Cabled Observatory Hydrophone |
| License | CC BY 4.0 |
| URL | mbari.org/technology/mars/ |
| Location | Monterey Bay, CA — 891 m depth |
| Sampling | 256 kHz broadband, 2 kHz decimated for baleen-whale work |
| Hosting | AWS Open Data Sponsorship (s3://pacific-sound-2khz/) |
Quick Start
cd use_cases/03_marine_acoustic
cargo run --release # Synthetic demo
cargo run --release -- --ship-transit # Cargo-ship transit
cargo run --release -- --csv data/processed/sample_marine.csv # CSV mode
cargo run --release --example marine_sdt # SDT benchmark
cargo run --release --example marine_stress # Stress test
cargo run --release --example marine_v02 # v0.1 vs v0.2 comparison