alohajazz commited on
Commit
1dbc3ed
·
verified ·
1 Parent(s): dbb29a3

Add corrected step-127641 encoder and matching seed-42 SED head

Browse files
BEATs_DAPT_MAM_fixed_step127641.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a2d1d93f53ec29227bdd52da087fd0abcf0ce797c3c4a8629cd1435a314a6f9
3
+ size 361345049
README.md CHANGED
@@ -7,8 +7,6 @@ tags:
7
  - self-supervised-learning
8
  - beats
9
  - masked-audio-modeling
10
- datasets:
11
- - world-dapt
12
  language:
13
  - en
14
  metrics:
@@ -17,169 +15,127 @@ library_name: torch
17
  pipeline_tag: audio-classification
18
  ---
19
 
20
- # OceanBEATs
21
-
22
- **OceanBEATs** is a foundation model for underwater acoustic monitoring,
23
- adapted from [BEATs](https://github.com/microsoft/unilm/tree/master/beats)
24
- via Domain-Adaptive Pretraining (DAPT) on a 5,673-h global ocean
25
- soundscape corpus (World-DAPT).
26
-
27
- This model serves as the "ears" for underwater soundscapes described in our
28
- paper: **"Discovery and promotion of unknown sounds into operational
29
- detection targets for underwater passive acoustic monitoring under false
30
- alarm constraints"** (*Scientific Reports*, **revision** in review).
31
-
32
- > **About this revision** (May 2026). The original December 2025 release used
33
- > SimCLR/InfoNCE-based DAPT under AMP fp16, which suffered a numerical
34
- > instability that prevented BEATs encoder weight updates (the
35
- > `beats_dapt_topup_encoder.pt` weights were therefore byte-identical to
36
- > Microsoft's BEATs AS-2M PRETRAIN). The current revision corrects this by
37
- > re-running DAPT with **Masked Audio Modeling (MAM)** and a **k-means
38
- > k=1024 tokeniser** under bfloat16 precision on a larger 5,673-h
39
- > World-DAPT corpus. The superseded buggy weights have been **removed**
40
- > from this repository (see *Reproducibility of the original buggy state*
41
- > below for how to recreate them if needed).
42
-
43
- ## Model Details (current canonical revision)
44
-
45
- - **Architecture:** BEATs (Audio Transformer; Microsoft)
46
- - **Self-supervised pretraining:** Masked Audio Modeling (MAM) with k=1024
47
- k-means cluster labels on PRETRAIN BEATs patch features
48
- - **DAPT corpus:** World-DAPT, 5,673 h (NOAA SanctSound, US Navy USWTR, NOAA
49
- NRS/ONMS, ICListen / ONC, NPS Glacier Bay, PALAOA Ekström Ice Shelf)
50
- - **Optimisation:** AdamW, batch 16, learning rate 1e-4 (cosine decay),
51
- bfloat16 precision, 1 epoch (126,365 steps); checkpoint
52
- `BEATs_DAPT_MAM_step120000.pt` selected by best 56-class SED validation
53
- - **Input:** 16 kHz mono waveform
54
- - **Backbone init:** BEATs AS-2M (iter3+)
55
-
56
- ## Available files (current canonical revision)
57
-
58
- | File | SHA-256 | Size |
59
- |---|---|---|
60
- | `beats_dapt_mam_step120000.pt` | `0fe9f7dd92780c2e564f1df06a192482dbcb9a56bdab4202f4d94862b9168f89` | 361 MB |
61
- | `sed_head_56_fulldata_ep8.pt` | `135d11738a6619a57769955468ce5cb6eee3f07044fa45e6c950bf25ac4f8f60` | 18 MB |
62
-
63
- `sed_head_56_fulldata_ep8.pt` is the 56-class SED head trained on top of the
64
- above encoder. Single-seed Event F1 = 0.483; n=10 mean ± std = 0.475 ± 0.017
65
- (per manuscript Table 1 footnote).
66
-
67
- ## Reproducibility of the original (buggy) state
68
-
69
- The original December 2025 release contained two files that have been
70
- removed in the current revision:
71
-
72
- | Removed file | Replacement / how to recreate |
 
 
 
 
 
73
  |---|---|
74
- | `beats_dapt_topup_encoder.pt` | Functionally equivalent to Microsoft's [BEATs AS-2M PRETRAIN](https://github.com/microsoft/unilm/tree/master/beats) (`BEATs_iter3_plus_AS2M.pt`); use that file directly to reproduce the original buggy DAPT-encoder behaviour. |
75
- | `sed_head_56_topup_ep8.pt` | Re-train a 56-class SED head on top of the BEATs AS-2M PRETRAIN encoder using the protocol in Methods §4.2.3 of the manuscript (`scripts/train_sed_beats_weak_plus.py` in the GitHub repository). |
76
 
77
- Removed-file commit history is preserved in the HuggingFace repository
78
- commit log; the SHA-256 of the deleted encoder was identical to that of
79
- Microsoft's `BEATs_iter3_plus_AS2M.pt` because the AMP fp16 NaN bug
80
- prevented any weight updates.
81
 
82
- ## Usage
83
 
84
- These weights are designed to be used with the official code repository:
85
-
86
- **GitHub Repository:** [alohajazz/openworld-soundscape-cced2-dgpu](https://github.com/alohajazz/openworld-soundscape-cced2-dgpu)
87
 
88
  ```python
89
  from huggingface_hub import hf_hub_download
90
 
91
- # Download canonical revision weights
92
- encoder_path = hf_hub_download(
93
- repo_id="BiologgingSolutions/OceanBEATs",
94
- filename="beats_dapt_mam_step120000.pt",
95
- local_dir="weights/",
96
- )
97
- sed_head_path = hf_hub_download(
98
- repo_id="BiologgingSolutions/OceanBEATs",
99
- filename="sed_head_56_fulldata_ep8.pt",
100
- local_dir="weights/",
101
- )
102
  ```
103
 
104
- After download, verify the SHA-256 fingerprints against the values listed
105
- above to ensure file integrity.
106
-
107
- ## License & Data Availability
108
-
109
- **License:** CC BY 4.0 (Creative Commons Attribution 4.0 International)
110
-
111
- These weights are released under CC BY 4.0 (open, including for commercial
112
- use, with attribution). The released weights do not redistribute raw audio.
113
-
114
- The internal 56-class SED training corpus itself remains non-public under
115
- an in-progress data-sharing agreement within the original collaboration;
116
- representative class examples and a per-class taxonomy are planned for
117
- release in a forthcoming companion paper.
118
-
119
- The Detect-Group-Promote-Union (DGPU) framework and the CCED2 unknownness
120
- score (the methods that consume these weights) are subject to patent
121
- applications filed by Biologging Solutions Inc.; the CC BY 4.0 license on
122
- the released weights does not grant any rights under those patents.
123
-
124
- > **Note:** The source code for using these models is released under the
125
- > **MIT License** at the GitHub repository linked above.
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
  ## Citation
128
 
129
- If you use this model in your research, please cite our paper:
130
-
131
- ```bibtex
132
- @article{noda2026discovery,
133
- title={Discovery and promotion of unknown sounds into operational detection targets for underwater passive acoustic monitoring under false alarm constraints},
134
- author={Noda, Takuji and Koizumi, Takuya},
135
- journal={Scientific Reports},
136
- note={Revision, in review},
137
- year={2026}
138
- }
139
- ```
140
-
141
- ## Change log
142
-
143
- ### 2026-05-09 follow-up: window-aware extraction (no weight changes)
144
-
145
- A latent bug in the embedding-extraction script (`SegDataset.__getitem__`
146
- ignored `center_sec`, returning per-file constant embeddings) was discovered
147
- and fixed on 2026-05-08. The fix affects only the **extraction code** in the
148
- GitHub repository — **encoder weights in this repository are byte-identical
149
- before and after the fix** (the bug occurred downstream of the encoder
150
- forward pass). All current-revision result tables (Tables 2/3/4 and Fig 3)
151
- were re-computed with the corrected window-aware extractor; updated paper
152
- artifacts are tracked under
153
- [`paper_artifacts/winaware_2026-05-09/`](https://github.com/alohajazz/openworld-soundscape-cced2-dgpu/tree/main/paper_artifacts/winaware_2026-05-09)
154
- and
155
- [`paper_artifacts/supp_table_s3_winaware_2026-05-09/`](https://github.com/alohajazz/openworld-soundscape-cced2-dgpu/tree/main/paper_artifacts/supp_table_s3_winaware_2026-05-09).
156
- The HICEAS evaluation set was also reduced from 10 species to 7 to enforce
157
- strict 0–8 kHz in-band consistency (Nyquist of the 16-kHz BEATs input);
158
- species whose dominant call energy lies above 8 kHz are listed in the
159
- GitHub `REVISION2.md`. SHA-256 fingerprints of
160
- `beats_dapt_mam_step120000.pt` and `sed_head_56_fulldata_ep8.pt` are
161
- unchanged from the current revision listed in the table above.
162
-
163
- ### Current revision (May 2026)
164
- - DAPT method changed from SimCLR/InfoNCE to Masked Audio Modeling (MAM)
165
- with k-means k=1024 tokeniser; precision changed from AMP fp16 to bfloat16
166
- (corrects the original numerical instability that prevented weight updates)
167
- - DAPT corpus expanded from ~4,400 h to 5,673 h
168
- - New canonical weights uploaded: `beats_dapt_mam_step120000.pt`,
169
- `sed_head_56_fulldata_ep8.pt`
170
- - Legacy buggy weights (`beats_dapt_topup_encoder.pt`,
171
- `sed_head_56_topup_ep8.pt`) **removed** — they were byte-identical to
172
- Microsoft BEATs AS-2M PRETRAIN due to the AMP fp16 weight-update failure
173
- and provided no information beyond the publicly available PRETRAIN weights
174
-
175
- ### Original release (December 2025)
176
- - SimCLR/InfoNCE DAPT on ~4,400-h World-DAPT corpus
177
- - Note: the encoder weights were inadvertently equivalent to PRETRAIN due to
178
- an AMP fp16 numerical instability discovered in April 2026
179
-
180
- ## Acknowledgements
181
-
182
- The base model architecture is based on BEATs (Microsoft). We acknowledge
183
- the creators of the BEATs model and the various open-source ocean acoustic
184
- datasets (NOAA SanctSound, US Navy USWTR, NOAA NRS/ONMS, ICListen / ONC,
185
- NPS Glacier Bay, PALAOA Ekström Ice Shelf) used for DAPT.
 
7
  - self-supervised-learning
8
  - beats
9
  - masked-audio-modeling
 
 
10
  language:
11
  - en
12
  metrics:
 
15
  pipeline_tag: audio-classification
16
  ---
17
 
18
+ # OceanBEATs — corrected September 2026 models
19
+
20
+ OceanBEATs adapts [BEATs](https://github.com/microsoft/unilm/tree/master/beats)
21
+ to underwater acoustic recordings using domain-adaptive pretraining (DAPT).
22
+ The corrected encoder and matching 56-class SED head below are the model pair
23
+ used for the September 2026 minor revision of Noda et al., *Scientific Reports*
24
+ (revision in review).
25
+
26
+ ## Corrected model pair
27
+
28
+ | File | Bytes | SHA-256 |
29
+ |---|---:|---|
30
+ | `BEATs_DAPT_MAM_fixed_step127641.pt` | 361345049 | `2a2d1d93f53ec29227bdd52da087fd0abcf0ce797c3c4a8629cd1435a314a6f9` |
31
+ | `sed_head_fixed_s42_ep7.pt` | 17963283 | `9b2b202ab3e52b0d1efe4cd3479ee479db7646b0f42ab5b0e32f1e3ca551f119` |
32
+
33
+ Use these two files together. The encoder contains `cfg` and a `model`
34
+ state dictionary; the head contains a `head` state dictionary, the ordered
35
+ 56-class `labels`, and training `hparams`. The files are PyTorch checkpoints,
36
+ not a Transformers `from_pretrained` bundle. Only load checkpoints from a
37
+ trusted source and verify their hashes before loading.
38
+
39
+ The head configuration retains generic original training/validation and log
40
+ path strings for provenance; the referenced CSV contents are not included.
41
+ No raw audio or individual reference embeddings are distributed in this pair.
42
+
43
+ ## Training and evaluation identity
44
+
45
+ - BEATs AS-2M (iter3+) initialisation; 16 kHz mono input.
46
+ - World-DAPT: 2,042,268 non-overlapping 10-s windows (approximately 5,673 h).
47
+ - Frozen teacher and fixed 1,024-cluster targets; 75% of student patch
48
+ embeddings replaced by a trainable mask token **before** transformer encoding.
49
+ - Cross-entropy on masked positions; AdamW with encoder learning rate 1e-4
50
+ and predictor/mask-token learning rate 1e-3, 5% warm-up then cosine decay,
51
+ and bfloat16 autocast.
52
+ - One shuffled pass, batch size 16, `drop_last=True`: 127,641 optimiser steps;
53
+ the incomplete final batch of 12 windows is unused. No DAPT validation split
54
+ or downstream checkpoint selection was used for this endpoint.
55
+ - Matching supervised head: seed 42, epoch 7. Reported corrected Table 1
56
+ Event/Clip/2-s-segment F1 is 0.493/0.749/0.518; these are frozen aggregate
57
+ results, not an evaluation on a publicly reproducible 56-class dataset.
58
+
59
+ The retained BEATs+DAPT analyses use corrected window-aware extraction:
60
+ `start_sec` when supplied, otherwise `max(0, center_sec - 5)`, with boundary
61
+ padding as needed. Reusing a legacy extractor can change results even when
62
+ the correct checkpoint is loaded.
63
+
64
+ ## Version history — do not substitute legacy files
65
+
66
+ - December 2025 SimCLR-style DAPT was invalid because AMP fp16 prevented
67
+ encoder updates. That analysis is superseded.
68
+ - May 2026 step-120,000 MAM is also superseded: masking was applied after
69
+ unmasked audio passed through the encoder, rather than before transformer
70
+ encoding. It does not implement the stated masked-input objective.
71
+ - September 2026 step-127,641 uses the corrected input-mask implementation.
72
+
73
+ The two May files remain available unchanged for historical provenance:
74
+
75
+ | Legacy file | SHA-256 |
76
  |---|---|
77
+ | `beats_dapt_mam_step120000.pt` | `0fe9f7dd92780c2e564f1df06a192482dbcb9a56bdab4202f4d94862b9168f89` |
78
+ | `sed_head_56_fulldata_ep8.pt` | `135d11738a6619a57769955468ce5cb6eee3f07044fa45e6c950bf25ac4f8f60` |
79
 
80
+ Neither is a substitute for the corrected pair. The original model-card
81
+ history remains available at repository revision
82
+ `dbb29a3dfc4fe1605c9fdd87079723db12903849`; its May-era numerical and
83
+ availability claims are not the current minor-revision record.
84
 
85
+ ## Download and code
86
 
87
+ The corrected pair is fixed by tag `v3.0.3-sr-minor-2026-09-13`:
 
 
88
 
89
  ```python
90
  from huggingface_hub import hf_hub_download
91
 
92
+ for name in ["BEATs_DAPT_MAM_fixed_step127641.pt", "sed_head_fixed_s42_ep7.pt"]:
93
+ path = hf_hub_download(
94
+ repo_id="BiologgingSolutions/OceanBEATs",
95
+ revision="v3.0.3-sr-minor-2026-09-13",
96
+ filename=name,
97
+ local_dir="weights",
98
+ )
99
+ print(path)
 
 
 
100
  ```
101
 
102
+ Check each downloaded file with `shasum -a 256` against the table above.
103
+ The [corrected code and aggregate-results release](https://github.com/alohajazz/openworld-soundscape-cced2-dgpu/releases/tag/v3.0.3-sr-minor-2026-09-13)
104
+ is GitHub commit `fe3cc9f1a696e6814329120fdf0a64bc6327ed5c`.
105
+ Its [artifact map](https://github.com/alohajazz/openworld-soundscape-cced2-dgpu/blob/fe3cc9f1a696e6814329120fdf0a64bc6327ed5c/MANUSCRIPT_ARTIFACT_MAP.md)
106
+ defines the verification and full-rerun boundaries. That GitHub release
107
+ predates this model upload; its statement that corrected weights were not yet
108
+ public describes the release-time state. This model revision supplies the
109
+ two matching files, but does not remove the remaining data limitations.
110
+
111
+ ## Data and reproducibility limits
112
+
113
+ The internal 56-class audio, clip-level metadata and split membership remain
114
+ non-public because of sensitive location/operational information and the
115
+ permissions of the original collaborating organisations. The complete label
116
+ taxonomy and aggregate statistics are reported in the manuscript materials;
117
+ exact retraining and Table 1 evaluation cannot be reproduced publicly.
118
+
119
+ The corrected fitted CCED2 kNN reference contains individual restricted
120
+ reference embeddings and is not distributed. This model pair does not supply
121
+ the fitted CCED2 reference models, all evaluation embeddings, or window-level
122
+ score arrays. Public aggregate checks are not equivalent to complete raw-data
123
+ reproduction. Results are research diagnostics, not validated deployment
124
+ performance or evidence that the complete DGPU loop caused the Promoter gain.
125
+
126
+ ## Licence and acknowledgement
127
+
128
+ The model weights retain CC BY 4.0, including commercial use with attribution;
129
+ the companion source code is MIT-licensed. The DGPU framework and CCED2 score
130
+ are subject to patent applications filed by Biologging Solutions Inc.; these
131
+ copyright licences do not grant patent rights.
132
+
133
+ We acknowledge Microsoft BEATs and the World-DAPT source collections: NOAA
134
+ SanctSound, US Navy USWTR, NOAA NRS/ONMS, ICListen / ONC, NPS Glacier Bay, and
135
+ PALAOA Ekström Ice Shelf.
136
 
137
  ## Citation
138
 
139
+ Noda, T. and Koizumi, T. An unknownness-aware candidate-surfacing and promotion
140
+ framework for underwater passive acoustic monitoring under false-alarm
141
+ constraints. *Scientific Reports* (revision in review, 2026).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
corrected_models_20260913.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repository": "BiologgingSolutions/OceanBEATs",
3
+ "tag": "v3.0.3-sr-minor-2026-09-13",
4
+ "previous_revision": "dbb29a3dfc4fe1605c9fdd87079723db12903849",
5
+ "github_code_release": "https://github.com/alohajazz/openworld-soundscape-cced2-dgpu/releases/tag/v3.0.3-sr-minor-2026-09-13",
6
+ "github_code_commit": "fe3cc9f1a696e6814329120fdf0a64bc6327ed5c",
7
+ "files": {
8
+ "BEATs_DAPT_MAM_fixed_step127641.pt": {
9
+ "bytes": 361345049,
10
+ "sha256": "2a2d1d93f53ec29227bdd52da087fd0abcf0ce797c3c4a8629cd1435a314a6f9"
11
+ },
12
+ "sed_head_fixed_s42_ep7.pt": {
13
+ "bytes": 17963283,
14
+ "sha256": "9b2b202ab3e52b0d1efe4cd3479ee479db7646b0f42ab5b0e32f1e3ca551f119"
15
+ }
16
+ },
17
+ "legacy_models_preserved": ["beats_dapt_mam_step120000.pt", "sed_head_56_fulldata_ep8.pt"],
18
+ "restricted_reference_embeddings_included": false,
19
+ "raw_audio_included": false,
20
+ "full_public_retraining_or_evaluation_claimed": false
21
+ }
sed_head_fixed_s42_ep7.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b2b202ab3e52b0d1efe4cd3479ee479db7646b0f42ab5b0e32f1e3ca551f119
3
+ size 17963283