SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.14411 · 2024

SNAC: Multi-Scale Neural Audio Codec

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 3 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2410.14411.json · badge: /api/ran/2410.14411.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
hubertsiuzdak/snac canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_rotary_pos_emb Ran
ran; our contract draft was wrong, not the code
hubertsiuzdak/snac/snac/attention.py
code served (permissive licence) · get_code("6d3d810524eb100b")
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 4, 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
from einops import rearrange

torch.manual_seed(0)

# Analyze the function:
# - q: tensor, shape operations suggest (..., seq_len, dim) where dim is even
# - k: tensor, same shape requirements as q
# - freqs: tensor, shape (..., seq_len, dim) for cos/sin operations
# - scale: can be a scalar or 2D tensor used for element-wise multiplication

# Create minimal valid tensors
batch_size = 2
seq_len = 3
head_dim = 4

# q and k: (batch, seq_len, dim)
q = torch.randn(batch_size, seq_len, head_dim)
k = torch.randn(batch_size, seq_len, head_dim)

# freqs: (batch, seq_len, dim) - used with cos() and sin()
freqs = torch.randn(batch_size, seq_len, head_dim)

# scale: can be scalar or 2D tensor
# Looking at usage: scale ** (-1), scale[-q_len:, :] suggests 2D tensor
# but also needs to work as scalar multiplier
# Let's use a 2D tensor (seq_len, 1) to match indexing pattern
scale = torch.ones(seq_len, 1)

ARGS = {
    'q': q,
    'k': k,
    'freqs': freqs,
    'scale': scale
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, 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
rotate_half Ran
ran; our contract draft was wrong, not the code
hubertsiuzdak/snac/snac/attention.py
code served (permissive licence) · get_code("1147383164fd3a66")
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, 3, 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
from einops import rearrange

torch.manual_seed(0)

# The function rotate_half takes a single parameter 'x' which is a tensor
# It rearranges the tensor, unbinds it, and concatenates parts together
# The function expects x to have a shape where the last dimension is even
# (since it's split into r=2 parts)

# Create a small tensor with batch size 2 and last dimension as even number (4)
# Shape: (batch=2, ..., last_dim=4) where last_dim will be split into r=2, d=2
x = torch.randn(2, 3, 4)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, 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, 3, 4) — shape (2, 3, 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
snake Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hubertsiuzdak/snac/snac/layers.py
code served (permissive licence) · get_code("f247e4748f379a76")
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 4, dtype family float, shape (2, 4, 3, 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

torch.manual_seed(0)

# The function takes two parameters: x (a tensor) and alpha (a scalar or tensor)
# x is reshaped, modified with sin operations, and reshaped back
# alpha is used in arithmetic operations (reciprocal, multiplication)

# Create a small tensor with shape (batch=2, channels=4, height=3, width=5)
x = torch.randn(2, 4, 3, 5)

# Create a scalar alpha parameter
alpha = torch.tensor(1.0)

ARGS = {
    "x": x,
    "alpha": alpha,
}
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 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 1 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
snake 10 other papers
6 dated earlier, 1 the same month, 3 later · 1 only as an assembly brick
2306.06546 (2023-06)
High-Fidelity Audio Compression with Improved RVQGAN
2307.04686 (2023-07)
VampNet: Music Generation via Masked Acoustic Token Modeling
2308.16692 (2023-08)
SPEECHTOKENIZER: UNIFIED SPEECH TOKENIZER FOR SPEECH LANGUAGE MODELS
and 7 more not named here
rotate_half 3 other papers
3 dated earlier
2303.11249 (2023-03)
What Makes Data Suitable for a Locally Connected Neural Network? A Necessary and Sufficient Condition Based on Quantum Entanglement
2310.02980 (2023-10)
Never Train from Scratch: Fair Comparison of Long-Sequence Models Requires Data-Driven Priors
2406.10056 (2024-06)
UniAudio 1.5: Large Language Model-driven Audio Codec is A Few-shot Audio Task Learner
apply_rotary_pos_emb 2 other papers
2 dated earlier
2310.02980 (2023-10)
Never Train from Scratch: Fair Comparison of Long-Sequence Models Requires Data-Driven Priors
2406.10056 (2024-06)
UniAudio 1.5: Large Language Model-driven Audio Codec is A Few-shot Audio Task Learner

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-23.

Repositories linked to this paper

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

Abstract

Neural audio codecs have recently gained popularity because they can represent audio signals with high fidelity at very low bitrates, making it feasible to use language modeling approaches for audio generation and understanding. Residual Vector Quantization (RVQ) has become the standard technique for neural audio compression using a cascade of VQ codebooks. This paper proposes the Multi-Scale Neural Audio Codec, a simple extension of RVQ where the quantizers can operate at different temporal resolutions. By applying a hierarchy of quantizers at variable frame rates, the codec adapts to the audio structure across multiple timescales. This leads to more efficient compression, as demonstrated by extensive objective and subjective evaluations. The code and model weights are open-sourced at https://github.com/hubertsiuzdak/snac.

For agents

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

get_harvested_code_for_paper("2410.14411")
get_code_for_paper("2410.14411")
have("2410.14411")

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

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

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

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

Connect an agent — have() is free.