Downloads · 30 days
0
EarthSpeciesProject/esp-aves2-sed-birdcode-ablation-ssl-beats-clip-pseudo-encoder
esp-aves2-sed-birdcode-ablation-ssl-beats-clip-pseudo-encoder is a machine learning model from EarthSpeciesProject. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-sa-4.0.
Encoder only. This repository contains the 32KHz BEATs backbone from the sed-birdcode-ablation-sslbeatsclippseudo run. The classification head from that run is not included, and there is no labelmap.json. See Relation…
Downloads · 30 days
0
Access
Public
Updated Aug 25, 2026
Repo size
362 MB
Likes
0
Public
Click a slice to open those files.
.safetensors362 MB · 100%
From the Hugging Face model README
Encoder only. This repository contains the 32KHz BEATs backbone from the
sed-birdcode-ablation-ssl_beats_clip_pseudorun. The classification head from that run is not included, and there is nolabel_map.json. See Relationship to the source checkpoint.
from avex import load_model
backbone = load_model("esp_aves2_sed_birdcode_beats_encoder", device="cuda")
"esp_aves2_sed_birdcode_beats_encoder" is the official name (as per yaml file name based ontology)
esp-aves2-sed-birdcode-ablation-ssl-beats-clip-pseudo-encoder is an audio representation learning model (bioacoustic encoder) that produces frame-level embeddings for downstream bioacoustic tasks such as species classification and detection, individual identification, and vocal repertoire discovery.
It is the encoder from an ablation in a sound event detection (SED) line of work: a BEATs SSL backbone post-trained with clip-level pseudo-labels over a 7,475-taxon label space. Only the encoder is published here.
https://www.earthspecies.org/about-us#supporthttps://github.com/earthspecies/avexTBAhttps://github.com/microsoft/unilm/tree/master/beatsThis model does not use the AVEX defaults. Two settings are easy to conflate and both matter:
| Setting | Value | What it is |
|---|---|---|
audio_config.sample_rate | 32000 | the rate audio must be delivered at |
audio_config.target_length_seconds | 5.0 | clip length (160,000 samples) |
init_config.sample_frequency | 16000 | a parameter of the fbank extractor — do not change |
sample_frequency is not a declaration of the incoming audio's rate. It fixes
the analysis window (25 ms x 16000 = 400 samples), the hop (160 samples), and
the mel filterbank (257 FFT bins x 128 mels). All three are frozen in this
checkpoint as the buffers backbone.fbank.window (400,) and
backbone.fbank.mel_fb (257, 128). Setting it to 32000 rebuilds them at
(800,) and (513, 128), and the checkpoint then fails to load with a
size mismatch on both.
Consequence of 32 kHz audio through a 16 kHz fbank: each window spans 12.5 ms of real time, the hop is 5 ms, and content at true frequency f is analysed at f/2. So 5.0 s yields 998 frames (the count a 10 s clip gives at 16 kHz), and bird song at 2-8 kHz lands at 1-4 kHz. The encoder was trained on exactly these features.
Two distinct failure modes to avoid:
sample_frequency to 32000 — will not load at all.5.0 s at 32 kHz produces 496 tokens (62 time patches x 8 frequency patches) of dimension 768.
Feature extraction for bioacoustic tasks: species classification and detection, repertoire and individual classification, retrieval and clustering.
Linear probing, retrieval, and clustering; can also be fine-tuned for task- and domain-specific bioacoustic applications.
This is an encoder with no classification head. It produces no class predictions and no text output. Using it as a stand-alone classifier without training a probe is out of scope.
Use as an encoder (feature extractor) and validate performance on your target domain. For sensitive deployments, apply access controls and follow conservation best practices.
Loading this model requires the AVEX (Animal Vocalization Encoder) library
avex to be installed.
pip install avex
Or with uv:
uv add avex
This repository has no packaged config name in avex, so load it by
checkpoint_path. AVEX resolves hf:// URIs directly:
import torch
from avex import load_model
from avex.configs import AudioConfig, ModelSpec
REPO = "EarthSpeciesProject/esp-aves2-sed-birdcode-ablation-ssl-beats-clip-pseudo-encoder"
CKPT = f"hf://{REPO}/esp-aves2-sed-birdcode-ablation-ssl-beats-clip-pseudo-encoder.safetensors"
spec = ModelSpec(
name="beats",
pretrained=False,
device="cuda",
# See train_config.yaml for the full init_config; sample_frequency stays 16000.
audio_config=AudioConfig(
sample_rate=32000,
representation="raw",
normalize=False,
target_length_seconds=5,
),
)
backbone = load_model(spec, device="cuda", checkpoint_path=CKPT, return_features_only=True)
Expect 252/252 params matched, 0 unexpected in the load log. load_model
detects that the checkpoint has no classifier and selects embedding mode
automatically, so return_features_only=True is optional.
# audio_tensor: (batch, 160000) float waveform at 32 kHz (5.0 s)
with torch.no_grad():
tokens = backbone(audio_tensor)
# Shape: (batch, 496, 768) -- 62 time patches x 8 frequency patches
# Fixed-size embedding
embedding = tokens.mean(dim=1) # (batch, 768)
Tokens are flattened time-major: index t * 8 + f. To keep the frequency
structure, regroup before pooling:
b, n, d = tokens.shape
freq_concat = tokens.reshape(b, n // 8, 8, d).mean(1).reshape(b, -1) # (batch, 6144)
This (batch, 6144) readout is the representation the source run's discarded
head consumed, so it is a good starting point for downstream probes. Note it is
not one of AVEX's built-in aggregation modes ("mean" / "max" /
"cls_token" / "none" all collapse time and frequency together into 768).
from avex.configs import ProbeConfig
from avex.models.probes import build_probe_from_config
probe_config = ProbeConfig(
probe_type="linear",
target_layers=["last_layer"],
aggregation="mean",
freeze_backbone=True,
online_training=True,
)
probe = build_probe_from_config(
probe_config=probe_config,
base_model=backbone,
num_classes=10, # your number of classes
device="cuda",
)
Not applicable. This is an encoder-only release with no classification head, so
no label_map.json is provided.
The source run sed-birdcode-ablation-ssl_beats_clip_pseudo stored its
backbone under an encoder._model.backbone.* prefix and carried a
Linear(6144, 7475) head as top-level classifier.{weight,bias}. Publishing
this encoder involved exactly two changes, both lossless for the backbone:
encoder._model.backbone.* -> backbone.*, matching
avex.models.beats_model.Model.Backbone weights are bitwise identical to the source checkpoint; verified
by a strict=True load and by comparing forward-pass outputs.
The dropped head was a frame-level SED classifier over the 8 concatenated
frequency patches (6144 = 8 x 768), applied per time patch and pooled over
time. It is not published here and is not required to use these embeddings.
TBA — the pseudo-label source and dataset composition for this ablation are
not recorded in the artifacts used to build this repository. The label space
was 7,475 taxa spanning birds, insects, and amphibians.
TBA
clip_pseudo), as one arm of a SED ablation study.TBATBA — see train_config.yaml for the inference-time model
configuration. That file is a model spec for loading, not a full training
config, so it does not record optimizer or schedule settings.
TBA — this is an ablation checkpoint and has not been evaluated on the
ESP-AVES2 benchmark suite. Do not assume parity with released ESP-AVES2 models.
For reference, the sibling released model esp-aves2-sl-beats-all carries full BEANS / BirdSet / Individual ID / Vocal Repertoire results.
TBA
TBA
TBA
BEATs transformer encoder, 12 layers, 768-dimensional, deep_norm=True, no
label predictor. 252 weight tensors.
Key components:
(batch, 496, 768) for a 5.0 s clip at 32 kHzTBA
Model configuration is available in train_config.yaml.
TBA — no publication is associated with this ablation checkpoint. For the
ESP-AVES2 model family, cite:
@inproceedings{miron2025matters,
title={What Matters for Bioacoustic Encoding},
author={Miron, Marius and Robinson, David and Alizadeh, Milad and Gilsenan-McMahon, Ellen and Narula, Gagan and Chemla, Emmanuel and Cusimano, Maddie and Effenberger, Felix and Hagiwara, Masato and Hoffman, Benjamin and Keen, Sara and Kim, Diane and Lawton, Jane K. and Liu, Jen-Yu and Raskin, Aza and Pietquin, Olivier and Geist, Matthieu},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026}
}
TBATBAhttps://github.com/earthspecies/avex/issuesContact: [email protected]