SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.16148 · NeurIPS · 2024

Towards Open Respiratory Acoustic Foundation Models: Pretraining and Benchmarking

Yang Liu, Yu Wu, Cecilia Mascolo, Georgios Rizos, Jagmohan Chauhan, Yuwei Zhang, Tong Xia, Jing Han, Mohammed Mosuily

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 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/2406.16148.json · badge: /api/ran/2406.16148.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
evelyn0414/OPERA canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
evelyn0414/opera canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
combine_dataloaders Ran
ran; our contract draft was wrong, not the code
evelyn0414/OPERA/src/pretrain/cola_training.py
code served (permissive licence) · get_code("273aded2e209e1ba")
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 CombinedLoader. 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 torch.nn as nn
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Create simple tensor data
x = torch.randn(8, 4)
y = torch.randint(0, 2, (8,))
dataset = TensorDataset(x, y)
dataloader1 = DataLoader(dataset, batch_size=2)

x2 = torch.randn(6, 4)
y2 = torch.randint(0, 2, (6,))
dataset2 = TensorDataset(x2, y2)
dataloader2 = DataLoader(dataset2, batch_size=2)

dataloaders = {
    'loader1': dataloader1,
    'loader2': dataloader2
}

ARGS = {
    'dataloaders': dataloaders,
    'train': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lightning, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CombinedLoader — a CombinedLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CombinedLoader 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
compute_saliency_map Ran
ran; our contract draft was wrong, not the code
evelyn0414/OPERA/res_analysis/saliency_map.py
code served (permissive licence) · get_code("ce5db6832cea6b60")
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)

# Build a minimal model that satisfies the function's usage:
# - model.eval() is called
# - model(input_tensor) is called and returns a tensor with shape (batch, num_classes)
# - model.zero_grad() is called
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

# Create model
model = SimpleClassifier(input_dim=4, num_classes=3)

# Create input tensor: batch_size=2, feature_dim=4
input_tensor = torch.randn(2, 4, dtype=torch.float32)

# Create output tensor for MSE loss case: batch_size=2, num_classes=3
output_tensor = torch.randn(2, 3, dtype=torch.float32)

ARGS = {
    "model": model,
    "input_tensor": input_tensor,
    "output_tensor": output_tensor,
}
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
crop_first Ran
ran; our contract draft was wrong, not the code
evelyn0414/opera/src/util.py
code served (permissive licence) · get_code("1bc472f9c7b0ef4f")
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 2, dtype family float, shape (128, 10) 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)

# The function expects 'data' to be a 2D array-like object (rows x columns)
# It crops the first 'crop_size' rows
# We'll create data with more rows than the default crop_size (128)

data = torch.randn(150, 10)  # 150 rows, 10 columns
crop_size = 128

ARGS = {
    'data': data,
    'crop_size': crop_size
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 (128, 10) — shape (128, 10) 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
generate_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
evelyn0414/OPERA/res_analysis/visualize_masked_spec.py
code served (permissive licence) · get_code("119b5fe3e8b4754c")
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 (8, 8) 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

# Create a small 2D array (8x8 to fit nicely with 4x4 patches)
array = np.random.rand(8, 8)

# Create mask_indices: with 8x8 array and 4x4 patches, we get 4 patches total
# (2 rows × 2 cols of patches)
mask_indices = [1, 0, 1, 0]

# patch_size parameter
patch_size = (4, 4)

ARGS = {
    "array": array,
    "mask_indices": mask_indices,
    "patch_size": patch_size,
}
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 2, dtype family float, shape (8, 8) — shape (8, 8) 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
random_crop Ran
ran; our contract draft was wrong, not the code
evelyn0414/opera/src/util.py
code served (permissive licence) · get_code("e50a9c988c664528")
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 ndarray, ndim 2, dtype family float, shape (128, 5) 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)

# The function expects data with shape (time_steps, features) where time_steps > crop_size
# crop_size defaults to 128, so we need data.shape[0] > 128
# We'll create a numpy array with shape (150, 5) to allow cropping

data = np.random.randn(150, 5)

