h_fHas read: C4
Each bar is one coordinate. The real vector has 2048.MusicVAE encoder, unfolded
A bidirectional LSTM is not one reader that can reverse time. It is two independent LSTMs reading the same tape from opposite ends, then joining what they learned.
The tape experiment
Blue accumulates the past. Red accumulates the future. They never talk to each other while reading.
h_fHas read: C4
Each bar is one coordinate. The real vector has 2048.x_tFirst, the token is represented numerically. Then each reader combines it with its own previous memory.
h_bHas read: HOLD
Same dimensions, separate weights, opposite history.Exact MusicVAE dimensions
Click a stage. The batch dimension B is omitted below so one melody stays easy to picture.
STAGE 01
A 16-bar melody has 256 sixteenth-note positions. Each position is one categorical choice from 130 tokens, represented as a one-hot row.
Mental picture: a 256-page flipbook. Every page has exactly one marked square.
one slot per sixteenth note
128 pitches + note-off + rest
features learned by each reader
stochastic code sent to decoder
The memory valve
The intimidating equations reduce to four decisions: erase, write, propose, reveal.
c_t = f_t * c_(t-1) + i_t * g_t
0.29 = 0.75 * 0.60 + 0.55 * -0.30
h_t = o_t * tanh(c_t)
0.23 = 0.80 * tanh(0.29)
How much old memory survives?
How strongly should the new idea enter?
What new information is being proposed?
How much memory becomes visible as h?
This lab shows one scalar. A 2048-unit LSTM performs the same controlled edit across 2048 coordinates in parallel.
Context resolves ambiguity
A unidirectional encoder knows only the prefix. A bidirectional encoder is legal here because the full input already exists.
Useful, but still ambiguous.
Now bank means river edge.
The complete melody is already on the table.
Future notes do not exist while generating.
The VAE heads
The 4096-D summary branches into a center and uncertainty. Sampling gives z.
512-D512-Dz = μ + σ * εwhere ε comes from N(0, 1)512-DMUSICVAE ENCODER RECEIPT
Three retrieval checks
Retrieving an idea strengthens memory more than seeing it one more time.
THE 20-SECOND RECALL
Two independent readers receive identical tokens.
F carries the past; B carries the future.
2048 + 2048 coordinates become a 4096-D summary.
Dense heads produce mu and sigma; sampling produces z.