Download implementation-notes.md from lab260/AASIST3: direct link, hf CLI and curl.
- Browser
- Download file 3.3 kB
-
https://huggingface.co/lab260/AASIST3/resolve/main/implementation-notes.md
- Command line
-
hf download hf://lab260/AASIST3/implementation-notes.md
-
curl -L -o implementation-notes.md https://huggingface.co/lab260/AASIST3/resolve/main/implementation-notes.md
AASIST3 — implementation notes
Wrapper for the Speech Anti-Spoofing Arena. Source: https://github.com/mtuciru/AASIST3, weights: https://huggingface.co/lab260/AASIST3.
Key decisions / gotchas
Score direction =
output[:, 1](class 1 = bona fide). The HF model-card "Quick Start" snippet claimsprediction 0 = bonafide, but that is generic boilerplate that contradicts the actual source pipeline:datasets/generic.pymapsbonafide → 1, spoof → 0, andutils/validation.py::compute_scorestakesoutputs[:, 1]as the score (withcompute_antispoofing_metricstreatinglabel == 1as genuine). Verified empirically — ASVspoof2019_LA gives EER 9.44 %, not ~90 % (which an inverted sign would give).Self-contained checkpoint.
model.safetensors(~1.29 GB) bundles the XLS-R-53 SSL encoder weights.from_pretrained("lab260/AASIST3")readsconfig.json(load_pretrained: false), builds the wav2vec2 architecture from thefacebook/wav2vec2-large-xlsr-53config, then overwrites every weight from the safetensors. No separate base checkpoint download (unlike W2V2-AASIST'sxlsr2_300m.pt).transformers 5.3.0 loads the 4.52.4-era checkpoint cleanly — no key remap needed. (Source pinned
transformers==4.52.4.)Preemphasis (0.97). The source eval pipeline applies
torchaudio.functional.preemphasisto the full waveform before windowing; the wrapper replicates it (preemphasis()inaasist3.py) so scores match the training/eval preprocessing.Fixed 64,600-sample window. The model's
pos_S(42) /pos_T(67) positional embeddings are sized for exactly 64,600 input samples, so the window is not optional. Deterministic first-64,600 (tile-repeat if shorter); no random crop.Device-agnostic. KAN/GAT/HS-GAL use
device=x.device/torch.zeros_like, so a plain.to(device)inload()is enough — no internal device hard-coding.batch_size = 16. Throughput plateaus ~38–39 utt/s for bs ≥ 8 on one RTX 4070 Ti SUPER; 16 chosen (within ~1.3 % of peak, lower memory).
Submission specifics (non-standard for this run)
Scores hosted in
lab260/AASIST3, not a newSpeechAntiSpoofingBenchmarks/<Model>repo (per user instruction). The default org-scoped fine-grained token cannot write or even open a PR cross-org, so a separate lab260-scoped token was used to commit scores directly tolab260/AASIST3main; dataset-repo submission PRs use the original org-scoped token. See memoryreference_external_modelrepo_submit.ASVspoof2021_DF verify-pr was CI-flaky. The first two
verify-hf-prruns failed at ~200 s on the 611 k-trial label stream (infra, no verdict posted) — the documented un-retried-stream residual; only DF (3.4× the next-largest dataset) was affected. A third re-dispatch (plus thesweep-pending-verificationsbackstop) passed green. The artifact was always correct (sha exact;reproduce --scoring --no-localΔ0.0).Backlinks + cumulative README/model-card badges were batched at the end (one model-repo commit; the tier/rank badge reflects final 5/5 coverage) rather than per-dataset.
genbacklink.pyoutput verified byte-identical to the post-merge-badge comment'sresult.yaml.