An Ehrenfest Time for Neural Audio Codec Drift

Neural speech codecs compress audio into a short string of discrete tokens and rebuild a waveform from them. If you decode the tokens back to audio and encode that audio again, you do not get the same tokens. This decode-re-encode cycle happens whenever compressed speech is edited, re-transmitted, or fed back into a generative model. The errors compound: LILAC reports that every baseline codec it tested rewrites at least 15% of its tokens in a single pass, and that after 100 cycles token agreement falls to 0.71 for EnCodec and 0.06 for Mimi. LILAC fixes this by building the codec to be exactly invertible, at a cost in speed. What is missing is a predictive account of the drift: why some codecs hold for many cycles and then collapse while others drift at once, and which design knobs control the collapse point.

This note proposes to treat the decode-re-encode cycle as an iterated chaotic map. It then borrows one specific result from quantum chaos: the Ehrenfest time. This is the time over which a small, localized wave packet behaves like a classical point before chaotic stretching spreads it across the system. That time grows only logarithmically with resolution, $\tau_E \sim \lambda^{-1}\ln(1/\hbar)$, where $\lambda$ is the rate at which nearby trajectories separate and $\hbar$ sets the initial packet size. In a codec, the quantizer cell plays the role of $\hbar$ and the per-cycle stretching of the continuous decoder-then-encoder map plays the role of $\lambda$. The claim is that token agreement under repeated cycling has a codec Ehrenfest time. That time is set by a measurable Lyapunov exponent and a log of a resolution ratio, and it separates what a single-pass consistency loss can fix from what only contraction or invertibility can fix.

Core Claim

Let $z$ be a continuous latent frame before quantization, and let $F$ be the continuous map from one cycle to the next: quantize, decode to audio, re-encode to latent. A token flips on cycle $n$ when its accumulated latent deviation crosses the nearest cell boundary. Suppose the first pass injects a deviation of size $\delta_0$, the reconstruction error measured back in latent space. Suppose further that the local stretching rate of $F$ is $\lambda$ per cycle, estimated from the leading singular values of its Jacobian along the trajectory. Then a token sitting at distance $d$ from its cell boundary first flips at roughly

$$n^*(d) \approx \frac{1}{\lambda}\ln\frac{d}{\delta_0},$$

which is the direct analog of the Ehrenfest time, with $d/\delta_0$ standing in for $1/\hbar$. If $d$ is roughly uniform inside a cell of width $\Delta$, integrating over $d$ gives a parameter-light prediction for the whole agreement curve $A(n)$ from three measured quantities: $\lambda$, $\delta_0$, and $\Delta$. The predicted curve has a flat early phase and then a decay. When $\lambda<0$ the map contracts into cell interiors and $A(n)$ plateaus instead of decaying. LILAC's exact idempotence is the extreme case of this.

The prediction has a sharp corollary that a purely empirical treatment would miss. The deviation $\delta_0$ and the cell width enter only inside a logarithm, while $\lambda$ divides. Reducing first-pass error, which is what a cycle-consistency loss does, should shift the collapse point by an additive $\ln$ term. Reducing $\lambda$ should rescale it, and pushing $\lambda$ below zero should remove the collapse entirely. Likewise, doubling the number of quantizer levels should buy only $\lambda^{-1}\ln 2$ extra cycles.

Where the Physics Comes In, and Where It Does Not

Three strands of the semiclassical literature play distinct roles here. The first supplies the time-scale method. Rigorous wave-packet theory holds only up to $\tau_E$, after which the packet deforms (Wavepackets in inhomogeneous periodic media; Symplectic semiclassical wave packet dynamics). We reuse this logic, but for a dissipative, discretized map rather than a Hamiltonian flow.

The second strand supplies a structural hypothesis. In Ehrenfest-time dependence of counting statistics, correlations split into a classical part, carried by bands of trajectories that stay together, and an interference part suppressed as $e^{-\tau_E/\tau_d}$. Quantum corrections to fidelity decay shows that $\tau_E$ delays the onset of corrections to fidelity decay. Fidelity decay is the closest physical analog of token agreement under a perturbation. Our analog of the "classical band" is the set of frames whose tokens never flip, and our analog of the delayed correction is the onset at $n^*$.

The third strand, encounter diagrammatics, enters only as a secondary hypothesis. In semiclassics, trajectory pairs that run close together and swap partners carry the leading corrections beyond the simple diagonal sum (Universality in chaotic quantum transport). The codec analog is a pair of different token sequences that decode to nearly identical audio, so that a flip is "undone" a few cycles later, along with recurrences into previously visited cells. These events would make measured agreement sit above the Lyapunov-only prediction after $n^*$. We will measure the size of this excess but not assume it matters.

We are explicit about what is not carried over. Codecs are dissipative and the map is not unitary, so there is no $\hbar$-scale action phase and no interference in the literal sense. The Heisenberg-time limit becomes a finite-codebook recurrence time. The tension between Waltner's static cancellation and ac-driven breakdown motivates one test: whether $\lambda$ differs between steady segments such as vowels and transient segments such as plosives. We treat this as an empirical question, not a theorem that transfers.

Research Program

The first component is measurement. For each codec, we compute the cycle map $F$ with a straight-through pass through the quantizer. We estimate per-frame finite-time Lyapunov exponents from Jacobian-vector products iterated over 10 to 20 cycles. We record $\delta_0$ and boundary distances $d$ in each quantizer's native geometry: per-dimension rounding for finite scalar quantization (FSQ), nearest-codeword margins for residual vector quantization, and lattice-cell margins for Q2D2 (Two-dimensional quantization; Two-dimensional quantization for geometry-aware audio coding, code at tashQ/Q2D2). We also stratify $\lambda$ by phoneme class using forced alignments.

