# EarthConvergence Open Bioacoustic Benchmark & Receipts Pack (v2)

This package contains the complete, reproducible **v1 Classical DSP** and **v2 Neural 4-Stage SoundStream-Style RVQ + Trained Causal Transformer** gate receipts, all 40 substantively unique cetacean and non-Watkins bioacoustic/echolocation JSON receipts, all 16 executable Python modules (`BioacousticModelSwapSlot`), and cryptographic SHA-256 + 328-tape split verification manifest backing https://earthconvergence.com.

## 1. Honest Model Provenance & Methodological Rigor

1. **What Executed `v2` Today**:
   Every `*_v2_neural.json` gate receipt in `receipts/` was executed locally by our **MasiDyn Local 4-Stage SoundStream-Style RVQ + AdamW-Trained 2-Layer Causal Acoustic Transformer (`NeuralSoundStreamRVQEngine`: `2` layers, `d_model = 64`, `4` attention heads, `dim_feedforward = 128`, `4` codebooks $\times$ `128` entries = `28 bits/frame`, `0.658 MB` parameter + codebook footprint on `BC-01` RTX 5080)** fitted and evaluated directly on our local WAV and Parquet corpora with **strict fold and group-split isolation** (scaling and RVQ codebooks fitted strictly inside each training fold/split, zero test-fold leakage, plus explicit pre-adaptation frozen evaluation and post-adaptation state hashes).
2. **Status of Google DeepMind / WDP / Georgia Tech `~400M DolphinGemma`**:
   Google DeepMind, the Wild Dolphin Project (Dr. Denise Herzing), and Georgia Tech (Dr. Thad Starner) have described `google/dolphingemma` (`~400M` SoundStream RVQ + Gemma) as in development for field trials and upcoming open-research release. We do **not** claim to execute Google's unreleased `~400M` checkpoint. Instead, `BioacousticModelSwapSlot(checkpoint_path=...)` in `code/dolphingemma_bridge.py` implements strict local `NeuralSoundStreamRVQEngine` checkpoint loading/validation (`.pt` / `.safetensors`, full key + tensor-shape + parameter-count verification; `official_dolphingemma_compatible = False` until an official `google/dolphingemma` weight adapter is built) and forwards `--checkpoint-path` and `--eval-mode` (`frozen`, `adapt`, `both`) across all five falsification gates.

## 2. Core 5-Gate Cetacean Benchmark Receipts (`receipts/`)

- `stenella_v2_neural.json` — *Stenella frontalis* (`244` WHOI Watkins cuts across `4` sample-rate tiers: `27` at `192 kHz`, `190` at `80 kHz`, `17` at `60.6 kHz`, `10` at `43.9 kHz`). Headline: held-out Causal Transformer perplexity `5.82` versus `10.39` bigram Markov (`128.00` uniform). Fit diagnostic, not the headline: full-set transition `z = -336.950` and tape-grouped held-out `z = -403.983` (`p = 0.0020`). Full-corpus latent RVQ SNR `7.497 dB`. Held-out SNR `5.671 dB`. Split: `61` train / `183` held-out, `tape_group_overlap_count = 0`.
- `signature_whistle_probe_v2_neural.json` — Two questions, kept in separate blocks. One question does not cover both datasets.
  - Watkins *Tursiops truncatus* within-tape identity (`33` cuts labeled Signature, latent RVQ SNR `-0.129 dB`): `94.44%` on tape `84228` (`n = 18`, `z = 2.86`, `p = 0.001` across `2,000` surrogates), `92.31%` on tape `89514` (`n = 13`, `z = 3.70`, `p = 0.001`). The pooled `95.65%` contrast is tape-confounded and is not a name.
  - Fremantle Harbour *Tursiops aduncus* is structure only (`336` whistles at `96 kHz`, no `animal_id`; Marley, Erbe, and Salgado Kent 2017, *Scientific Data* `10.1038/sdata.2017.126`, Figshare `10.6084/m9.figshare.5011637.v1`). That paper does not treat these files as signature whistles. Headline: held-out perplexity `49.17` versus `62.22` bigram Markov. Fit diagnostic: column-permutation stereotypy `z = -171.896` (`p = 0.0020`). Held-out latent RVQ SNR `4.844 dB`. Session overlap `0`. `48,269` RVQ frames.
