RC-Attention Source Code
Description
This dataset provides the source code used to train and evaluate the RC-Attention architecture described in the manuscript "A Lightweight Reservoir Computing Approach with Multi-Scale Attention for Robust Speaker Verification" (Silva, L. and Cataldo, E.), submitted to Pattern Recognition Letters. The RC-Attention architecture combines a temporal encoder with multi-scale, multi-head attention pooling to produce compact speaker embeddings for text-independent speaker verification. The code supports three interchangeable temporal encoders, corresponding to the ablation study reported in the paper: - a fixed, non-trainable Reservoir Computing (RC) layer (the proposed lightweight model); - a fully trainable Gated Recurrent Unit (GRU); - a fully trainable Long Short-Term Memory (LSTM) network. The three configurations share an identical architecture, training procedure, and evaluation pipeline, differing only in the temporal encoder, so that they can be directly and fairly compared. The encoder is selected via a single configuration constant (ENCODER_TYPE) at the top of the script. Contents: RC_attMSP_Voxceleb1_clean.py — a single Python script that (i) extracts log-Mel spectrogram features from VoxCeleb1 audio, (ii) trains the RC-Attention model using the Additive Margin Softmax loss, (iii) reports closed-set diagnostics (retrieval accuracy, Equal Error Rate, t-SNE visualization), and (iv) profiles the computational efficiency of the trained model (trainable/total parameter count, GFLOPs per utterance via thop, and inference latency), matching the metrics reported in the paper's ablation and computational-efficiency tables. Data availability: This dataset contains source code only. The VoxCeleb1 audio corpus is not included and must be obtained separately from its official distributors (https://www.robots.ox.ac.uk/~vgg/data/voxceleb/), subject to their own terms of use. Software requirements: Python 3.x, PyTorch, librosa, soundfile, scikit-learn, pandas, matplotlib, and thop.
Files
Institutions
- Universidade Federal FluminenseRio de Janeiro, Niterói