The second component is prediction. From the measured quantities alone, we predict $A(n)$, per-token flip times, and the collapse cycle before running the 100-cycle experiment. We then compare the predictions against what the experiment shows.

The third component is intervention. We train controlled FSQ codecs on LibriTTS at about 0.75 to 1.5 kbit/s with matched architecture and compute. We vary only the following: the number of quantizer levels, a single-pass cycle-consistency loss, and a spectral penalty on the top singular value of $F$'s Jacobian, applied with random-vector power iteration. The theory says these three knobs should act on the log argument, on $\delta_0$, and on $\lambda$, respectively, and so should produce distinguishable signatures.

Baselines

The naive reference point is an unmodified pretrained codec run through 100 cycles, specifically EnCodec from High Fidelity Neural Audio Compression. LILAC reports its token agreement at 0.71 after 100 cycles, and we will reproduce that figure on the same LibriSpeech test-clean setup before trusting anything else. This baseline establishes the drift the theory must explain.

The strongest existing method is LILAC. It achieves idempotence by construction through invertible coupling layers, FSQ, and a fill network, and reports token agreement of 1.00 over 100 cycles at 0.75 kbit/s with UTMOS of 4.14 on LibriSpeech test-clean. It is the strongest competitor because it already solves drift completely. We cannot beat it on agreement. The question is whether a contraction-regularized feed-forward codec can match its agreement within a few points while keeping UTMOS within 0.1 and running at a clearly lower GPU real-time factor, the cost LILAC itself acknowledges. We will train our variants on the same 0.75 kbit/s budget, on comparable data, with the same evaluation scripts, and report real-time factor on identical hardware.

The key ablation is a cycle-consistency loss with no Jacobian penalty, matched in training steps and tuned over the same weight grid as the spectral penalty. This isolates the proposal's central ingredient: control of $\lambda$ rather than $\delta_0$. Beating it means the spectral-penalty model shows a plateau, or a collapse cycle at least twice as late, at equal first-pass rewrite rate. No reported result was found on Lacuna for cycle-consistency losses on multi-cycle token agreement, so this number must be produced here.

The theory itself has a further baseline: a two-parameter exponential fit to $A(n)$. The Lyapunov model must predict held-out codecs' collapse cycles better than an exponential fitted on other codecs.

Why not just…?

Why not just add a decode-re-encode consistency loss during training? This is the obvious engineering fix and a real threat. Our model predicts that it lowers $\delta_0$, which helps only logarithmically, while leaving $\lambda$ largely untouched. If so, it should reduce first-pass rewrites but leave the long-run collapse in place. LILAC's report that all twelve baselines exceed 15% first-pass rewriting suggests ordinary training does not control drift, but it does not directly test this loss. The matched ablation above settles the question. If the consistency loss alone produces a plateau, the central claim is wrong and we will say so.

Why not just use LILAC? For applications that tolerate its compute cost, one should. But exact invertibility is a sufficient condition, not a necessary one. The theory says contraction in a neighborhood of the data is enough. That sufficiency matters because it opens idempotence to feed-forward codecs and to lattice quantizers like Q2D2 that LILAC's design does not cover. The theory also explains why EnCodec degrades gracefully while Mimi collapses, which LILAC reports but does not explain.

Why not just fit drift curves empirically, with no physics? An exponential fit describes a curve but cannot say what changes it. The semiclassical contribution is specific and falsifiable. Collapse time should scale as $\ln(\text{resolution})/\lambda$, with resolution and first-pass error entering only through the logarithm. This is a structural prediction a curve fit does not make. If the measured scaling with quantizer levels is linear rather than logarithmic, the Ehrenfest analogy fails and the empirical fit wins.

Why not just call the Jacobian penalty contractive regularization and skip the analogy? The penalty itself is standard, and we do not claim it as new. What is new is the prediction of when and by how much it helps relative to other knobs, and a pre-registered test of that prediction across codec families.

Decisive Checks

All evaluations use LibriSpeech test-clean, LibriTTS-R test, and VCTK. We follow the Codec-SUPERB protocol (Codec-SUPERB @ SLT 2024): Whisper word error rate against the 2.89% uncompressed reference, ECAPA-TDNN equal error rate, and UTMOS. These are tracked at cycles 1, 10, 50, and 100 alongside token agreement.

The first check is scaling. Across FSQ codecs differing only in level count, the measured collapse cycle should increase linearly in $\ln L$, the log of the level count $L$, with a slope that matches $1/\lambda$ measured independently to within 30%. The second check is out-of-sample prediction. Agreement curves predicted from first-pass measurements should match the 100-cycle curves for EnCodec, a Q2D2 model, and our FSQ models better than the cross-validated exponential baseline.

The third check is intervention signatures. The consistency loss should shift collapse additively, and the spectral penalty should rescale or eliminate it. The penalized model should approach LILAC's agreement at lower real-time factor without losing more than 0.1 UTMOS. The fourth check is the stationarity contrast. Transients should show larger $\lambda$ and earlier flips than steady vowels. The fifth check is the encounter excess, meaning agreement above the Lyapunov-only prediction after collapse. It will be reported as a measured quantity. If it is negligible, the diagrammatic layer is dropped and the contribution rests on the Ehrenfest-time scaling alone.