Deep dive · Step 1 of the pipeline
The overview showed you what stem separation does — it pulls the voice out of a finished song. This page shows you how a neural network actually pulls that off: what it sees, what happens inside its layers, and how it learned. Same song, one level deeper. Still no equations.
◉ Still real. Every image below is generated from “Chasing the Morning”: real spectrograms of its actual separated stems, and real activation snapshots captured from inside the Demucs network while it was separating this very chorus.
To a computer, a song isn't notes and words — it can be drawn as a picture called a spectrogram: time runs left to right, low sounds sit at the bottom, high sounds at the top, and darker means louder. Once sound is a picture, “separate the voice” becomes something much more familiar: find the shapes that belong to the voice, and copy them onto a new canvas.
And here's the trick that makes it feel possible: each instrument leaves a different visual signature. Click through the stems below — you'll learn to read this picture in about twenty seconds.
↑ higher notes
time → (the first chorus, 15 s)
📷 real spectrograms of the demo song's first chorus — the same 15 seconds in every view
A recording studio mixes: four separate performances go in, one song comes out. Demucs is that console run in reverse — from the finished song, it rebuilds all four channels. Here they are. Mute and un-mute them while the song plays; with all four on, you're hearing the machine's four guesses added back together.
🎚 four synced tracks · try soloing the bass — most people have never heard one isolated
Demucs listens to the song in two ways at once. One branch reads the spectrogram — the picture you just learned. The other reads the raw waveform — the sound wave itself, which keeps fine timing details the picture blurs. Two views of the same song, like reading the sheet music and hearing the performance.
Each branch is a funnel: a stack of layers that squeezes the input into a smaller, smarter summary. Early layers see raw detail; deeper layers see concepts — “this region behaves like a voice.” In the middle the two branches compare notes, then everything runs backwards through a mirror-image funnel that paints four clean stems.
one finished recording
reads the spectrogram — good at pitch & harmony
detail in → meaning out
reads the raw waveform — good at timing & punch
same idea, other view
a transformer lets every moment of the song consult every other moment (see section D)
the funnels run in reverse, expanding the summary back into full-resolution audio
drums · bass · other · voice
Don't take the funnel on faith — look inside it. While Demucs separated this song's chorus, we photographed what its picture-ear layers actually passed forward. These are real network activations, not illustrations. Watch the image get shorter (frequencies squeezed: 512 rows → 8) while the network's private notebook gets thicker (48 → 384 channels of “what I noticed”).
🔬 captured with hooks on the real model while it processed this chorus · each image: average of all channels at that layer
Songs repeat themselves — chorus two sounds like chorus one. This map proves it for our song: every moment is compared with every other moment, and dark teal squares mean “these two parts sound alike.” The checkerboard pattern is the song's structure — verses and choruses echoing each other.
The transformer at the center of Demucs exploits exactly this. When a word is buried under a loud drum fill, the network can consult the same melody elsewhere in the song where the voice is clearer — like a human listener thinking “wait, what did they sing in the first chorus?”
Nobody programmed rules like “voices are wavy lines.” Demucs learned by practicing on songs where the answer was known — studio multitracks where the isolated voice, drums and bass already exist as separate files. The recipe:
Mix the four known stems into a finished song and play it to the network — without showing the answer.
The network paints its four stems, exactly like it did for our demo song.
Compare its guess with the real stems. Every wrong pixel nudges the network's millions of dials a tiny step toward better.
↻ repeat millions of times, across thousands of songs, until the guesses are nearly perfect
Why it still isn't perfect: instruments that share the voice's territory (a lead guitar, backing harmonies) can smear across stems, and anything the training data rarely contained — rare instruments, heavy effects — confuses it. That's why “everything else” is a catch-all bucket, and why a little vocal bleed remains. As you heard in the overview, though: clean enough to cut the lyric error rate meaningfully.
It launches like one, but it's a different species. A classic tool like ffmpeg is rules written by programmers — every behavior was authored by hand. Demucs on this laptop is 520 KB of code and an 80 MB file of learned weights: the code only builds the empty funnels and feeds audio through; everything it knows — voices are wavy lines, drums are vertical stripes — lives in the weights file, and no human wrote it. The weights are the machine; the code is just the frame it hangs in.
No — and that's by design. Learning only happens in the training loop above, where every guess can be graded against known answer keys. Your songs arrive with no answer key, so on your machine the network runs read-only: song number one thousand is separated exactly as well as song number one. When separation improves in this field, it arrives as a new weights file from a new training run — you swap the machine, it doesn't grow.
Stem separation isn't magic and isn't rules — it's a network that learned to see instruments in pictures of sound, listens with two ears at once, uses the song's own repetition as a cheat sheet, and was trained by grading millions of its own guesses.
Better separators are one of the clearest upgrade paths for the whole lyrics pipeline — a cleaner voice in means fewer misheard words out.