audio-and-signallisted
Install: claude install-skill TranBaDat2607/claude-code-kaggle-grandmaster
# Audio & Signal Playbook
## 1. Representations
- **Mel spectrograms** (log-mel, 128 mels, hop chosen so the event of interest spans enough
frames) fed to ImageNet-pretrained CNNs (EfficientNet, NFNet, ConvNeXt, eca_nfnet) — the
default winner for bioacoustics. Normalise per-sample or per-dataset; try PCEN.
- **Raw waveform** 1D CNNs / wav2vec2 / BEATs / audio transformers (AST, PaSST) for diversity.
- Compute: decode audio once at the model's sample rate (npy cache) and compute the spectrogram on the GPU inside
the model (torchaudio, as HMS 3rd did). See `compute-efficiency` (`references/audio-and-signal.md`).
- **Biosignals (EEG/ECG)**: spectrograms per channel/bipolar montage stacked as image tiles,
or 1D CNN/GRU/transformer on raw signals with band-pass filtering; also domain features
(band powers, HRV) for GBDT stackers.
## 2. Labels & training
- Weak/clip-level labels with short events: random crops of 5–10s, attention/SED heads
(frame-wise predictions + attention pooling), BCE (multilabel) rather than softmax.
- Secondary labels (other species present) → soft targets (e.g. 0.3–0.5).
- Label noise: knowledge distillation from an ensemble, pseudo-label unlabelled soundscapes,
loss truncation.
- Class imbalance: sample weighting by class frequency^-0.5, upsampling rare classes, focal BCE.
- Augmentations: mixup (very effective for audio, also mixing with background noise/
no-call clips), time/frequency masking (SpecAugment), gain, pitch/time shift, ran