- `watkins_truncatus_cross_tape_identity.json` — same `33` labeled Watkins *T. truncatus* cuts, leave-one-tape-out, v1 contour features. **FAIL.** `7` animals on `3` tapes, `0` animal ids on more than one tape. Accuracy was not estimated. The permutation null was not estimated. This is not a language result.
- `watkins_label_span_census.json` — metadata census of all `15,248` Watkins cuts, no audio read. `1,916` cuts carry an animal id. Unique *T. truncatus* ids: `8`. Ids on more than one tape: `0`. The identity question is closed for this corpus. The only animals on more than one tape are single orcas (`Keiko`, `1,452` cuts, `49` tapes; `Moby Doll`, `192` cuts, `4` tapes). One id cannot be a who-classifier.
- `watkins_species_gate_v2_neural.json` — WHOI Watkins (`15,248` raw cuts in Parquet shards; `14,864` featurized cuts in `watkins_features.npz`; `13,317` multi-tape evaluated cuts across `328` recordings [`311` single-species recordings + `17` mixed-species recordings] and `24` species with `>= 60` cuts and `>= 4` recordings, strictly fold-isolated scaling + neural encoder + RVQ):
  - **Cut-Random 5-Fold CV**: `v2 = 62.98%` vs `v1 = 49.09%` (`+13.89 pp`, `z = 105.46`).
  - **Strict Tape-Held-Out 5-Fold `StratifiedGroupKFold` (`328` recordings)**: `v2 = 40.01%` vs `v1 = 31.68%` (`+8.33 pp`, `z = 20.75`, `p = 0.00498` over `200` composition-preserving group-label surrogates + `40` conditional re-split surrogates; majority baseline = `19.87%`, uniform chance = `4.17%`).
- `orcasound_score_v2_neural.json` — *Orcinus orca* (`398` human-marked SRKW calls + `44` Ford-catalogue typed call annotations within `OS_7_05_2019_08_24_00_.wav`):
  - Classical voiced-interval detector (`decode_orcasound.voiced_intervals`): Interval `F1 = 0.6973` (`311/398` TP, recall `78.14%`, `+18.45σ` above 200-shift circular null).
  - 4-stage Neural RVQ representation (codebooks calibrated strictly on the 80% training split: `33` train / `8` held-out voiced calls; `38` usable calls across `6` Ford call types with `>= 2` calls): Ford call-type cohesion `z = -2.629` (`p = 0.00399` vs `500` label permutations).
- `dswp_stage1_battery_v2_neural.json` — *Physeter macrocephalus* (`1,501` DSWP WAVs on disk; `80` WAVs in v2 RVQ battery split `50` train / `30` held-out + `agnostic/impossible/noise.wav` evaluated through the **exact same DSWP-fitted codebook** using the **identical pre-encoder time-domain waveform permutation null (`N = 40` surrogates)**):
  - Held-out `30` DSWP WAVs (pre-encoder waveform permutation null): `z = -10.918` (`p = 0.02439`, `PASS`).
  - White-noise negative control (`noise.wav` through DSWP codebook, identical pre-encoder waveform permutation null): `z = -0.322` (`p = 0.41463`, `FAIL` as required).
  - Rung 3 semantics: `FAIL_CLOSED_REFUSED_PENDING_DTAG_CONTEXT` (`dswp_coda_reality.json`: Q2 5-template alphabet `p = 0.419` `NOT SUPPORTED`).

## 3. Non-Watkins Cross-Species Empirical Studies Included (`receipts/` & `code/`)

