SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.06309 · 2021

Exploring Wav2vec 2.0 fine-tuning for improved speech emotion recognition

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2110.06309.json · badge: /api/ran/2110.06309.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
b04901014/FT-w2v2-ser canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
RandomBucketSampler Ran
ran on a synthesized input
b04901014/FT-w2v2-ser/pretrain/dataloader.py
code served (permissive licence) · get_code("89eb1c45a5dc8589")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned SingleRandomBucketSampler. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import random

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

# Create a small dataset with length information
# length should be an array-like of sequence lengths for each sample
num_samples = 10
length = np.array([100, 200, 150, 300, 250, 120, 180, 220, 160, 140], dtype=np.int32)

ARGS = {
    'nbuckets': 2,
    'length': length,
    'batch_size': 64,
    'drop_last': False,
    'distributed': False,
    'world_size': None,
    'rank': None,
    'dynamic_batch': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SingleRandomBucketSampler — a SingleRandomBucketSampler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SingleRandomBucketSampler output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
StandardSampler Ran
ran on a synthesized input
b04901014/FT-w2v2-ser/pretrain/dataloader.py
code served (permissive licence) · get_code("4991a053c117f1d4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned RandomSampler. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch.utils import data

torch.manual_seed(0)

# Create a minimal dataset
class DummyDataset(data.Dataset):
    def __init__(self, size=4):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        return torch.randn(4), idx

dataset = DummyDataset(size=4)

ARGS = {
    'dataset': dataset,
    'shuffle': True,
    'distributed': False,
    'world_size': None,
    'rank': None,
    'dynamic_batch': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RandomSampler — a RandomSampler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RandomSampler output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
eval_kmeans Ran
ran on a synthesized input
b04901014/FT-w2v2-ser/cluster.py
code served (permissive licence) · get_code("afff10ffa9f79fa6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import faiss

# Create a small standalone index class that mimics faiss index behavior
class MockFaissIndex:
    def __init__(self, vectors):
        """
        vectors: numpy array of shape (n_clusters, dim) representing cluster centers
        """
        self.vectors = np.ascontiguousarray(vectors.astype(np.float32))
        
    def search(self, seq, k):
        """
        Mimic faiss index.search() which returns (distances, indices)
        seq: query vectors of shape (n_queries, dim)
        k: number of nearest neighbors
        Returns: (distances, indices) where indices shape is (n_queries, k)
        """
        # Simple L2 distance based nearest neighbor search
        distances = []
        indices = []
        for query in seq:
            dists = np.linalg.norm(self.vectors - query, axis=1)
            nearest_idx = np.argsort(dists)[:k]
            indices.append(nearest_idx)
            distances.append(dists[nearest_idx])
        return np.array(distances), np.array(indices)

# Create a small sequence to query (batch size 2, dimension 4)
seq = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [2.0, 3.0, 4.0, 5.0]
], dtype=np.float32)

# Create mock cluster centers (3 clusters, dimension 4)
cluster_centers = np.array([
    [1.1, 2.1, 3.1, 4.1],
    [2.1, 3.1, 4.1, 5.1],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float32)

# Create the faiss-like index
index = MockFaissIndex(cluster_centers)

ARGS = {
    "seq": seq,
    "index": index
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
multilabel2vec Ran
ran on a synthesized input
b04901014/FT-w2v2-ser/utils/helper_funcs.py
code served (permissive licence) · get_code("380f5345d4f504c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct valid arguments for multilabel2vec
labels = {
    'label_a': 2.0,
    'label_b': 3.0,
    'label_c': 5.0
}

labeldict = {
    'label_a': 0,
    'label_b': 1,
    'label_c': 2,
    'label_d': 3
}

ARGS = {
    'labels': labels,
    'labeldict': labeldict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
prepare_mask Ran
ran on a synthesized input
b04901014/FT-w2v2-ser/modules/FeatureFuser.py
code served (permissive licence) · get_code("43dd2f576a5240b7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyze the function:
# - length: used as an index (length - 1), so needs to be an int
# - shape: passed to torch.zeros(), so needs to be a tuple/list of ints
# - dtype: passed to torch.zeros(), so needs to be a torch dtype
# - device: passed to torch.zeros() and torch.arange(), so needs to be a torch device

# The function creates a mask of given shape, sets one position per batch based on length,
# then flips and cumsum to create a causal mask pattern.
# For a 2D operation with batch dimension, shape should be (batch_size, seq_len)

length = torch.tensor([3, 2], dtype=torch.long)  # batch size 2
shape = (2, 4)  # batch_size=2, seq_len=4
dtype = torch.float32
device = torch.device('cpu')

ARGS = {
    'length': length,
    'shape': shape,
    'dtype': dtype,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tonumpy Ran
ran, honoured the contract we drafted
b04901014/FT-w2v2-ser/utils/helper_funcs.py
code served (permissive licence) · get_code("ca8d4b1715a4e662")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function tonumpy takes a tensor x and converts it to a numpy array
# It calls .detach(), .cpu(), and .numpy() on the input
# So x must be a torch tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
train_kmeans Not yet run
unverified (harvested, no recorded run)
b04901014/FT-w2v2-ser/cluster.py
code served (permissive licence) · get_code("15363f2d4c3c84df")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
tonumpy 2 other papers
2 dated earlier · 1 only as an assembly brick
1707.06347 (2017-07)
Proximal Policy Optimization Algorithms
1810.12894 (2018-10)
Exploration by Random Network Distillation
prepare_mask 1 other paper
1 the same month
2110.06306 (2021-10)
Fine-grained style control in Transformer-based Text-to-speech Synthesis

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

While Wav2Vec 2.0 has been proposed for speech recognition (ASR), it can also be used for speech emotion recognition (SER); its performance can be significantly improved using different fine-tuning strategies. Two baseline methods, vanilla fine-tuning (V-FT) and task adaptive pretraining (TAPT) are first presented. We show that V-FT is able to outperform state-of-the-art models on the IEMOCAP dataset. TAPT, an existing NLP fine-tuning strategy, further improves the performance on SER. We also introduce a novel fine-tuning method termed P-TAPT, which modifies the TAPT objective to learn contextualized emotion representations. Experiments show that P-TAPT performs better than TAPT, especially under low-resource settings. Compared to prior works in this literature, our top-line system achieved a 7.4\% absolute improvement in unweighted accuracy (UA) over the state-of-the-art performance on IEMOCAP. Our code is publicly available.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2110.06309")
get_code_for_paper("2110.06309")
have("2110.06309")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2110.06309.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2110.06309.svg)](https://syntology.ai/paper/2110.06309)

Connect an agent — have() is free.