Zalán Borsos, Raphaël Marinier, Damien Vincent, Eugene Kharitonov, … Neil Zeghidour (Google Research) — arXiv:2209.03143, 2022

AudioLM: Audio as a Language

Two tokenizers disagree about what audio is. One hears meaning and throws away the sound; the other hears the sound and throws away the meaning. AudioLM’s whole idea is to stop choosing — and to stack three language models on the result.

Prerequisites: what an autoregressive language model does (predict the next token) + what a spectrogram is. Vector quantization, RVQ, k-means, ABX and ViSQOL are all built from zero here.
10
Chapters
14
Interactive Sims
3
Cascaded Stages
51.2%
Human Detection Rate

Chapter 0: The Babble Problem

Play a WaveNet with no conditioning and listen for thirty seconds. What comes out is uncanny. The timbre is right. The breathiness is right. The room reverb is right. The little glottal creak at the start of a vowel is right. And it is complete nonsense — a fluent stream of syllables that never becomes a word, a word that never becomes a sentence, a sentence that never becomes a thought.

The community had a name for this before it had an explanation: babbling. It is the sound of a model that has mastered the physics of a voice and learned nothing about what a voice is for.

Now run the opposite experiment. Take GSLM — the "textless NLP" line of work that discretizes speech into a few hundred units per second and trains a Transformer on those units. Ask it to continue a prompt. What comes out is meaningful: syntactically plausible, sometimes semantically coherent, an actual English-shaped utterance. And it sounds like a single robotic voice recorded in an anechoic chamber, because that is the only voice the resynthesizer knows how to make. Speaker identity, room, prosodic richness: gone.

Two failure modes, mirror images of each other. One model has the sound and not the structure. The other has the structure and not the sound. AudioLM exists because somebody looked at those two failures side by side and refused to accept that they were a trade-off.

The sentence that organizes this entire paper. "We show how existing audio tokenizers provide different trade-offs between reconstruction quality and long-term structure, and we propose a hybrid tokenization scheme to achieve both objectives." Everything below — the two tokenizers, the three stages, the flattening scheme, the 3-second prompts, even the safety classifier — is downstream of that one observation. If you remember one line from this lesson, make it that one.

Why audio is hard in a way images are not

An audio signal is a single number repeated very fast. At 16 kHz — the sample rate this paper uses throughout — one second of mono speech is a vector of 16,000 numbers. Ten seconds is 160,000. A minute is nearly a million. There is no spatial structure to exploit, no 2D locality, nothing but a scalar time series that happens to encode, simultaneously and at wildly different timescales:

TimescaleWhat lives there (speech)What lives there (piano)
~0.1 ms (a few samples)Waveform phase, the fine structure of a fricativeAttack transient of a hammer strike
~10 msPitch period, formant structurePartials of a single note
~100 msA phoneme; the identity of the speaker’s vocal tractA note, its decay envelope
~1 sA word, local prosodyA motif, a chord change
~10 sSyntax, topic, discourse coherencePhrase structure, key, harmonic progression

Read that table as an engineering specification and the difficulty jumps out. A model that only sees 0.1 ms of context can render a beautiful fricative and cannot know it is in the middle of a word. A model that only sees 10 s of context in some compressed summary can plan a sentence and cannot render a fricative at all. The paper puts it plainly in its opening paragraph: audio "involves multiple scales of abstractions… these multiple scales interact in such a way that achieving high audio quality while displaying high-level consistency remains a challenge, in particular in the absence of strong supervision."

That last clause — in the absence of strong supervision — is doing quiet work. If you hand WaveNet a phoneme sequence with durations and an F0 contour, it produces gorgeous, coherent speech. That is text-to-speech, and it was solved-ish. The hard problem is what happens when nobody tells the model what to say. No transcript. No MIDI. No linguistic features. Just: here are three seconds of audio, keep going.

The landscape before AudioLM

Take a moment with the actual prior art, because AudioLM is best understood as a specific move in a specific game. Four families had staked out four corners:

Autoregressive waveform models — WaveNet, WaveRNN
Predict the next sample. Near-veridical local quality; famously slow; unconditioned output is babble because the receptive field cannot span a sentence.
Adversarial / diffusion synthesizers — MelGAN, HiFi-GAN, DiffWave, WaveGrad
Non-autoregressive, high fidelity, fast. But they are vocoders: they need a conditioning signal to render. They do not decide what to say.
Textless NLP — GSLM, and relatives
Discretize speech into HuBERT-derived units, run a Transformer on them. Genuinely meaningful continuations. Trained on clean speech only; synthesis restricted to a single speaker.
High-bitrate token LMs — Jukebox, Perceiver AR
Model codec tokens directly. Signal quality can be excellent (Perceiver AR on SoundStream codes generates convincing piano). Temporal structure is the weak point; Jukebox shows audible artifacts.

Spend an extra beat on GSLM, because it is the closest ancestor and the sharpest contrast. Lakhotia et al. showed that a Transformer trained on discretized speech units generates coherent speech with no textual annotation whatsoever — a genuinely surprising result in 2021, and the birth of "textless NLP." The units come from HuBERT, quantized to a small vocabulary (200 tokens in the configuration AudioLM benchmarks against). Resynthesis goes through a unit-to-speech module.

The paper's critique is two sentences long and entirely fair: "the acoustic diversity and the quality remain limited: the model is trained on clean speech only and synthesis is restricted to a single speaker." Both halves matter. Clean-only training is a data limitation — GSLM used the 6k-hour clean subset of Libri-Light; AudioLM uses the full 60k-hour unlab-60k split, ten times the data and far messier. Single-speaker synthesis is an architectural limitation: once you have thrown away speaker identity at tokenization time, no decoder can put it back.

Notice the pattern. Every corner is strong on one axis and weak on the other. The paper's own framing of Perceiver AR is telling: it "can then generate piano music of high signal-level quality; however the temporal structure of the generated sequences can be further improved." Politely phrased, that is exactly the babble problem in a musical key — the notes are beautiful and the piece goes nowhere.

Why not just make the Transformer bigger?

Before accepting that tokenization is necessary, kill the lazy alternative. Why not run a Transformer directly on waveform samples and buy the context with hardware?

Because self-attention costs O(n2) in sequence length, and the constant does not save you. Do the arithmetic on ten seconds of 16 kHz mono:

n = 10 s · 16,000 samples/s = 160,000 positions
attention pair count = n2 = 160,0002 = 2.56 × 1010 per head, per layer

Twenty-five billion pairwise interactions, for one head, for one layer, for ten seconds of a single mono clip. Multiply by 16 heads and 12 layers and you are at 4.9 × 1012 before you have generated a single sample. The paper states the ceiling bluntly: quadratic cost "is acceptable for sequences of up to 103 tokens… however, it prevents modeling natural signals in their raw form."

Now do the same arithmetic on the representation AudioLM actually models in its second stage — 2,250 tokens for that same ten seconds (Chapter 4 derives the number):

n′ = 2,250 positions  →  n′2 = 5.06 × 106
speedup = 2.56 × 1010 / 5.06 × 1065,060×

Five thousand times cheaper attention, for the same ten seconds of audio. That is not an optimization; it is the difference between an experiment you can run and one you cannot. And it is why the paper's very first architectural requirement is that the number of tokens T′ be "typically 2–3 orders of magnitude smaller" than the number of samples T.

The literature did try the other road. Routing Transformers, Performers, Perceiver AR — all are cited here as efficient-attention alternatives. The paper's judgement is that a second solution exists and is cleaner: "another solution to this scaling problem is to work with mappings of the natural signals to a compact, discrete representation space." Compress first, then model. It is the same move that made high-resolution image generation tractable via VQ-GAN and Parti, and long video generation tractable via time-agnostic VQGAN. AudioLM is that move applied to sound, with one twist nobody had made before: use two different compressions at once.

How this idea probably got assembled

It is worth reading AudioLM as an integration paper, because the honest description of its contribution is that three mature Google components were already sitting in the same building and somebody noticed they composed.

ComponentBuilt forRepurposed here as
SoundStream (Zeghidour et al., 2021)A neural codec: beat Opus and EVS at low bitrateA tokenizer whose codes are prediction targets, not just a transmission format
w2v-BERT (Chung et al., 2021)Self-supervised pre-training for speech recognitionA source of semantic tokens, via k-means on one intermediate layer
T5X / decoder-only TransformersText language modeling at scaleThree unmodified next-token predictors, one per stage

Note the shared author list: Zeghidour and Tagliasacchi are on both SoundStream and AudioLM. The reframing is the contribution. A codec is normally judged by rate–distortion; here the paper uses SoundStream's tokens "not as intermediate representations for lossy reconstruction, but rather as targets for a sequence modeling task operating at a lower sampling rate." Same bits, entirely different job.

Reconstruct the likely sequence of thoughts. Step one: train an LM on SoundStream tokens — the paper reports doing exactly this, and it babbles. Step two: notice that GSLM's HuBERT units do not babble, but resynthesize badly. Step three: measure both properly (Table I, Chapter 2) and confirm the complementarity is real rather than anecdotal. Step four: rather than picking, stack them. The negative result in step one is load-bearing; without it the hybrid looks like unnecessary complexity.

Vocabulary you will need

Every term below is derived from zero when first used. Skim the table now so the names are not strangers, then move on.

TermOne-line meaningFirst used
Semantic tokens zk-means cluster indices over w2v-BERT layer-7 activations; 25/sCh 2
Acoustic tokens YSoundStream RVQ codes; a TA×Q matrix of codebook indices; 50 frames/s × 12Ch 2
RVQResidual vector quantization: quantize, subtract, quantize the leftover, repeat Q timesCh 3
ABX error rateDoes an instance of "bit" land nearer another "bit" than a "bet"? Lower is betterCh 2
ViSQOLComputational proxy for perceived similarity between reference and reconstruction; higher is betterCh 2
Q′The split point between coarse and fine RVQ layers; Q′ = 4 of Q = 12Ch 4
FlatteningReading the TA×Q token matrix in row-major order into one 1D sequence, with per-layer offsetsCh 4
sWUGGY / sBLIMPZero-shot probes: word vs non-word, and grammatical vs ungrammatical sentenceCh 8

Feel the two failure modes

Before any machinery, get the two axes into your hands. The sim below is a map, not a chart: the horizontal axis is local fidelity (does a 50 ms slice sound real?) and the vertical axis is long-horizon coherence (does a 10 s span mean something?). Each dot is a system from the table above. Press a dot and the strip at the bottom animates what that system's output does over ten seconds — a schematic of the signal envelope plus a "meaning track" that either holds together or dissolves.

Sim 0 — The fidelity/coherence map, and what each corner sounds like

Tap any system to select it. The lower strip animates a 10-second schematic: the upper trace is signal detail, the lower blocks are units of meaning — words for speech, motifs for music. Watch which systems keep the blocks aligned and which let them scatter.

The "meaning track" in that sim deserves a word, because it is the honest version of a thing usually left implicit. When we say a continuation is coherent, we mean something checkable: over a 10-second span, do the units of the signal group into a hierarchy — phones into syllables into words into a clause; notes into a motif into a phrase? Babbling produces the bottom two levels and nothing above. That is precisely why the paper's evaluation suite (Chapter 8) is built from lexical and syntactic probes rather than audio-quality metrics. Quality metrics cannot see the failure.

Things to notice. WaveNet's detail trace is the richest on the board and its meaning blocks never lock into a grid — that is babble drawn as a picture. GSLM's blocks are crisp and evenly spaced (it has real linguistic structure) while its detail trace is thin and unvarying, which is what "single speaker, clean recording" looks like when you plot it. And AudioLM sits in the corner both of them are missing, which is the entire claim of the paper and which we now have to earn.

What "solve it" would actually require

Let us be precise about the target, because vague targets produce vague architectures. To beat both failure modes at once, a system must satisfy four constraints simultaneously:

#ConstraintWhy it fights the others
1Represent 10–30 s of audio inside a Transformer’s contextSelf-attention is quadratic; raw 16 kHz audio at 10 s is 160,000 positions, which is hopeless
2Reconstruct the waveform at high perceptual qualityQuality puts a lower bound on bitrate, and bitrate is sequence length
3Carry linguistic/musical structure in the representation itselfStructure wants a compact, abstract code — the opposite of a high-bitrate one
4Need no transcript, MIDI, or annotationRules out every conditioning shortcut that made TTS work

Constraints 2 and 3 are in direct opposition, and this is not a soft tension — it is arithmetic. Reconstruction quality is bounded below by information content: you cannot recreate a waveform from fewer bits than the waveform's perceptual entropy. Structure, meanwhile, wants aggressive abstraction: the whole point of a phoneme label is that it discards the speaker, the room, and the pitch. A single code that is simultaneously high-entropy (for quality) and heavily abstracted (for structure) is close to a contradiction in terms.

Make constraint 1 and constraint 2 collide numerically, because "bitrate is sequence length" is the kind of sentence that slides past. A discrete code with vocabulary N emitted at rate R tokens per second costs R · log2N bits per second. Turn that around: for a fixed vocabulary, bitrate and token rate are the same quantity in different units. Doubling the bitrate to improve reconstruction doubles the sequence the Transformer must attend over, which quadruples the attention cost. Quality is paid for in compute, quadratically.

bitrate = R · Q · log2N    bits/s
semantic: 25 · 1 · log21024 = 25 · 10 = 250 bps
acoustic (Q=4): 50 · 4 · log21024 = 50 · 40 = 2000 bps
acoustic (Q=12): 50 · 12 · 10 = 6000 bps  (= 600 tokens/s)

Those four numbers are the skeleton of the entire paper, and every one of them is derived in Chapter 3 from the sample rate and the architecture. Hold on to the ratio: the acoustic stream is 24× the bitrate of the semantic stream, and 24× the sequence length. That factor is exactly what makes a single unified code impossible.

The move most people would make, and why it fails. The obvious fix is a middle bitrate — not too compressed, not too raw. Chapter 2 shows the paper actually ran this experiment: it pushed the semantic tokenizer up to 6000 bps, matching the acoustic tokenizer bit for bit, and reconstruction quality still landed at ViSQOL 1.4 versus the acoustic tokenizer's 3.9 at the same bitrate. The two representations are not on one dial with a sweet spot in the middle. They are different kinds of information, and equalizing the bitrate does not convert one into the other. That negative result is what licenses the hybrid.

The shape of the answer

AudioLM's answer, stated once here and unpacked for the next nine chapters: use both tokenizations, and impose a hierarchy between them.

Semantic tokens — from w2v-BERT, k-means-quantized
25 per second, 250 bits per second. Carry phonetics, syntax, melody, rhythm. Reconstruct to mush.
↓ used as conditioning for ↓
Coarse acoustic tokens — SoundStream RVQ layers 1–4
200 per second, 2000 bits per second. Carry speaker identity, room, recording conditions.
↓ used as conditioning for ↓
Fine acoustic tokens — SoundStream RVQ layers 5–12
400 per second, +4000 bits per second. Remove the remaining compression artifacts.

Read the three rows as a budget. The semantic stream costs 250 bps and buys what is said. The coarse stream costs 2000 bps and buys who says it and where. The fine stream costs 4000 bps and buys nothing you can name — it buys the absence of artifacts. Two thirds of the total bitrate goes to a stage whose entire job is to make the output stop sounding compressed. That allocation is worth staring at: it is a precise measurement of how expensive perceptual transparency is, relative to meaning.

And it explains the third stage's peculiar freedom. If your job is only to remove artifacts, you do not need the sentence. You do not need the speaker's history. You need the last fraction of a second of coarse structure, which is why the paper can run stage 3 on independent, non-overlapping 3-second chunks and batch them in parallel. The cheapest-to-model information is also the most expensive in bits — an inversion that is easy to state and genuinely useful to remember.

Three token streams, three separate decoder-only Transformers, each one conditioned on the output of the previous. Coarsest structure first, finest detail last. That is the whole architecture, and by the end of Chapter 5 you will have watched it fill in a continuation token by token.

Two things about that picture deserve flagging now, because they are the non-obvious design decisions rather than the obvious ones. First: the semantic tokens are never decoded to audio. They exist only to condition the next stage. Second: the tokenizers are pre-trained and frozen before the language models are trained at all — the paper is explicit that this "decouples the tokenizers and the language model and simplifies the training setup." Nothing about the codec adapts to make the LM's job easier. The LM takes the code as given.

What this lesson will make you able to do. By Chapter 9 you should be able to: (a) state the exact token rate and bitrate of each stream and derive them from the sample rate; (b) hand-compute a residual vector quantization, including the offset scheme used to flatten it; (c) explain why stage 3 can ignore the semantic tokens entirely; (d) recite what the ASR and speaker-classifier experiments prove about which token type carries which information; and (e) explain how a model that fools humans 48.8% of the time is caught by a small CNN 98.6% of the time. That last one is the most interesting number in the paper.

What "conditioned on the previous stage" buys you

The cascade is not merely a pipeline; it encodes a factorization of the joint distribution, and the factorization is the reason the architecture is cheap. Write the full joint over semantic tokens z and acoustic tokens y and it is intractable. Split it and it is three ordinary language models:

p(z, y) = p(z) · p(y≤Q′ | z) · p(y>Q′ | y≤Q′)

Each factor is a next-token problem over a short-ish sequence, which is exactly what a decoder-only Transformer is good at. Notice what the third factor does not contain: z. The fine acoustic stage is assumed conditionally independent of the semantic tokens given the coarse acoustic tokens. That assumption is an engineering claim with a testable consequence, and Chapter 4 will show what it buys (a 3-second chunk instead of a 30-second one) and what it costs (fine detail cannot depend on the sentence-level plan, only on local coarse structure).

Similarly, the first factor drops y entirely: p(zt | z<t, y<t) ≈ p(zt | z<t). Semantic tokens are modeled as if past acoustics did not matter. Is that true? Approximately — a speaker's voice does not usually change what they say next. But it is an approximation, and it is one of the places where you should expect the framework to leak. The paper names it as a "conditional independence assumption," which is scientist for "we know, and it works anyway."

Where the honest reader should push back. If semantic tokens truly captured all structure, the coarse acoustic model would need no long context at all — yet it is trained on 10-second crops, not 3-second ones. And if fine tokens truly were local, stage 3's 3-second chunks would be arbitrary rather than tuned. Both stages are longer than their stated assumptions strictly require. The assumptions are approximations chosen to make sequence lengths fit, and the crop lengths are where you can see the authors hedging.

A note on what this paper is not

AudioLM is not text-to-speech. It is not a music generator you prompt with words — that is MusicLM, which arrives a few months later and is built on top of this framework. It is not a codec, though it uses one. It has no text encoder, no caption, no label, no conditioning signal of any kind except audio itself.

Nor is it a model you can steer. There is no knob for "say something about the weather," no way to specify a speaker other than by giving it three seconds of that speaker, and no mechanism for stopping at a semantically sensible point. The paper notes, almost in passing, that one source of transcription errors is "the end-of-sentence tokens not being generated at the proper position." A pure continuation model has no notion of being finished.

And it is not multilingual, not polyphonic, and not general audio. Speech means English read-aloud audiobooks (Libri-Light). Music means solo piano, from an internal 40k-hour dataset. The conclusion explicitly lists "multilingual speech, polyphonic music, and audio events" as future extensions. Every one of those became a paper within eighteen months.

What it is: a demonstration that if you tokenize audio the right way, the ordinary machinery of language modeling — decoder-only Transformer, next-token prediction, temperature sampling — is enough to generate audio that is simultaneously coherent and convincing. The paper's most quotable result is that human raters, told explicitly that the first three seconds are real and asked to judge the rest, got it right 51.2% of the time. Coin-flip, with a p-value of 0.23 against the null of pure guessing.

Sit with the design of that evaluation for a second, because it is stricter than it first appears. The raters were told the first three seconds were real. They were screened for English proficiency. The real samples were compressed through SoundStream first, so codec artifacts could not be used as a tell. Ten raters, one hundred samples, one thousand ratings. Under those conditions, 51.2% is as close to chance as a finite sample gets.

And notice the scope of the claim, because the paper is careful about it and the internet was not. This is 7 seconds of continuation, judged in an unpaired setup, on read audiobook speech. It is not a claim that AudioLM produces indistinguishable audio at arbitrary length, in dialogue, or under A/B comparison. Short, unpaired, read speech — that is the regime. It is still a remarkable result, and it is still an obligation.

That result is why Chapter 9 exists. A paper that achieves indistinguishability has an obligation, and the authors took it: they trained a detector and reported its accuracy in the same paper. We will look at both the classifier and the reason it works so well.

Honest confusion is allowed here. The first time through, the three-stage cascade feels like one stage too many — why not merge coarse and fine? The paper answers this directly and the answer is not "quality," it is sequence length. Chapter 4 does the arithmetic and the numbers are stark. If that question is nagging at you now, good; hold it, because you will get the satisfaction of a real answer rather than a hand-wave.

What the paper quietly does not say

Three omissions worth naming now, so you notice them as absences rather than as your own confusion later.

The piano dataset is internal. "An internal dataset of 40k hours of piano music" is not reproducible, and the paper offers no further description beyond the range of player skill and acoustic conditions. The MAESTRO dataset appears only as the source of evaluation prompts.

The k-means fitting details are thin. We are told K = 1024, that layer 7 of the MLM module is used, and that per-dimension standardization "significantly improves" phonetic discriminability. We are not told how many frames the clustering was fit on, how initialization was handled, or how sensitive the result is to the seed. For a component this load-bearing, that is a lot of trust.

The dedup and the 2× alignment are never reconciled. Figure 2's caption states that for every semantic token there are 2Q′ coarse acoustic tokens, because SoundStream runs at 50 Hz and w2v-BERT at 25 Hz. But Section IV-B says consecutive repeated semantic tokens are removed in the first two stages. After deduplication the 2:1 correspondence no longer holds frame-for-frame. The paper does not say how the conditioning is aligned afterwards; the honest reading is that the semantic tokens function as an unaligned prefix rather than a time-synchronized track. Chapter 4 returns to this.

One more framing before we start

There is a useful way to hold this whole paper in one sentence, and it is worth installing before the details arrive: AudioLM asks what happens if you stop treating audio as a signal and start treating it as a text.

Not a metaphor — a literal engineering commitment. Discrete symbols from a fixed vocabulary. Next-token prediction with cross-entropy. Temperature sampling. Relative position embeddings borrowed from T5. A prompt is a prefix. A continuation is a completion. Every tool in the text-LM toolbox transfers unchanged, because the representation was made to accept them.

The price of that commitment is the tokenizer, and the tokenizer is where all the difficulty went. Once you accept that, the structure of the next nine chapters is obvious: two chapters on what tokens to use, two on how to make them, two on how to arrange them, and four on whether it worked.

The road ahead

ChQuestion it answers
1What does "cast audio generation as language modeling" mean concretely, and how much does tokenization actually buy?
2SHOWCASE — what exactly do semantic and acoustic tokens each keep and throw away? (ABX and ViSQOL, measured)
3How are the two token streams produced? (RVQ by hand, k-means by hand, every rate derived)
4Why three stages instead of one, and what does the flattened token sequence literally look like?
5SHOWCASE — watch a continuation generate, stage by stage, token by token
6What data, what model, what hyperparameters, and what are the three inference modes?
7How do we know semantic tokens carry content and acoustic tokens carry identity? (Two clean experiments)
8Does the model know English? (sWUGGY, sBLIMP) And does any of this transfer to piano?
9If humans cannot tell, what can? And what did AudioLM turn into?

The whole framework, in one code block

Here is the entire system as pseudocode. Every line of it will be justified over the next nine chapters, but there is value in seeing how small it is before it gets complicated. Nothing here is exotic: two frozen encoders, three next-token models, one frozen decoder.

python — AudioLM inference, the whole thing
# ---- frozen, pre-trained, never updated during LM training ----
w2v      = load("w2v-BERT-XL")      # 0.6B Conformer, MLM + contrastive
kmeans   = load("kmeans-K1024")      # fit on layer-7 activations, normalized
ss_enc   = load("soundstream.encoder") # 50 Hz embeddings from 16 kHz audio
ss_rvq   = load("soundstream.rvq")     # Q = 12 layers, N = 1024 each
ss_dec   = load("soundstream.decoder")

# ---- the three language models: identical architecture, 0.3B each ----
LM1, LM2, LM3 = load("semantic"), load("coarse"), load("fine")

def continue_audio(prompt_wav, n_seconds):
    z_p = kmeans.predict(normalize(w2v.layer7(prompt_wav)))   # (Ts,)   25 Hz
    Y_p = ss_rvq.encode(ss_enc(prompt_wav))                   # (Ta, 12) 50 Hz

    z   = LM1.sample(prefix=z_p,          T=0.6)             # stage 1: structure
    Yc  = LM2.sample(cond=z, prefix=Y_p[:, :4], T=0.8)      # stage 2: identity+room
    Yf  = LM3.sample(cond=Yc,               T=0.6)          # stage 3: fine detail

    return ss_dec(ss_rvq.decode(concat(Yc, Yf, axis=1)))     # (Ta, 12) -> waveform

Read the shapes. The prompt goes in as a waveform and immediately becomes two objects with very different geometries: a flat vector of length TS and a matrix of shape TA×12. Three sampling calls later, only the matrix is left — the semantic tokens have done their job as conditioning and are discarded. The decoder never sees them.

Note also what is not in this code: no text, no transcript, no phoneme aligner, no MIDI, no speaker embedding, no reference encoder. The only input is prompt_wav.

Three ways to run the same three models

One more preview, because it reframes what the cascade is. Depending on which parts you clamp to ground truth and which you sample, the same trained models give you three different generation behaviors:

ModeWhat is fixedWhat you get
UnconditionalNothingDiverse, syntactically consistent speech; speaker identity, prosody and room vary freely between samples
Acoustic generationGround-truth semantic tokens z from a real clipThe same sentence, said by a randomly different voice in a randomly different room. The linguistic content is pinned; everything else is resampled
ContinuationBoth z and coarse y from the first 3 secondsThe prompt's voice, prosody and room, carried forward with new content

That middle row is the paper's cleanest experimental instrument, and Chapter 7 turns it into two quantitative results: an ASR system transcribes the resampled audio and recovers the original transcript (word error rate 6.0%), while a speaker classifier trained on 291 speakers recognizes the original speaker only 3.2% of the time. Same audio, two probes, opposite answers. Content is in z; identity is in y. That is the hypothesis made falsifiable.

Design challenge — before Chapter 2:

You have been told semantic tokens carry structure and acoustic tokens carry sound. Design the experiment that would prove it, using only off-the-shelf components and no human raters. You need two probes that answer opposite questions on the same generated audio. What are they, what do you hold fixed, and what number would count as a win for each? Sketch it before reading on — the paper's version is in Chapter 7, and it is almost certainly what you wrote down, which is a good sign for both of you.

Cross-domain bridge:
The semantic/acoustic split is the content/style split you already know from image generation, and the plan/render split you know from graphics. In a renderer, the scene graph decides what is in the frame and the shader decides how it looks; nobody would try to store both in one buffer. AudioLM's contribution is noticing that speech has the same separation available for free — one self-supervised model happens to produce the scene graph, another happens to produce the shader inputs — and that a language model can be run on each. If you have internalized neural audio codecs, you already own half of the acoustic side.

One last orientation. The four numbers to hold through Chapter 3 are 16,000 (samples per second), 320 (the codec stride), 640 (the semantic stride), and 1024 (both codebook and cluster count). Everything else is derived.

Inline check before you move on

Three quick ones. Answer them in your head; the answers are one line below each, so cover the page if you want the test to be real.

(a) A model generates 30 seconds of audio at 16 kHz. How many raw samples is that, and how many semantic tokens?
480,000 samples; 30 × 25 = 750 semantic tokens. The ratio is 640 — which is exactly why the semantic stage can be trained on 30-second crops.

(b) Why can a vocoder like HiFi-GAN not solve the babble problem, no matter how good it gets?
Because it renders a conditioning signal; it does not decide the conditioning signal. Perfect rendering of a nonsense plan is nonsense, rendered perfectly.

(c) If you had to delete one of AudioLM's three stages and keep the system usable, which one and what would you lose?
Stage 3. You would drop from 6000 bps to 2000 bps and hear compression artifacts, but content and speaker identity survive — which is precisely what the piano configuration does, and Chapter 8 confirms it.

If (c) felt like a guess, that is the right state to be in. The rest of this lesson is about turning it into something you can defend with numbers.

A colleague proposes: "Just take the semantic tokenizer and raise its bitrate until reconstruction is good. Then you get structure and quality from one code." What does the paper's Table I say about this plan?