ARGS = {
    'data': data,
    'crop_size': 128
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, 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 (128, 5) — shape (128, 5) 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
random_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
evelyn0414/opera/src/util.py
code served (permissive licence) · get_code("8ceb445ccf7af790")
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 ndarray, ndim 2, dtype family float, shape (6, 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
import random

random.seed(42)
np.random.seed(42)

# Create a small 2D numpy array for the data parameter
# Shape: (6, 4) - 6 time steps, 4 features
data = np.random.randn(6, 4).astype(np.float32)

ARGS = {
    'data': data,
    'rate_start': 0.1,
    'rate_seq': 0.2
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 2, dtype family float, shape (6, 4) — shape (6, 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
random_masking Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
evelyn0414/OPERA/res_analysis/visualize_masked_spec.py
code served (permissive licence) · get_code("1629c61058c17fa6")
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. 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

torch.manual_seed(0)

# Construct arguments for random_masking
# x: [N, L, D] tensor - sequence of shape (batch_size, sequence_length, embedding_dim)
# mask_ratio: float - ratio of tokens to mask (default 0.7)

x = torch.randn(2, 8, 4)  # N=2, L=8, D=4
mask_ratio = 0.7

ARGS = {
    "x": x,
    "mask_ratio": mask_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 tuple — a tuple output has no array shape of its own; none 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
replace_generation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
evelyn0414/OPERA/res_analysis/visualize_masked_spec.py
code served (permissive licence) · get_code("d33a98b078a5f213")
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 (8, 8) 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
import torch

torch.manual_seed(0)

# Analyzing the function:
# - x: 2D array/matrix that gets sliced by patches
# - pre: 2D array/matrix that gets copied and modified
# - mask_indices: list/array of integers (0 or 1) indicating which patches to replace
# - patch_size: tuple of (height, width) for patches

# Create small 2D arrays for x and pre
# Using 8x8 size so it divides nicely by (4,4) patch_size
x = np.random.rand(8, 8)
pre = np.random.rand(8, 8)

# mask_indices: for an 8x8 image with 4x4 patches, we get 4 patches (2x2 grid)
# We need 4 mask values - use 0 to indicate replacement
mask_indices = [0, 1, 0, 1]

# patch_size is already defined as default (4, 4)
patch_size = (4, 4)

ARGS = {
    "x": x,
    "pre": pre,
    "mask_indices": mask_indices,
    "patch_size": patch_size
}
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 ndarray, ndim 2, dtype family float, shape (8, 8) — shape (8, 8) 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
smooth_list Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
evelyn0414/OPERA/res_analysis/show_logs.py
code served (permissive licence) · get_code("0416d4fe99ed3480")
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 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

torch.manual_seed(0)

# The function smooth_list takes a list of numbers and applies a moving average smoothing
# It requires at least 5 elements in the list
# The function iterates through the list and computes the average of a window around each element

input_list = [1.0, 2.0, 3.5, 4.2, 5.1, 6.3, 7.8, 9.2, 10.5]

ARGS = {
    'input_list': input_list
}
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 list, ndim 1, dtype family float — 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
get_encoder_path Not yet run
unverified (harvested, no recorded run)
evelyn0414/OPERA/src/benchmark/model_util.py
code served (permissive licence) · get_code("5ee822af0adca359")
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, 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 10 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

Respiratory audio, such as coughing and breathing sounds, has predictive power for a wide range of healthcare applications, yet is currently under-explored. The main problem for those applications arises from the difficulty in collecting large labeled task-specific data for model development. Generalizable respiratory acoustic foundation models pretrained with unlabeled data would offer appealing advantages and possibly unlock this impasse. However, given the safety-critical nature of healthcare applications, it is pivotal to also ensure openness and replicability for any proposed foundation model solution. To this end, we introduce OPERA, an OPEn Respiratory Acoustic foundation model pretraining and benchmarking system, as the first approach answering this need. We curate large-scale respiratory audio datasets (∼136K samples, over 400 hours), pretrain three pioneering generalizable acoustic models, and build a benchmark consisting of 19 downstream respiratory health tasks for evaluation. Our pretrained models demonstrate superior performance (against existing acoustic models pretrained with general audio on 16 out of 19 tasks) and generalizability (to unseen datasets and new respiratory audio modalities). This highlights the great promise of respiratory acoustic foundation models and encourages more studies using OPERA as an open resource to accelerate research on respiratory audio for health. The OPERA website can be found at opera-benchmark.github.io Our codebase is open-sourced at github.com/evelyn0414/OPERA Encoder Projector Decoder Data Curation Unlabeled Respiratory Audio spectrogram Pretraining data (136K samples, 400+ hours) Downstream data (19 tasks) (X, y) (X, y) (X, y) ...

For agents

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

get_harvested_code_for_paper("2406.16148")
get_code_for_paper("2406.16148")
have("2406.16148")

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

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

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

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

Connect an agent — have() is free.