εar-VAE2
for High-Fidelity Music Reconstruction
A spec-domain autoencoder compressing 48 kHz stereo audio into a 25 Hz sequence of continuous latents — a 1920× temporal downsampling — through two frequency-aware components: Spec-SnakeBeta and a Duplex-Aware Refiner.
Which factors make the LDM-base generation struggling?
MotivationLatent-diffusion music generators operate on the latent space of a VAE — whatever spectral detail, phase structure, or stereo image the decoder cannot reconstruct is unavailable to any downstream generator. At the aggressive temporal compression these systems demand, decoders show three recurring failure modes. We ask: at a fixed compression rate, which modeling choices best preserve what matters?
High-frequency detail lost
A channel-wise activation reuses one response across all spectral bins and cannot adapt directly to physical frequency.
Phase smeared across frames
Phase error grows monotonically with frequency and saturates near random (π/2) above 4 kHz.
Stereo image collapses
A uniform corrector spends capacity in the wrong place; localization cues differ across the spectrum.
Why does the architecture work?
Spectral-domain VAE-GANStereo audio is transformed by STFT into a complex spectrogram; a 2D-convolutional Spec Encoder with delayed stereo fusion compresses it to a 25 Hz continuous latent, and a mirrored Spec Decoder with early splitting reconstructs a coarse spectrogram. The Duplex-Aware Refiner then applies band-specific complex corrections and restores the Nyquist bin. A paired iSTFT then removes the explicit analysis margin and returns exactly the original number of waveform samples. Click a stage to inspect it.
PIPELINEεar-VAE2 at a glance
Waveform → STFT → complex spectrogram → encoder → 25 Hz latent → decoder → duplex-aware refinement → iSTFT.
How should activations adapt to frequency?
Frequency-axis periodic activationBigVGAN’s SnakeBeta activation, x + β⁻¹ sin²(αx), learns its periodicity per channel — in the spectral domain that mixes all frequencies onto one curve. Because each STFT bin corresponds to a fixed physical frequency, Spec-SnakeBeta learns one (αf, βf) pair per frequency bin and shares it across feature channels. A frequency-proportional initialization in log-parameter space starts near identity at low bins and becomes progressively more oscillatory toward high frequencies. Drag the frequency slider to inspect it.
From Snake to Spec-SnakeBeta. Standard activations such as ReLU and GELU do not provide an explicit periodic basis. On bounded intervals a neural network can still approximate periodic functions; the Snake family instead supplies a periodic residual directly through three design stages:
Snake
A single parameter α controls both oscillation frequency and inverse amplitude (1/α) — the two degrees of freedom are optimization-coupled.
SnakeBeta
Decouples frequency (α) from amplitude (β) with independent gradient paths. Per-channel — all frequency bins share one (α, β) pair.
Spec-SnakeBeta
One log-space response per physical frequency, shared across feature channels — near-identity at low bins and more oscillatory at high.
LOG-FSpec-SnakeBeta(log-F)
Frequency-indexed and shared across feature channels. The initial α response is proportional to normalized physical frequency, while β starts at 1; both positive parameters are optimized in log space.
Where should the refiner spend its capacity?
Psychoacoustically placed correctionsHuman localization relies on interaural timing (phase) at low frequencies and interaural level (magnitude) at high frequencies — the classical duplex theory (Rayleigh, 1907). Per-frequency error analysis of the trained decoder shows the same asymmetry: magnitude error peaks in the 1–4 kHz mid band while phase error saturates above 4 kHz. The refiner therefore constrains its residual outputs to the cue emphasized in each band. Its output layers are zero-initialized, so refinement starts as an identity mapping that preserves the frozen decoder output. Hover the bands.
DUPLEXThree bands, three correction types
Phase-only below 1.5 kHz · joint magnitude & phase in 1.5–4 kHz · magnitude-only above 4 kHz.
When does the metric work?
Reconstruction · generationReconstruction on the 546-track Song Describer Dataset against four recent open-source audio VAEs, each at its native operating condition. The chart reports point estimates; cross-system numbers are competitive rather than strictly matched; the base-vs-full comparison within εar-VAE2 is controlled.
48 KHZ · 25 HZεar-VAE2 (full)
Runs at 48 kHz with a 25.0 Hz continuous latent. This is the complete decoder with the Duplex-Aware Refiner; the base εar-VAE2 result uses the same operating condition.
What does the latent organize along time?
Temporal-frequency probeMusical content varies at markedly different rates in time: percussion, onsets, and rhythmic groove change fast, while sustained harmony and timbre change slowly. A latent that mirrors acoustic structure might therefore route fast and slow temporal variation to different content types. To test this, we encode a clip to its latent z ∈ ℝC×T, take the real FFT along the temporal axis, and split the temporal-frequency bins at the midpoint:
zlow — slow-varying half
Zeroing the upper temporal-frequency half and inverse-FFT back to the time domain. This retains the slowly changing components of the latent sequence. When decoded, it reconstructs the sustained content of the audio — long harmonic tones, pads, and timbre texture that evolve smoothly over time.
zhigh — fast-varying half
Zeroing the lower temporal-frequency half and inverse-FFT back. This isolates the rapidly changing components. When decoded, it reconstructs the rhythmic groove of the audio — percussive onsets, transient attacks, and beat-level energy fluctuations.
Each half is decoded separately and, above all, listened to per case; the schematic below traces the procedure.
PROBE
The difference: sand and water beyond the stone
Listen & compareSwitch between versions while playing — playback position is preserved for direct A/B comparison. Gen Demos are full-length songs generated on εar-VAE2 latents; reconstruction clips are 30 s 48 kHz stereo excerpts from the Song Describer Dataset; downstream generation clips are 45 s matched-window pairs. For cross-system comparison — reconstruction and downstream generation, where εar-VAE2 is placed side by side with other systems — clips are loudness-normalized to −14 LUFS (EBU R128 linear gain, true peak ≤ −1.5 dBTP) so the A/B is level-fair. The remaining sections are presented at their native decoded levels.
Gen Demos
full songs generated on εar-VAE2 latentsReconstruction
encode → decode fidelity · 5 systems + ground truthDownstream generation
LeVo 2 VAE vs εar-VAE2 · same renderer architecture, retrained per latent spaceLatent Temporal-Frequency Probe
Low (slow-varying) → sustained layer: steady loudness, clear melodic long lines.High (fast-varying) → groove layer: strong rhythmic pulse, surging low-end.
Band decodes are not level-equalized — loudness differences across systems reflect real per-band energy.
Refiner Ablation
Ground truth vs without refiner vs with refiner — selected reconstruction examplesBanded Refiner Ablation
Banded (ours) vs unconstrained refiner · same frozen decoderThe stereo polar field visualization in each player is adapted from the open-source EAR-Audio-Preview project (polar sample mode).