SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.08386 · ICML · 2020

COALA: Co-Aligned Autoencoders for Learning Semantically Enriched Audio Representations

Xavier Favory, Konstantinos Drossos, Tuomas Virtanen, Xavier Serra

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 0 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/2006.08386.json · badge: /api/ran/2006.08386.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
xavierfav/coala marked official in Papers with Code
Papers with Code archive
5 ran · 0 no recorded run
yijerjer/music_genre_classification community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ConvBlock Ran
ran on a synthesized input · constructed an object; no result was computed
yijerjer/music_genre_classification/cnn_models.py
pointer only (licence: NONE) · get_code("a60af54cdf63b14b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yijerjer/music_genre_classification when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

DualAETrainer Ran
ran on a synthesized input · constructed an object; no result was computed
xavierfav/coala/dual_ae_trainer.py
code served (permissive licence) · get_code("ecc9d811b5842de5")
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 an instance of its own class, DualAETrainer: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 import nn
from pathlib import Path
import tempfile
import h5py
import numpy as np

torch.manual_seed(0)

# Create temporary HDF5 files for train and validation datasets
def create_temp_h5_dataset(num_samples=4):
    temp_file = tempfile.NamedTemporaryFile(suffix='.h5', delete=False)
    temp_path = temp_file.name
    temp_file.close()
    
    with h5py.File(temp_path, 'w') as f:
        dataset_group = f.create_group('dataset')
        dataset_group.create_dataset('data', data=np.random.randn(num_samples, 16).astype(np.float32))
        dataset_group.create_dataset('label', data=np.random.randn(num_samples, 8).astype(np.float32))
        dataset_group.create_dataset('id', data=np.arange(num_samples, dtype=np.int32))
    
    return temp_path

# Create temporary id2tag file
def create_temp_id2tag_file():
    temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
    temp_path = temp_file.name
    import json
    json.dump({"0": "tag1", "1": "tag2", "2": "tag3"}, temp_file)
    temp_file.close()
    return temp_path

# Create dummy encoder/decoder models
class AudioEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(16, 8)
    
    def forward(self, x):
        return self.fc(x)

class AudioDecoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(8, 16)
    
    def forward(self, x):
        return self.fc(x)

class TagEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(8, 8)
    
    def forward(self, x):
        return self.fc(x)

class TagDecoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(8, 8)
    
    def forward(self, x):
        return self.fc(x)

# Generate temporary dataset files
train_h5_path = create_temp_h5_dataset(num_samples=4)
val_h5_path = create_temp_h5_dataset(num_samples=2)
id2tag_path = create_temp_id2tag_file()

ARGS = {
    'params': {
        'train_dataset_file': train_h5_path,
        'validation_dataset_file': val_h5_path,
        'audio_loss_weight': 0.5,
        'tag_loss_weight': 0.3,
        'contrastive_loss_weight': 0.2,
        'contrastive_temperature': 1.0,
        'epochs': 2,
        'batch_size': 2,
        'learning_rate': 0.001,
        'device': 'cpu',
        'experiment_name': 'test_experiment',
        'id2tag_file': id2tag_path,
        'log_interval': 1,
        'save_model_every': 1,
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DualAETrainer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DualAETrainer 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
InMemoryDataset Ran
ran on a synthesized input · constructed an object; no result was computed
xavierfav/coala/dual_ae_trainer.py
code served (permissive licence) · get_code("a249acfa9e68f2eb")
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 an instance of its own class, InMemoryDataset: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np
import h5py
import tempfile
import os

# Create a temporary HDF5 file with the expected structure
temp_dir = tempfile.mkdtemp()
h5_path = os.path.join(temp_dir, 'test_dataset.h5')

with h5py.File(h5_path, 'w') as f:
    # Create dataset group
    dataset_group = f.create_group('dataset')
    
    # Create data: shape (2, 4) - 2 samples, 4 features
    data = np.random.randn(2, 4).astype(np.float32)
    dataset_group.create_dataset('data', data=data)
    
    # Create label: shape (2,) - 2 labels
    label = np.array([0, 1], dtype=np.int64)
    dataset_group.create_dataset('label', data=label)
    
    # Create id: shape (2,) - 2 ids
    id_data = np.array([100, 101], dtype=np.int32)
    dataset_group.create_dataset('id', data=id_data)

ARGS = {
    'h5_path': h5_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
h5py, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type InMemoryDataset — the run constructed an instance of its own class and did not call it; no shape is 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
contrastive_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xavierfav/coala/dual_ae_trainer.py
code served (permissive licence) · get_code("7567a11b33565b39")
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 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Create small embedding tensors
# z_audio: (batch_size, embedding_dim)
# z_tag: (batch_size, embedding_dim)
# Using batch_size=2 and embedding_dim=4

z_audio = torch.randn(2, 4)
z_tag = torch.randn(2, 4)

# Temperature parameter for scaling
t = 0.5

ARGS = {
    "z_audio": z_audio,
    "z_tag": z_tag,
    "t": t,
}
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 0, dtype family float, shape () — shape () 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
embeddings_to_cosine_similarity_matrix Ran
ran, honoured the contract we drafted
xavierfav/coala/dual_ae_trainer.py
code served (permissive licence) · get_code("99a215366b6ba1c1")
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, 2) 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)

# Create a small tensor of embeddings: shape (n_embeddings, embedding_dim)
# n_embeddings = 2, embedding_dim = 4
z = torch.randn(2, 4)

ARGS = {
    "z": z
}
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, 2) — shape (2, 2) 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
kullback_leibler Ran
ran, honoured the contract we drafted
xavierfav/coala/dual_ae_trainer.py
code served (permissive licence) · get_code("51b431bae9caa13e")
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 0, dtype family float, shape () 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)

# Create small probability distributions (batch_size=2, dim=4)
# These should be valid probability distributions (non-negative, sum to 1)
y_hat = torch.tensor([
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)

y = torch.tensor([
    [0.15, 0.15, 0.35, 0.35],
    [0.1, 0.2, 0.3, 0.4]
], dtype=torch.float32)

ARGS = {
    "y_hat": y_hat,
    "y": y
}
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 0, dtype family float, shape () — shape () 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

Audio representation learning based on deep neural networks (DNNs) emerged as an alternative approach to hand-crafted features. For achieving high performance, DNNs often need a large amount of annotated data which can be difficult and costly to obtain. In this paper, we propose a method for learning audio representations, aligning the learned latent representations of audio and associated tags. Aligning is done by maximizing the agreement of the latent representations of audio and tags, using a contrastive loss. The result is an audio embedding model which reflects acoustic and semantic characteristics of sounds. We evaluate the quality of our embedding model, measuring its performance as a feature extractor on three different tasks (namely, sound event recognition, and music genre and musical instrument classification), and investigate what type of characteristics the model captures. Our results are promising, sometimes in par with the state-of-theart in the considered tasks and the embeddings produced with our method are well correlated with some acoustic descriptors.

For agents

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

get_harvested_code_for_paper("2006.08386")
get_code_for_paper("2006.08386")
have("2006.08386")

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

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

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

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

Connect an agent — have() is free.