SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.00282 · 2024

PAM: Prompting Audio-Language Models for Audio Quality Assessment

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 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/2402.00282.json · badge: /api/ran/2402.00282.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
soham97/pam canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
do_mixup Ran
ran, honoured the contract we drafted
soham97/pam/PAM/models/pytorch_utils.py
code served (permissive licence) · get_code("5337e68cdb46397d")
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, 3) 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 numpy as np

torch.manual_seed(0)

# Construct arguments for do_mixup
# x: (batch_size * 2, ...) - we use batch_size=2, so shape is (4, 3)
# mixup_lambda: (batch_size * 2,) - shape is (4,)

x = torch.randn(4, 3)
mixup_lambda = torch.rand(4)

ARGS = {
    "x": x,
    "mixup_lambda": mixup_lambda,
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
soham97/pam/PAM/models/htsat.py
pointer only (licence: MIT); the stored copy get_code serves, from fudan-zvg/SeaFormer, is pointer only (licence: NONE) · get_code("3ac6b7d76e8e3584")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from fudan-zvg/SeaFormer, and GitHub detected no licence in that repository 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.

evaluate_pam Ran
ran, honoured the contract we drafted
soham97/pam/pcc.py
code served (permissive licence) · get_code("a8d84ccaebb23a2a")
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 tuple, ndim 2, dtype family float; 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 torch
import torch.nn as nn
from torch.utils.data import DataLoader, Dataset

torch.manual_seed(0)

# Define a minimal PAM model that implements the evaluate method
class MinimalPAM(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def evaluate(self, audios, sample_index):
        # Return two lists of scores as expected by the function
        batch_size = audios.shape[0]
        pam_scores = [float(i) for i in range(batch_size)]
        pam_segment_scores = [float(i * 2) for i in range(batch_size)]
        return pam_scores, pam_segment_scores

# Define a minimal dataset
class MinimalAudioDataset(Dataset):
    def __init__(self, num_samples=4):
        self.num_samples = num_samples
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        # Return (_, audios, sample_index) as expected by the dataloader iteration
        dummy_label = 0
        audios = torch.randn(4)  # Small audio feature vector
        sample_index = idx
        return dummy_label, audios, sample_index

# Create dataloader that yields (_, audios, sample_index)
dataset = MinimalAudioDataset(num_samples=4)
dataloader = DataLoader(dataset, batch_size=2)

# Create PAM instance
pam = MinimalPAM()

# Define arguments
ARGS = {
    "dataloader": dataloader,
    "pam": pam
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple 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
interpolate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
soham97/pam/PAM/models/pytorch_utils.py
code served (permissive licence) · get_code("bdcac6c19196f655")
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 3, dtype family float, shape (2, 8, 3) 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)

# x: (batch_size, time_steps, classes_num)
# ratio: int, ratio to interpolate

x = torch.randn(2, 4, 3)  # batch_size=2, time_steps=4, classes_num=3
ratio = 2

ARGS = {
    "x": x,
    "ratio": ratio,
}
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 3, dtype family float, shape (2, 8, 3) — shape (2, 8, 3) 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
load_task_dataframe Ran
ran; our contract draft was wrong, not the code
soham97/pam/pcc.py
code served (permissive licence) · get_code("9e1c1269ab3f61a7")
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 tuple, ndim 2, dtype family float; 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 os
import pandas as pd
import tempfile
import shutil

# Create a temporary directory structure to mimic the task/model layout
temp_dir = tempfile.mkdtemp()
task_dir = os.path.join(temp_dir, 'task')
model_name = 'test_model'
model_dir = os.path.join(task_dir, model_name)

os.makedirs(model_dir, exist_ok=True)

# Create a scores.csv file with test data
scores_data = {
    'Model': [model_name, model_name, 'other_model'],
    'File Name': ['file1', 'file2', 'file3'],
    'OVL': [0.8, 0.9, 0.7],
    'REL': [0.6, 0.7, 0.5]
}
df = pd.DataFrame(scores_data)
df.to_csv(os.path.join(task_dir, 'scores.csv'), index=False)

# Create dummy wav files
for filename in ['file1', 'file2', 'file3']:
    filepath = os.path.join(model_dir, filename + '.wav')
    with open(filepath, 'w') as f:
        f.write('dummy wav content')

# Create a simple model class that has a split method (used in the function)
class SimpleModel:
    def __init__(self, model_path):
        self.path = model_path
    
    def split(self, sep):
        return self.path.split(sep)

model = SimpleModel(model_dir)

ARGS = {
    'task': task_dir,
    'model': model_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple 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
move_data_to_device Ran
ran; our contract draft was wrong, not the code
soham97/pam/PAM/models/pytorch_utils.py
code served (permissive licence) · get_code("6e703419174005ee")
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)

# Create a small float tensor
x_float = torch.randn(2, 4, dtype=torch.float32)

# Create device (CPU only)
device = torch.device('cpu')

ARGS = {
    'x': x_float,
    '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
trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
soham97/pam/PAM/models/htsat.py
code served (permissive licence) · get_code("605878f6dcef72e9")
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) 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
import math

torch.manual_seed(0)

# Create a small tensor to be filled with truncated normal values
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
soham97/pam/PAM/models/htsat.py
code served (permissive licence) · get_code("f9fd6241d935f07b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (12, 4, 4, 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)

# Create a tensor with shape (B, H, W, C)
# B = 2 (batch size)
# H = 8 (height, must be divisible by window_size)
# W = 12 (width, must be divisible by window_size)
# C = 4 (channels)
# window_size = 4

B = 2
H = 8
W = 12
C = 4
window_size = 4

x = torch.randn(B, H, W, C)

ARGS = {
    'x': x,
    'window_size': window_size
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 4, dtype family float, shape (12, 4, 4, 4) — shape (12, 4, 4, 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
get_audio_encoder Not yet run
unverified (harvested, no recorded run)
soham97/pam/PAM/models/audio.py
code served (permissive licence) · get_code("705be5651717fc89")
How it ran

no invocation recorded.

read_config_as_args Not yet run
unverified (harvested, no recorded run)
soham97/pam/PAM/models/utils.py
code served (permissive licence) · get_code("2ecc1e3196019a78")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 3 the same month, 7 later) and 0 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
drop_path 224 other papers
147 dated earlier, 2 the same month, 67 later, 7 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
window_partition 223 other papers
149 dated earlier, 2 the same month, 63 later, 9 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
trunc_normal_ 160 other papers
95 dated earlier, 3 the same month, 60 later, 2 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
do_mixup 8 other papers
3 dated earlier, 5 later
1912.10211 (2019-12)
PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition
2305.11834 (2023-05)
Pengi: An Audio Language Model for Audio Tasks
2309.05767 (2023-09)
Natural Language Supervision for General-Purpose Audio Representations
and 5 more not named here
interpolate 8 other papers
3 dated earlier, 5 later
1912.04761 (2019-12)
Sound Event Detection of Weakly Labelled Data with CNN-Transformer and Automatic Threshold Optimization
2305.11834 (2023-05)
Pengi: An Audio Language Model for Audio Tasks
2309.05767 (2023-09)
Natural Language Supervision for General-Purpose Audio Representations
and 5 more not named here
move_data_to_device 5 other papers
3 dated earlier, 2 later
1912.04761 (2019-12)
Sound Event Detection of Weakly Labelled Data with CNN-Transformer and Automatic Threshold Optimization
1912.10211 (2019-12)
PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition
2309.05767 (2023-09)
Natural Language Supervision for General-Purpose Audio Representations
and 2 more not named here
get_audio_encoder 2 other papers
1 dated earlier, 1 later
2311.01616 (2023-11)
Adapting Frechet Audio Distance for Generative Music Evaluation
2503.08540 (2025-03)
Mellow: a small audio language model for reasoning
evaluate_pam 1 other paper
1 dated earlier
2311.01616 (2023-11)
Adapting Frechet Audio Distance for Generative Music Evaluation
load_task_dataframe 1 other paper
1 dated earlier
2311.01616 (2023-11)
Adapting Frechet Audio Distance for Generative Music Evaluation
read_config_as_args 1 other paper
1 dated earlier
2309.05767 (2023-09)
Natural Language Supervision for General-Purpose Audio Representations

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 audio quality is a key performance metric for various audio processing tasks, including generative modeling, its objective measurement remains a challenge. Audio-Language Models (ALMs) are pre-trained on audio-text pairs that may contain information about audio quality, the presence of artifacts, or noise. Given an audio input and a text prompt related to quality, an ALM can be used to calculate a similarity score between the two. Here, we exploit this capability and introduce PAM, a no-reference metric for assessing audio quality for different audio processing tasks. Contrary to other "reference-free" metrics, PAM does not require computing embeddings on a reference dataset nor training a task-specific model on a costly set of human listening scores. We extensively evaluate the reliability of PAM against established metrics and human listening scores on four tasks: text-to-audio (TTA), text-to-music generation (TTM), text-to-speech (TTS), and deep noise suppression (DNS). We perform multiple ablation studies with controlled distortions, in-the-wild setups, and prompt choices. Our evaluation shows that PAM correlates well with existing metrics and human listening scores. These results demonstrate the potential of ALMs for computing a general-purpose audio quality metric.

For agents

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

get_harvested_code_for_paper("2402.00282")
get_code_for_paper("2402.00282")
have("2402.00282")

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

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

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

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

Connect an agent — have() is free.