Chapter 1: Audio as a Language

Chapter 0 ended on a slogan: cast audio generation as a language modeling task. Slogans are cheap. This chapter makes it mechanical — what the objects are, what shapes they have, what gets frozen, and what the loss function is actually summing over.

The framework has exactly three components. The paper introduces them in a single paragraph and then never adds a fourth, which is unusual restraint and worth honoring by reading that paragraph slowly.

The three components, formally

Start with the input. A single-channel audio sequence is a vector of real numbers:

x ∈ RT

x is the waveform. T is the number of samples — 16,000 per second at the sample rate used throughout this paper. Each entry is one amplitude measurement, typically in [−1, 1]. That is the whole input format. No spectrogram, no framing, no windowing at this level of the description.

Component 1 — the tokenizer. A frozen encoder that maps the waveform to a short sequence of symbols drawn from a finite vocabulary:

h = enc(x),  h = (h1, …, hT′),  with T′ ≪ T

Every symbol: enc is the encoder (in practice either SoundStream's convolutional encoder plus its quantizer, or w2v-BERT plus k-means). ht is one token — an integer index into a codebook, not a vector. T′ is the token count. The double-less-than sign is not decoration; the paper says T′ is "typically 2–3 orders of magnitude smaller than T," and Chapter 3 will show the ratios are 640 for semantic tokens and 320 for acoustic frames.

Component 2 — the language model. A decoder-only Transformer over those tokens, trained on the ordinary maximum-likelihood objective:

maximize   ∏t=1T′ p(ht | h<t)

Read the product as: the probability the model assigns to the whole token sequence is the product of the probability it assigns to each token given everything before it. h<t means the tokens at positions 1 through t−1. This is GPT's objective with the word "word" crossed out and "audio token" written in. Nothing about it is audio-specific.

Component 3 — the detokenizer. A frozen decoder that turns predicted tokens back into a waveform:

x̂ = dec(ĥ)

where the hats mark quantities the model produced rather than measured. In AudioLM, dec is always SoundStream's convolutional decoder — the semantic tokenizer has no decoder at all, which is exactly the property Chapter 2 measures and complains about.

Data flow, with shapes, for a 10-second clip. Waveform x: float32, shape (160000,). Semantic tokens z: int, shape (250,), values in 1…1024. SoundStream embeddings: float32, shape (500, D). Acoustic tokens Y: int, shape (500, 12), values in 1…1024. Flattened stage-2 input: int, shape (2250,). Output waveform : float32, shape (160000,). Six objects. Every number in that list is derived in Chapter 3 from three facts: 16 kHz input, stride product 320, and w2v-BERT's 25 Hz output rate.

Every symbol, once, with an analogy

The paper's notation is compact and it never repeats a definition. Here is the complete key; refer back to it whenever a superscript surprises you.

SymbolMeaningAnalogy
x, TWaveform and its sample countThe raw film negative and its grain count
Reconstructed waveformThe print made from the negative
z, TSSemantic token sequence and its lengthThe screenplay: what happens, no cinematography
Y, TAAcoustic token matrix (TA rows × Q columns)The lighting and lens setup, per frame
yqtThe token from quantizer q at frame tLayer q of correction applied to frame t
QNumber of RVQ layers (12 for speech)How many correction passes the codec makes
Q′Coarse/fine split point (4)Where "the look" ends and "the polish" begins
NCodebook size per quantizer (1024)How many options each correction pass may choose from
KNumber of k-means clusters (1024)The size of the screenplay’s alphabet
oiOffset added when flattening, oi = ((i−1) mod Q) · NA prefix that says which pass a code came from
ts, taEnd of the prompt, in semantic and acoustic framesWhere the given footage stops and generation starts

Two notational traps worth pointing at directly. First, Y is a matrix, z is a vector — the acoustic representation has a second axis (the quantizer index) that the semantic representation does not. Almost every confusing sentence in Section III is confusing because of that asymmetry. Second, superscripts on y are quantizer indices, not exponents. yQ′t is "the Q′-th quantizer's code at time t," never "y to the power Q′."

Where the product objective comes from

The product in Component 2 is not a modeling choice; it is an identity. Any joint distribution over a sequence factorizes by the chain rule of probability, exactly, with no assumptions:

p(h1, h2, …, hT′) = p(h1) · p(h2|h1) · p(h3|h1,h2) · … · p(hT′|h<T′)

Nothing has been lost. What the architecture chooses is how to compute each conditional: with a causal Transformer that attends over all previous positions. A model that attends over only the previous 20 tokens is making an approximation; a full-context causal Transformer is not.

This matters for audio in a way it does not for text. In text, a 512-token window covers a paragraph and most dependencies are local. In audio, a limited window is precisely the WaveNet failure — the receptive field ends before the word does. The chain rule says nothing is lost in principle; the receptive field says everything is lost in practice. Tokenization is what makes the principle achievable.

One consequence to hold: at generation time, every token is drawn from the model's own distribution conditioned on tokens it itself produced. There is no ground truth to fall back on. This is why sampling temperature is not a cosmetic knob — it shifts the distribution the entire remaining generation is conditioned on.

Sampling versus argmax

Why sample at all? Take the greedy path — always emit the highest-probability token — and the generation is deterministic given the prompt. Two problems, one aesthetic and one fatal.

The aesthetic problem: a single prompt yields a single continuation, forever. The acoustic-generation experiment in Chapter 7 depends on running the same semantic tokens through stage 2 repeatedly and getting different speakers. Greedy decoding makes that experiment impossible.

The fatal problem: greedy decoding on an autoregressive model over a high-entropy stream falls into loops. The most likely next token given a stretch of near-silence is more near-silence; the most likely token after that is more of the same. Text LMs show this as repeated phrases; audio LMs show it as a held tone or a stuck hum. Temperature sampling with T < 1 keeps most of the sharpening benefit while retaining enough entropy to escape.

pT(i) = exp(logiti / T) / Σj exp(logitj / T)
T → 0 : argmax  ·  T = 1 : the model’s own distribution  ·  T → ∞ : uniform

The Transformer itself, and a parameter count that does not quite add up

The paper uses "identical decoder-only Transformers in all stages." The configuration, verbatim from Section IV-B:

HyperparameterValueWhat it controls
Layers12Depth of the residual stack
Attention heads16Parallel attention subspaces (64 dims each)
Embedding dimension d1024Width of the residual stream
Feed-forward dimension4096Inner width of the MLP (4× expansion)
Dropout0.1Regularization
Positional schemeT5-style relativePosition enters attention as a learned bias per relative offset
Stated size0.3B per stageThree stages ⇒ ~0.9B total for the LMs

Do the arithmetic yourself rather than accepting the 0.3B. Per Transformer block, the attention projections (query, key, value, output) are four d×d matrices:

4 · d2 = 4 · 10242 = 4 · 1,048,576 = 4,194,304

The feed-forward block is two matrices, d×4096 and 4096×d:

2 · d · 4096 = 2 · 1024 · 4096 = 8,388,608

Per block: 4,194,304 + 8,388,608 = 12,582,912, plus a few thousand for the two layer norms. Times 12 blocks:

12 · 12,582,912 = 150,994,944 ≈ 0.151B

Add the token embedding table — even a generous 5,120-entry vocabulary at d = 1024 is only 5.2M — and the relative-position bias tables, which are tiny. The stated dimensions account for roughly 0.15B, not 0.3B.

What to do with a number that does not reconcile. Not panic, and not assume the paper is wrong. Parameter counts depend on conventions that papers rarely spell out: untied input and output embeddings over a large flattened vocabulary, separate conditioning stacks, or a wider configuration than the one printed. The lesson is the habit, not the discrepancy: always recompute the headline numbers you are given from the dimensions you are given. When they match, you have verified your understanding of the architecture. When they do not, you have found the exact place where the description is incomplete — which is far more useful than a number you memorized.

One genuinely interesting choice in that table is relative positional embeddings. Absolute position embeddings tie the model to the crop length it was trained on; a model trained on 750-position crops has never seen position 900. Relative embeddings encode "how far back" rather than "where," which is what you want for a signal with no canonical origin. Audio has no sentence-initial token. Every position is the middle of something.

Why the tokenizers are frozen — and what it costs

The paper flags this as one of two "aspects to emphasize": the tokenizer and detokenizer "are pre-trained and frozen ahead of training the language model, which decouples the tokenizers and the language model and simplifies the training setup."

Decoupling is a real engineering benefit and it is easy to underrate. SoundStream is trained with reconstruction losses plus adversarial losses — a GAN, with all the instability that implies. w2v-BERT is trained with a masked-language-modeling loss plus a contrastive loss on 0.6B parameters. The language models are trained with plain cross-entropy. Joining those three optimization problems into one would mean tuning a GAN, a contrastive objective, and an autoregressive objective simultaneously, with gradients from the LM pulling the codebook around while the discriminator pulls it somewhere else. Nobody wants that.

Freezing also means the tokenizers can be trained once and reused. All three stages share one SoundStream and one w2v-BERT. Change the LM architecture and you do not retokenize your 60,000 hours of audio.

But be honest about the cost, because the paper is not. A frozen codebook is optimized for reconstruction, not for predictability. SoundStream's RVQ minimizes waveform distortion at a given bitrate; nothing in its objective encourages the resulting token sequence to be easy for a language model to predict. It is entirely possible that a slightly worse codec would produce a much more learnable token stream. AudioLM does not test this, and the question stayed open for years.

Frozen vs trained, stated as a rule you can carry. In any stacked system, ask of each component: what objective shaped it, and is that objective aligned with the job it now has? Here: SoundStream was shaped by rate–distortion and now serves as a prediction target (misaligned, tolerated). w2v-BERT was shaped by masked prediction and now serves as a semantic summarizer (well aligned — masked prediction is exactly the pressure that produces phoneme-like units). The k-means quantizer was fit to those activations and now defines a vocabulary (aligned, but with K chosen by sweeping downstream metrics rather than by any intrinsic criterion). Two out of three is a good score for a system paper.

What a "token" even is here

This is where audio language modeling diverges from text in a way that trips people up, so let us be blunt about it.

In text, token 4,281 is " the", and there is a sense in which the model inherits meaning from the token's form — subword pieces share characters, and embeddings for related pieces end up related partly because they co-occur with related contexts.

In audio, token 511 is the 511th centroid of a k-means fit, or the 511th entry in a learned codebook. The index is arbitrary. Index 511 and index 512 have no relationship whatsoever; they were assigned in whatever order the initialization produced. There is no ordering, no arithmetic, no similarity readable from the number.

The consequence: the Transformer's embedding table must learn the entire geometry of the codebook from co-occurrence statistics alone. It sees only "index 511 tends to follow index 88 and precede index 903." From that it must reconstruct the fact that 511 and 512 are acoustically adjacent — or fail to, and pay for it in likelihood.

This is not a flaw, it is just the setting. And it explains a design choice that would otherwise look strange: the per-layer offsets in the flattening scheme (Chapter 4). When you flatten a TA×Q matrix of RVQ codes into one sequence, index 7 from quantizer 1 and index 7 from quantizer 2 mean totally different things. The offsets keep them as distinct vocabulary entries rather than collapsing them.

The loss, with actual numbers

Maximizing a product of probabilities is minimizing a sum of negative log probabilities — cross-entropy, one term per token. Watch it happen on a toy vocabulary of four semantic tokens.

Suppose at some position the model emits logits over four candidate tokens:

logits  =  [ 2.0,   0.5,   −1.0,   0.3 ]   (candidates A, B, C, D)

Step 1 — exponentiate. e2.0 = 7.389056, e0.5 = 1.648721, e−1.0 = 0.367879, e0.3 = 1.349859.

Step 2 — sum. 7.389056 + 1.648721 + 0.367879 + 1.349859 = 10.755515.

Step 3 — divide. p(A) = 7.389056 / 10.755515 = 0.68700. p(B) = 1.648721 / 10.755515 = 0.15329. p(C) = 0.367879 / 10.755515 = 0.03421. p(D) = 1.349859 / 10.755515 = 0.12550. They sum to 1.00000, as they must.

Step 4 — score the truth. Say the ground-truth next token was D. The loss at this position is

−ln p(D) = −ln(0.12550) = 2.0757 nats = 2.0757 / ln 2 = 2.9948 bits

Three bits of surprise. For calibration: a uniform guess over 1024 semantic tokens costs log21024 = 10 bits. A trained model averaging 3 bits per semantic token is compressing the stream by a factor of more than three beyond the tokenizer's own 250 bps — which is a concrete way of saying "the model has learned that speech is predictable."

Temperature, and why 0.6

At inference AudioLM uses temperature sampling with temperatures of 0.6, 0.8 and 0.6 for the three stages. Temperature divides the logits before the softmax. Run the same four numbers at T = 0.6:

Step 1 — divide. [2.0, 0.5, −1.0, 0.3] / 0.6 = [3.3333, 0.8333, −1.6667, 0.5].

Step 2 — exponentiate. e3.3333 = 28.0316, e0.8333 = 2.3009, e−1.6667 = 0.18888, e0.5 = 1.64872. Sum = 32.1701.

Step 3 — divide. p(A) = 0.87135, p(B) = 0.07152, p(C) = 0.00587, p(D) = 0.05125.

The top candidate went from 0.687 to 0.871; the tail candidate C fell from 3.4% to 0.6%. Temperature below 1 sharpens. The paper's justification is one sentence: "we found that these temperature values provide a good trade-off between diversity and semantic consistency of the generated speech."

Why is stage 2 the loosest (0.8) and the two ends tighter (0.6)? The paper does not say, but the structure of the problem does. Stage 1 decides what is said: sample too hot and the sentence wanders into nonsense, which the sWUGGY/sBLIMP probes in Chapter 8 would punish immediately. Stage 3 decides fine detail: sample too hot and you inject noise into the very stage whose only job is removing artifacts. Stage 2 decides voice and room: this is where you actually want diversity, since the acoustic-generation experiments in Chapter 7 depend on the same semantic tokens producing many different speakers. The temperature schedule is a diversity budget, spent where diversity is desirable.

Why decoder-only, and how conditioning gets in

Stages 2 and 3 are conditional models — stage 2 needs the whole semantic sequence, stage 3 needs the coarse acoustic tokens. The textbook architecture for conditional sequence modeling is an encoder–decoder with cross-attention. The paper uses neither. It uses a decoder-only Transformer and puts the conditioning in the sequence, as a prefix.

Concretely, stage 2's training sequence is written out in full in Section III-C, and it is worth transcribing because it is the least intuitive object in the paper:

( z1, z2, …, zTS,   y11, y21, …, yQ′1,   y12, y22, …, yQ′2,   … , yQ′TA )

All the semantic tokens first, in order. Then the coarse acoustic tokens, flattened. The paper adds one clarifying detail: "with y11 being the first token predicted during training" — meaning the loss is not applied to the semantic prefix at all in stage 2. Those positions are conditioning, not targets.

Why prefix rather than cross-attention? Three reasons, in descending order of how much the paper cares. It keeps all three stages architecturally identical, so one implementation serves everything. It lets the conditioning participate in the same relative-position scheme as the targets. And it sidesteps the alignment question entirely: a prefix does not need to be time-synchronized with what follows, which — recall the deduplication wrinkle from Chapter 0 — is exactly the property this system needs.

The cost is sequence length. Cross-attention would let stage 2 attend to 250 semantic tokens without spending 250 positions of its own context. Prefixing spends them. At 2,250 total positions, 11% of stage 2's context is conditioning. That is affordable; at longer crops it would not be.

How much does tokenization actually buy?

Time to make the compression concrete. The sim below is a calculator you can feel: drag the duration and watch every derived quantity move — sample count, token counts per stream, the flattened sequence length each stage actually sees, and the attention cost of each option on a log scale.

Sim 1 — Rate ladder: from samples to tokens to attention cost

Drag the duration slider. The four bars are, top to bottom: raw samples, acoustic tokens (all 12 quantizers), the flattened stage-2 sequence, and semantic tokens. Bar length is log-scaled. The right-hand readout shows n2 for each — the number that decides whether the experiment is runnable.

Push the slider to 30 seconds and read the top two bars. Raw samples: 480,000. Semantic tokens: 750. The attention costs differ by a factor of 410,000. That is the entire justification for the tokenizer, drawn to scale.

Now push to 3 seconds and look at the stage-3 row. 1,800 tokens — comfortably inside the "up to 103–104" regime the paper calls acceptable, and small enough that the stage can be run on independent chunks in parallel batches. Chapter 4 explains why that independence is legitimate.

The training loop, in code

There is nothing audio-specific left once tokenization is done. Here is stage 1 in full — if you have written a character-level language model, you have written this:

python — stage 1 training, complete
# z: int tensor (B, Ts) of semantic tokens, values in [0, 1023]
# 30-second crops => Ts = 750 before dedup

logits = model(z[:, :-1])                 # (B, Ts-1, 1024)
loss   = cross_entropy(
             logits.reshape(-1, 1024),
             z[:, 1:].reshape(-1))       # next-token, teacher forced
loss.backward()

# that is the entire objective. No audio loss, no spectrogram loss,
# no adversarial term — those all live inside the frozen SoundStream.

Notice what is absent. No mel-spectrogram L1 term. No multi-scale STFT loss. No discriminator. All of the perceptual machinery that makes neural audio sound good has been pushed inside the frozen codec, where it was trained once and forgotten. The language models never touch a waveform.

That is the deepest structural point of the paper, and it is easy to miss because it takes the form of an absence: AudioLM contains no audio-specific loss function. It is three text-style language models in a trench coat, and the trench coat is SoundStream.

Where "teacher forcing" bites later

The training loop above conditions each prediction on ground-truth previous tokens. The paper is explicit: each stage is "trained for predicting next tokens given all previous ground-truth tokens in the corresponding stage."

At inference, stages 2 and 3 are conditioned on tokens the previous stage generated, not on ground truth. This is exposure bias, and in a cascade it compounds: a slightly off-distribution semantic sequence from stage 1 becomes the conditioning for stage 2, whose output becomes conditioning for stage 3.

Does it hurt? Chapter 7 gives the measurement. When stage 2 is fed ground-truth semantic tokens, the resulting audio transcribes at 6.0% word error rate versus 2.6% for a straight SoundStream reconstruction. So the semantic→acoustic mapping alone costs about 3.4 points of WER, before stage 1 has contributed any error at all. The paper says as much: "most of the errors are coming from the mapping of semantic to acoustic tokens."

Gap to hold open. We now know the cascade loses something at the semantic→acoustic boundary. We do not yet know what. Is it phonetic confusion? Prosodic mismatch? Something about proper nouns? Chapter 7 names it precisely, and the answer is more specific and more interesting than "noise."

The vocabulary budget, stage by stage

Because tokens from different sources must not collide, each stage works over a composite vocabulary. Laying it out removes a lot of later confusion:

StageReadsPredictsDistinct symbol blocks
1 — semanticz<tzt1 block of K = 1024
2 — coarse acousticall of z, then coarse y so faryqt for q ≤ 41×1024 semantic + 4×1024 acoustic = 5120
3 — fine acousticcoarse y, then fine y so faryqt for q > 44×1024 coarse + 8×1024 fine = 12,288

Stage 3 has the largest vocabulary and the shortest sequences; stage 1 has the smallest vocabulary and the longest sequences. That inverse relationship is not an accident — it falls straight out of the bitrate ladder. Coarse information is cheap per symbol and must span long times. Fine information is expensive per symbol and only needs to span a moment.

Stage 1 · long & narrow
750 positions (30 s crop), 1024-way choice each. Total context in bits: 750 × 10 = 7,500.
Stage 2 · medium & medium
2,250 positions (10 s crop), 5120-way vocabulary. Context: 250 semantic + 2,000 coarse acoustic tokens.
Stage 3 · short & wide
1,800 positions (3 s chunk), 12,288-way vocabulary. Batched over independent chunks.

One more consequence, easy to overlook: because each stage is a separate model with a separate vocabulary, the three stages could in principle have different architectures. The paper chooses identical ones — "we use identical decoder-only Transformers in all stages" — which is a simplicity decision, not a necessity. Later work in this lineage (notably the RQ-Transformer style designs) exploits exactly that freedom.

Inline check

(a) Why does the LM's vocabulary size for the acoustic stages exceed 1024 even though each RVQ codebook has exactly 1024 entries?
Because flattening adds per-layer offsets: quantizer q's codes occupy a disjoint block of the vocabulary. With Q′ = 4 coarse layers the stage-2 acoustic vocabulary is 4 × 1024 = 4096 entries, plus the semantic conditioning vocabulary.

(b) If you doubled the SoundStream frame rate from 50 Hz to 100 Hz at fixed Q, what happens to reconstruction quality and to stage-2 attention cost?
Quality improves (more bits); attention cost quadruples (sequence doubles, cost is quadratic). This is constraint 1 versus constraint 2 from Chapter 0, felt in a single knob.

(c) The paper removes consecutive repetitions of semantic tokens in the first two stages. What does that do to the effective token rate, and why would you want it?
It compresses runs: a phoneme spanning three 40 ms frames that lands in the same cluster three times becomes one token. Effective rate drops below 25/s, so a 30-second crop fits comfortably. It also removes a trivially predictable pattern — predicting "same again" is free likelihood that teaches the model nothing.

One closing observation about component 3, the detokenizer. It is the only part of the system that ever touches a waveform at inference, and it is completely deterministic given the tokens. All the creativity, all the sampling, all the uncertainty lives upstream in the discrete world. The audio is merely what falls out.

The cascade's three failure surfaces

Before moving to the tokenizers, name the places a three-stage system can break. You will meet all three again with numbers attached.

SurfaceFailure modeMeasured in
Stage 1 aloneThe semantic sequence is fluent-sounding but not English — wrong syntax, non-wordsCh 8: sWUGGY 71.5 / 83.7, sBLIMP 64.7
Stage 1 → 2 boundaryThe right words become the wrong sounds; content leaks away in the mappingCh 7: WER 6.0 vs 2.6 for straight reconstruction
Stage 2 → 3 boundaryFine detail contradicts coarse structure; audible artifacts remainCh 2/3: ViSQOL 3.3 (2000 bps) → 3.9 (6000 bps)

Every one of those has a number, and every number comes from a different measurement instrument: a phonetic probe, an ASR system, a perceptual quality proxy. That is what a well-instrumented systems paper looks like — one metric per interface, not one metric for the whole pipeline.

Cross-domain bridge:
This chapter is the compiler view of audio. A tokenizer is a front end that lowers a continuous signal to an intermediate representation; a language model is an optimizer over that IR; the detokenizer is a back end that emits the target. And exactly as in a compiler, the interesting engineering is in choosing the IR — LLVM's success is not its optimizer, it is the decision about what the IR should represent. AudioLM's contribution is a two-level IR. If you have read our self-supervised speech lesson, the semantic level is already familiar; Chapter 3 builds the acoustic level from scratch.

Chapter 2 puts the two candidate tokenizations on a bench and measures them. Everything after that is consequence.

Read it with one question in mind: if these two codes were not complementary, what would AudioLM be? The answer is: an unnecessarily complicated way to do what GSLM already did. The complementarity is the load-bearing empirical fact.

The paper emphasizes two aspects of the framework. One is that T′ ≪ T. What is the second, and why does it matter mechanically?

Chapter 2: SHOWCASE — Two Tokens, One Trade-off

This is the chapter the paper is built on. Everything before it is motivation; everything after it is consequence. If the two tokenizations did not genuinely complement each other, AudioLM would be a needlessly complicated way to do something simpler.

So: measure them. Take the same speech, encode it two ways, and ask two questions of each encoding. Question one: can you still hear the difference between "bit" and "bet"? Question two: can you rebuild the waveform? The answers are startlingly lopsided in opposite directions, and Table I of the paper is one of the cleanest complementarity results you will find anywhere.

The two questions, made into instruments

You cannot measure "does it carry meaning" directly. You need a probe that is sensitive to linguistic content and insensitive to everything else, and a second probe that is sensitive to waveform fidelity and indifferent to meaning. The paper picks one of each.

Probe 1 — ABX error rate, for phonetic discriminability. ABX is a distance-based metric with no training and no classifier. You take a set of phoneme trigrams that differ only in the central phoneme — the canonical pair is "bit" versus "bet." Then:

A
One recorded instance of "bit"
B
One recorded instance of "bet"
X
A different instance of "bit" — the item to be matched
↓ score it
Error if d(X, B) < d(X, A)
i.e. if the representation puts X nearer the wrong word. ABX error rate = fraction of triplets that err. Lower is better.

Two variants matter enormously here. In the within-speaker condition, A, B and X come from the same speaker. In the across-speaker condition, A and B share a speaker and X comes from a different one. The gap between the two numbers is a direct readout of how much speaker information contaminates the representation — and that gap turns out to be the sharpest evidence in the entire table.

The paper computes ABX "using scripts published with the Libri-Light dataset with the default settings" and reports on LibriSpeech dev-clean. Standard tooling, standard split; no room for a thumb on the scale.

Probe 2 — ViSQOL, for reconstruction quality. ViSQOL is "a computational proxy for perceived similarity between a reference audio and its reconstruction," run in "speech" mode on 16 kHz signals. It outputs a number on a roughly 1–5 mean-opinion-score scale: 1 means "this does not resemble the reference," 5 means "perceptually identical." Higher is better.

And here is the crucial methodological move, easy to skim past: to measure reconstruction quality from semantic tokens at all, the authors train a SoundStream decoder to reconstruct audio from those tokens. The semantic tokenizer has no native decoder. They built the fairest possible one — the same decoder family that makes SoundStream sound good — and pointed it at w2v-BERT-derived codes. If the semantic tokens contained the waveform information, this decoder would find it.

Why this protocol is fair, in one sentence each. Same evaluation set (LibriSpeech dev-clean). Same metric implementations (Libri-Light's ABX scripts, ViSQOL v3 speech mode). Same decoder architecture for both token types. And — the detail that closes the last loophole — "to allow uniform comparison across the two representations, we represent speech using residual vector-quantized embeddings, where each frame is represented by its corresponding centroid for w2v-BERT or by the output of a SoundStream quantizer." Both sides are reduced to quantized frame embeddings before anything is measured.

ABX by hand, on five numbers

ABX is one of those metrics that sounds abstract until you compute one. Do it in two dimensions.

Pretend each utterance has been reduced to a 2D point where the first coordinate captures something speaker-ish (vocal tract length, say) and the second captures something vowel-ish (the height of the vowel). Take a within-speaker triplet from speaker S1:

A = "bit" #1 = (0.40, 0.90)  ·  B = "bet" #1 = (0.85, 0.30)  ·  X = "bit" #2 = (0.55, 0.75)

Step 1 — distance from X to A. Differences: 0.55 − 0.40 = 0.15 and 0.75 − 0.90 = −0.15. Squares: 0.0225 and 0.0225. Sum: 0.0450. Square root: d(X, A) = 0.2121.

Step 2 — distance from X to B. Differences: 0.55 − 0.85 = −0.30 and 0.75 − 0.30 = 0.45. Squares: 0.0900 and 0.2025. Sum: 0.2925. Square root: d(X, B) = 0.5408.

Step 3 — score. 0.2121 < 0.5408, so X is nearer the other "bit". Not an error. Within-speaker, this representation works.

Now the across-speaker condition. Speaker S2 has a systematic offset in this space — a longer vocal tract shifts the first coordinate up, a different recording chain shifts the second down. Say the offset is (+0.35, −0.30). Then S2's "bit" lands at:

X′ = (0.55 + 0.35,  0.75 − 0.30) = (0.90, 0.45)

Step 4 — distance from X′ to A. Differences: 0.90 − 0.40 = 0.50 and 0.45 − 0.90 = −0.45. Squares: 0.2500 and 0.2025. Sum: 0.4525. Root: d(X′, A) = 0.6727.

Step 5 — distance from X′ to B. Differences: 0.90 − 0.85 = 0.05 and 0.45 − 0.30 = 0.15. Squares: 0.0025 and 0.0225. Sum: 0.0250. Root: d(X′, B) = 0.1581.

Step 6 — score. 0.1581 < 0.6727: X′ is nearer "bet". Error. The speaker offset — which has nothing to do with the vowel — was large enough to swamp the phonetic difference entirely.

That single worked triplet is the within/across gap. A representation that encodes speaker identity strongly will pass the within-speaker test and fail the across-speaker one. A representation that has discarded speaker identity will score nearly the same on both. Hold that thought for exactly one table.

From one triplet to an error rate

One triplet gives a bit. An ABX score aggregates over thousands. The procedure: enumerate every valid (A, B, X) triplet in the evaluation set, score each, average.

Make the paper's headline numbers concrete by putting them back into counts. Suppose you evaluate 1,000 within-speaker triplets:

RepresentationABX withinErrors per 1,000 tripletsCorrect
Semantic, 250 bps6.7%67933
Semantic, 6000 bps5.6%56944
Acoustic, 2000 bps22.4%224776
Acoustic, 6000 bps17.8%178822

The acoustic representation gets one in five wrong. That is not a subtle degradation; it is a representation in which "bit" and "bet" are frequently not distinguishable by distance. Chance on this task is 50%, so 22.4% is far better than random — the information has not vanished, it has been buried under variation the metric cannot ignore.

Here is the whole metric in code, which fits in ten lines and is worth reading because it removes any remaining mystery:

python — ABX error rate, from scratch
import numpy as np

def abx_error(triplets):
    """triplets: list of (A, B, X) arrays; A and X are the SAME trigram."""
    errors = 0
    for A, B, X in triplets:
        dA = np.linalg.norm(X - A)          # distance to the right anchor
        dB = np.linalg.norm(X - B)          # distance to the wrong anchor
        errors += int(dB < dA)               # nearer the wrong one => error
    return 100.0 * errors / len(triplets)

# real ABX uses DTW-aligned frame sequences, not single vectors,
# and averages over speaker/context conditions — but this IS the idea.

Two refinements the real implementation adds and this sketch omits. Utterances are variable-length frame sequences, so the distance is a dynamic-time-warping alignment cost rather than a Euclidean norm. And the averaging is stratified by speaker and phonetic context so that a few prolific speakers cannot dominate. Neither changes the logic: nearer the right anchor, or not.

A brief aside on scale, since the numbers in the table below are about to be compared across metrics with opposite polarities: ABX is an error rate, so lower is better; ViSQOL is a quality score, so higher is better. Getting the arrows the wrong way round on Table I inverts the entire argument, and it is an easy mistake to make at a glance.

Calibrating ViSQOL

"ViSQOL 1.1" means nothing until you know the scale. The metric targets a mean-opinion-score-like range, and it is worth carrying a rough conversion:

ViSQOLRoughly meansWhere it appears in this paper
~1.0–1.5The reconstruction does not perceptually resemble the referenceSemantic tokens, both bitrates (1.1 and 1.4)
~2.0–2.5Recognizable, heavily degraded — old telephonyNothing in this paper
~3.0–3.5Clearly good; artifacts audible on careful listeningAcoustic tokens at 2000 bps (3.3) — the stage-2 output
~3.8–4.5Close to transparent for speechAcoustic tokens at 6000 bps (3.9) — the stage-3 output

Now the third stage's existence has a number attached. It moves the system from 3.3 to 3.9 — from "clearly good" to "close to transparent" — and it costs 4000 of the 6000 total bits per second to do it. That is the price of the last increment of perceptual quality, and it is the reason stage 3 was given its own model, its own vocabulary, and its own chunking scheme.

Table I, the result the paper turns on

TokenizationBitrateABX within (↓)ABX across (↓)ViSQOL (↑)
Semantic (w2v-BERT)250 bps6.77.61.1
6000 bps5.66.21.4
Acoustic (SoundStream)2000 bps22.428.73.3
6000 bps17.826.63.9

Read it three times, each time looking for something different.

First reading — the columns are anti-correlated. The rows that are good at ABX are bad at ViSQOL and vice versa, with no overlap and no middle. Semantic tokens err on 6.7% of within-speaker triplets; acoustic tokens err on 22.4%, more than three times as often. Semantic tokens reconstruct at ViSQOL 1.1; acoustic tokens at 3.3, which is the difference between "unusable" and "good."

Second reading — bitrate does not convert one into the other. Compare the two 6000 bps rows, which are matched bit for bit. Semantic: ABX 5.6/6.2, ViSQOL 1.4. Acoustic: ABX 17.8/26.6, ViSQOL 3.9. At identical information budgets the two representations remain in completely different regimes. Raising the semantic bitrate 24-fold bought 1.1 points of ABX and 0.3 points of ViSQOL. It did not turn semantic tokens into acoustic tokens. This is the negative result promised in Chapter 0, and it is what rules out the "just pick a middle bitrate" solution.

Third reading — the within/across gap. Compute it yourself; the paper never does, and it is the most revealing number on the page:

TokenizationBitrateAcross − withinInterpretation
Semantic250 bps7.6 − 6.7 = 0.9Changing speaker barely perturbs the representation
Semantic6000 bps6.2 − 5.6 = 0.6Even less, with more bits
Acoustic2000 bps28.7 − 22.4 = 6.3Speaker change costs 7× more than for semantic tokens
Acoustic6000 bps26.6 − 17.8 = 8.8More bits makes the speaker sensitivity worse
The single most informative derived number in this paper. More acoustic bits increase the across-speaker penalty, from 6.3 to 8.8. Think about what that means. The extra bits are not being spent on phoneme identity — if they were, both ABX numbers would fall together. They are being spent on speaker- and channel-specific detail, which helps you match a vowel to itself only when the speaker is held fixed, and actively hurts you when it changes. The acoustic code is becoming more of a speaker fingerprint as you give it room. That is precisely the property AudioLM will later exploit to preserve a speaker's voice from a 3-second prompt.

SHOWCASE — reconstruct from each, side by side

Now stop reading numbers and look at them. The sim below runs the same source clip down two paths simultaneously. Left column: the semantic path — w2v-BERT features, standardized, k-means-quantized, then decoded. Right column: the acoustic path — SoundStream encoder, RVQ, decoder. The top row shows what survives in the representation; the bottom row shows the reconstruction against the original.

Sim 2 — SHOWCASE: the same audio, tokenized two ways

The centre strip is the source: a schematic spectrogram with a phoneme track (what is said) and a speaker/room track (who says it, where). Each side keeps one and destroys the other. Use the bitrate buttons to move both sides along Table I’s rows, and watch the ABX/ViSQOL readouts change to the paper’s actual measured values. Press Rebuild to re-run the reconstruction animation.

Watch the phoneme track on the left survive the k-means bottleneck almost intact while the speaker/room track collapses to a flat gray — that is ViSQOL 1.1 drawn as a picture. On the right the speaker/room track comes through in full colour while the phoneme boundaries smear — that is ABX 22.4. Switch to matched 6000 bps and notice how little moves. Both sides get slightly sharper. Neither side crosses over.

Play with ABX directly

The second sim lets you build triplets yourself. Drag X around and watch the decision flip; toggle the representation between "semantic-like" (speaker axis compressed) and "acoustic-like" (speaker axis expanded) and see the same triplet score differently.

Sim 3 — The ABX triplet lab

A and B are fixed anchors ("bit" and "bet" from one speaker). Drag X — the two distance readouts update live and the verdict flips when the nearer anchor changes. The speaker offset slider moves X the way a different speaker would. Toggle the representation to see why the same offset is harmless in one space and fatal in the other.

Two things to try. First, put X exactly halfway between A and B and nudge it — the verdict is knife-edge, which is what a hard triplet looks like. Second, set the representation to acoustic-like and push the speaker offset to maximum: the verdict flips even though you never moved X along the vowel axis. That is the 6.3-point across-speaker penalty, generated by your own hand.

The experiment that proves the negative half

Tables are one kind of evidence; a broken model is another. The paper does not merely argue that acoustic tokens alone are insufficient — it trains that model and reports what it sounds like.

The setup: flatten the acoustic token matrix Y in row-major order into a single sequence, train a decoder-only Transformer on it, prompt with 4 seconds of speech, and sample a continuation. The verdict, verbatim: "While both the recording conditions and the speaker identity from the prompt are preserved, the linguistic content is inconsistent, and often akin to babbling."

Every clause of that sentence is a result. Recording conditions preserved → the acoustic tokens carry room and channel. Speaker identity preserved → they carry voice. Linguistic content inconsistent → they do not carry meaning, or the LM cannot find it at that timescale. This is Chapter 0's babble problem, reproduced under controlled conditions with the paper's own components.

And note what they explicitly did not do: train the mirror-image model on semantic tokens alone. The reason is given in one clause — "we perform this on the acoustic tokens, since the semantic tokens only allow for poor audio synthesis." You cannot listen to a semantic-only model, because there is nothing to listen to. ViSQOL 1.1 is not a quality complaint; it is a statement that the audio is not there.

An inference the paper leaves to you. How do you even get 6000 bps out of semantic tokens? w2v-BERT emits features at 25 Hz. With a 1024-entry codebook that is 250 bps for a single quantizer. To reach 6000 you need 25 · Q · log21024 = 6000, which gives Q = 24 residual quantization layers stacked on the w2v-BERT embeddings. The paper only says both sides are represented "using residual vector-quantized embeddings," but the arithmetic pins it down. That is a lot of residual layers spent describing a 1024-dimensional feature vector — and the result still reconstructs at ViSQOL 1.4, because the w2v-BERT features themselves have discarded the waveform. You cannot quantize your way back to information the encoder threw away.

What each representation is actually optimized to keep

Step back and ask why the result comes out this way. It is not mysterious once you look at the training objectives.

Semantic (w2v-BERT + k-means)Acoustic (SoundStream RVQ)
Trained toPredict masked spans of its own discretized activations; contrast true futures against distractorsReconstruct the waveform under reconstruction + adversarial losses at a bitrate bottleneck
Rewarded for keepingWhatever predicts distant context: phoneme identity, word identity, syntaxWhatever a discriminator can hear: timbre, room, noise floor, phase-ish structure
Rewarded for discardingSpeaker, channel, absolute pitch — nuisance variation that does not help predict the masked spanNothing, up to the bit budget; it keeps whatever is perceptually loudest
ConsequenceABX 6.7 / ViSQOL 1.1ABX 22.4 / ViSQOL 3.3

The middle row of that table is the whole explanation. Masked prediction over long spans is an invariance-inducing objective: information that varies within a speaker's utterance but does not help predict the future is a liability, so the encoder learns to throw it away. Rate–distortion with an adversary is a fidelity-inducing objective: every bit that makes the output more convincing is worth keeping, and speaker identity is extremely audible.

These are not two settings of one dial. They are two different questions asked of the same signal, and the answers happen to be complementary. That complementarity is a gift of the objectives, not a design achievement — which is exactly why the authors had to measure it before building on it.

The honest limit of this evidence. Table I is measured on English read speech (LibriSpeech dev-clean) with a phonetic probe designed for English phoneme trigrams. It says nothing about tonal languages, where pitch is phonemic and a speaker-invariant representation might discard contrastive information. It says nothing about music, where "phonetic discriminability" has no meaning at all — and indeed the paper offers no analogue of Table I for the piano experiments. The complementarity is demonstrated in one domain and assumed in the other.

Why not just interleave the two streams?

Given two complementary token types, the most obvious combination is to interleave them into one sequence — z1, y1, z2, y2, … — and train a single language model. One model instead of three. Why did the paper not do that?

Section III-C gives two reasons, and the second is the practical one.

Reason one is statistical. The hierarchy "reflects the conditional independence assumption that semantic tokens are expected to be conditionally independent from past acoustic tokens given past semantic tokens." Written out: p(zt | z<t, y<t) ≈ p(zt | z<t). If that is true, the interleaved model is spending its capacity attending to tokens that carry no information about the prediction it is making. Worse, they are the numerous tokens — acoustic tokens outnumber semantic ones 24 to 1 — so the semantic signal is diluted in a sea of irrelevant context.

Reason two is arithmetic. "The token sequence per stage is reduced compared to alternatives such as modeling the interleaved sequence of semantic and acoustic tokens, allowing for computationally more efficient training and inference." Do the numbers for ten seconds. Interleaved, all 12 quantizers: 250 semantic + 6,000 acoustic = 6,250 positions, and the model must handle all of it in one context. Split into stages: 2,250 for stage 2 and 1,800 for stage 3 (on 3-second chunks, batched). Attention cost of the interleaved model is 6,2502 = 39.1 million pairs; the hierarchical version pays 5.06 million for stage 2 and 3.24 million per chunk for stage 3.

interleaved: 6,2502 = 3.91 × 107
hierarchical: 2,2502 + 1,8002 = 5.06 × 106 + 3.24 × 106 = 8.30 × 106
ratio ≈ 4.7× cheaper — before counting that stage 3’s chunks parallelize

Nearly five times cheaper, and the saving grows with duration because the quadratic term dominates. The hierarchy is not merely an inductive bias; it is a compute decision that the inductive bias happens to justify.

Chapter 4 takes this apart properly, including the choice to split acoustic modeling into two stages rather than one. But you now have the shape of the argument: every structural decision in AudioLM is a sequence-length decision wearing a probabilistic costume.

How you would reproduce Table I

The measurement is more approachable than it looks. Sketch of the pipeline, end to end:

python — reproducing Table I, sketch
# --- 1. build both token streams for LibriSpeech dev-clean ---
Z = {u: semantic_tokens(wav) for u, wav in devclean}   # (Ts,)   25 Hz
Y = {u: acoustic_tokens(wav) for u, wav in devclean}   # (Ta, Q) 50 Hz

# --- 2. map each frame back to its quantized EMBEDDING (not the index) ---
Ez = {u: centroids[z]            for u, z in Z.items()}   # centroid per frame
Ey = {u: rvq.dequantize(y)      for u, y in Y.items()}   # sum of Q codewords

# --- 3. ABX on the embeddings, Libri-Light scripts, default settings ---
abx_within, abx_across = libri_light_abx(Ez)      # -> 6.7 / 7.6

# --- 4. ViSQOL needs audio, so train a decoder FROM the tokens ---
dec_z = train_soundstream_decoder(inputs=Ez, targets=wavs)
visqol_z = visqol(dec_z(Ez), wavs, mode="speech")      # -> 1.1

Step 2 is the one people get wrong. ABX is a distance metric, so it needs vectors, not integers — the codebook index 511 has no geometry. You must map each frame back to the embedding its token represents: the k-means centroid on the semantic side, the sum of chosen codewords on the acoustic side. That is what the paper means by "each frame is represented by its corresponding centroid for w2v-BERT or by the output of a SoundStream quantizer."

Step 4 is the expensive one: a whole decoder has to be trained just to make the semantic side measurable. That is not a formality — it is the fairest possible attempt to extract audio from a code that does not want to give any.

Inline check

(a) Semantic tokens at 6000 bps have better ABX than at 250 bps. Why does AudioLM use the 250 bps version anyway?
Because the improvement is 1.1 ABX points for 24× the sequence length. Stage 1 would go from 750 positions to 18,000 for a 30-second crop, and attention cost would rise 576-fold, to buy phonetic discriminability the downstream stages do not consume directly.

(b) If someone reports a new tokenizer with ABX 6.0 and ViSQOL 3.5, what have they achieved?
They have collapsed AudioLM's premise: one code with both properties, which would make the whole hierarchy unnecessary. Be suspicious, then check the bitrate and the evaluation split — and check whether ABX was computed across speakers.

(c) The paper trains an LM on acoustic tokens alone and reports babbling. Why is that experiment necessary rather than obvious?
Because Table I measures the representation, not the model. It is logically possible that a big enough Transformer could recover linguistic structure from acoustic tokens despite their poor ABX — the information is degraded, not absent (22.4% error is far below chance). The babbling result closes that gap empirically: at this scale, it does not.

A note on where "semantic" is and is not the right word

The paper calls one token type semantic, and the word does real work in the argument. It also overstates the case, and being precise about that will save you confusion later.

What the measurements actually establish is that these tokens are strongly phonetic (ABX 6.7) and largely speaker-invariant (across−within gap 0.9). Phonetic and speaker-invariant is not the same as semantic. A token stream that perfectly encoded phoneme sequences while understanding nothing would score exactly the same on both metrics.

The justification for the stronger word comes later, from Chapter 8's probes: a language model over these tokens prefers real words to non-words 71.5% of the time and grammatical sentences to ungrammatical ones 64.7% of the time. That is evidence about lexicon and syntax — which is closer to semantics, though still not identical to it.

The most defensible reading: semantic tokens are a phoneme-like code whose sequence statistics carry linguistic structure. The structure is in the sequence, not in the individual token. Token 511 does not mean anything; the transition from 511 to 88 to 903 does. That is exactly how text tokens work too, and it is why the analogy holds.

Keep the distinction because it predicts where the framework will strain. Anything that is linguistically meaningful but not phonetically marked — irony, reference, discourse structure — is not obviously carried by these tokens, and the paper never claims it is.

What would falsify the complementarity claim

A claim worth believing is one you can say how to break. Three results would force a retreat from this chapter's thesis; none has been observed in the AudioLM setting.

Observation that would break itWhy it would matter
A single tokenizer reaching ABX < 8 and ViSQOL > 3.5 at 6000 bps on dev-cleanBoth objectives in one code; the hierarchy becomes unnecessary complexity
An acoustic-token-only LM, scaled up, producing sWUGGY/sBLIMP scores near AudioLM’sBabbling was a capacity problem, not a representation problem
Semantic tokens whose across−within ABX gap grows with bitrateThe invariance story would be backwards — the semantic code would be picking up speaker detail too

Keep the list. It is also a research agenda: the second row in particular has been probed repeatedly by later work, and the answer has stayed "representation, not capacity" at the scales anyone has tried.

Concept and realization: what actually flows

Close the chapter by tracing the data, since a table of metrics is not yet an implementation.

Semantic path — shapes
waveform (160000,) float → w2v-BERT layer 7 (250, 1024) float → per-dimension standardize (250, 1024) → k-means assign (250,) int in [0,1023] → centroid lookup (250, 1024) float → trained SoundStream decoder → waveform (160000,) at ViSQOL 1.1
↓ same source audio ↓
Acoustic path — shapes
waveform (160000,) float → SoundStream encoder (500, D) float → RVQ (500, 12) int in [0,1023] → sum of 12 centroids (500, D) float → SoundStream decoder → waveform (160000,) at ViSQOL 3.9

Notice the asymmetry in the middle steps. The semantic path replaces each frame with one centroid — a single 1024-dimensional vector chosen from 1024 options. The acoustic path replaces each frame with a sum of twelve centroids, each chosen from its own 1024-entry codebook. That is 1024 possible frame values versus 102412. The representational capacity per frame differs by a factor beyond astronomical, and the frame rate differs by 2× on top of it.

Said that way, ViSQOL 1.1 versus 3.9 stops being surprising and starts being arithmetic. What is surprising — genuinely, and it is the paper's real find — is that the 1024-option-per-frame code is the one that knows what the sentence means.

Cross-domain bridge:
This is the lossy versus lossless in the right basis lesson from information theory, made audible. JPEG throws away high-frequency chroma because the eye does not care; a phoneme label throws away the speaker because the syntax does not care. Both are lossy compressions optimized against a downstream consumer — and the moment you change the consumer, the "right" compression changes completely. AudioLM's insight is to keep two compressions because it has two consumers: a language model that consumes structure and an ear that consumes sound.
In Table I, the acoustic tokens' across-speaker ABX penalty grows from 6.3 points (at 2000 bps) to 8.8 points (at 6000 bps), while the semantic tokens' penalty shrinks from 0.9 to 0.6. What does this pattern tell you?

Chapter 3: Building the Two Tokenizers

Chapter 2 measured the two token types. This chapter builds them. By the end you will have hand-computed a residual vector quantization from raw numbers, derived every rate in the paper from the sample rate, and seen exactly why a single line of preprocessing — subtract the mean, divide by the standard deviation, per dimension — is described as "significantly" improving phonetic discriminability.

Take the acoustic side first, because it is the one where the arithmetic is unforgiving.

SoundStream, from sample rate to token rate

SoundStream's encoder is a stack of strided convolutional blocks. The paper gives the configuration exactly: "4 convolutional blocks having strides (2, 4, 5, 8)." Each stride divides the temporal resolution. Multiply them:

2 × 4 × 5 × 8 = 320

So the encoder emits one embedding per 320 input samples. At 16 kHz:

16,000 samples/s ÷ 320 = 50 embeddings/s  ⇒  one every 20 ms
TA = T / 320

That is the whole derivation, and it is worth doing once by hand because every other number in the acoustic pipeline hangs off it. Ten seconds of audio → 160,000 samples → 500 embeddings. Three seconds → 48,000 samples → 150 embeddings.

The paper calls this "a 16000 / 50 = 320-fold reduction in the sampling rate." Notice it is a reduction in rate, not in information: each of those 50 embeddings per second is a real-valued vector of substantial dimension. The information reduction happens in the next step.

Why one codebook cannot possibly work

Vector quantization replaces a continuous vector with the index of its nearest entry in a learned codebook. Simple, and it has a fatal scaling property.

To hit 6000 bits per second at 50 frames per second, each frame must carry

6000 bits/s ÷ 50 frames/s = 120 bits per frame

A single codebook carrying 120 bits per frame needs 2120 entries. Write that out: approximately 1.3 × 1036 codewords. There is not enough matter in the solar system to store the codebook, let alone data to train it. Even the modest 2000 bps configuration needs 40 bits per frame — 240 ≈ 1.1 × 1012 entries. Still impossible.

This is the single motivation for RVQ, and it is purely combinatorial. A codebook's size grows exponentially in the bits it carries, but its training data requirement and nearest-neighbour cost grow with it. Residual vector quantization escapes by factorizing: instead of one codebook with 2120 entries, use twelve codebooks with 210 = 1024 entries each. Total bits: 12 × 10 = 120. Total storage: 12 × 1024 = 12,288 codewords. Same bit budget, twelve thousand codewords instead of a decillion. The cost is that the twelve choices are made greedily and sequentially rather than jointly optimally — which is exactly the structure AudioLM will later exploit to split coarse from fine.

Residual vector quantization, the algorithm

Four lines, and they are the entire method:

1. Quantize
Find the nearest codeword in codebook 1 to the input vector. Record its index.
2. Subtract
Compute the residual: what the first codeword failed to capture.
3. Repeat
Quantize the residual with codebook 2. Subtract again. Continue for Q layers.
4. Reconstruct
The approximation is the sum of the chosen codewords. Each layer refines the previous.

The consequence that matters for AudioLM: the layers are ordered by importance. Layer 1 captures the bulk of the vector's energy; layer 12 captures a whisper. Truncating after layer 4 gives a valid, coarser reconstruction — which is precisely what stage 2 predicts and stage 3 refines. The paper states the interpretation directly: "tokens from the coarse quantizers recover acoustic properties like speaker identity and recording conditions, while leaving only the fine acoustic details to the fine quantizer tokens."

Hand-worked RVQ: every intermediate step

Two dimensions, three quantizers, four codewords each. Small enough to do on paper, structurally identical to the real thing.

The input vector (think of it as one 20 ms SoundStream frame, radically simplified):

x = (0.62, −0.35)    ‖x‖ = √(0.622 + 0.352) = √(0.3844 + 0.1225) = √0.5069 = 0.7120

The three codebooks (learned; here just given):

IndexC1 (coarse)C2 (mid)C3 (fine)
0(0.50, −0.50)(0.10, 0.10)(0.02, 0.02)
1(0.80, 0.10)(−0.10, 0.05)(−0.02, 0.04)
2(−0.60, 0.40)(0.05, −0.15)(0.01, 0.05)
3(0.00, 0.90)(−0.05, −0.05)(−0.01, −0.03)

Notice the codebooks shrink in scale: coarse entries have magnitude ~0.5–0.9, mid ~0.1, fine ~0.03. That is not a coincidence — it is what training produces, because each codebook is fit to the residual distribution left by the previous one, and residuals get smaller.

Layer 1 — quantize x. Squared distance to each C1 entry, every arithmetic step:

kx − C1ksquaresd2
0(0.62−0.50, −0.35−(−0.50)) = (0.12, 0.15)0.0144 + 0.02250.0369 ← min
1(0.62−0.80, −0.35−0.10) = (−0.18, −0.45)0.0324 + 0.20250.2349
2(0.62+0.60, −0.35−0.40) = (1.22, −0.75)1.4884 + 0.56252.0509
3(0.62−0.00, −0.35−0.90) = (0.62, −1.25)0.3844 + 1.56251.9469

Winner: index 0, at squared distance 0.0369, i.e. distance √0.0369 = 0.1921.

Residual after layer 1: r1 = x − C10 = (0.62 − 0.50, −0.35 + 0.50) = (0.12, 0.15). Its norm is √(0.0144 + 0.0225) = √0.0369 = 0.1921, which is the same number — the residual norm is the quantization error. That identity is worth pausing on: in RVQ, the error you make at one layer becomes the input to the next.

Layer 2 — quantize r1 = (0.12, 0.15).

kr1 − C2ksquaresd2
0(0.12−0.10, 0.15−0.10) = (0.02, 0.05)0.0004 + 0.00250.0029 ← min
1(0.12+0.10, 0.15−0.05) = (0.22, 0.10)0.0484 + 0.01000.0584
2(0.12−0.05, 0.15+0.15) = (0.07, 0.30)0.0049 + 0.09000.0949
3(0.12+0.05, 0.15+0.05) = (0.17, 0.20)0.0289 + 0.04000.0689

Winner: index 0, d2 = 0.0029, d = √0.0029 = 0.0539.

Residual after layer 2: r2 = r1 − C20 = (0.12 − 0.10, 0.15 − 0.10) = (0.02, 0.05).

Layer 3 — quantize r2 = (0.02, 0.05).

kr2 − C3ksquaresd2
0(0.02−0.02, 0.05−0.02) = (0.00, 0.03)0.0000 + 0.00090.0009
1(0.02+0.02, 0.05−0.04) = (0.04, 0.01)0.0016 + 0.00010.0017
2(0.02−0.01, 0.05−0.05) = (0.01, 0.00)0.0001 + 0.00000.0001 ← min
3(0.02+0.01, 0.05+0.03) = (0.03, 0.08)0.0009 + 0.00640.0073

Winner: index 2, d2 = 0.0001, d = 0.0100.

Residual after layer 3: r3 = (0.02 − 0.01, 0.05 − 0.05) = (0.01, 0.00).

The reconstruction. Sum the three chosen codewords:

x̂ = C10 + C20 + C32 = (0.50, −0.50) + (0.10, 0.10) + (0.01, 0.05)
= (0.50 + 0.10 + 0.01,  −0.50 + 0.10 + 0.05) = (0.61, −0.35)
error = x − x̂ = (0.01, 0.00),  ‖error‖ = 0.0100

The tokens. Three integers: (0, 0, 2). Six bits total, at log24 = 2 bits per layer. From a 2D real vector to six bits, with 1.4% relative error.

Watching the error collapse

After layerResidualNorm% of ‖x‖SNR = 20·log10(‖x‖/‖r‖)
0 (nothing)(0.62, −0.35)0.7120100.0%0.00 dB
1 (coarse)(0.12, 0.15)0.192127.0%11.38 dB
2 (mid)(0.02, 0.05)0.05397.6%22.43 dB
3 (fine)(0.01, 0.00)0.01001.4%37.05 dB

Roughly 11 dB per layer, which is a useful rule of thumb: each residual quantizer buys about two bits of effective precision. It also makes the coarse/fine split legible. The first layer alone removes 73% of the vector's magnitude. In the real codec, Q′ = 4 layers remove enough that what remains is inaudible as structure — you can hear that it is compressed, but you can identify the speaker, the room, and the words. That is why stage 2 stops at 4.

Why greedy is good enough, and where it is not. RVQ chooses each layer's codeword greedily — nearest to the current residual — rather than searching jointly over all 43 = 64 combinations (or 102412 in the real thing). Greedy is provably suboptimal: a slightly worse layer-1 choice can leave a residual that layers 2 and 3 handle far better. In practice the loss is small because the codebooks are trained on the residual distributions the greedy procedure actually produces, so each codebook is matched to its own input. It is a fixed point, not an accident. The place it bites is bitrate scalability: because layer q is trained against layer q−1's greedy residuals, you cannot reorder or drop a middle layer.

Flattening, with the same three numbers

Chapter 4 does this properly, but the arithmetic belongs here while the tokens are fresh. The three tokens (0, 0, 2) come from three different codebooks, and "0 from codebook 1" is a completely different object from "0 from codebook 2." To put them in one sequence for a language model, the paper adds an offset:

oi = ((i − 1) mod Q) · N

With Q = 3 layers and N = 4 codewords, the offsets for the three positions are 0·4 = 0, 1·4 = 4, 2·4 = 8. Applying them:

raw tokens  (0, 0, 2)
offsets     +(0, 4, 8)
flattened   (0, 4, 10)  — three distinct symbols in a vocabulary of Q·N = 12

In the real system, Q′ = 4 coarse layers with N = 1024 gives a coarse acoustic vocabulary of 4096 symbols, and the fine stage's 8 layers give 8192. Same trick, bigger numbers.

The same computation, three ways

Form one was arithmetic on paper. Form two is the loop, written so every line maps to a step above:

python — RVQ from scratch, step by step
import numpy as np

x = np.array([0.62, -0.35])

C = [np.array([[ 0.50, -0.50], [ 0.80, 0.10], [-0.60, 0.40], [ 0.00, 0.90]]),
     np.array([[ 0.10,  0.10], [-0.10, 0.05], [ 0.05,-0.15], [-0.05,-0.05]]),
     np.array([[ 0.02,  0.02], [-0.02, 0.04], [ 0.01, 0.05], [-0.01,-0.03]])]

r, codes = x.copy(), []
for q, Cq in enumerate(C):
    d2 = ((Cq - r) ** 2).sum(axis=1)      # squared distance to every codeword
    k  = int(d2.argmin())                   # greedy nearest
    codes.append(k)
    r  = r - Cq[k]                          # the residual becomes the next input
    print(f"layer {q+1}: code={k}  residual={r}  norm={np.linalg.norm(r):.4f}")

# layer 1: code=0  residual=[0.12 0.15]  norm=0.1921
# layer 2: code=0  residual=[0.02 0.05]  norm=0.0539
# layer 3: code=2  residual=[0.01 0.00]  norm=0.0100

xhat = sum(Cq[k] for Cq, k in zip(C, codes))    # [0.61 -0.35]
Q, N = len(C), len(C[0])
flat = [k + (i % Q) * N for i, k in enumerate(codes)]  # [0, 4, 10]

Form three is the library call, which does all of the above plus codebook learning, exponential-moving-average updates, and dead-code restarts:

python — the one-liner
from vector_quantize_pytorch import ResidualVQ

rvq = ResidualVQ(dim=2, num_quantizers=3, codebook_size=4)
quantized, indices, commit_loss = rvq(x)     # indices -> tensor([0, 0, 2])

# SoundStream's real configuration, for comparison:
#   ResidualVQ(dim=D, num_quantizers=12, codebook_size=1024)
#   at 50 Hz that is 50 * 12 * log2(1024) = 6000 bits per second

Three forms, one computation. If the third one ever surprises you, drop back to the first.

Feel it: the residual staircase

Sim 4 — Residual vector quantization, layer by layer

The target vector is the white-hot dot; codewords are the small marks. Step advances one quantizer: the nearest codeword lights up, the reconstruction arrow extends, and the residual (the dashed remainder) shrinks. The bar chart tracks residual norm and cumulative bitrate. Drag the target to see how the greedy path changes.

Drag the target far from every coarse codeword and watch the first residual stay large — the later layers cannot fully recover, because they were trained for small residuals. That is quantization error you can see, and it is why codebook coverage matters more at layer 1 than anywhere else.

Every rate in the paper, derived

ConfigurationFrame rateQCodebookbits/frameBitrateTokens/s
Semantic (w2v-BERT + k-means)25 Hz1K = 102410250 bps25
Acoustic, coarse only (stage 2)50 Hz4N = 1024402000 bps200
Acoustic, full (stages 2+3)50 Hz12N = 10241206000 bps600
Piano codec (Sec. IV-I)50 Hz3N = 214 = 16,384422100 bps150

Every cell is the same formula: rate × Q × log2(codebook). The piano row is the interesting one — the authors traded quantizer depth for codebook width, using 3 layers of 16,384 entries instead of 12 layers of 1,024. The paper says this "already provides high reconstruction quality," so they skip stage 3 entirely for music. Chapter 8 returns to why piano tolerates that and speech does not.

Now the semantic side: w2v-BERT

The other tokenizer is a 0.6-billion-parameter Conformer trained with two self-supervised objectives at once: a masked language modeling loss (predict discretized targets for masked spans) and a contrastive loss (pull true continuations closer than distractors). No transcripts. No labels.

Its output geometry: "w2v-BERT performs downsampling along the temporal dimension, so that real-valued 1024-dimensional feature vectors are computed at a sampling rate of 25 Hz (one every 40 ms)." Hence

TS = T / 640    (16,000 / 25 = 640 samples per semantic frame)

Twice the temporal stride of SoundStream, which is where the "factor of 2" in Figure 2's caption comes from — for every semantic token there are two acoustic frames, hence 2Q′ coarse acoustic tokens.

Why an intermediate layer, and which one

Here is a choice that looks arbitrary and is not: the paper takes activations from the 7th layer of the MLM module, not from the final layer.

The intuition comes from layer-wise analyses of self-supervised speech models. Early layers stay close to the acoustics — they still encode speaker and channel. Late layers specialize toward the pre-training objective's own targets, which are not necessarily phonetic. The phoneme-like abstraction peaks somewhere in the middle. Figure 3 (left) of the paper plots ABX for layers 6 through 9 and shows exactly this shape: a minimum, with worse scores on either side.

The selection procedure is stated honestly and is refreshingly unglamorous: "we adopt a set of heuristics for choosing the intermediate layer to quantize and the number of k-means clusters K. Namely, we inspect ABX, sWUGGY and sBLIMP scores computed for different layers… In addition, we performed a small subjective evaluation test by listening to a few continuations." Three quantitative probes plus listening. The winner: layer 7, K = 1024.

Read that as a template, not a detail. There is no principled criterion for "which layer of a self-supervised model is the semantic one." The authors swept it against the metrics they actually care about downstream — phonetic discriminability, lexical judgement, syntactic judgement — and then listened. When you build on a frozen encoder, the layer index is a hyperparameter, and it must be swept against your task, not inherited from someone else's paper.

The one line of preprocessing that changes everything

"We found that normalizing w2v-BERT embeddings such that each dimension has zero mean and unit variance before clustering significantly improves their phonetic discriminability."

That sentence is easy to skim. It should not be. k-means uses Euclidean distance, and Euclidean distance is dominated by whichever dimensions have the largest scale. If one dimension of the w2v-BERT feature encodes something loud and non-phonetic — overall gain, a speaker-correlated bias — it will dominate every distance computation, and the clusters will partition speakers rather than phonemes.

Watch it happen in three dimensions reduced to two. Let dimension 1 be a large-scale, speaker-correlated feature and dimension 2 be a small-scale, phoneme-correlated one. Three frames:

FrameRaw (dim1, dim2)What it is
a(100.0,  1.0)/b/ spoken by speaker A
b(100.4, −1.0)/d/ spoken by speaker A
c(108.0,  1.1)/b/ spoken by speaker B

Distances before normalization. d(a, b): differences (0.4, −2.0), squares 0.16 and 4.00, sum 4.16, root 2.0396. d(a, c): differences (8.0, 0.1), squares 64.00 and 0.01, sum 64.01, root 8.0006.

So a is nearly four times closer to b — a different phoneme from the same speaker — than to c, the same phoneme from a different speaker. Run k-means with K = 2 on this data and you get one cluster per speaker. Your "semantic" tokens are speaker IDs.

Now standardize. Say over the corpus dimension 1 has mean 104 and standard deviation 5, while dimension 2 has mean 0 and standard deviation 1:

a′ = ((100.0 − 104)/5,  (1.0 − 0)/1) = (−0.80,  1.00)
b′ = ((100.4 − 104)/5, (−1.0 − 0)/1) = (−0.72, −1.00)
c′ = ((108.0 − 104)/5,  (1.1 − 0)/1) = ( 0.80,  1.10)

Distances after normalization. d(a′, b′): differences (−0.08, 2.00), squares 0.0064 and 4.0000, sum 4.0064, root 2.0016. d(a′, c′): differences (−1.60, −0.10), squares 2.5600 and 0.0100, sum 2.5700, root 1.6031.

The verdict has flipped. a is now closer to c — same phoneme, different speaker — than to b. k-means will cluster by phoneme. One preprocessing step, one changed answer, and the difference between a semantic tokenizer and an expensive speaker-ID system.

Sim 5 — Standardize, then cluster

Left: raw w2v-BERT-like features, where a high-variance nuisance dimension stretches the cloud horizontally. Right: the same points after per-dimension standardization. Press Cluster to run k-means on whichever view is active and watch which partition it finds — speakers or phonemes. The nuisance scale slider controls how loud the non-phonetic dimension is.

Turn the nuisance scale to maximum on the raw view and cluster: the boundary is vertical, splitting speakers. Switch to the standardized view and cluster again: the boundary rotates to horizontal, splitting phonemes. Same data, same algorithm, different metric — because standardization is a change of metric.

k-means, and what "the token" finally is

python — the complete semantic tokenizer
import numpy as np
from sklearn.cluster import MiniBatchKMeans

# 1. features from an INTERMEDIATE layer, not the last
F = w2v_bert.forward(wav, return_layer=7)       # (Ts, 1024) float, 25 Hz

# 2. per-dimension standardization — mu/sigma fit on the CORPUS, not the clip
F = (F - mu) / sigma                            # (Ts, 1024)

# 3. k-means fit once, offline, on a large sample of frames
km = MiniBatchKMeans(n_clusters=1024).fit(F_corpus)

# 4. the semantic tokens ARE the centroid indices
z = km.predict(F)                                # (Ts,) int in [0, 1023]

# 5. dedup: collapse consecutive repeats (stages 1 and 2 only)
z = z[np.insert(np.diff(z) != 0, 0, True)]

Step 2 deserves one emphasis. The mean and standard deviation are corpus statistics, computed once and frozen. Standardizing per-clip would be a subtly different — and worse — operation: it would remove exactly the between-clip variation you might want, and it would make the tokenizer non-causal within a clip.

And now the answer to "what is a semantic token, really": it is the index of the nearest of 1,024 centroids, in a standardized 1,024-dimensional space, of the 7th-layer activation of a masked-language model, computed every 40 ms. Nothing more mystical than that. The paper notes the lineage plainly: "our proposal for the extraction of semantic tokens from w2v-BERT resembles the token extraction from HuBERT in prior works."

What the paper does not tell you about step 3. How many frames was the k-means fit on? How was it initialized? How stable is K = 1024 across seeds? None of this is stated. For a component that defines the vocabulary of the entire first stage, that is a meaningful gap — and it is the kind of gap that makes exact reproduction of a systems paper hard even when every architectural detail is given.

Inline check

(a) A 3-second stage-3 chunk: how many acoustic frames, and how many fine tokens?
48,000 samples / 320 = 150 frames. Fine layers Q − Q′ = 8, so 150 × 8 = 1,200 fine tokens, plus 150 × 4 = 600 coarse tokens as conditioning: 1,800 positions.

(b) Why is codebook 3 in the hand-worked example so much smaller in magnitude than codebook 1?
Because it is fit to the residual distribution left after two layers, and residuals shrink by roughly 11 dB per layer. A fine codebook with coarse-sized entries would overshoot every residual it was asked to represent.

Why does SoundStream use 12 codebooks of 1024 entries rather than one codebook large enough to carry the same bitrate?

Chapter 4: The Hierarchy

We have two token streams and we know what each one carries. The remaining question is the one every reader asks at this point and the paper answers in a single dense subsection: why three models? Two would seem enough — one for semantics, one for sound. Why is the acoustic half split in two?

The answer is sequence length, twice over, dressed as two conditional-independence assumptions. This chapter takes the dressing off.

The three factors, with every symbol named

Section III-C writes down three conditional distributions. Here they are, followed by a full symbol key, because the superscripts and subscripts do a lot of work.

Stage 1 — semantic:   p( zt | z<t )
Stage 2 — coarse acoustic:   p( yqt | z,  y≤Q′<t,  y<qt )   for q ≤ Q′
Stage 3 — fine acoustic:   p( yqt | y≤Q′,  y>Q′<t,  y<qt )   for q > Q′
PieceReads as
yqtThe token from quantizer q at acoustic frame t — the thing being predicted
zAll semantic tokens, past and future, with no subscript — stage 2 sees the entire semantic plan before predicting any audio
y≤Q′<tAll coarse tokens at earlier frames — the acoustic history
y<qtThe tokens from coarser quantizers at the same frame — within-frame history
y≤Q′In stage 3: all coarse tokens, all frames — the complete coarse layer as conditioning
y>Q′<tFine tokens at earlier frames

Three observations that unlock the notation. First, z appears without a time subscript in stage 2: it is a complete prefix, not a running condition. Stage 2 knows the whole sentence before it renders the first 20 ms. Second, y<qt means generation is ordered within a frame: quantizer 1's token is chosen, then quantizer 2 conditioned on it, and so on. Coarse before fine, at every timestep. Third, stage 3's conditioning contains no z at all. That absence is the paper's second big assumption, and it is worth two sentences of its own: "considering that fine acoustic tokens are conditionally independent from semantic tokens when conditioned on coarse acoustic tokens, the third stage can ignore the semantic tokens, which reduces the total sequence length."

Flattening a matrix into a sentence

A language model consumes a 1D sequence. The acoustic representation is a 2D matrix: TA frames by Q quantizers. Something has to give, and the paper takes "the simple approach of flattening the acoustic tokens in a row-major order."

Row-major means: all quantizers of frame 1, then all quantizers of frame 2, and so on. Make it concrete with three frames and four coarse quantizers (Q′ = 4). Suppose the RVQ produced:

q = 1q = 2q = 3q = 4
frame 11790344512
frame 217887512
frame 364088441

Row-major flattening gives the raw sequence

(17, 903, 44, 512,  17, 88, 7, 512,  640, 88, 44, 1)

and now the problem from Chapter 1 bites. The 17 at position 1 came from quantizer 1; the 17 at position 5 also came from quantizer 1 (fine, same meaning) — but the 512 at position 4 came from quantizer 4 and the 512 at position 8 also from quantizer 4. What if a quantizer-2 code happened to be 17? The model would see the same symbol for two unrelated things.

The offsets fix it. The paper defines

oi = ( (i − 1) mod Q ) · N

where i is the position in the flattened sequence (1-indexed), Q the number of quantizers being flattened, N the codebook size. With Q = 4 and N = 1024 the offsets cycle 0, 1024, 2048, 3072, 0, 1024, 2048, 3072, …

Apply them to the twelve positions above, one at a time:

i(i−1) mod 4oirawoffset token
1001717
2110249031927
322048442092
4330725123584
5001717
611024881112
72204872055
8330725123584
900640640
1011024881112
1122048442092
123307213073

Now every symbol is unambiguous. Position 1's 17 and position 5's 17 are the same vocabulary entry, correctly, because they are both quantizer-1 codes. Position 3's 44 and position 11's 44 both map to 2092, also correctly. And nothing from quantizer 2 can ever collide with anything from quantizer 1, because their blocks are disjoint: [0, 1023] versus [1024, 2047].

The paper adds a parenthetical worth honoring: "In the following, we omit the offsets from the notation and assume proper offsetting implicitly." Every yqt you see afterwards secretly carries its offset.

Why row-major and not column-major? Column-major would mean: all of quantizer 1 for the whole clip, then all of quantizer 2, and so on. It has a real appeal — it groups tokens by semantic role, and the model would see a clean coarse-to-fine pass over the entire sequence. But it destroys locality in time: to predict frame 300's quantizer-2 code you would attend across 299 intervening quantizer-2 codes to reach frame 300's quantizer-1 code, which is the single most informative context you have. Row-major keeps the frame's own coarse codes immediately adjacent, at distance 1, 2, 3. Given that the RVQ layers are hierarchically dependent within a frame, adjacency is worth more than role-grouping.

The factor of two

SoundStream runs at 50 Hz; w2v-BERT at 25 Hz. Two acoustic frames per semantic token. Figure 2's caption states the consequence exactly: "for every semantic token there are 2Q′ acoustic tokens in the second stage and 2(Q − Q′) tokens in the third stage."

Q′ = 4 ⇒ 2Q′ = 8 coarse acoustic tokens per semantic token
Q − Q′ = 8 ⇒ 2(Q − Q′) = 16 fine acoustic tokens per semantic token

So the token budget per 40 ms of audio is: 1 semantic, 8 coarse, 16 fine. Twenty-five tokens to describe forty milliseconds. Twenty-four of them are about how it sounds; one is about what it says.

Now the arithmetic that justifies three stages

The paper's argument for splitting acoustic modeling in two is stated in one sentence — "we adopt the solution with two separate stages to limit the sequence length that the model has to process at once" — and then supported by two assumptions. Put numbers on it.

The merged alternative. One acoustic stage predicting all 12 quantizers, conditioned on semantics, on a 10-second crop:

semantic prefix: 10 · 25 = 250
acoustic: TA · Q = 500 · 12 = 6,000
total = 6,250 positions,  attention pairs = 6,2502 = 3.91 × 107

The split version. Stage 2 on a 10-second crop, stage 3 on 3-second chunks:

stage 2: 250 + 500 · 4 = 2,250 → 5.06 × 106 pairs
stage 3: 150 · 4 + 150 · 8 = 600 + 1,200 = 1,800 → 3.24 × 106 pairs per chunk

Two models whose largest context is 2,250, versus one model at 6,250. And the split has a second, larger benefit that the pair-count comparison understates: because stage 3's chunks are independent, they can be batched. Generating 30 seconds of fine detail is ten independent 3-second problems solved in parallel, not one 18,000-position problem solved serially.

The paper spells out that scaling property: performing stage 3 on non-overlapping 3-second chunks allows "us to scale this stage independently of the target audio sequence length as well as to use more residual quantization layers Q to achieve higher quality." Read the second clause again. The chunking is not only a compute saving — it is what makes Q = 12 affordable at all. A merged stage at Q = 12 on 30-second crops would be an 18,750-position sequence.

See the tape

Sim 6 — The token tape: matrix → flattened sequence, with offsets

The grid is the acoustic token matrix (frames × quantizers) with the semantic track above it. Press Flatten to watch row-major reading order sweep the grid and lay tokens onto the tape below, offsets applied live. Move the Q′ split to see which rows go to stage 2 (warm) and which to stage 3 (teal), and watch the two sequence-length readouts move in opposite directions.

Slide Q′ to 1 and stage 2 becomes tiny while stage 3 balloons; slide it to 11 and the reverse. Q′ = 4 is where both stay inside a few thousand positions — and, per Chapter 2, where the coarse reconstruction is already at ViSQOL 3.3, meaning speaker and room are fully captured before the split.

Why Q′ = 4 specifically. The paper's justification is one sentence: "we set Q′ = 4 such that we predict the flattened tokens corresponding to the coarse 4 layers in the second stage, whereas the third stage models the fine 8 layers. Hence, the third stage increases the audio bitrate from 2000 bps to 6000 bps, which… improves the audio quality significantly." So the split point is chosen so that stage 2's output is exactly the 2000 bps configuration measured in Table I. The evaluation and the architecture were designed together — Table I's rows are not arbitrary bitrates, they are the system's actual operating points.

The two assumptions, and what would break them

AssumptionFormal statementWhat it buysWhat would break it
Semantic autonomyp(zt | z<t, y<t) ≈ p(zt | z<t)Stage 1 needs no acoustic context: 750 positions for 30 s instead of 18,750Content that depends on voice — a speaker whose accent changes which words are likely, or music where timbre implies the next note
Fine localityy>Q′ ⊥ z  |  y≤Q′, and fine detail is determined locallyStage 3 drops z entirely and runs on independent 3 s chunks, batchedFine detail with long-range structure — a reverb tail longer than 3 s, or a sustained note whose fine partials evolve across chunk boundaries

That second failure mode is not hypothetical. Non-overlapping 3-second chunks mean the fine detail at t = 2.99 s and t = 3.01 s are generated by different forward passes with no shared context. Any artifact at a chunk boundary is a direct consequence. The paper does not report boundary artifacts, and the piano configuration sidesteps the issue entirely by having no stage 3 — but it is the obvious place to look if you were reproducing this and heard a periodic click every three seconds.

Building the three sequences, in code

Everything above is twenty lines of tensor manipulation. Reading it removes any remaining ambiguity about what each model actually consumes.

python — constructing the training sequences for all three stages
import numpy as np

N, Q, Qp = 1024, 12, 4          # codebook size, total quantizers, coarse split

def flatten_with_offsets(Y):    # Y: (Ta, q_count) int
    Ta, qc = Y.shape
    off = (np.arange(qc) * N)[None, :]    # (1, qc): 0, 1024, 2048, ...
    return (Y + off).reshape(-1)             # row-major -> (Ta*qc,)

# ---- stage 1: semantic only ----------------------------------------
seq1 = z_dedup                                # (~750,) for a 30 s crop

# ---- stage 2: full semantic prefix, then flattened coarse ----------
coarse = flatten_with_offsets(Y[:, :Qp])   # (Ta*4,) = (2000,) for 10 s
seq2   = np.concatenate([z_dedup, coarse + SEM_VOCAB])
# loss is applied ONLY from the first coarse position onward
mask2  = np.arange(len(seq2)) >= len(z_dedup)

# ---- stage 3: coarse conditioning, then flattened fine -------------
# run on independent NON-OVERLAPPING 3-second chunks (Ta_chunk = 150)
c_chunk = flatten_with_offsets(Y[s:s+150, :Qp])   # (600,)
f_chunk = flatten_with_offsets(Y[s:s+150, Qp:])   # (1200,)
seq3    = np.concatenate([c_chunk, f_chunk + COARSE_VOCAB])
mask3   = np.arange(len(seq3)) >= len(c_chunk)

# no semantic tokens appear in seq3 at all — that is the whole point

Three things to notice in that code. The + SEM_VOCAB and + COARSE_VOCAB shifts are the same offset trick applied at a higher level, keeping conditioning symbols disjoint from target symbols. The loss masks encode "conditioning is not a target" — the paper's "with y11 being the first token predicted during training." And seq3 is built from a slice Y[s:s+150], with no reference to anything outside that window.

Generation order, drawn

Within stage 2, the model walks the tape left to right. Because the tape is row-major, that walk has a specific rhythm worth internalizing:

… the whole semantic prefix …
Read, never predicted. Establishes what will be said.
frame 1: q1 → q2 → q3 → q4
Coarsest first. q2 is predicted knowing q1; q4 knows q1–q3. This is the y<qt term.
frame 2: q1 → q2 → q3 → q4
Now with all of frame 1 in context. This is the y≤Q′<t term.
↓ … 500 frames later … ↓
stage 3, per 3-second chunk
All 600 coarse tokens of the chunk, then 1,200 fine tokens in the same row-major rhythm. No semantics, no cross-chunk context.

The within-frame ordering is doing real work. Recall from Chapter 3 that RVQ layers are hierarchically dependent by construction — layer 2's codebook was fit to layer 1's residuals. Predicting q2 without knowing q1 would be predicting a residual without knowing what it is a residual of. Row-major flattening makes that dependency the shortest possible attention hop.

What this hierarchy is not

Two nearby ideas it is easy to conflate with AudioLM's cascade. Distinguishing them sharpens what is actually being claimed.

Nearby ideaHow it differs
A diffusion cascade (low-res model → upsampler)Diffusion cascades refine a continuous signal through noise levels, and each stage models the same variables at higher resolution. Here each stage models different variables — semantic tokens are not a low-resolution version of acoustic tokens; they are a different code entirely, with different content.
A VQ-VAE-2-style multi-scale priorCloser, but VQ-VAE-2's top and bottom codes come from one jointly trained autoencoder with a shared reconstruction objective. AudioLM's two codes come from two independently trained models with unrelated objectives — masked prediction and rate–distortion — that were never optimized to be compatible. The complementarity in Chapter 2 is discovered, not designed.
Coarse-to-fine within one RVQThis is what stages 2 and 3 split. But note that stage 1 sits outside the RVQ hierarchy entirely — it is not "an even coarser quantizer." Semantic tokens are not the top of the residual staircase; they are a separate staircase in a different space.

The third row is the one to keep. AudioLM's hierarchy has a seam in it. Below the seam (stages 2 and 3) is a genuine residual hierarchy where each level refines the previous in the same vector space. Above the seam (stage 1) is a different representation entirely, connected to the rest only by a learned mapping in stage 2. The paper's contribution is the seam.

The deduplication wrinkle, faced honestly

Chapter 0 flagged this; here is the full version.

Figure 2's caption says there are exactly 2Q′ acoustic tokens per semantic token, which presupposes a fixed 1:2 time alignment. Section IV-B says: "in the first two stages, we follow the previously proposed practice of removing consecutive repetitions of the semantic tokens."

These cannot both be literally true of the sequences the model sees. If a phoneme spans five 40 ms frames and lands in the same cluster all five times, deduplication turns five semantic tokens into one — while the corresponding 200 ms of audio still has ten acoustic frames and forty coarse tokens. The ratio is now 40:1, not 8:1, and it varies from segment to segment.

The consistent reading: the semantic tokens function as an unaligned prefix, not a synchronized track. Stage 2 gets the sequence of distinct semantic units and must work out the timing itself, from the acoustic history and from whatever prosodic information the semantic sequence implicitly carries. The 2Q′ statement describes the underlying frame rates, not the post-deduplication sequence.

Why deduplication is a good idea anyway. Two reasons, neither stated in the paper. Predicting "the same token again" is nearly free likelihood that teaches the model nothing — a run-length-encodable pattern eating capacity and gradient signal. And durations are the most speaker-variable part of speech: the same sentence from a fast and a slow speaker has wildly different repeat counts but identical dedup sequences. Removing repeats makes the semantic stream more invariant, pushing timing entirely into the acoustic stages where speaker identity already lives. It is a small choice that reinforces the whole architecture's separation of concerns.

Why not condition stage 3 on the semantic tokens anyway?

Suppose you disbelieved the conditional-independence assumption and wanted stage 3 to see z. What exactly would it cost?

The semantic prefix for a 3-second chunk is 75 tokens (fewer after dedup), so the chunk sequence grows from 1,800 to about 1,875 — a 4% increase. That sounds cheap. But it is not the cost that matters; it is the dependency.

Conditioning stage 3 on z means stage 3 can no longer be run on arbitrary coarse token sequences in isolation. You would need to carry the aligned semantic segment for every chunk, which reintroduces the alignment problem deduplication destroyed (Chapter 0's wrinkle), and you would couple stage 3's correctness to stage 1's output quality. Right now a stage-3 model is a pure function of coarse acoustic tokens; it can be retrained, replaced, or applied to coarse tokens from any source — including real audio — without touching the rest of the system.

That modularity is worth more than 4% of sequence length. It is also what made the piano configuration trivial: drop stage 3 entirely and nothing else changes.

The general shape of this decision. Conditional-independence assumptions in a cascade are rarely about statistics; they are about interfaces. Asserting that y>Q′ is independent of z given y≤Q′ is a declaration that the coarse tokens are a sufficient interface between the halves of the system. Once you make that declaration and hold to it, everything below the interface can be developed, tested and replaced independently. The statistical claim is what licenses the API boundary — and the API boundary is what you actually wanted.

Counting a real generation

Put it all together for the paper's headline task: a 3-second prompt continued for 7 seconds.

QuantityPrompt (3 s)Continuation (7 s)Total (10 s)
Samples at 16 kHz48,000112,000160,000
Semantic tokens (pre-dedup)75175250
Acoustic frames150350500
Coarse tokens (×4)6001,4002,000
Fine tokens (×8)1,2002,8004,000
Tokens the model must generate— (given)4,375

Four thousand three hundred and seventy-five autoregressive steps for seven seconds of audio. Compare: 112,000 steps if you generated waveform samples. Compare again: about 1,700 tokens for seven seconds of text at typical rates. AudioLM sits between text and waveform, roughly 2.5× the token cost of speaking the same content as text — which is a remarkably tight bound on "how much more expensive is sound than symbols."

Before the audit, one correction to a natural but wrong mental image: the three stages are not three resolutions of the same thing. Stages 2 and 3 are, but stage 1 lives in a different space entirely. Keep the seam visible.

A sanity check you can do in your head

Whenever you meet a hierarchical token system, run this three-line audit. It catches most misunderstandings.

Line 1 — what is the frame rate of each level, and what is their ratio? Here: 25 Hz and 50 Hz, ratio 2. That ratio is where every "factor of 2" in the paper comes from.

Line 2 — how many symbols per frame at each level, and from how many codebooks? Here: 1 symbol from 1 codebook of 1024 (semantic); 12 symbols from 12 codebooks of 1024 (acoustic). That asymmetry is why one is a vector and the other a matrix.

Line 3 — which levels are conditioning and which are targets, per stage? Here: stage 1 targets semantics with no conditioning; stage 2 conditions on semantics plus coarse history and targets coarse; stage 3 conditions on coarse and targets fine. Write that down and the three probability expressions reconstruct themselves.

The hierarchy as a set of interfaces

One more way to hold Chapter 4, which is the way you would hold it if you were building this rather than reading about it. Each stage boundary is an API, and each API has a contract:

InterfaceContractWhat may change on either side without breaking it
audio → zA sequence of integers in [1, K] at 25 Hz, deduplicated, carrying phonetic/structural contentAny SSL encoder, any layer, any K — as long as the sequence stays predictable and speaker-invariant
z → stage 2An unaligned prefix describing what is said over the whole windowReplace z with text, captions, or a joint embedding — this is precisely what MusicLM and VALL-E do
coarse y → stage 3A (TA, Q′) integer matrix that determines fine detail locallyAny Q′, any chunk length; stage 3 can be swapped for a non-autoregressive refiner
full Y → audioA (TA, Q) matrix decodable by the frozen codecAny codec with the same shape contract

Every successor in Chapter 9's lineage table is a substitution at exactly one of these four interfaces. That is why the architecture proved so durable despite every one of its components being replaced within two years.

Inline check

(a) Stage 2 sees all of z but only y<t. Why the asymmetry?
Because z is conditioning — produced entirely by stage 1 before stage 2 runs — while y is what stage 2 is generating, so causality forbids seeing the future. Prefix conditioning is non-causal by construction; target modeling is causal by necessity.

(b) You set Q′ = 12 (no stage 3). What survives and what breaks?
Quality survives at full 6000 bps — but stage 2's 10-second sequence becomes 250 + 6,000 = 6,250 positions, you lose the chunked parallelism, and you can no longer scale Q without scaling the crop. This is the merged alternative, priced out above.

(c) Why must the offsets cycle with period Q rather than being applied per-frame?
Because the ambiguity being resolved is "which quantizer produced this code," and that is a property of the column, not the row. Frame index is already encoded by position in the sequence; quantizer index is not, so it has to go into the symbol.

The hierarchy as a summary table

Stage 1Stage 2Stage 3
Predictsztyq≤4tyq>4t
Conditioned onz<tall z, coarse y<t, y<qtall coarse y, fine y<t, y<qt
Training crop30 s10 s3 s
Sequence length~750 (pre-dedup)2,2501,800
Vocabulary1,0241,024 + 4,0964,096 + 8,192
Bitrate produced250 bps (not decoded)2,000 bps+4,000 → 6,000 bps
Sampling temperature0.60.80.6
Runs onWhole sequence, serialWhole sequence, serialIndependent 3 s chunks, parallel

Every column of that table has been derived from first principles in this chapter and the last. If you can reconstruct it from the sample rate, the stride product, Q, Q′, and the two conditional-independence assumptions, you understand AudioLM's architecture completely. What remains is watching it run.

Cross-domain bridge:
The three stages are a progressive JPEG for time. Progressive image formats send a low-frequency pass first — you see the whole picture, blurry, immediately — then successive refinements. AudioLM sends the meaning first, then the voice, then the polish, and each pass is a separate autoregressive model rather than a separate DCT band. The insight both share: if your representation is ordered by perceptual importance, you can truncate anywhere and still have something valid. That is why setting Q′ = 3 with no stage 3 (the piano configuration) is a legitimate system and not a broken one.
Stage 3's conditioning omits the semantic tokens entirely. What is the concrete payoff of that omission?

Chapter 5: SHOWCASE — Watch Three Stages Run

Everything is assembled. Two tokenizers, three models, one flattening scheme, two conditional-independence assumptions. This chapter runs it — slowly, with the token streams visible — so that the sentence "AudioLM performs three subsequent stages" becomes something you have watched rather than something you have read.

Start with the exact procedure, because the paper's description of continuation is precise and every clause matters.

The continuation procedure, clause by clause

Setup. A prompt x of 3 seconds. Two indices name where the prompt ends: ts in semantic frames and ta in acoustic frames. For a 3-second prompt at 16 kHz:

ts = 3 · 25 = 75 semantic frames  ·  ta = 3 · 50 = 150 acoustic frames

Step 0 — tokenize the prompt. "We first map the prompt x to the corresponding semantic tokens z≤ts and to the coarse acoustic tokens y≤Q′≤ta." So we extract 75 semantic tokens (fewer after dedup) and 150 × 4 = 600 coarse acoustic tokens. Note what we do not extract: the prompt's fine acoustic tokens are never used as conditioning anywhere.

Step 1 — semantic continuation. "The first stage generates ẑ>ts, the continuation of semantic tokens autoregressively based on the conditioning z≤ts." Stage 1 sees only the prompt's semantic tokens and extends them. It has no idea who is speaking or what room they are in; it does not need to.

Step 2 — coarse acoustic continuation. This is the step that carries the voice, and its conditioning list is longer than you might expect. "We concatenate the entire semantic token sequence (z≤ts, ẑ>ts) along with the coarse acoustic tokens of the prompt y≤Q′≤ta and feed it as conditioning to the coarse acoustic model, which then samples the continuations of the corresponding acoustic tokens."

Read that carefully. Stage 2's input contains three things: the prompt's semantic tokens, the generated semantic tokens, and the prompt's coarse acoustic tokens. The full semantic plan — past and future — plus 3 seconds of the speaker's actual voice.

Step 3 — fine acoustic. "In the third stage, we process the coarse acoustic tokens with the fine acoustic model." No prompt-specific handling is described, because stage 3 does not distinguish prompt from continuation. It chunks whatever coarse sequence it is given and fills in fine detail everywhere.

Step 4 — decode. "Finally, we feed both the prompt and the sampled acoustic tokens to the SoundStream decoder to reconstruct a waveform x̂." The output includes the prompt, re-synthesized through the codec — which is exactly why the subjective evaluation in Chapter 8 compresses the ground-truth samples through SoundStream too. Otherwise the codec artifacts in the first 3 seconds would give the game away.

Where does the speaker's voice actually come from? Trace it. Stage 1 cannot carry it — Chapter 2 measured semantic tokens as nearly speaker-invariant (across−within ABX gap of 0.9). Stage 3 cannot carry it — it never sees the prompt as such. It enters at exactly one place: the 600 coarse acoustic tokens of the prompt, prepended to stage 2's sequence. The model continues that acoustic sequence, and because coarse RVQ codes are strongly speaker-dependent (across−within gap 6.3), continuing them coherently means continuing the voice. Speaker preservation is not a mechanism; it is a side effect of the acoustic tokens being a good speaker fingerprint. Chapter 7 measures it at 92.6% classification accuracy.

The three inference modes, side by side

The same three trained models produce three behaviors depending on what you clamp. This is worth its own table because the modes get conflated constantly.

UnconditionalAcoustic generationContinuation
Stage 1Sampled from scratchSkipped — ground-truth z usedPrompted with z≤ts, then sampled
Stage 2Conditioned on sampled zConditioned on ground-truth z, no acoustic promptConditioned on full z and the prompt's coarse y
Stage 3Same in all three modesSameSame
What varies run to runEverything: content, voice, roomVoice and room only — content is pinnedOnly the new content; voice and room are pinned by the prompt
Used in the paper forDemonstrating diversity (Sec. III-D)The two disentanglement experiments (Sec. IV-C, IV-D)The headline result and the human evaluation (Sec. IV-F, IV-G)

The middle column is the scientific instrument. By feeding real semantic tokens and resampling everything else, the authors isolate exactly one question: what information did the semantic tokens carry? Chapter 7 reads the answer off two probes.

SHOWCASE — the pipeline, running

Now watch it. The sim below is the paper's Figure 2 turned into a machine you can step through. The three token tracks are stacked; the prompt region is shaded; press Play and each stage fills in its continuation left to right, in the row-major rhythm from Chapter 4. The waveform at the bottom builds as the acoustic tokens arrive.

Sim 7 — SHOWCASE: the three-stage generation pipeline

Controls: Play runs all three stages in order. Step stage advances one stage at a time so you can inspect the intermediate state. The temperature slider changes how sharply each stage samples — push it up and watch the semantic track lose its repeated structure. Ablate semantics disconnects stage 1, reproducing the paper's acoustic-only babbling experiment: the voice track stays coherent, the meaning track scatters.

Four things to do with that sim, in order.

One. Play it once at default settings and watch the ordering. Stage 1 completes the entire semantic track before a single acoustic token appears. That is the "concatenate the entire semantic token sequence" clause made visual — stage 2 cannot start until stage 1 has finished, because it conditions on the whole plan.

Two. Step through and pause after stage 2. The waveform is already there, and already in the prompt's voice — but it is the 2000 bps version. Stage 3's contribution is the difference between that and the final trace, which is the ViSQOL 3.3 → 3.9 gap from Chapter 2.

Three. Turn the temperature up past 1.2 and replay. The semantic track loses its runs and its phrase-like grouping; the meaning blocks stop aligning. This is the diversity/consistency trade-off the paper's 0.6 was chosen to avoid, and it is why stage 1 gets the coldest temperature of the three.

Four. Toggle Ablate semantics. Stage 1 is disconnected and stage 2 runs on the acoustic prompt alone. The voice track — speaker colour, room shading — continues perfectly. The meaning track dissolves into unstructured fragments. That is the babbling result from Section III-B, reproduced in a picture: "both the recording conditions and the speaker identity from the prompt are preserved, the linguistic content is inconsistent, and often akin to babbling."

The same procedure, in code

Here is continuation written out with every conditioning list explicit. Compare it line by line against the four clauses above.

python — AudioLM continuation, with all conditioning explicit
def continuation(prompt_wav, seconds_out):
    # ---- step 0: tokenize the prompt ------------------------------
    z_p = semantic_tokens(prompt_wav)          # (ts,)      ts = 75 for 3 s
    Y_p = acoustic_tokens(prompt_wav)          # (ta, 12)   ta = 150
    coarse_p = Y_p[:, :4]                       # (150, 4) — the ONLY voice carrier

    n_new_sem = int(seconds_out * 25)           # 175 for 7 s
    n_new_ac  = int(seconds_out * 50)           # 350 frames

    # ---- step 1: semantic continuation, T = 0.6 -------------------
    z_hat = LM1.sample(prefix=z_p, n=n_new_sem, temperature=0.6)
    z_all = concat(z_p, z_hat)                  # (250,)

    # ---- step 2: coarse acoustic, T = 0.8 ------------------------
    # conditioning = ENTIRE semantic sequence + the prompt's coarse tokens
    cond2 = concat(z_all, flatten(coarse_p))     # 250 + 600 = 850 positions
    coarse_hat = LM2.sample(prefix=cond2,
                              n=n_new_ac * 4,       # 1400 tokens
                              temperature=0.8)
    coarse_all = concat(coarse_p, unflatten(coarse_hat, q=4))   # (500, 4)

    # ---- step 3: fine acoustic, T = 0.6, INDEPENDENT 3 s chunks ---
    fine_all = []
    for s in range(0, len(coarse_all), 150):        # 150 frames = 3 s
        chunk = coarse_all[s:s+150]                 # (150, 4)
        fine_all.append(LM3.sample(prefix=flatten(chunk),
                                  n=len(chunk) * 8,
                                  temperature=0.6))     # no z anywhere
    fine_all = unflatten(concat(*fine_all), q=8)     # (500, 8)

    # ---- step 4: decode prompt AND continuation together ---------
    Y_out = concat_cols(coarse_all, fine_all)        # (500, 12)
    return soundstream_decoder(Y_out)                # (160000,) waveform

Three lines deserve a second look. cond2 is 850 positions of pure conditioning before stage 2 predicts anything — 250 semantic plus 600 coarse. The stage-3 loop has no z in scope at all, which is the conditional-independence assumption enforced by code structure rather than by an argument. And the final decode takes the prompt's frames along with the generated ones, so the output waveform's first three seconds are a SoundStream re-synthesis of the original, not the original itself.

What stage 2 actually has to learn

It is tempting to think of stage 2 as a "vocoder with extra steps." It is not, and the distinction matters.

A vocoder maps a deterministic conditioning signal (mel-spectrogram, say) to a waveform, and the mapping is close to a function — the same mel gives essentially the same audio. Stage 2's mapping is one-to-many in the most extreme way: the same semantic sequence is compatible with every speaker in the world, every room, every microphone, every noise floor. The paper measures exactly this: resampling stage 2 on fixed semantic tokens produces "a wide variety of speakers and recording conditions."

So stage 2 is not learning a mapping; it is learning a conditional distribution whose entropy is enormous. Its job is to sample a coherent point from that distribution — pick a voice, and then stay with it for ten seconds. Consistency is the hard part, not selection.

And when a prompt is present, the task changes shape again: the coarse acoustic prefix collapses most of that entropy. The model is no longer choosing a voice; it is recognizing one from 600 tokens and extending it. Chapter 7's two numbers — 3.2% speaker accuracy without a prompt, 92.6% with one — are the same model doing these two very different jobs.

Why "consistency" is where autoregression earns its keep. A non-autoregressive model that emitted all 1,400 coarse tokens in parallel would have to make 1,400 independent choices about voice, and independent choices do not agree. Autoregression means token 900 is chosen knowing tokens 1…899 — so once a voice is established, every subsequent token is drawn from a distribution already conditioned on it. The speaker consistency AudioLM exhibits is not a special mechanism; it is what sequential conditioning does to a high-entropy distribution. This is the same reason autoregressive text models keep a consistent narrative voice without being told to.

Unconditional mode, and why diversity counts as evidence

Run the cascade with no prompt at all and you get the mode the paper describes first: "we sample unconditionally all semantic tokens ẑ, which we then use as conditioning for acoustic modeling."

The reported behavior is worth quoting in full because each clause is a separate claim: the model "generates diverse, syntactically and semantically consistent linguistic content, with varying speaker identity, prosody, acoustic conditions."

Diversity here is not an aesthetic bonus. It is evidence about what was learned. A model that collapsed to one speaker would be telling you that the acoustic stage had memorized a mode rather than learned a distribution — which is exactly GSLM's limitation, imposed by its architecture. That AudioLM's unconditional samples vary in speaker and room and prosody says the coarse acoustic model represents those as genuinely free variables.

Meanwhile the linguistic content stays consistent within a sample. Free variation across samples, coherence within a sample: that pair is the signature of a correctly factorized model, and it is what Chapter 8's probes will quantify.

Walking the indices

To make the sim's bookkeeping concrete, here is the same 3-second-prompt, 7-second-continuation generation written as index ranges.

ObjectPrompt indicesGenerated indicesWhere it comes from
z (semantic)1 … 7576 … 250Stage 1, temperature 0.6
y1…4 (coarse)frames 1 … 150frames 151 … 500Stage 2, temperature 0.8
y5…12 (fine)frames 1 … 150frames 151 … 500Stage 3, temperature 0.6, in 3 s chunks
Waveformsamples 1 … 48,000samples 48,001 … 160,000SoundStream decoder, all 12 layers

Two subtleties fall out of that table. First, the prompt's fine tokens are regenerated by stage 3, not copied — stage 3 is handed the coarse sequence and fills in fine detail across the whole thing, prompt included. Second, stage 3's chunk boundaries land at frames 150, 300, 450 for 3-second chunks, which means the first chunk boundary coincides exactly with the prompt/continuation boundary. Whether that is deliberate or a happy accident of the 3-second prompt length, the paper does not say.

What can go wrong, and what it sounds like

A cascade has characteristic failure signatures. Knowing them is most of debugging.

SymptomWhich stageWhy
Fluent voice, meaningless words1Semantic sampling too hot, or semantic conditioning ignored. The classic babble.
Right words, wrong voice partway through2Coarse acoustic drift — the model stopped tracking the prompt's speaker fingerprint over long generations
Right words, right voice, "underwater" quality3Fine detail missing or mismatched; you are hearing the 2000 bps reconstruction
Periodic artifact every 3 seconds3Chunk boundaries — independent chunks with no shared context
Sentence never ends; content rambles1No end-of-sentence modeling; the paper notes exactly this as an error source
Proper nouns garbled1→2 boundaryThe paper names it: "the primary source of errors is the synthesis of proper nouns"

That last row is a genuinely informative failure. Why proper nouns specifically? Because they are low-frequency, high-entropy, and phonetically arbitrary — exactly the case where a 1024-cluster semantic vocabulary has the least support. A common word has thousands of training instances to pin down its semantic-token trajectory. A rare surname has a handful. The failure mode of a discrete bottleneck is always the tail.

The cascade's compounding, stated once. Each stage is trained with teacher forcing on ground-truth inputs and deployed on the previous stage's samples. Stage 2 has never seen a stage-1 sample during training; stage 3 has never seen a stage-2 sample. Errors do not merely add — they move the input distribution, and a model off its training distribution degrades faster than linearly. That this works at all is partly because each stage's input is discrete: a slightly wrong token is still a valid token, which is a much gentler perturbation than a slightly wrong continuous vector. Discretization is quietly doing error correction for the whole system.

The generation cost, honestly

Autoregressive means serial. Count the forward passes for a 7-second continuation, using Chapter 4's totals:

StageTokens generatedSerial?Notes
1 — semantic175 (fewer after dedup)Fully serialShortest, but gates everything downstream
2 — coarse1,400Fully serialContext grows to 2,250; the dominant serial cost
3 — fine2,800Serial within a chunk, parallel across chunksThree chunks for 7 s ⇒ ~933 serial steps
Total4,375~2,508 serial stepsChunking cuts the critical path by roughly a third

Two and a half thousand sequential forward passes through 0.3B-parameter models, for seven seconds of audio. This is not real-time, and the paper never claims it is. Real-time audio language modeling arrives later in this lineage, and it arrives by attacking exactly this number — which is why the flattening scheme was the first thing subsequent work replaced.

What you would see in a real implementation log

To make the abstraction concrete one last time, here is what a 7-second continuation looks like as a trace — the kind of output you would print while debugging.

trace — one continuation, annotated
[tokenize]  prompt 3.00 s -> wav (48000,) float32
[tokenize]  w2v-BERT layer7 -> (75, 1024) -> standardize -> kmeans -> z_p (75,)
[tokenize]  dedup            -> z_p (61,)          # 14 consecutive repeats collapsed
[tokenize]  soundstream enc  -> (150, D) -> rvq -> Y_p (150, 12) int16

[stage 1]   prefix 61 tok, sampling 175 tok, T=0.60
[stage 1]   done in 175 steps -> z_hat (175,), z_all (236,)

[stage 2]   cond = z_all (236) + flatten(Y_p[:, :4]) (600) = 836 positions
[stage 2]   sampling 1400 tok, T=0.80
[stage 2]   ctx grows 836 -> 2236; done -> coarse_all (500, 4)

[stage 3]   chunking 500 frames -> 4 chunks of 150 (last = 50)
[stage 3]   chunk 0: 600 cond + 1200 tgt   T=0.60   [parallel]
[stage 3]   chunk 1: 600 cond + 1200 tgt   T=0.60   [parallel]
[stage 3]   chunk 2: 600 cond + 1200 tgt   T=0.60   [parallel]
[stage 3]   chunk 3: 200 cond +  400 tgt   T=0.60   [parallel]
[stage 3]   done -> fine_all (500, 8)

[decode]    Y_out (500, 12) -> soundstream dec -> x_hat (160000,) float32
[decode]    3.00 s resynthesized prompt + 7.00 s generated
[total]     4375 tokens generated, ~2508 serial steps

Three things this trace makes visible that the prose does not. Deduplication removed 14 of 75 semantic tokens from the prompt — nearly 19%, which is typical and which is why the "2Q′ per semantic token" statement cannot be taken literally. Stage 2's context grows from 836 to 2,236 positions during generation, so its cost is not fixed. And the last stage-3 chunk is short (50 frames), because 500 does not divide evenly by 150 — a mundane implementation detail that becomes a bug if you assume uniform chunks.

Reading Figure 2 correctly

The paper's Figure 2 is a three-panel diagram, and it is the image most people remember from AudioLM. It is also slightly misleading if read casually, so here is what each panel actually asserts.

PanelShowsEasy misreadingCorrect reading
iSemantic tokens feeding forward"Semantic tokens are the first layer of one model"They are the complete output of a separate model, produced before stage 2 begins
iiSemantic + coarse acoustic"Semantic and acoustic are interleaved in time"Semantics form a prefix; the coarse tokens follow, flattened row-major
iiiCoarse + fine, then the decoder"Stage 3 continues the same sequence"Stage 3 runs on independent 3 s chunks with no semantic input at all

And the caption carries the one number the diagram cannot show: "the factor of 2 comes from the fact that the sampling rate of SoundStream embeddings is twice as that of the w2v-BERT embeddings." Every time you look at that figure, mentally attach 25 Hz to the top row and 50 Hz to the other two.

Inline check

(a) In acoustic-generation mode, why does the transcript stay fixed while the speaker changes?
Because z is clamped to ground truth (fixing content) while stage 2 samples the coarse acoustic tokens fresh with no acoustic prompt (freeing voice and room). The two are separable precisely because Chapter 2's measurements say they live in different codes.

(b) Could you preserve the speaker while replacing the content, using only these three models?
Yes — that is continuation with a substituted semantic sequence: feed the prompt's coarse acoustic tokens plus a semantic sequence taken from a different utterance. It is voice conversion, and it falls out of the architecture for free. The paper does not run this experiment, but the machinery is entirely present.

(c) The paper regenerates the prompt's fine tokens rather than reusing the originals. Does that matter?
It matters for evaluation: it means the first 3 seconds of an AudioLM output are not bit-identical to the source, so the human raters in Chapter 8 hear a re-synthesis throughout. It also means any stage-3 artifact appears in the prompt region too, which removes an obvious cue ("the audio gets worse at 3 seconds").

Design challenge — the mode the paper did not run:

You want voice conversion: keep speaker A's voice, say speaker B's words. Using only the three trained models and the two frozen tokenizers, write down the conditioning you would feed each stage. Then say what would go wrong, and why. (Sketch first.) — The construction: take z from speaker B's utterance, take the coarse acoustic prefix from speaker A's clip, feed both to stage 2, run stage 3 normally. What goes wrong: prosody. Chapter 7 reports that "rhythm and intonation have only slight variations across different samples, suggesting that prosodic features are captured mostly by the semantic tokens" — so speaker B's timing and intonation ride along with the content, and you get speaker A's timbre delivering speaker B's cadence. Whether that reads as convincing conversion or as uncanny depends entirely on how different the two speakers' rhythms are.

Concept and realization: the full data flow, one more time

prompt_wav — float32 (48000,)
3 seconds at 16 kHz. The only input.
↓ two frozen encoders, in parallel ↓
z_p — int (75,)  ·  Y_p — int (150, 12)
Semantic and acoustic views of the same 3 seconds. Only Y_p[:, :4] will be used.
↓ LM1, T = 0.6 ↓
z_all — int (250,)
75 given + 175 generated. The complete plan for 10 seconds.
↓ LM2, T = 0.8, prefix = z_all ⊕ flatten(Y_p[:, :4]) ↓
coarse_all — int (500, 4)
2000 bps. Voice and room are now fixed for the whole clip.
↓ LM3, T = 0.6, in 4 chunks of 150 frames ↓
fine_all — int (500, 8)
+4000 bps of artifact removal. No semantics involved.
↓ SoundStream decoder ↓
x̂ — float32 (160000,)
10 seconds: 3 re-synthesized, 7 invented. ViSQOL ~3.9 against a hypothetical reference.

Six objects, five transformations, two of them frozen. If you can redraw that diagram from memory with the shapes attached, you can implement AudioLM.

Cross-domain bridge:
The cascade is a rendering pipeline: stage 1 is the scene graph, stage 2 is the rasterizer that decides materials and lighting, stage 3 is the anti-aliasing pass. And the prompt is a style transfer reference — three seconds of "here is the look," from which the rasterizer infers everything it needs. The reason this analogy is more than cute is that it predicts the failure modes correctly: bad scene graph gives you nonsense composed beautifully; bad rasterizer gives you the right scene in the wrong style; bad anti-aliasing gives you the right image with visible edges. All three appear in the failure table above.

One caveat on the sim before we leave it: the token tracks are schematic. Real semantic tokens do not have a "height," and the bars are standing in for how structured versus random the sequence is. What the sim gets right is the ordering, the prompt boundary, the conditioning dependencies, and what disappears when stage 1 is removed.

Where the entropy is

A last quantitative way to see why the stages behave so differently: count the entropy each one is responsible for.

StageBits produced per secondShare of totalNature of the uncertainty
1 — semantic250 (upper bound)4%Genuinely open: what should be said next?
2 — coarse acoustic2,00032%Wide open without a prompt (any voice, any room); nearly closed with one
3 — fine acoustic4,00064%Almost closed: given coarse structure, fine detail is largely determined

Note the inversion. The stage with the fewest bits carries the most uncertainty that matters, and the stage with the most bits carries the least. Stage 3 emits two thirds of the total bitrate while making almost no consequential decisions — which is exactly why it can be run on independent chunks, at a cold temperature, without semantics.

This also explains a practical asymmetry you would hit immediately in implementation: stage 1 is where sampling hyperparameters matter enormously and stage 3 is where they barely matter at all. Change stage 1's temperature from 0.6 to 1.0 and the output becomes incoherent. Change stage 3's and almost nothing audible happens.

And it reframes the 0.6 / 0.8 / 0.6 schedule one final time. The hottest temperature sits on the stage whose uncertainty you want to exercise — the one that chooses a voice. The two cold temperatures sit on the stage that must not wander (structure) and the stage that has nothing to wander about (detail).

A final note on cost. Nothing in this chapter's procedure requires the stages to run on the same machine, in the same process, or even in the same week. Stage 1 could run on a phone; stage 3 could run as a batch job. The cascade is a pipeline in the Unix sense, and that is a deployment property most monolithic generative models do not have.

It also means you can inspect the intermediate. Print the semantic tokens and you have a machine-readable transcript-of-sorts of what the model decided to say, before any audio exists. No other point in the system offers that.

The one thing to take from this chapter

If Chapter 2 is the paper's empirical core, this chapter is its mechanical core, and it reduces to a single asymmetry.

Structure is generated first and completely; sound is generated second and conditionally. Stage 1 finishes the entire semantic sequence before stage 2 emits a single acoustic token. That ordering is not an implementation convenience — it is the reason the output has long-horizon coherence at all. A model that decided what to say and how to say it simultaneously, token by token, would drift, because each local acoustic choice would constrain the remaining plan.

Separating them means the plan is fixed before rendering begins, and rendering cannot corrupt it. Every coherent generative system in any modality does some version of this, and AudioLM's version is unusually legible because the two stages are literally different models with different vocabularies.

Next: the training recipe that produced these three models, the data that made it robust, and the two tasks the whole framework is judged on.

During continuation, what exactly is prepended to stage 2's sequence, and why does the answer explain speaker preservation?

Chapter 6: Training and the Continuation Task

An architecture is a hypothesis; a training recipe is what makes it true. This chapter covers what AudioLM was trained on, how, for how long, and how the two evaluation tasks are defined. It also does an arithmetic exercise the paper does not: counting the tokens each stage actually sees, which turns out to say something surprising about how over-trained these models are.

The data choice, and why it is a result

Everything — SoundStream, w2v-BERT, the k-means quantizer, and all three Transformers — is trained on the unlab-60k train split of Libri-Light: 60,000 hours of English speech, unlabeled, derived from public-domain audiobooks.

The paper immediately draws a contrast that is easy to read as a footnote and is actually a finding: "While previous works use the 6k-hour clean subset of Libri-Light for training the language model, AudioLM shows strong performance when trained on the more diverse and noisy unlab-60k subset."

GSLM and relativesAudioLM
SplitLibri-Light clean 6kLibri-Light unlab-60k
Hours6,00060,000 (10×)
CurationFiltered for recording qualityNone beyond the split definition
Speakers / conditionsNarrowWide: varied microphones, rooms, noise floors

Then the sentence that states why anyone should care: "The increased robustness to the quality of the training data reduces the data preparation effort needed to apply our framework."

That is a claim about deployability, not about scores. Data cleaning is the dominant cost of applying a speech system to a new domain, and "you can skip it" is worth more than a point of WER. But it is worth asking why AudioLM tolerates noisy data when GSLM does not — the paper does not say, and the answer follows from the architecture.

Why the hybrid tokenization makes messy data survivable. In a single-code system, every bit of the code is shared between content and channel, so training on noisy recordings forces the model to spend capacity representing noise in the same variables it uses for language. In AudioLM the noise lands almost entirely in the acoustic tokens, where it is welcome — it is precisely the "recording conditions" the acoustic stage is supposed to model — while the semantic tokens, which Chapter 2 measured as near speaker- and channel-invariant, stay clean. Noisy data does not degrade the linguistic model; it enriches the acoustic one. Robustness is not a lucky property of scale; it is the factorization paying off a second time.

Model selection: the two sweeps

Two hyperparameters define the semantic tokenizer, and both were chosen empirically. Figure 3 of the paper reports both sweeps.

Sweep 1 — which layer. ABX scores (within and across speaker) for the unquantized embeddings of MLM-module layers 6 through 9, on LibriSpeech dev-clean with scaled embeddings. The curve has a minimum; layer 7 wins.

Sweep 2 — how many clusters. sWUGGY and sBLIMP development-set scores for K ∈ {256, 512, 1024, 2048} at layer 7. K = 1024 is selected.

Note which metrics are used for which sweep. The layer is chosen with a phonetic probe (ABX), the vocabulary size with lexical and syntactic probes (sWUGGY, sBLIMP). That is a sensible division: the layer determines what kind of information the features carry, while K determines how finely that information is discretized — and over-fine discretization hurts language modeling, not phonetics.

Then the honest coda: "In addition, we performed a small subjective evaluation test by listening to a few continuations produced by the different choices." Three automated probes and a listening test. That is how these decisions are actually made, and it is good that the paper says so.

The K trade-off, reasoned rather than reported. Too few clusters and distinct phonemes collapse into one token — the semantic stream literally cannot express the difference between "bit" and "bet," and no downstream stage can recover it. Too many and each token becomes rare: the language model sees fewer examples per symbol, the transition statistics get sparse, and the sequence starts encoding speaker-specific detail again (more clusters means clusters can specialize by voice). K = 1024 at 25 Hz gives 10 bits per 40 ms, which is roughly the information rate of phonemes-plus-a-bit in English. That the sweep lands where the linguistics says it should is mildly reassuring.

The training recipe, complete

SettingValueComment
Hardware16 TPUv4 per stageThree stages trained separately
Batch size256Sequences, not tokens
Steps1,000,000Per stage
Crop length, stage 130 s equivalent~750 semantic positions before dedup
Crop length, stage 210 s equivalent250 semantic + 2,000 coarse = 2,250
Crop length, stage 33 s equivalent600 coarse + 1,200 fine = 1,800
CroppingRandomFresh offsets every epoch
DedupConsecutive semantic repeats removedStages 1 and 2 only
Inference temperature0.6 / 0.8 / 0.6Per stage
Prompt length (speech)3 sTruncate, tokenize, condition

Notice what the table does not contain: optimizer, learning rate, schedule, warmup, weight decay, gradient clipping. None of these appear in the paper. For a reproduction attempt that is a significant gap — 1M steps at batch 256 is a long run to guess a learning rate for.

Counting the tokens: an exercise the paper skips

Batch 256 for 1M steps is 256 million sequences per stage. Multiply by sequence length:

StageSequencesPositions eachTokens seenTokens per parameter
1 — semantic2.56 × 108~7501.92 × 1011 (192B)~640
2 — coarse2.56 × 1082,2505.76 × 1011 (576B)~1,920
3 — fine2.56 × 1081,8004.61 × 1011 (461B)~1,537
Total~1.2 × 1012 (1.2T)

A trillion tokens of training, spread over three 0.3B-parameter models. Put that next to the compute-optimal heuristic of roughly 20 tokens per parameter and these models are trained 30–100× past that point.

Is that wasteful? Not here, and the reason is instructive. Compute-optimal scaling assumes data is the scarce resource and you are choosing how to split a fixed budget between model size and tokens. In this setting the constraint is inverted: audio data is effectively unlimited (60,000 hours re-cropped at random offsets is an enormous number of distinct sequences), and the model size is capped by the need to run three of them in a cascade at generation time. When data is free and inference cost is the binding constraint, over-training a small model is exactly right — you are buying quality per generated token, which is the thing you pay for forever.

How many times does the data get seen? 60,000 hours is 2.16 × 108 seconds:

stage 1 (30 s crops): 2.16×108 / 30 = 7.2 × 106 distinct windows → 2.56×108 / 7.2×10636 passes
stage 2 (10 s crops): 2.16×107 windows → ≈ 12 passes
stage 3 (3 s crops): 7.2×107 windows → ≈ 3.6 passes

Random offsets mean these are not literal epochs — the same 30 seconds of audio cropped at a different offset is a genuinely different training sequence — but the order of magnitude is right. Stage 1 sees the corpus a few dozen times; stage 3 barely three.

Sim 8 — The training budget explorer

Each stage is a column. Move crop length and watch four coupled quantities move: sequence length, attention cost per step, total tokens seen at 1M steps, and effective passes over 60k hours. The dashed line marks the paper's chosen configuration for each stage. Try to find a setting where all three stages are cheaper without any of them dropping below a usable context.

Push the crop scale up and stage 2's attention bar runs away first — it has both the longest sequence and no chunking escape hatch. That is why 10 seconds, not 30, and it is the single tightest constraint in the whole training setup.

The data pipeline, in code

What actually happens between "60,000 hours of mp3-ish audiobook audio" and "a batch of 256 integer sequences" is worth writing out, because three of the steps are where the paper's choices live.

python — one training batch for stage 2
import numpy as np

CROP_S = 10                     # stage 2; 30 for stage 1, 3 for stage 3
SR     = 16000

def make_batch(clips, B=256):
    seqs = []
    for _ in range(B):
        clip  = random_choice(clips)                 # from unlab-60k
        start = np.random.randint(0, len(clip) - CROP_S * SR)
        wav   = clip[start : start + CROP_S * SR]      # RANDOM crop, fresh each epoch

        # --- frozen tokenizers, no gradient ---
        z = kmeans.predict((w2v.layer7(wav) - mu) / sigma)   # (250,)
        Y = ss_rvq.encode(ss_enc(wav))                       # (500, 12)

        # --- dedup: stages 1 and 2 only ---
        z = z[np.insert(np.diff(z) != 0, 0, True)]              # (~150-220,)

        # --- flatten coarse with offsets, concatenate ---
        coarse = flatten_with_offsets(Y[:, :4])              # (2000,)
        seqs.append(np.concatenate([z, coarse + SEM_VOCAB]))

    return pad_to_max(seqs)          # dedup makes lengths ragged

Three lines to dwell on. The random_crop is why "epochs" are fuzzy — a 10-second window starting at second 3.7 and one starting at 3.9 are different sequences. The tokenizers run inside the data pipeline with no gradient, which in practice means they are usually run once offline and cached, turning 60k hours of audio into a few tens of gigabytes of integers. And the dedup line makes sequence lengths ragged, which is why real implementations pad — a detail the paper never mentions but every reimplementation hits within an hour.

Could the three stages be trained jointly?

The paper trains them separately and never discusses the alternative. Worth thinking through, since it is the first question a reviewer would ask.

Mechanically, no. The stages are connected by sampled discrete tokens. Sampling is not differentiable, so there is no gradient path from stage 2's loss back into stage 1's parameters. You would need a straight-through estimator, Gumbel-softmax, or REINFORCE — each of which introduces variance or bias into a 1M-step run, for a benefit nobody has demonstrated.

Statistically, it would not help much. Each stage's training targets are ground truth extracted from real audio, not from the previous stage's output. Stage 2 learns p(coarse | semantics) from true semantic tokens, which is the correct conditional. Joint training would optimize the composite, which is only better if the composite has a different optimum — and under the conditional-independence assumptions, it does not.

Practically, it would be a disaster. Separate training means three independent 16-TPU jobs that can run in parallel, restart independently, and be swapped out one at a time. Joint training means one job holding 0.9B parameters plus two frozen encoders, with a sampling step in the middle. The engineering argument is decisive on its own.

The exposure-bias caveat, restated. The one place separate training genuinely loses is that stage 2 never sees a stage-1 sample during training, so at inference it is slightly off-distribution. The clean fix — training stage 2 on stage 1's samples, i.e. scheduled sampling — is not applied here. Chapter 7's WER measurement (6.0 with ground-truth semantics) is therefore an optimistic bound on the full-cascade error, and the paper is careful to run that experiment in acoustic-generation mode where the caveat does not apply.

The two tasks, defined

AudioLM is evaluated on exactly two tasks, chosen "in order to showcase the general applicability of the framework… from different audio domains."

Speech continuation
"The model is expected to keep the speaker identity, prosody and recording conditions of the prompt and produce new content, which is syntactically correct and semantically consistent."
Piano continuation
"The model is expected to generate piano music, which is coherent with the prompt in terms of melody, harmony and rhythm."

Both task definitions have the same two-part structure: preserve something from the prompt, invent something new that is consistent with it. And in both, the preserved part maps to acoustic tokens and the invented part to semantic tokens — which is why one framework serves both without modification.

The generalization requirement is stated explicitly and is stronger than it looks: "As the speech and piano prompts we use for evaluation are respectively from unseen speakers and unseen performances, generating consistent continuations requires AudioLM to generalize beyond training data." Unseen speakers means the 92.6% speaker-preservation result of Chapter 7 cannot be memorization — there is no embedding for that speaker anywhere in the model.

How a prompt is made

Mundane and worth stating, because it is where a reproduction usually goes wrong: "For generating the prompts, we truncate samples to the desired prompt length, extract the corresponding w2v-BERT and SoundStream tokens and use them as conditioning."

Truncate the waveform, then tokenize. Not: tokenize the whole clip and truncate the tokens. The difference matters at the boundary — SoundStream's convolutional encoder has receptive field, so the last few frames of a truncated waveform are computed from a partially-empty context, whereas frames from a full clip would have seen the future. Truncating first is the honest choice; it is what you would have at inference time with a live prompt.

3 seconds is a striking number. Three seconds of audio is 75 semantic tokens and 600 coarse acoustic tokens. From that, the system reconstructs a speaker's voice well enough that a 291-way classifier identifies them 92.6% of the time in the continuation, and human raters cannot tell the continuation from real speech. For comparison, classical speaker-adaptive TTS needed minutes of enrollment audio. The reason 3 seconds suffices: the acoustic tokens are not a summary of the speaker, they are a sample of the speaker's actual code sequence, and continuing a sequence is a much easier problem than inferring a latent identity vector.

What is missing from the recipe

A short, honest list of things you would need and would not find:

MissingWhy it matters
Optimizer, LR, schedule, warmup1M steps at batch 256 is a large run to guess at; T5X defaults are a plausible but unstated assumption
SoundStream and w2v-BERT training details for this corpusBoth are cited to prior papers, but both were retrained here on unlab-60k
k-means fitting sample size, initialization, seed sensitivityDefines the stage-1 vocabulary entirely
Validation/early-stopping criterion"1M steps" is a budget, not a convergence statement
Piano dataset composition"Internal, 40k hours" — unreproducible by construction

None of this makes the paper less good; systems papers from industrial labs routinely omit these. It does mean that "reproduce AudioLM" is a research project rather than an engineering task, which is worth knowing before you start.

Two framing notes before the recipe details. First, "training AudioLM" is really five training jobs, not three: SoundStream, w2v-BERT, the k-means quantizer, and then the three Transformers. The paper describes the last three in detail and cites the first two. Second, all five see the same corpus, which is a deliberate choice and the subject of the next-but-one section.

Keep that five-job picture in mind whenever the paper says "we train AudioLM." The phrase covers a lot of ground.

What "60,000 hours" actually is

Numbers like "60k hours" go by too fast. Sit with it.

60,000 hours = 2,500 days = 6.8 years of continuous speech
at 16 kHz mono float32: 2.16 × 108 s × 16,000 × 4 bytes ≈ 13.8 TB raw
tokenized to 12×10-bit codes at 50 Hz: 2.16 × 108 × 750 bits ≈ 20 GB

That last line is worth its own moment. The tokenizer turns 13.8 terabytes of waveform into about 20 gigabytes of integers — a 690-fold reduction — and the language models never see anything else. Tokenization is not only a modeling decision; it is what turns an infrastructure problem into a laptop-sized array.

Semantic tokens alone are smaller still: 2.16 × 108 s × 25 × 10 bits ≈ 6.8 GB, before deduplication. Six years of human speech, reduced to a file you could hold in RAM. That is the compression Chapter 0 promised, applied to a corpus.

Libri-Light, and what its shape implies

Libri-Light is derived from LibriVox — public-domain audiobooks, read by volunteers. Three properties of that source shape everything downstream, and none of them are neutral.

Property of the corpusConsequence for AudioLM
Read speech, not conversationNo turn-taking, no interruptions, no backchannels. The model has never heard a dialogue. This is why "continuation" is the natural task and "conversation" is not
Book prose, not speech registerThe linguistic distribution is written English read aloud — long sentences, literary vocabulary. sBLIMP and sWUGGY are relatively well matched to this; spontaneous speech would not be
Volunteer readers, home recordingsThe acoustic diversity the paper celebrates. Also a specific demographic and accent distribution, which is exactly the gap the broader-impact section flags
English onlyEvery result in the paper is an English result. Multilingual is listed as future work

The first row explains something that otherwise looks like a limitation of ambition. AudioLM does not do dialogue not because dialogue is hard for the architecture but because there is no dialogue in the training data. The same three models trained on conversational audio would be a different system with the same equations.

Inline check

(a) Why is stage 1 trained on 30-second crops when generation only ever needs 10?
Because long-horizon structure is stage 1's entire job. Training on 30 s exposes the model to discourse-level dependencies it would never see at 10 s — and with relative position embeddings, a model trained long generalizes down to short contexts for free.

(b) The k-means quantizer is trained on unlab-60k, not on clean speech. What would go wrong if it were fit on clean data and applied to noisy data?
Distribution shift in the quantizer: noisy frames would land far from every centroid, assignments would become unstable, and the semantic stream would carry channel artifacts as spurious token changes. Fitting on the deployment distribution is the whole reason the noisy-data robustness holds.

(c) Stage 3 sees the corpus only ~3.6 times while stage 1 sees it ~36 times. Is that a problem?
Probably not, and for a structural reason: stage 3's task is local. Fine acoustic detail given coarse detail is close to a per-frame regression, so the number of effectively independent training examples is the number of frames (2.16×108 × 50 = 1010), not the number of 3-second windows. Long-horizon tasks need many passes over long windows; local tasks do not.

Two more observations before that. First, the recipe is notable for what it does not include: no curriculum, no scheduled sampling, no auxiliary losses, no distillation. Three plain cross-entropy runs. Second, the three runs are independent, so wall-clock time is one run, not three, if you have the hardware — which is part of why the separate-training decision is so comfortable.

The absence of tricks is itself informative. When a system works with the plainest possible training recipe, the credit belongs to the representation rather than to the optimization. That is the honest reading of AudioLM: the hard thinking went into what to predict, not into how to fit it.

What you would need to change to train this on your own data

Suppose you had 5,000 hours of some other audio domain — podcasts, bird song, industrial machinery — and wanted an AudioLM for it. What actually has to change?

ComponentChange neededWhy
SoundStreamRetrain on your domainThe codebooks are fit to your signal statistics. A speech codec on bird song wastes most of its bits
The semantic encoderThe hard one — see beloww2v-BERT's masked-prediction objective produces phoneme-like units because it was trained on speech. There is no guarantee the analogous structure exists elsewhere
k-means KRe-sweepK should match the effective symbol rate of your domain, which is not 1024 by nature
Q, Q′, NRe-sweepThe piano configuration (3 × 214) versus speech (12 × 210) shows how far this can move
Crop lengthsMatch your structure timescale30 s captures a sentence; a bird song phrase or a machine cycle may need far more or far less
The three TransformersRetrain, same architectureNothing about them is domain-specific

The second row is where the project either works or does not, and the paper's piano experiment is the only evidence that it transfers. Piano is a favorable case: it has a discrete symbolic layer (notes) that a self-supervised model can plausibly discover, exactly as speech has phonemes. Domains without such a layer — ambient noise, machinery — may have no semantic level to find, in which case the hierarchy degenerates to an acoustic-only model and you are back to babbling.

Which suggests a diagnostic to run before committing: fit k-means to your candidate semantic features, then measure whether an autoregressive model over those tokens has substantially lower perplexity than a unigram model. If it does not, the tokens carry no structure worth cascading, and the extra stage is pure cost.

Concept and realization: what a training step costs

Make one gradient step concrete, for stage 2, so the hardware numbers stop being abstract.

QuantityValueDerivation
Sequence length2,250250 semantic + 500 × 4 coarse, 10 s crop
Batch256Stated
Tokens per step576,0002,250 × 256
Model~0.3B paramsStated (~0.15B from the printed dimensions)
FLOPs per step (fwd+bwd)~1.0 × 1015≈ 6 × params × tokens
Steps106Stated
Total for stage 2~1.0 × 1021 FLOPs
Hardware16 TPUv4Stated

Roughly 1021 floating-point operations for one of three stages. The 6×N×T rule of thumb (two FLOPs per parameter for the forward multiply-accumulate, doubled again for the backward pass) is worth memorizing — it turns any stated (params, tokens) pair into a compute estimate in one line, and it is how you sanity-check whether a reported training run is plausible on the reported hardware.

Note also what the estimate does not include: the attention term, which at 2,250 positions is not negligible, and the cost of running the frozen tokenizers over 60,000 hours, which is a one-time preprocessing job that in practice takes a meaningful fraction of the total.

Setup comparison: AudioLM versus its closest ancestor

GSLM (Lakhotia et al.)AudioLM
Token sourceHuBERT units, 200-entry vocabularyw2v-BERT layer 7, K = 1024  plus  SoundStream RVQ, 12×1024
Number of LMs13, cascaded
Training dataLibri-Light clean 6kLibri-Light unlab-60k
SynthesisUnit-to-speech module, one voiceSoundStream decoder, any voice the acoustic tokens describe
Speaker preservationNot applicable — single speaker92.6% classifier accuracy from a 3 s prompt
sWUGGY (all) / sBLIMP68.7 / 57.171.5 / 64.7
CER / WER on resynthesis2.9 / 6.63.4 / 6.0

Read the last two rows together and something interesting appears. On resynthesis accuracy the two systems are essentially tied — GSLM is slightly better on characters, AudioLM slightly better on words. On linguistic knowledge AudioLM is far ahead, especially on syntax (64.7 versus 57.1). And on everything acoustic, they are not comparable, because GSLM has one voice.

The honest summary: AudioLM did not beat GSLM at GSLM's own task by much. It made GSLM's task a subproblem of a larger one, and solved the larger one. That is usually how progress looks.

Cross-domain bridge:
The over-training observation generalizes far beyond audio. Compute-optimal scaling laws answer "given a fixed training budget, how should I split it?" — but that is the wrong question whenever inference is the dominant lifetime cost, which is true of anything deployed. Then the right question is "given a model size I can afford to run, how much training can I justify?" and the answer is: much more than compute-optimal. AudioLM arrived at this in 2022 by necessity (three models in a serial cascade), before the argument was widely made. Whenever you see a small model trained absurdly long, look for a serial inference constraint.

One more thing the data section quietly settles: the tokenizers are trained on the same corpus as the language models. That is not automatic — you could tokenize with an off-the-shelf encoder trained elsewhere — and it matters, because a k-means quantizer fit on clean speech and applied to noisy speech would produce unstable assignments. Fitting everything on unlab-60k is what makes the robustness claim hold rather than merely being asserted.

It also means the tokenizers have seen every hour the language models have seen. There is no held-out-data story here for the tokenizers; the evaluation sets (LibriSpeech dev-clean, test-clean) are separate corpora, but the tokenizers are as adapted to the training distribution as anything can be.

What the recipe implies about reproduction difficulty

Ranked from easiest to hardest, if you set out to rebuild this today:

Easy: the three Transformers. Standard decoder-only stacks with published dimensions; any modern framework does this in an afternoon.

Moderate: the acoustic tokenizer. Open RVQ codecs exist and are well documented; retraining one on 60k hours is a compute problem, not a research problem.

Hard: the semantic tokenizer. You need a 0.6B self-supervised speech model trained on the same corpus, the right intermediate layer, corpus-level standardization statistics, and a k-means fit whose details are unstated. Every one of these is a lever with no documented setting.

Impossible: the piano results. The dataset is internal.

That ordering is typical of industrial systems papers and worth internalizing: the parts that look hardest (the models) are usually the easiest to reproduce, and the parts that look like footnotes (preprocessing statistics, clustering details, data splits) are where reproduction actually fails.

AudioLM trains all components on Libri-Light's noisy unlab-60k split rather than the 6k-hour clean subset used by prior work. Why does the architecture make this affordable?

Chapter 7: What Each Token Type Carries

Chapter 2 measured the token types with generic probes: phonetic discriminability and reconstruction quality. Useful, but indirect. This chapter runs the direct experiments — the ones that take generated audio and ask two specific, falsifiable questions: are these the same words? and is this the same person?

The design is beautiful in its simplicity. Both experiments use the same generation mode (acoustic generation from ground-truth semantic tokens), the same generated audio, and two off-the-shelf classifiers pointed at it. Same stimulus, two probes, opposite answers.

Experiment 1: do the words survive?

The hypothesis under test, stated by the paper: "when modeling speech, the linguistic content is mostly captured by the semantic tokens, while speaker identity and recording conditions are captured by the acoustic tokens."

The setup. Take real speech. Extract its ground-truth semantic tokens. Throw the audio away. Run stages 2 and 3 to synthesize new audio conditioned only on those tokens. Then transcribe the result with an ASR system and compare against the original transcript.

If the semantic tokens carried the content, the transcript comes back. If they did not, it will not.

DetailValue
ASR systemConformer Transducer-L
Evaluation setLibriSpeech test-clean, samples 4–10 s
Retained2.2 hours of the full 5.4 hours
RepeatsAcoustic generation run per sample
BaselineGSLM unit-to-speech via textless-lib, 200 HuBERT-derived units
MetricsCharacter error rate (CER) and word error rate (WER) against the original transcripts

Table II, the result:

Original audioSoundStream reconstructionAudioLMGSLM unit-to-speech
CER0.80.93.42.9
WER2.52.66.06.6

Now decompose it, because the four columns form an error budget that the paper describes but does not tabulate.

StepΔCERΔWERWhat it costs
ASR on real audio (floor)0.82.5The transcriber's own errors — nothing to do with AudioLM
+ SoundStream compression+0.1+0.1The codec is essentially transparent to ASR
+ semantic→acoustic generation+2.5+3.4The entire cost of the mapping
Total (AudioLM)3.46.0

Two conclusions fall straight out, and the paper states both.

First: "the semantic content is fully captured by the semantic tokens, as the transcripts obtained from the output of acoustic generation closely follow the original transcripts." A 6.0% word error rate means 94 of every 100 words came back. From a 250 bps code, with the actual audio discarded and re-invented in a different voice. That is a strong statement about what those 10 bits per 40 ms contain.

Second: the codec is not the problem. "The error rates of the SoundStream reconstruction are comparable to those of the original audio, suggesting that most of the errors are coming from the mapping of semantic to acoustic tokens." 0.1 points versus 3.4 points. If you wanted to improve AudioLM's intelligibility, the codec is the wrong place to look.

Where those 3.4 points actually go

The paper names three error sources by inspection, and each one teaches something different.

1. Proper nouns
"The primary source of errors is the synthesis of proper nouns." Rare, phonetically arbitrary, and therefore poorly supported by a 1024-cluster vocabulary. The tail of a discrete bottleneck is always where it breaks.
2. End-of-sentence position
"A secondary source of errors is the end-of-sentence tokens not being generated at the proper position." A continuation model has no notion of finishing; sentence boundaries are a structure it was never asked to represent.
3. Its own synthesized noise
"Since the acoustic generation can synthesize different recording environments, the resulting samples might contain background noise, which also degrades the performance of ASR." The model is being punished for succeeding at its other job.

That third one is a genuinely subtle measurement artifact and deserves a beat. The whole point of the acoustic stage is that it produces varied, realistic recording conditions — including noisy ones. The ASR system was not asked to be robust to that; it just transcribes what it hears, badly, when there is background noise. So part of the 6.0% WER is not AudioLM failing at content; it is AudioLM succeeding at acoustic diversity in a way that degrades the measuring instrument.

Read this as a lesson about evaluation. When a system has two objectives and you measure one with an instrument sensitive to the other, the measurement is contaminated. The clean fix would be to condition acoustic generation on a fixed clean recording condition for the ASR evaluation — which the framework can do, since recording condition lives in the acoustic tokens. The paper does not do this, and reports the contamination honestly instead. Both are defensible; only one is transparent.

Both metrics are about to appear as bare numbers, so it is worth building them from scratch first. Neither is complicated; both are routinely misread.

WER and CER by hand — and why their ratio is a clue

Both metrics are edit distances, normalized differently. Compute one of each on a real LibriSpeech sentence, using exactly the failure mode the paper names.

Reference (test-clean, an actual utterance): "mister quilter is the apostle of the middle classes" — 9 words, 43 letters, 8 spaces, 51 characters.

Hypothesis (a plausible proper-noun failure): "mister quilt her is the apostle of the middle classes".

Step 1 — word-level alignment. Line them up:

ReferenceHypothesisOperation
mistermistermatch
quilterquiltsubstitution
herinsertion
is / the / apostle / of / the / middle / classesidentical7 matches

Step 2 — word error rate. WER = (S + D + I) / N, where N is the number of reference words:

S = 1,  D = 0,  I = 1,  N = 9
WER = (1 + 0 + 1) / 9 = 2 / 9 = 0.2222 = 22.2%

Step 3 — character error rate. At the character level the two strings differ by a single inserted space:

"quilter" → "quilt her": one inserted character (the space)
S = 0,  D = 0,  I = 1,  N = 51
CER = 1 / 51 = 0.0196 = 2.0%

Step 4 — read the ratio. WER / CER = 22.2 / 2.0 = 11.3. One misplaced space cost eleven times more in words than in characters, because word-level metrics have no partial credit: quilt is as wrong as zebra.

Now look at AudioLM's actual ratio: 6.0 / 3.4 = 1.76. And the original audio's: 2.5 / 0.8 = 3.13. AudioLM's ratio is lower than the clean-audio baseline, which tells you its extra errors are spread more evenly across characters rather than concentrated in word-shredding boundary mistakes. Whatever is going wrong in the semantic→acoustic mapping degrades phonemes broadly rather than destroying occasional words — consistent with "a bit of everything is slightly off," not "some words are catastrophically wrong."

python — WER and CER, from scratch
def edit_distance(ref, hyp):
    # classic Levenshtein DP over token lists
    d = [[0] * (len(hyp) + 1) for _ in range(len(ref) + 1)]
    for i in range(len(ref) + 1): d[i][0] = i
    for j in range(len(hyp) + 1): d[0][j] = j
    for i in range(1, len(ref) + 1):
        for j in range(1, len(hyp) + 1):
            cost = 0 if ref[i-1] == hyp[j-1] else 1
            d[i][j] = min(d[i-1][j] + 1,       # deletion
                          d[i][j-1] + 1,       # insertion
                          d[i-1][j-1] + cost)  # substitution
    return d[-1][-1]

ref = "mister quilter is the apostle of the middle classes"
hyp = "mister quilt her is the apostle of the middle classes"

wer = edit_distance(ref.split(), hyp.split()) / len(ref.split())   # 2/9  = 0.2222
cer = edit_distance(list(ref),  list(hyp))  / len(ref)          # 1/51 = 0.0196

# library one-liner:  import jiwer;  jiwer.wer(ref, hyp), jiwer.cer(ref, hyp)

The ASR probe's own blind spots

Before trusting Table II completely, note what a WER probe cannot see.

It cannot see prosody. A continuation that says the right words with entirely wrong stress and phrasing scores identically to one that sounds natural. Nothing in Table II rewards intonation.

It cannot see semantic plausibility beyond the reference. In acoustic-generation mode there is a reference transcript, so this is fine. But WER is useless for evaluating continuations, where there is no ground truth for the invented part — which is exactly why Chapter 8 needs entirely different instruments.

And it inherits the ASR system's own biases. Conformer Transducer-L was trained on a particular distribution; audio that is unusual in ways unrelated to intelligibility (odd room, unusual voice) will transcribe worse. The paper acknowledges this for background noise; the same argument applies to any acoustic condition the ASR system finds unfamiliar.

Experiment 2: does the speaker survive? (And should it?)

Now the mirror image. Same generated audio, different probe.

The classifier. The paper builds a speaker classifier from scratch and describes it in unusual detail, which is welcome because it is reused for the safety classifier in Chapter 9.

ComponentSpecification
Input representationLog-mel spectrogram: 25 ms window, 10 ms hop, 64 mel bins
Crop1 second
BackboneSix convolution blocks; convolutions along time and frequency with 3×1 and 1×3 kernels; ReLU + batch normalization
Channels[64, 128, 256, 256, 512, 512]
PoolingMax pooling, stride 2 on both axes, whenever the channel count increases
Long-input inferenceRun on overlapping 1-second windows with 250 ms hop; aggregate predictions
Training dataLibriSpeech train-clean-100 ∪ test-clean, uncompressed → 291 speakers, 90/10 split
Sanity check"Almost perfect accuracy on the evaluation split"

Two architecture choices worth noticing. The separable 3×1 and 1×3 kernels factorize a 3×3 convolution into a time pass and a frequency pass — cheaper, and it lets the network treat the two axes differently, which is right for spectrograms where time and frequency are not interchangeable. The 1-second crop with 250 ms hop aggregation means the classifier never needs a long-context model: speaker identity is a local property, decidable from a second of audio, and voting over windows handles the rest.

Table III, the result:

ConditionSpeaker classification accuracyWhat it means
SoundStream reconstruction100.0%The codec preserves speaker identity perfectly; the classifier is robust to lossy compression
Acoustic generation with AudioLM3.2%Resampling the acoustic tokens on fixed semantics changes the speaker
Continuation with AudioLM92.6%Given a 3 s acoustic prompt, the original speaker comes back

Read the middle row against chance. With 291 speakers, random guessing gives 100/291 = 0.34%. The paper is precise about this: "while higher than chance (3.2% compared to 100 / 291 = 0.3%), the speaker classification accuracy remains low."

So 3.2% is not zero. It is roughly 9× chance. The semantic tokens carry a small but real amount of speaker information — which is exactly what Chapter 2's across−within ABX gap of 0.9 points predicted. Not zero, just small. The paper's conclusion is calibrated accordingly: "the semantic tokens carry little information about the speaker identity, which is instead mostly determined by the acoustic tokens."

3.2% versus 92.6% is the whole paper in two numbers. Same model, same stages 2 and 3, same semantic conditioning. The only difference is whether the prompt's coarse acoustic tokens are prepended. Without them the speaker is a free variable and lands nearly anywhere; with them, it is pinned 92.6% of the time. That gap is the causal demonstration that speaker identity lives in the coarse acoustic tokens and nowhere else — and it is a much stronger claim than any correlational analysis of representations could give you.

The continuation experiment, in detail

The 92.6% figure comes from its own protocol, described in Section IV-F.

DetailValue
PromptsCropped from LibriSpeech test-clean samples of length 4–10 s
Prompt length3 seconds
Continuations per prompt3
Continuation length7 seconds
Classifier applied toThe continuations only — "excluding the prompts"
Result>92% (Table III: 92.6%)

"Excluding the prompts" is load-bearing. If the classifier were run on the whole 10 seconds it would see 3 seconds of essentially-real audio and could score well on that alone. Running it only on the generated 7 seconds means the number reflects generation, not copying.

And remember the generalization constraint from Chapter 6: the prompts come from test-clean, whose speakers are not in the training set of the language models. There is no stored speaker embedding to retrieve. The system is reconstructing a voice it has never heard, from 600 coarse acoustic tokens, and holding it for seven seconds.

Three attributes, three verdicts

The paper's experiments plus one qualitative observation give a complete assignment of attributes to token types. This table is the chapter's takeaway:

AttributeLives inEvidence
Linguistic contentSemantic tokensWER 6.0 when regenerating audio from ground-truth semantics alone (Table II)
Speaker identityAcoustic tokens (coarse)3.2% without acoustic prompt vs 92.6% with (Table III)
Recording conditionsAcoustic tokens"A large diversity in the sampled recording conditions" when resampling
Prosody (rhythm, intonation)Mostly semantic, some acoustic"Rhythm and intonation have only slight variations across different samples"

The prosody row is the interesting one, and it is the only qualitative entry — the paper reaches it "based on a subjective assessment done by comparing the synthesized samples generated from the same semantic tokens."

Think about why prosody would land on the semantic side. Semantic tokens are extracted at 25 Hz with deduplication. Deduplication destroys absolute duration but preserves relative ordering; and the k-means clusters, being fit to contextualized w2v-BERT features, are themselves sensitive to stress and position. So the semantic stream encodes something like "which syllables are prominent and in what order," which is most of what we hear as intonation, while leaving the fine timing to the acoustic stages. It is a split nobody designed and it happens to be roughly correct.

Sim 9 — The disentanglement lab

Choose a generation mode, then Resample repeatedly. Each run draws a fresh sample: the transcript strip shows what the ASR probe would read, the speaker strip shows which of the 291 identities the classifier picks. Watch the transcript stay fixed while the speaker jumps around in acoustic generation mode, and both stay fixed in continuation mode. The running accuracy counters converge toward the paper's 3.2% and 92.6%.

Run acoustic generation twenty times and the speaker counter hovers near 3%; the transcript strip barely moves. Switch to continuation and the speaker counter climbs past 90 within a handful of draws. You are watching a factorization work.

Before the pattern, one detail from the ASR setup worth flagging: the acoustic generation is repeated three times per sample, and the reported CER/WER average over all of them. That means Table II's numbers already incorporate the variability of the acoustic stage, rather than reporting a single lucky draw. Small choice; it is the difference between a number and an estimate.

The two probes also differ in an underappreciated way: one has a ground-truth reference (the transcript) and the other has a ground-truth label (the speaker). Both are available only because the generation was conditioned on real audio. In pure continuation mode neither reference exists for the generated portion, which is why Chapter 8 needs entirely different instruments.

Two experiments, one design pattern

Step back from the numbers and look at the shape of what was done, because it is reusable.

1. State a factorization hypothesis
"Content is in z; identity and channel are in y." Precise enough to be wrong.
2. Find a generation mode that clamps one factor and frees the other
Acoustic generation: z fixed from real audio, y resampled. This is the intervention.
3. Point two off-the-shelf probes at the result
An ASR system for content, a speaker classifier for identity. Neither was built for this.
4. Predict opposite outcomes, and check
Content should survive (WER stays low); identity should not (accuracy near chance). Both held.

Step 3 is the part most often done badly. The temptation is to build a bespoke probe — train a classifier on the representation and report its accuracy. That measures decodability, which is a property of the probe as much as of the representation. Using an independent, pre-existing system that was never trained on your representation removes that degree of freedom entirely. Conformer Transducer-L does not know AudioLM exists; it just transcribes audio.

And step 2 is the part that requires the architecture to cooperate. You can only clamp one factor and free the other if the model exposes them separately — which is exactly what the hybrid tokenization provides. A single-code system offers no such handle, which is why nobody runs this experiment on a monolithic model: there is nothing to hold fixed.

What this does and does not prove

Be precise about the logical status of these results, because they are stronger than typical representation analyses and it is worth knowing why.

What is proved. These are interventional experiments, not correlational ones. The paper does not train a probe on semantic tokens and report that speaker identity is hard to decode — that would only show the information is not linearly accessible. Instead it resamples the acoustic tokens and observes the speaker change. Manipulating a variable and observing the downstream effect is causal evidence.

What is not proved. That the semantic tokens contain no speaker information — 3.2% is nine times chance. That the split is clean for other attributes: emotion, accent, and speaking rate are never measured, and the paper's own broader-impact section worries that "generated speech continuations might not be consistent with the prompt in terms of accent and dialect for underrepresented groups." That is an admission that the factorization is imperfect precisely where it matters most.

What is untested entirely. Whether any of this holds for music. There is no piano analogue of Table II or Table III. The claim that semantic tokens capture "melody and rhythm for music" is supported only by a preference test (Chapter 8), not by a probe.

The experiment nobody ran. The obvious missing probe: take two utterances from different speakers saying different things, cross the semantic tokens of one with the acoustic prompt of the other, and measure both WER (against speaker B's transcript) and speaker accuracy (against speaker A). If the factorization is clean, you should get roughly 6.0% WER and roughly 92% speaker accuracy simultaneously. That single experiment would upgrade "each token type mostly carries X" to "the two are independently controllable," which is a much stronger and more useful claim. Everything needed to run it is in the paper; the result is not.

Inline check

(a) Why does the SoundStream reconstruction score 100.0% on speaker classification but only 0.9 CER — why is the codec transparent to one probe and not the other?
It is transparent to both, roughly. 0.9 CER versus 0.8 for the original is a 0.1-point degradation — the codec is nearly lossless for ASR too. The 100.0% is what "nearly lossless" looks like when the metric saturates.

(b) Acoustic generation is run three times per sample. Why three?
Because a single sample from a high-entropy conditional is a poor estimate of that conditional's behavior. Three draws per source clip average out the luck of any individual generation — and for the speaker experiment, they demonstrate the variety directly, since three draws usually give three different speakers.

Cross-domain bridge:
These two experiments are a knockout study, the standard tool of experimental biology, applied to a neural system. You do not learn what a gene does by staring at its sequence; you disable it and see what breaks. Here: disable the acoustic prompt and speaker identity breaks (92.6 → 3.2) while content survives; there is no available knockout of the semantic tokens that leaves audio to measure, which is why the acoustic-only babbling experiment had to stand in for it. Whenever you want to know what a representation carries, resist the probe-classifier reflex and ask instead: what can I intervene on, and what downstream measurement would notice?
Implementation checkpoint:

You have a trained AudioLM and want to reproduce Table III's middle column. Write the eight lines. — (1) Load N clips from LibriSpeech test-clean, 4–10 s. (2) For each, extract ground-truth semantic tokens z. (3) Run stage 2 with conditioning = z only, no acoustic prefix, T = 0.8. (4) Run stage 3 on the resulting coarse tokens in 3 s chunks, T = 0.6. (5) Decode with SoundStream. (6) Run the 291-way speaker classifier on 1 s windows with 250 ms hop and aggregate. (7) Score against the clip's true speaker. (8) Repeat 3× per clip and average. Expected: ~3%. If you get >10%, your stage 2 is leaking the prompt; if you get 0.3%, check that the classifier works at all on generated audio.

Before that, one number to keep in perspective: 291 speakers is a small closed set. The classifier is not doing speaker verification in the open world; it is choosing among 291 known identities. That makes 92.6% impressive but not directly comparable to a speaker-verification equal-error rate, and it is why the paper cites ASVspoof separately when discussing biometric spoofing rather than claiming its own numbers bear on it.

Reading Table III's first row

The row nobody discusses is the most important control in the chapter: SoundStream reconstruction → 100.0% speaker accuracy.

Without it, the 3.2% result is ambiguous. Maybe the classifier simply fails on codec-processed audio; maybe passing anything through SoundStream destroys speaker identity, and AudioLM's generation has nothing to do with it. The control rules that out completely: real audio, compressed through the same codec at the same bitrate, is still classified perfectly.

So the drop from 100.0% to 3.2% is attributable entirely to resampling the acoustic tokens, which is the intervention under study. And the recovery from 3.2% to 92.6% is attributable entirely to supplying an acoustic prompt. Two clean attributions, made possible by one control row.

The habit worth forming. When you read a table of results, find the row that exists only to eliminate an alternative explanation, and ask what would be unknowable without it. In Table II it is the SoundStream reconstruction column (0.9 / 2.6), which shows the codec is not the error source. In Table III it is the 100.0%. In both cases the interesting number is meaningless without its control, and in both cases the control is the least discussed cell in the table.

The result in one sentence each

Table II: regenerate audio from nothing but the semantic tokens and an ASR system still recovers 94% of the words, so the semantic tokens carry the content.

Table III: do the same and a speaker classifier recovers the original speaker 3.2% of the time — barely above chance — so the semantic tokens do not carry the voice; add three seconds of coarse acoustic tokens and it recovers 92.6%, so they do.

Two sentences, two tables, one factorization confirmed from both sides. Everything else in this chapter is the careful work that makes those two sentences trustworthy: the codec baseline that shows compression is not the confound, the 291-speaker chance level that calibrates 3.2%, the "excluding the prompt" clause that stops the 92.6% from being copying, and the honest note that ASR is degraded by the model's own acoustic diversity.

A quick note on why these two probes and not others. An ASR system and a speaker classifier are the two most mature, most standardized, most widely-trusted audio classifiers in existence. Choosing them is not laziness — it is choosing instruments whose behavior the reader already understands, so the result does not depend on trusting a probe the authors built.

If you wanted to extend this analysis, the same logic tells you where to look next: emotion recognition and accent classification are the two other reasonably mature off-the-shelf probes, and both would test attributes the paper explicitly worries about and never measures.

The one experiment that would tie it all together

Chapter 5's challenge box sketched voice conversion; here it earns a second mention because it is the natural completion of this chapter's argument.

Take speaker A's coarse acoustic prompt and speaker B's semantic tokens. Generate. Then run both probes: the ASR system against speaker B's transcript, and the speaker classifier against speaker A. Clean factorization predicts roughly 6% WER and roughly 92% speaker accuracy, simultaneously, from a single generated clip.

That would upgrade the claim from "each token type mostly carries X" to "the two are independently controllable" — which is the property every downstream application (TTS, voice conversion, dubbing) actually needs. Every component required to run it is described in the paper. The result is not there, and every successor system in Chapter 9's lineage table is, in effect, a demonstration that it works.

Acoustic generation from ground-truth semantic tokens gives 3.2% speaker classification accuracy, against a chance level of 0.34% with 291 speakers. What is the correct reading?

Chapter 8: Does It Know English? (And Piano)

Chapter 7 established that semantic tokens carry linguistic content. This chapter asks a harder question: does the language model over those tokens know anything about English — lexicon, syntax — or has it merely learned to produce plausible token sequences?

The distinction matters. A model could reproduce transcripts faithfully in acoustic-generation mode (where ground-truth semantics are supplied) while being incapable of generating a grammatical sentence on its own. Table II tests the mapping; this chapter tests the mind.

Two zero-shot probes from the Zero Resource Challenge

Both metrics come from the ZeroResource Speech Challenge 2021, and both work the same way: present the model with a pair, one good and one bad, and check which one it assigns higher probability. No training, no fine-tuning, no classifier head. Pure likelihood comparison.

sWUGGY — the lexical probe
"Measures whether in a pair of a similar-sounding word and a non-word (e.g., 'brick' and 'blick'), the model gives a higher probability to the word." Tests: is there a lexicon in there?
sBLIMP — the syntactic probe
"Measures how often, according to the model, a grammatically correct sentence has a higher probability than a similar incorrect one (e.g., 'the dogs sleep' vs 'the dog sleep')." Tests: is there grammar in there?

The datasets, exactly: 10,000 pairs for sWUGGY and 6,300 pairs for sBLIMP, from the challenge development sets, "each synthesized using four voices." Four voices matters — a model that scored well on one voice and badly on others would be measuring something acoustic rather than linguistic.

sWUGGY is reported twice: on all pairs, and on an in-vocab subset "pre-filtered to contain words that occur in the LibriSpeech data." The gap between them tells you how much of the score depends on having actually heard the word during training, versus general phonotactic plausibility.

One practical note before the mechanics: both probes are evaluated on synthesized audio, not on recordings. The challenge organizers render each text stimulus with four TTS voices, so the model is being asked to score speech it has never heard a human produce. That is a deliberate design choice — it guarantees the two members of each pair differ only in the intended contrast, with no confound from different recording sessions, speakers, or noise.

It also means a residual risk the paper does not discuss: if the model's semantic tokenizer behaves oddly on synthetic speech, all four voices share that oddity, and the scores would be systematically affected. Nothing suggests this happened, but it is the kind of assumption worth naming.

The normalization problem, worked out

Here is a subtle methodological point that the paper handles correctly and that costs it a headline number — which is the mark of a paper worth trusting.

To score a pair you compute the model's log-likelihood of each sequence and pick the higher. But: "positive examples in the sBLIMP data are on average shorter than their negative counterparts, which can implicitly bias scores towards higher success rates."

Why does length bias the comparison? Because a log-likelihood is a sum of per-token log probabilities, every one of which is negative. A longer sequence has more negative terms, so it accumulates a lower total — regardless of how good it is. Longer is penalized, mechanically.

Watch it produce a wrong answer. Suppose the grammatical sentence "the dogs sleep" becomes 12 semantic tokens and the ungrammatical "the dog sleep" becomes 10, and the model — which does know grammar — assigns:

SentenceTokensTotal log-likelihoodPer-token average
"the dogs sleep" (correct)12−30.0−30.0 / 12 = −2.50
"the dog sleep" (incorrect)10−27.0−27.0 / 10 = −2.70

Unnormalized comparison: −27.0 > −30.0, so the model "prefers" the ungrammatical sentence. Marked wrong. But look at the per-token numbers: the model finds every token of the correct sentence more probable on average. It knew the answer; the metric asked the wrong question.

Normalized comparison: −2.50 > −2.70, so the correct sentence wins. Marked right.

The paper's decision: "we normalize the log-likelihood returned by the model by the sequence length in all experiments." Applied uniformly, to every model, including their own.

And here is the part that shows integrity. Footnote 3 of the paper: "Without the log-likelihood normalization discussed above, AudioLM achieves a sBLIMP score of 67.5, outperforming the phone topline." The phone topline — a BERT trained on ground-truth phonetic transcriptions — scores 66.8. So the unnormalized number would have let the authors claim that a text-free model beats a model trained on actual phonemes. They report 64.7 instead, in the main table, because 64.7 is the number the honest protocol produces. The bigger claim is relegated to a footnote with an explicit caveat. Read a lot of papers and you will learn how rare that is.

Table IV, complete

ModelsWUGGY all (↑)sWUGGY in-vocab (↑)sBLIMP (↑)
Text-based toplines
Forced alignment topline92.263.7
Phone topline97.966.8
Non-causal (not suited for generation)
BERT baseline67.775.656.1
HuBERT-only (Nguyen et al.)70.979.859.5
Harwath et al. (visual grounding)67.675.456.7
CPC-BERT (Nguyen et al.)80.059.9
Causal
van Niekerk et al. (LSTM on CPC)64.372.354.0
GSLM68.757.1
AudioLM71.583.764.7

Three readings, again.

First — AudioLM wins every no-text-supervision column. sWUGGY all: 71.5 versus 70.9 for the best prior (HuBERT-only). In-vocab: 83.7 versus 80.0 (CPC-BERT). sBLIMP: 64.7 versus 59.9. The lexical margins are modest; the syntactic margin is not.

Second — the sBLIMP jump. The paper quantifies it as "improving by 8% relative over the previous state-of-the-art (CPC-BERT)." Check the arithmetic:

59.9 × 1.08 = 64.69 ≈ 64.7  ✓

And it clears the forced alignment topline at 63.7 — a BERT model trained on force-aligned ground-truth phonetic transcriptions. A model that has never seen text outscores a model trained on aligned phonemes, at judging English grammar. That is the sentence to remember from this table.

Third — the causal/non-causal split. This is the reading that is easiest to miss and most important. "Unlike AudioLM, the aforementioned models are not causal, so they are not well suited for speech generation." BERT and RoBERTa variants see the whole sequence bidirectionally; they can score a sentence but cannot generate one left to right. AudioLM beats them anyway, while being architecturally constrained in a way they are not. Compare only within the causal block and the margins widen further: 64.7 versus GSLM's 57.1 on sBLIMP.

Sim 10 — The pair-judgement lab: sWUGGY, sBLIMP, and the normalization trap

Each round presents a pair. The bars show per-token log-probabilities as the model reads left to right; the two readouts show the total and the length-normalized score. Toggle Normalize to see pairs flip their verdict — the highlighted rounds are the ones where length bias alone decides the answer. The running score tracks how the protocol choice changes the reported number.

Cycle through the sBLIMP rounds with normalization off and watch pairs where the model clearly prefers the grammatical sentence per token, yet loses on the total. Those are the rounds the footnote is about.

The human evaluation: 51.2%

Automated probes measure the linguistic half. For the whole thing — content, acoustics, and the absence of artifacts, judged together — the paper runs a listening test, and its design is worth studying because it closes every obvious loophole.

Design elementChoiceLoophole it closes
Sample lengthExactly 10 secondsLength as a cue; also avoids padding artifacts
Source100 samples from LibriSpeech test-clean, ≥10 s, chosen at randomCherry-picking
Real halfGround truth, compressed with SoundStream to match AudioLM's bitrate"So that compression artifacts cannot be used as cues to detect synthetic audio"
Synthetic half3 s prompt + 7 s generated, concatenated
Raters10, screened for English proficiencyJudgements about linguistic plausibility require the language
Instructions"The first 3 seconds in each sample is original human speech, and thus their decision should be based on the segment following the first 3 seconds"Prevents crediting the prompt
Ratings collected1,000Statistical power

The result: "the rate of success for assigning the correct label (original vs. synthesized) is 51.2%, which, according to a binomial test, is not statistically significantly different (p = 0.23) from assigning labels uniformly at random (50% success rate)."

Note the direction of the statistics. The authors are not claiming a positive result; they are failing to reject the null that raters were guessing. With 1,000 ratings, a binomial test at 51.2% gives p = 0.23 — comfortably inside noise. The task tests three things at once, as the paper lists them: semantic and syntactic correctness of the content, acoustic coherence with the prompt, and absence of generation artifacts. Failing to detect any of the three, under those controls, is a strong composite result.

And the paper's own next sentence is the one that leads to Chapter 9: "Since human raters struggle to differentiate short speech samples synthesized by AudioLM from real speech samples in an unpaired setup, the responsible model development practices call for addressing this aspect systematically."

Checking the p-value yourself

"p = 0.23" is the kind of number worth recomputing, both to confirm it and to learn what test was used.

A 51.2% success rate over 1,000 ratings is 512 successes. Under the null hypothesis of pure guessing, the count is Binomial(n = 1000, p = 0.5), with

mean = n·p = 500  ·  standard deviation = √(n·p·(1−p)) = √250 = 15.811

Step 1 — the z-score.

z = (512 − 500) / 15.811 = 12 / 15.811 = 0.759

Step 2 — the tail probability. For a standard normal, P(Z > 0.759) ≈ 0.224. That is the one-sided p-value, and it rounds to the paper's 0.23.

Step 3 — note which test that is. A two-sided test would double it to ≈ 0.45. The paper reports the one-sided value, which is the right choice here: the alternative hypothesis of interest is "raters do better than chance," not "raters differ from chance in either direction." Nobody expected systematically sub-chance performance. Either way, both numbers are nowhere near any conventional threshold — you would need roughly 526 successes for one-sided significance at p = 0.05.

Which gives a useful sense of the experiment's resolution: with 1,000 ratings, this test could have detected a true detection rate of about 53% or higher. It cannot rule out a small real effect below that. "Indistinguishable" here means "indistinguishable at the resolution of 1,000 ratings," and the paper's careful phrasing — "not statistically significantly different" rather than "identical" — respects that.

Scoring a pair, in code

python — sWUGGY / sBLIMP scoring, exactly as described
import numpy as np

def seq_logprob(model, wav):
    """Log-likelihood of the SEMANTIC token sequence for one audio clip."""
    z = semantic_tokens(wav)                 # frozen tokenizer, then dedup
    lp = 0.0
    for t in range(1, len(z)):
        logits = model(z[:t])                  # stage-1 LM only
        lp += log_softmax(logits)[z[t]]        # each term is negative
    return lp, len(z)

def judge_pair(model, wav_good, wav_bad, normalize=True):
    lp_g, n_g = seq_logprob(model, wav_good)
    lp_b, n_b = seq_logprob(model, wav_bad)
    if normalize:                              # the paper's choice, everywhere
        lp_g, lp_b = lp_g / n_g, lp_b / n_b
    return lp_g > lp_b                         # True = scored correct

# sWUGGY: 10,000 pairs (word vs non-word), 4 voices each
# sBLIMP:  6,300 pairs (grammatical vs not), 4 voices each
score = np.mean([judge_pair(model, g, b) for g, b in pairs]) * 100

Two details this makes explicit. Only the stage-1 model is involved — sWUGGY and sBLIMP never touch the acoustic stages, so they are measuring the semantic language model in isolation. And the audio is synthesized from text by the challenge organizers using four voices, so a model with residual speaker sensitivity would score inconsistently across voices; averaging over the four is itself a small robustness check.

What these probes cannot see

Both metrics are pairwise likelihood comparisons on short stimuli. Three things they are blind to.

Long-range coherence. sBLIMP sentences are a few words long. Nothing here tests whether the model stays on topic across 30 seconds — which was Chapter 0's entire motivating problem. The evidence for long-horizon coherence in this paper is the human evaluation and the piano preference test, not these probes.

Semantics beyond syntax. "The dogs sleep" versus "the dog sleep" is a grammatical contrast. Neither probe asks whether the model prefers meaningful sentences to grammatical nonsense. The paper's claim of "semantically plausible speech continuations" rests on listening, not on measurement.

Anything acoustic. Both probes score semantic token sequences. A model with perfect sWUGGY and sBLIMP could still produce unlistenable audio — which is precisely GSLM's situation, differently. The two halves of the paper's claim are measured by entirely disjoint instruments, and that is a feature.

Beyond speech: piano

The framework was built for speech; the interesting claim is that it transfers. "We retrain all components of AudioLM on an internal dataset of 40k hours of piano music that includes players from beginner to expert level, and exhibits a wide range of different acoustic conditions, with content ranging from piano scale exercises to famous pieces."

What changed: exactly one thing. "The model hyperparameters are identical to the speech continuation setup, except for the acoustic generation stage: we found that a codec with 3 layers of quantization and a larger codebook size of 214 per layer already provides high reconstruction quality, so the experiments on piano continuation ignore the third stage and directly predict the 3 levels of acoustic tokens in the second stage."

SpeechPiano
Q (quantizer layers)123
Codebook size N1024 = 21016,384 = 214
Bits per frame12 × 10 = 1203 × 14 = 42
Bitrate at 50 Hz6000 bps2100 bps
Stages used32 (no fine stage)
Prompt length3 s4 s, from MAESTRO

Read that table as a claim about the two signals. Piano needs less than half the bitrate of speech for comparable perceived quality, and reaches it with three wide codebooks instead of twelve narrow ones. Solo piano is spectrally sparser and more stationary than speech: a struck note is a decaying sum of harmonics, well described by a few large codewords, whereas speech is a rapidly-switching sequence of very different spectral shapes needing many fine corrections.

Why wide-and-shallow beats deep-and-narrow for piano. RVQ depth buys precision through successive refinement; codebook width buys coverage of distinct spectral shapes. Piano has few distinct shapes (notes and their combinations) each needing decent precision — so 214 codewords cover the space and 3 layers suffice. Speech has enormous shape diversity (every phoneme × every speaker × every room) but tolerates coarser precision per shape — so 12 layers of successive refinement work better than one enormous codebook. The right RVQ geometry is a property of the signal, and this is one of very few papers that shows both settings side by side.

The piano result

The evaluation is a preference test, because there is no piano analogue of ABX or WER. Setup: 10 raters, 15 pairs of 20-second continuations, each pair being the same prompt continued by (a) a model trained on acoustic tokens only and (b) full AudioLM.

Result: raters preferred AudioLM in 83.3% of pairs.

And the qualitative observation that gives the number meaning: "While both are of equally high audio quality, analogously to the speech continuation experiments, only the latter display consistent melody and temporal structure."

Equal audio quality, different structure. That is Chapter 0's fidelity/coherence split, reproduced in a domain with no phonemes, no words, no syntax — and it is why the paper's conclusion generalizes the claim: hierarchical modeling "not only benefits speech generation by separating linguistic content from speaker identity, but more generally improves audio generation by explicitly disentangling the long-term structure and local acoustic details."

Sim 11 — Piano continuation: acoustic-only versus full AudioLM

A piano roll. The shaded region is the 4-second prompt; everything to the right is generated. Toggle between the two systems and watch what changes: the acoustic-only model keeps the timbre and the note-level realism but loses the key, the motif, and the metre. The structure meters on the right score melodic contour continuity, harmonic consistency and rhythmic regularity against the prompt.

Flip between the two several times on the same prompt. The acoustic-only continuation is never ugly — every note sounds like a real piano — it is simply about nothing. That is the most precise available description of what long-term structure is: the difference between sounds and a piece.

Before ranking the evidence, one more piece of context on the human evaluation: the raters were told the first three seconds were real. That instruction makes the task harder for the model, not easier — it focuses attention exactly where the generation is, and it removes any chance of the prompt carrying the judgement. It is the kind of design choice that costs the authors nothing to omit and that they included anyway.

Reading the numbers as a hierarchy of evidence

This chapter has produced five different kinds of number, and they are not equally strong. Ranking them is a useful exercise.

EvidenceStrengthWhy
sWUGGY / sBLIMP (Table IV)StrongestZero-shot, no training, standard public datasets, direct comparison to a published leaderboard, uniform protocol applied to everyone
Human detection 51.2% (p = 0.23)StrongPre-registered-style design with the obvious confounds removed; but 10 raters and a null result, so it bounds rather than establishes
Piano preference 83.3%Moderate10 raters, 15 pairs. Against an ablation of itself, not against any external system
Prosody assignmentWeak"Based on a subjective assessment" — no metric, no rater count, no protocol
Unconditional diversityWeakestQualitative description of listening to samples; no measurement at all

None of these are dishonest. All of them are labelled correctly in the paper — the qualitative ones say "we observe" and "subjective assessment," the quantitative ones give protocols and sample sizes. The skill being practised here is reading those labels rather than flattening every number into "the paper showed."

And notice the pattern in what is strong: the strongest evidence comes from metrics the authors did not design, on datasets they did not build, compared against a leaderboard they did not curate. The weakest comes from listening to their own samples. That ordering is not a coincidence, and it generalizes to every empirical paper you will read.

What is missing from the music evaluation

Three honest gaps, worth naming because they bound the claim.

No Table I for music. There is no measurement of what piano semantic tokens carry versus piano acoustic tokens — no ABX analogue, no reconstruction comparison. The complementarity is assumed to transfer.

No absolute quality baseline. The comparison is against an ablation of itself, not against Jukebox, Perceiver AR, or a symbolic music model. "Better than our own ablation in 83.3% of pairs" is a statement about the hierarchy, not about the state of the art.

Solo piano only, from an unreleased dataset. The conclusion lists "polyphonic music" as future work, which in context means multi-instrument. And 40k hours of internal piano recordings cannot be reproduced by anyone outside Google.

Inline check

(a) Why is sWUGGY reported both on all pairs and on an in-vocab subset?
Because "all" mixes two abilities: recognizing words actually heard in training, and rejecting non-words on phonotactic grounds alone. The in-vocab subset isolates the first. AudioLM's larger margin in-vocab (83.7 vs 80.0) than overall (71.5 vs 70.9) suggests its advantage is more lexical memory than phonotactic generalization.

(b) The piano configuration has no third stage. What did it give up?
Nothing measurable, per the paper — 3 layers at 214 "already provides high reconstruction quality." It also gave up the parallel-chunk trick, but with only 2 stages and 150 tokens/s the sequences were never the bottleneck.

(c) Why is the piano prompt 4 seconds rather than speech's 3?
The paper does not say. A plausible reason: musical structure has a longer minimum unit. Three seconds of speech contains several words — enough to establish voice and register. Three seconds of piano might not contain a full bar at a slow tempo, leaving metre and key underdetermined. Four seconds buys roughly two bars at moderate tempo.

Cross-domain bridge:
The length-normalization trap is Simpson's paradox for sequences, and it recurs everywhere likelihoods are compared across unequal lengths: beam search's length penalty in machine translation, perplexity comparisons across tokenizers with different compression rates, retrieval scores across documents of different sizes. The general rule: a sum of negative terms is not a fair comparison unless the number of terms is matched. Whenever you see a system "prefer" the shorter option suspiciously often, check whether the metric is doing the preferring. Our sampling and decoding lesson works the same correction from the generation side.

Also worth noting what the four-voice synthesis buys. Each sWUGGY and sBLIMP stimulus is rendered by four different voices, and the score averages over them. A model whose semantic tokens retained speaker information would score inconsistently across the four — high for voices resembling its training distribution, low for others — and the average would drag it down. Voice-averaging is therefore a quiet second test of the speaker-invariance that Chapter 2 measured directly.

Why zero-shot probes are the right instrument here

One methodological point deserves emphasis because it is easy to take for granted.

sWUGGY and sBLIMP require no training whatsoever on the model being evaluated. No probe classifier, no fine-tuning head, no held-out split of the model's own outputs. You compute two likelihoods and compare them. That property is what makes the leaderboard comparison in Table IV meaningful across architectures as different as an LSTM on CPC features, a RoBERTa on visually-grounded representations, and a causal Transformer on k-means tokens.

Contrast this with the alternative that a less careful paper would have used: train a linear probe on the semantic tokens to predict phonemes or words, and report its accuracy. That number would confound three things — how much information is present, how accessible it is to a linear map, and how much data the probe got. Every one of those is a property of your probing setup rather than of the model.

The zero-shot design removes all three degrees of freedom. What is left is a statement about the model's own probability distribution, which is the thing you actually wanted to know.

The cost is that you can only ask questions expressible as a likelihood comparison between two stimuli. That is a real constraint — it is why there is no zero-shot probe for coherence, prosody, or acoustic quality in this paper, and why those had to be evaluated by ear.

The chapter in one line

A model that has never seen a letter of text judges English grammar better than a model trained on force-aligned phonetic transcriptions — and the authors report the smaller of their two possible numbers for it.

That is the sentence. The rest is protocol: 10,000 lexical pairs, 6,300 syntactic pairs, four voices each, length-normalized log-likelihoods, causal architecture competing against non-causal baselines. And on the music side, one preference test showing that the same hierarchy separates structure from surface in a domain with no words at all.

A closing observation about the piano configuration that is easy to skip. Dropping stage 3 for music is not a compromise — it is a demonstration that the architecture is modular in the way Chapter 4 claimed. The interface between stages 2 and 3 is a coarse token matrix; if your codec's coarse tokens are already good enough, stage 3 is simply unnecessary and nothing else changes. Two stages, one fewer model, identical everything else.

That single configuration change does more to support the interface argument than any amount of prose about conditional independence.

Connecting the two halves of the paper

It is worth stating explicitly how Chapters 7 and 8 fit together, because they are answering nested questions.

Chapter 7 asked: do the semantic tokens carry linguistic content? It answered yes, by supplying real semantic tokens and recovering the transcript. That is a statement about the representation.

Chapter 8 asked: does a language model over those tokens know English? It answered yes, by comparing likelihoods on word/non-word and grammatical/ungrammatical pairs. That is a statement about the model.

Both are needed. A representation that carries content but supports no learnable structure would pass Chapter 7 and fail Chapter 8 — you could resynthesize faithfully and never generate a sentence. A model with good likelihood statistics over a representation that carried nothing would pass Chapter 8 in some degenerate sense and fail Chapter 7. Only both together license the claim in the abstract: syntactically and semantically plausible speech continuations, with no transcript.

AudioLM reports sBLIMP 64.7 with length normalization, and mentions 67.5 without it in a footnote. Why does the choice matter, and which is the honest number?

Chapter 9: Detection, Risk, and What Came Next

Two numbers from this paper sit next to each other and produce the most interesting question in it.

Humans, told which 3 seconds are real, on 10-second clips: 51.2% correct
A small convolutional network, on 1-second crops: 98.6% correct

The same audio. One judge cannot tell at all; the other is nearly perfect. Understanding why is worth more than either number alone, and it generalizes far beyond this paper.

The detector, exactly as built

The paper's approach is deliberately unimpressive, which is the point: "we train a convolutional network with the same architecture as the one described in Section IV-D, but for the binary classification task of differentiating between original samples and continuations generated by AudioLM (excluding the prompt)."

Same six-block CNN from Chapter 7 — log-mel input, 25 ms window, 10 ms hop, 64 mel bins, channels [64, 128, 256, 256, 512, 512], 3×1 and 1×3 kernels. Only the output head changes: 291 speakers becomes 2 classes.

DetailValue
ArchitectureIdentical to the speaker classifier; binary head
Positive classAudioLM continuations, excluding the prompt
Negative classOriginal samples, compressed through SoundStream
Training dataLibriSpeech train-clean-100 (originals and prompts)
Training crops1 second
Long-input inferenceOverlapping 1 s windows, 250 ms hop, aggregated
Evaluation setBalanced
Accuracy98.6%

The handicap that makes the experiment honest

One design decision here is more instructive than the result. Why compress the real audio through SoundStream before training the detector? The paper explains:

"We compare continuations to original samples compressed through SoundStream rather than uncompressed audio, since otherwise i) the task is trivial (the model quickly converges to 100% accuracy) and ii) eventual compression artifacts would become a confounding factor that would prevent evaluating the generative abilities of AudioLM."

Read that as a chain of reasoning. An uncompressed-versus-generated detector reaches 100% instantly, because it learns to detect the codec, not the generation. That detector is useless: it would flag any SoundStream-compressed real recording as fake. To measure whether AudioLM's generation is detectable, both classes must go through the codec.

This is the single most transferable idea in the chapter. Any detector for generated media faces the same trap: the easiest signal is almost never the one you meant to measure. Detectors for generated images learn the upsampler's fingerprint; detectors for generated text learn tokenizer quirks or formatting habits. Those detectors report high accuracy and collapse the moment the pipeline changes — because they never learned anything about the content. The correct experimental design is to equalize every incidental channel between the classes, and then see what is left. AudioLM's authors did this to their own detector, deliberately making its job harder, and still got 98.6%.

Why the machine wins and the human does not

The paper does not explain the gap. Here is the reasoning, which is worth having explicitly.

The two judges are answering different questions. The human is asked: does this sound like a person talking? That is a judgement about naturalness, integrated over seven seconds, using a perceptual system tuned by a lifetime of listening to real speech — and tuned specifically to what matters: intelligibility, speaker identity, emotional tone. The CNN is asked: does this one-second spectrogram come from distribution A or distribution B? That is a statistical question, and it does not care whether the difference is perceptible.

And there is a difference to find. Trace it. Real audio produces a sequence of RVQ codes that is a quantization of a real waveform. Generated audio produces a sequence of RVQ codes sampled from a language model at temperature 0.8 and 0.6. Those two distributions over code sequences are not the same, even when their decoded waveforms are perceptually equivalent. Temperature sampling below 1 systematically over-represents high-probability codes; the model's learned transition statistics are an approximation of the true ones. Decode both and the difference survives as a faint statistical texture in the spectrogram — inaudible, but perfectly learnable.

Human perception discards exactly that information. Our auditory system is a lossy, task-oriented encoder. It is superb at speaker identity and phoneme discrimination and largely blind to the fine statistics of spectral texture, because those statistics have never mattered for survival. A CNN trained on log-mel spectrograms has no such priorities: every bin is equally interesting.

The general principle, stated once. Perceptual indistinguishability and statistical indistinguishability are different properties, and the gap between them is enormous. A generative model reaches perceptual indistinguishability when its errors fall below the resolution of human perception. It would reach statistical indistinguishability only when its output distribution exactly matched the data distribution — which no finite model trained by maximum likelihood and sampled at temperature 0.6 does. The first is achievable and has been achieved here. The second is essentially never achieved, which is why detection keeps working. Every claim of "undetectable AI-generated media" should be read as "perceptually undetectable," and the two are not close.
Sim 12 — Two judges, one signal

Left: what the human hears — a 7-second waveform and its perceptual summary, with the real/generated pair shown together. Right: what the CNN sees — a 1-second log-mel patch, with the learned discriminative statistic highlighted. Press Draw sample repeatedly and watch the two accuracy counters diverge toward 51.2% and 98.6%. The equalize codec toggle removes the paper's handicap: turn it off and the detector jumps to 100% by cheating on compression artifacts.

Turn the codec equalization off and watch the detector's counter shoot to 100% within a few draws while the human counter does not move. That is the trivial-task failure mode the paper explicitly designed around, reproduced in ten seconds.

What the detector does not prove

98.6% is a strong result under specific conditions. Be precise about which.

Condition of the testWhat is untested
Balanced evaluation setReal deployment is enormously imbalanced. At a 1-in-10,000 base rate, a 1.4% false-positive rate means most flagged samples are real
Same generatorDetection of other systems, or of AudioLM after any change to codec, temperature, or model
Clean LibriSpeech domainTelephone codecs, re-encoding, room playback-and-recapture, added noise
No adversaryAnyone deliberately post-processing to defeat the detector
Continuations onlyShort generated inserts spliced into real recordings

The base-rate point deserves the arithmetic, because it is the one people skip. Suppose 1 in 10,000 clips in some stream is generated, and you run a detector with 98.6% accuracy on both classes across 1,000,000 clips:

generated: 100 → 98.6 caught
real: 999,900 → 1.4% flagged = 13,999 false alarms
precision = 98.6 / (98.6 + 13,999) = 0.7%

Under 1% of flagged clips would actually be generated. That is not a criticism of the paper — the balanced setting is the right one for measuring whether a signal exists — but it is the difference between a scientific result and a deployable system, and the gap is four orders of magnitude of base rate.

One framing note before the comparison. The paper never uses the word "watermark," and it is worth being precise about what it did build: a classifier trained after the fact on outputs, not a signal embedded during generation. The distinction shapes every property in the table below.

Detector versus watermark: the road not taken

AudioLM ships a post-hoc detector: a classifier that examines audio and guesses its origin. The alternative — which arrived later in this lineage — is a proactive watermark: deliberately perturbing the generation so that an inaudible, robust signal is embedded in every output.

Post-hoc detector (this paper)Proactive watermark
How it worksLearns the statistical fingerprint the generator leaves by accidentEmbeds a fingerprint on purpose, at generation time
Needs generator cooperationNo — works on any output you can collectYes — must be built into the pipeline
Survives model updatesNo; retrain per generator versionYes, if the scheme is versioned
Survives re-encoding / noiseUntested here; likely poorlyDesigned for it, with explicit robustness targets
Detects other generatorsNoNo — and that is the fundamental limit of both
CostOne small CNNChanges to the generative model or decoder

The last row of that table is the one that ends every optimistic conversation about provenance. Neither approach detects a generator you did not anticipate. A watermark tells you "this came from our system"; it says nothing about audio from someone else's. A learned detector generalizes a little further but not much, and degrades as generators improve.

Which makes the accidental-fingerprint result more interesting, not less. AudioLM's 98.6% comes from a fingerprint nobody designed — a byproduct of sampling from an imperfect model. As models get better, that fingerprint gets fainter. The 98.6% is a snapshot of a moving quantity, and the direction of travel is known.

One more consequence of the accidental-fingerprint framing: the detector is a moving target in a way a designed signal would not be. Every improvement to the generator erodes it, and no improvement to the generator erodes a properly designed watermark. That asymmetry is why the field moved toward embedded signals within a couple of years.

The arms-race arithmetic

Put a shape on that movement. A detector works when the generated distribution differs measurably from the real one within the detector's window. Two levers close that gap:

Better modeling
Lower cross-entropy means the model's transition statistics match the data's more closely, and the sampled code sequences look more like quantized real ones.
Higher temperature
T = 1 samples from the model's actual distribution; T < 1 systematically over-picks likely codes, creating exactly the statistical skew a detector can find. AudioLM uses 0.6–0.8.

That second lever is an uncomfortable observation: the temperature schedule that makes AudioLM sound good is part of what makes it detectable. Sampling at T = 1 would produce a less skewed code distribution and a harder detection problem — at the cost of the "diversity versus semantic consistency" trade-off Chapter 1 described. Quality and detectability are coupled through the same knob, in the same direction. The paper does not run the detector at varying temperatures; it would be a two-hour experiment and a genuinely informative plot.

The broader impact, as the authors wrote it

Section VI is short and specific. Its structure is worth copying.

It names the upside first, concretely: "use-cases ranging from helping people with speech impediments to assisting in composing music."

It names inherited risks: "AudioLM inherits all concerns about language models for text, such as reflecting the societal biases in the underlying data."

It names a risk specific to this system: "the generated speech continuations might not be consistent with the prompt in terms of accent and dialect for underrepresented groups in the training data." This one is sharper than it looks. The whole selling point is that continuations preserve the prompt's characteristics. If that preservation degrades for speakers underrepresented in Libri-Light — which skews toward a particular set of English accents — then the system works better for some people than others in a way that is invisible to every metric in the paper. Table III's 92.6% is an average over test-clean speakers; no per-group breakdown is reported.

It names the misuse cases with citations: "spoofing biometric identification" (citing the ASVspoof challenge) and "impersonating a specific speaker" (citing YourTTS).

And it points to its own mitigation: "As an important step towards this direction, in Section IV-H we provide a model for accurately detecting audio synthesized by AudioLM."

The template worth stealing. Publish the capability and the detector in the same paper. Design the detection experiment to be harder than necessary rather than easier. Report the human evaluation that shows the capability is real, and the machine evaluation that shows it is catchable. Name the demographic failure mode you did not measure. None of this is heroic — it is about four extra paragraphs and one extra experiment — and in 2022 it was uncommon enough to be worth remarking on.

What AudioLM became

The conclusion lists its own future work: "multilingual speech, polyphonic music, and audio events… as well as integrating AudioLM into an encoder-decoder framework for conditioned tasks such as text-to-speech or speech-to-speech translation." Nearly all of it happened, mostly within a year, and mostly by keeping this exact hierarchy and adding a conditioning signal on top.

What came nextWhat it kept from AudioLMWhat it added
MusicLMThe semantic→acoustic hierarchy, essentially unchangedA text-music joint embedding (MuLan) as the conditioning signal — text-to-music by replacing the prompt
VALL-ECoarse/fine acoustic token split, LM over codec tokens, 3-second speaker promptEnCodec instead of SoundStream, and text instead of semantic tokens — TTS as conditional language modeling
AudioPaLMAudio tokens as vocabulary entriesA single model whose vocabulary contains text and audio tokens — speech-to-speech translation in one LM
SoundStormThe token representationParallel, non-autoregressive decoding — a direct attack on Chapter 5's 2,500 serial steps
Moshi and full-duplex systemsAudio-as-language, hierarchical codesReal-time, streaming, simultaneous listening and speaking

Notice what every one of those inherits: audio tokens are a vocabulary, and generation is next-token prediction. And notice what most of them dropped: flattening. Row-major flattening multiplies sequence length by Q, and that is the first thing every successor attacked — VALL-E with parallel fine prediction, SoundStorm with masked parallel decoding, RQ-Transformer designs with a nested depth transformer. AudioLM's flattening was "the simple approach," as the paper says, and simple approaches are the ones that get replaced.

Sim 13 — The lineage map

AudioLM sits in the middle. Below it, what it was built from; above it, what was built from it. Tap any node to see what it contributed or inherited, with the edge highlighting which component travelled. Prerequisite lessons on this site are marked.

Where to go from here on this site

DirectionLessonWhy
← PrerequisiteSelf-supervised speechWhere w2v-BERT, HuBERT and masked prediction come from — the semantic half, built from zero
← PrerequisiteNeural audio codecsSoundStream and RVQ in full, including the losses AudioLM never has to think about
← BackgroundAudio representationsWaveforms, spectrograms, mel scales — the substrate under everything here
→ Direct successorMusicLMThis exact hierarchy plus a text-music embedding
→ Sibling lineageVALL-ECodec tokens plus text: TTS reframed as language modeling
→ AncestorWaveNetThe babbling baseline of Chapter 0, in its own right
→ NeighbourCLAPThe other way to give audio a language: contrastive text-audio alignment rather than tokens
→ AppliedTTS architecturesWhere the encoder-decoder version of this idea landed

Five things to carry out of this paper

If a year from now you remember five things, make them these.

1. Complementary tokenizations beat compromise tokenizations. Table I's four rows show that matching the bitrate does not convert one representation into the other. When two objectives pull in opposite directions, look for two codes rather than a middle setting.

2. Bitrate is sequence length is compute. Every architectural decision in AudioLM — the coarse/fine split, the 3-second chunks, the crop lengths, even Q′ = 4 — is a sequence-length decision. Learn to read systems papers this way and half their choices become predictable.

3. Factorization buys robustness for free. Training on 60,000 hours of noisy audio works because the noise has somewhere to go. The same structure that made the model good made the data problem easy.

4. Interventional evidence beats probing. 3.2% versus 92.6% is a causal claim about where speaker identity lives, obtained by changing one thing and measuring the effect. It is worth more than any number of decoder probes.

5. Perceptual and statistical indistinguishability are not the same. 51.2% and 98.6%, on the same audio. This will keep being true, and it is the single most useful thing to know about detecting generated media.

Inline check

(a) Why does the detector train on 1-second crops when the samples are 7 seconds long?
Because the discriminative signal is a local spectral texture, not a long-range structure — one second contains plenty of it. Short crops also multiply the effective training set size and let the same window-and-aggregate inference trick from the speaker classifier apply unchanged.

(b) Suppose you improved AudioLM until its detector dropped to 60% accuracy. What would that tell you?
That the model's output distribution had moved substantially closer to the data distribution — a much stronger statement about model quality than any perceptual test could give. Detector accuracy is, inconveniently, one of the better available measures of generative fidelity.

Before the lineage, one honest note about scope: the successors below are a selection, not a survey. They are chosen because each one substitutes at a different interface, which makes the set useful for understanding what AudioLM was actually contributing.

What the successors reveal about AudioLM's real contribution

A good way to identify a paper's load-bearing idea is to look at what everyone kept and what everyone threw away.

Kept by everyone: audio as discrete tokens from a neural codec; a coarse/fine split with a language model per level; a short acoustic prompt as the carrier of voice identity; frozen tokenizers decoupled from the sequence model.

Thrown away by nearly everyone: row-major flattening; the semantic-token stage itself, whenever a better conditioning signal exists.

That second item is the interesting one. VALL-E replaces semantic tokens with text. MusicLM replaces them with a text-music embedding. AudioPaLM replaces them with a shared text-audio vocabulary. In every case, the semantic stage was a stand-in for a conditioning signal that was not available. AudioLM had no text, so it manufactured a text-like intermediate out of self-supervised features.

Which reframes the contribution. AudioLM is not primarily "here is how to use semantic tokens." It is "here is what the layer above the codec must provide, and here is proof that you can build it from audio alone if you have nothing else." The moment someone had something else — a transcript, a caption, a joint embedding — they slotted it into the same hole.

The most durable sentence in the paper. "We show how existing audio tokenizers provide different trade-offs between reconstruction quality and long-term structure." Everything about the specific models has been superseded: SoundStream by EnCodec and its successors, w2v-BERT by better SSL encoders, flattening by parallel decoding, 0.3B Transformers by much larger ones. The trade-off has not been superseded, because it is a property of the objectives rather than of any implementation. Understand the trade-off and every paper in this lineage reads as a variation.

The cheat sheet

Every number and symbol worth carrying, in one place.

QuantityValueWhere it comes from
Sample rate16 kHzGiven
SoundStream stride product2×4×5×8 = 3204 conv blocks
Acoustic frame rate50 Hz (20 ms)16000 / 320
Semantic frame rate25 Hz (40 ms)w2v-BERT downsampling
TA, TST/320, T/640The two strides
Q, N12, 1024SoundStream configuration
Q′4Coarse/fine split; makes stage 2 = 2000 bps
K1024k-means clusters, swept on sWUGGY/sBLIMP
w2v-BERT layer7 of the MLM moduleSwept on ABX
Bitrates250 / 2000 / 6000 bpsrate × Q × log2N
Tokens per second25 / 200 / 600Same formula without the log
Offsetsoi = ((i−1) mod Q)·NFlattening disambiguation
Per semantic token2Q′ = 8 coarse, 2(Q−Q′) = 16 fineThe 50/25 Hz factor of 2
Transformer12 layers, 16 heads, d=1024, ff=4096, dropout 0.1, T5 relative positionsIdentical in all stages
Crops / temperatures30, 10, 3 s  /  0.6, 0.8, 0.6Per stage
Training16 TPUv4, batch 256, 1M steps, Libri-Light unlab-60k (60k h)Per stage
ABX (sem / ac)6.7–7.6 / 22.4–28.7Table I, within / across speaker
ViSQOL (sem / ac)1.1 / 3.3 at operating points; 3.9 at 6000 bpsTable I
CER / WER3.4 / 6.0 (orig. 0.8 / 2.5)Table II
Speaker accuracy3.2% (no prompt) → 92.6% (3 s prompt); chance 0.3%Table III, 291 speakers
sWUGGY / sBLIMP71.5 · 83.7 / 64.7 (67.5 unnormalized)Table IV
Human detection51.2%, p = 0.23, 1000 ratingsSection IV-G
Machine detection98.6%, balanced, 1 s cropsSection IV-H
Piano40k h, Q=3, N=214, no stage 3, 4 s prompt, 83.3% preferredSection IV-I

One structural observation first. The detector reuses the speaker classifier's architecture verbatim — same six blocks, same channels, same 1-second crops, same window-and-aggregate inference. Only the head changes. That is a small piece of engineering economy with a real methodological benefit: a network already shown to read speaker identity robustly from generated audio is a credible instrument for reading generation artifacts too, and reusing it removes one more free parameter from the experiment.

The safety result, restated for people who will cite it

This number gets quoted a lot, usually incorrectly. Here is the precise claim and its precise scope.

The claimThe scope
Humans cannot distinguish AudioLM continuations from real speech7-second continuations of 3-second prompts, from read English audiobook speech, judged unpaired by 10 screened raters, with real samples codec-matched. 51.2%, p = 0.23
A small CNN detects them with 98.6% accuracyBalanced evaluation set, same generator, same domain, 1-second crops, real samples codec-matched, no adversary
Therefore detection is solvedNot claimed by the paper and not true. See the base-rate arithmetic above: at realistic prevalence, precision collapses
Therefore this model is safe to releaseNot claimed by the paper. The broader-impact section explicitly frames the detector as "an important step towards this direction," not as a solution

The two useful takeaways for anyone building in this space: perceptual indistinguishability arrived earlier than most people expected, and it does not imply statistical indistinguishability. Both halves matter, and quoting either without the other misrepresents the result.

A closing thought about the shape of the whole thing

AudioLM is, in the end, a paper about interfaces. It found that two independently-trained models — one built for speech recognition, one built for compression — produce representations that happen to partition audio almost exactly along the seam that matters. Neither was designed for the other. Nobody trained them jointly. The complementarity was discovered by measurement and then exploited by architecture.

That is a more interesting kind of result than "we scaled it up." It says that the objectives we already use — masked prediction and rate–distortion — carve nature at joints that are useful for generation, and that a substantial amount of progress is available to anyone willing to measure what existing components actually carry rather than assuming.

The Feynman test for this lesson is simple. Can you draw the three stages with their sequence lengths, name what each token type carries with a number attached, hand-compute one RVQ layer and its flattening offset, and explain both the 3.2/92.6 pair and the 51.2/98.6 pair to someone who has not read the paper? If yes, you can rebuild it.

Exit gate — teach it back before you leave.

Without scrolling up: (1) derive 50 Hz, 25 Hz, 250 bps and 6000 bps from the sample rate and the architecture; (2) state Table I's four rows and explain why matched bitrate does not collapse the difference; (3) hand-run one RVQ layer and apply the flattening offset; (4) name the two conditional-independence assumptions and what each buys in sequence length; (5) explain 3.2% versus 92.6%, and 51.2% versus 98.6%. If any of the five stalls, its chapter is one tap away.

"What I cannot create, I do not understand."
Encode ten seconds of your own voice with an open RVQ codec this week, print the token matrix, and flatten it by hand. The hierarchy stops being a diagram.

And one closing note on how to read the successors. Every paper in the lineage table can be summarized as "AudioLM, with substitution X." Knowing which of the four interfaces from Chapter 4 was substituted tells you almost everything about what the paper does and what it inherits unexamined. It is a fast and surprisingly reliable way to read a whole subfield.

Reading list, with what each one adds

  1. Borsos, Z. et al. "AudioLM: a Language Modeling Approach to Audio Generation." arXiv:2209.03143, 2022 — the paper. Read Section III-C twice; it is the densest half-page.
  2. Zeghidour, N. et al. "SoundStream: An End-to-End Neural Audio Codec." IEEE/ACM TASLP, 2022 — where the acoustic tokens come from, including the losses AudioLM inherits without thinking about.
  3. Chung, Y. et al. "w2v-BERT: Combining Contrastive Learning and Masked Language Modeling for Self-Supervised Speech Pre-training." ASRU, 2021 — the semantic half.
  4. Lakhotia, K. et al. "On Generative Spoken Language Modeling from Raw Audio." TACL, 2021 — GSLM, the closest ancestor and the sharpest contrast.
  5. Dunbar, E. et al. "The Zero Resource Speech Challenge 2021." Interspeech, 2021 — sWUGGY, sBLIMP, and the leaderboard Table IV compares against.
  6. Schatz, T. et al. "Evaluating Speech Features with the Minimal-Pair ABX Task." Interspeech, 2013 — where the metric of Chapter 2 comes from.
  7. Kahn, J. et al. "Libri-Light." ICASSP, 2020 — the 60k hours, and the ABX scripts.
  8. Hawthorne, C. et al. "General-purpose, Long-context Autoregressive Modeling with Perceiver AR." ICML, 2022 — the high-bitrate-tokens-only approach whose limitation motivated the hierarchy.
Human raters detect AudioLM continuations 51.2% of the time; a small CNN detects them 98.6% of the time. What is the correct explanation?