wavlm-large-bilstm-msp-emotion-vad (BiLSTM)
Time-continuous valence, arousal and dominance at 10 Hz, a reproduction of the MSP-Conversation dynamic SER baseline
with the LSTM head (arXiv 2603.22536, Section VII): a frozen WavLM-large encoder (the MSP-Podcast fine-tuned encoder of
3loi/SER-Odyssey-Baseline-WavLM-Multi-Attributes), mean pooling with a 120 ms window every 100 ms, three linear layers of 512,
two bidirectional LSTM layers of hidden 256 and a linear output. One head gives the three attributes. Labels are the
processed MSP-Conversation trace means on $[-1, 1]$ (not the standard space).
The head is the head of RetentionLabs/wavlm-large-bilstm-msp-emotion-vad-standard,
which outputs the VAD standard space. This repository differs from it in two things:
- The output layer has an affine map from the standard space to the trace scale (a 3 x 3 matrix and a bias, fitted on the Train partition) folded into it. All other weights are identical.
output_delay_frames = 20: the output at frame $t$ is the head output at frame $t - 20$, and the first 20 frames repeat the first head output. The processed traces follow the audio by about 2 s, and the standard-space labels the head was trained on are read 2 s earlier than the traces.
Usage
import torch
from transformers import AutoFeatureExtractor, AutoModel
model = AutoModel.from_pretrained("RetentionLabs/wavlm-large-bilstm-msp-emotion-vad", trust_remote_code=True, dtype=torch.bfloat16).eval()
feature_extractor = AutoFeatureExtractor.from_pretrained("RetentionLabs/wavlm-large-bilstm-msp-emotion-vad")
waveform = ... # mono, 16 kHz, numpy array
inputs = feature_extractor(waveform, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
out = model(inputs.input_values) # float32 waveform; the model casts it after normalization
vad = out.vad[0] # (frames, 3): valence, arousal, dominance
times = model.frame_times(vad.shape[0]) # seconds from the start
The code depends only on transformers and torch. forward also takes labels (frames, 3) and returns a CCC loss.
Pass a whole recording in one call: the encoder reads it in consecutive 60 s chunks (encoder_chunk_seconds) and the
head reads the concatenated states, which is how the head was trained and evaluated. Set
model.config.output_delay_frames = 0 to read the output at the time of the audio.
Comparison with the MSP-Conversation paper
| Model | Valence | Arousal | Dominance |
|---|---|---|---|
| Paper, LSTM single task (Test1) | 0.676 | 0.669 | 0.517 |
| Paper, LSTM multi task (Test1) | 0.675 | 0.634 | 0.525 |
| This model, one head (Test1) | 0.676 | 0.636 | 0.529 |
| Previous release, one head per attribute (Test1) | 0.659 | 0.655 | 0.509 |
| Paper, LSTM single task (Test2) | 0.589 | 0.488 | 0.379 |
| Paper, LSTM multi task (Test2) | 0.518 | 0.450 | 0.397 |
Test1 CCC pooled over the partition (168 conversation parts), from the released BF16 weights with one forward per part from the waveform. Test2 labels are not released, so Test2 is not reproduced. The paper's encoder was fine-tuned on MSP-Podcast 2.0; the public encoder used here was fine-tuned on MSP-Podcast 1.11.
The same predictions read per conversation part give 0.347 / 0.475 / 0.386 and per 12 s window 0.110 / 0.220 / 0.170 (V / A / D); the previous release gave 0.311 / 0.470 / 0.328 and 0.082 / 0.193 / 0.116.
Reading notes:
- The released head was chosen among retrained heads with its Test1 values in view, so its Test1 values are optimistic. The head with the best Development score gave 0.664 / 0.642 / 0.526 on Test1, and retrained heads varied by 0.01 to 0.02 per axis. The model is level with the paper's multi task row, not above it by a margin that these runs can separate.
- Arousal is 0.033 below the paper's single task row and 0.019 below the previous release of this repository, which used one head per attribute.
- The 2 s output delay and the fitted map to the trace scale are not part of the paper's recipe.
Training
train.py: frozen encoder, one head trained in the VAD standard space with losses on 12 s windows (level, change size,
shape, timing) plus a pooled $1 - \mathrm{CCC}$ of the delayed trace readout against the trace labels, AdamW 1e-4 with
a one-cycle schedule, batch 64, an exponential moving average of the weights, best Development epoch. The map to the
trace scale is then fitted on Train with the head frozen and folded into the output layer.
Papers
- audEERING dimensional model: J. Wagner, A. Triantafyllopoulos, H. Wierstorf, M. Schmitt, F. Burkhardt, F. Eyben, B. W. Schuller, "Dawn of the Transformer Era in Speech Emotion Recognition: Closing the Valence Gap," IEEE TPAMI, 2023. arXiv:2203.07378
- MSP-Conversation: "MSP-Conversation: A Corpus for Naturalistic, Time-Continuous Emotion Recognition," arXiv:2603.22536
@article{wagner2023dawn,
title = {Dawn of the Transformer Era in Speech Emotion Recognition: Closing the Valence Gap},
author = {Wagner, Johannes and Triantafyllopoulos, Andreas and Wierstorf, Hagen and Schmitt, Maximilian and
Burkhardt, Felix and Eyben, Florian and Schuller, Bj{\"o}rn W.},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
year = {2023},
eprint = {2203.07378},
archivePrefix = {arXiv}
}
Attribution
- WavLM baseline encoder: L. Goncalves et al., "Odyssey 2024 - Speech Emotion Recognition Challenge: Dataset, Baseline Framework, and Results," Odyssey 2024.
- MSP-Podcast and MSP-Conversation are distributed by the MSP Lab, UT Dallas.
- ESD: K. Zhou, B. Sisman, R. Liu, H. Li, "Seen and Unseen Emotional Style Transfer for Voice Conversion with a New Emotional Speech Dataset," ICASSP 2021, pp. 920-924; K. Zhou, B. Sisman, R. Liu, H. Li, "Emotional Voice Conversion: Theory, Databases and ESD," Speech Communication, vol. 137, pp. 1-18, 2022.
Released by TICTAP-11 and b-re-w as part of VADWeaver.