1. **Pale Spear-Nosed Bat Echolocation 2AFC (`receipts/goal_line_bat.json`, `code/goal_line_bat.py`)**:
   *Phyllostomus discolor* (Wagenhaeuser, Wiegrebe & Baier 2020, *J. Exp. Biol.* `223:jeb224311`, Dryad DOI `10.5061/dryad.tx95x69vz`, `CC0-1.0`): `7,676` behavioral 2AFC trials across `3` bats (`Ese, Primus, Secundus`) achieving `68.68%` accuracy vs `50%` chance (within-bat IMD `z = +6.21, p = 0.0002`), paired with `75,087` distinct ultrasonic call records aggregated into `5,797` call-recording trials (`z = -4.60, p = 0.0002`).
2. **Human Blindfolded Outdoor Echolocation (`receipts/goal_line_human.json`, `code/goal_line_human.py`)**:
   Bujacz et al. (`2,340` trials across `26` participants $\times$ `13` acoustic stimuli, `CC-BY 4.0`): `76.03%` direction accuracy (`p = 9.4e-29`) and `65.60%` distance accuracy (`p = 6.9e-24`) vs `33.33%` chance; learning gain `+7.74 pp` (`p = 5.0e-6`).
3. **Human Wall-Texture Echo Discrimination (`receipts/goal_line_texture.json`, `code/goal_line_texture.py`)**:
   PLOS ONE `pone.0251397.s001` (`14` participants $\times$ `3` echo trace conditions, `CC-BY 4.0`): `71.90%` far accuracy on normal echo traces and `81.90%` on enhanced RDLD (`p = 0.000122`), collapsing to `56.19%` (`p = 0.145`, near chance) when late reflection tails are stripped.
4. **Active Sonar Target Replication (`receipts/sonar_target_replication.json`)**:
   Gorman & Sejnowski (`208` targets $\times$ `60` spectral bands): held-out `F1 = 1.0` (`TP=55, FP=0, FN=0, TN=49`).
5. **Baleen Whale Stage-1 Raw Audio Gate (`receipts/whale_stage1_result_humpback_song.json`, `receipts/whale_stage1_result_minke_pam.json`, `receipts/whale_stage1_result_noise.json`)**:
   Humpback song (`z = 33.142` self-similarity / `z = 32.146` RQA determinism), Minke whale PAM (`z = 22.248` / `19.010`), and white noise negative control (`FAIL`).
6. **Invertible Seawater Acoustic Physics Codec (`receipts/phys_codec_receipt.json`, `code/phys_codec.py`)**:
   Exact Francois-Garrison seawater absorption (`alpha(f, T, S, D, pH)`), relativistic acoustic Doppler shift, and echo time-to-contact (`8/8` roundtrip invariants, `0.0` float drift).
7. **Polar Bear GBIF & iNaturalist Occurrence/Media Metadata (`receipts/polar_bear_data_report.json`)**:
   *Ursus maritimus* GBIF occurrence inventory (`10,919` total occurrences, `7` sound records, `2,343` still-image records) and iNaturalist observations (`89,039` total); metadata inventory only (does not contain USGS GPS collar or maternal den emergence tables).
8. **Cross-Species Sequence Compression Tournament (`receipts/sequence_tournament_receipt.json`)**:
   Information-theoretic compression and entropy baselines evaluated across `8` species repertoires.
9. **NOAA DCLDE 2020 & 2027 Catalog & Local Intake Status (`receipts/dclde_local_status.json`)**:
   Local catalog inventory (`status = NOT_DONE`, `audio_state = PARTIAL`, `1,246` catalog entries, `218` partial downloads on disk, `0` independently verified complete `.flac` files in this bundle check; indicates unverified local hydration status, not proof of zero physically existing files).

## 4. Reproducing the Tests & Running the Structural Auditor

```bash
pip install -r requirements.txt
pytest code/test_dolphingemma_swap_and_v2_rvq.py -v
python code/run_v2_neural_gate_battery.py --checkpoint-path <optional_local_engine_checkpoint.pt> --eval-mode both
```
