The VAE trick that makes reconstructions look better—and samples no better
A skip connection can slash a VAE’s reconstruction error by changing coordinates, while leaving every generated sample exactly the same. Separate training can
0.04×: at a skip of 0.8, reconstruction MSE can fall to 4% without changing the generator.
A variational autoencoder can cut its reconstruction error to 4% of its original value without changing a single probability in the distribution it generates. The trick is an input skip: a direct path that carries some of the observed data into its reconstruction. That can make a model look dramatically better at reproducing what it has already seen, while doing nothing to improve what it produces from a fresh random draw.
This is more than a warning about one neural-network design. It is a reminder that a model’s easiest-to-measure virtue may not be the one we care about. If a system is meant to generate plausible data, reconstruction error alone cannot tell us whether its new samples are plausible.
The Science
A variational autoencoder, or VAE, learns two linked operations. An encoder turns an observation into a probability distribution over hidden variables, or latent codes. A decoder uses a latent code to reconstruct the observation. For generation, the model draws a code from a prior distribution and lets the decoder produce a new observation.
An input skip adds a direct route from the original observation to the reconstruction. In the setup Lee studies, the reconstruction is the decoder output plus a fraction α of the input. The remaining fraction, b=1-α, must be accounted for by the decoder. At α=0.8, for example, the skip carries 80% of the input directly; the decoder is responsible for the residual 20%.
Here is the crucial algebra. Scale the decoder’s output by b and scale its Gaussian observation-noise variance by b^2. The skip model then has the same distribution of generated observations and latent codes as the corresponding model without a skip. Its exact posterior probabilities and exact density scores are unchanged too. But reconstruction error, measured as mean squared error (MSE), is multiplied by b^2. With a skip of 0.8, that factor is 0.04.
In plain terms, the numerical error shrinks because the residual is being measured in a rescaled coordinate system. It is not evidence that the model has learned a more faithful picture of the data. This exact equivalence concerns two representations of the same fitted model; it does not guarantee that training two models separately will lead to the same result.
That distinction matters because optimization is not indifferent to parameter coordinates. Lee notes that Adam, a widely used adaptive training algorithm, and gradient clipping can take different paths when parameter scales change. So separate fits can end up with genuinely different generators, even when their architectures are mathematically related. The paper tests those training outcomes using a synthetic Gaussian dataset with a known probability distribution, and with NOAA’s Deep-ocean Assessment and Reporting of Tsunamis (DART) records.
DART instruments measure pressure at the ocean floor; NOAA reports it as an equivalent water-column height. Lee analyzes windows of 192 observations spaced 15 minutes apart, each spanning 47 hours and 45 minutes. The seven annual records include four original cases and three from 2018. The study compares neural models with and without the skip, at different observation-noise variances, and with probabilistic principal component analysis (PPCA), a linear probabilistic model.
To assess generation, the paper uses the energy score. This measures how close generated samples are to observations while also penalizing generated samples that are too spread out from one another; lower is better. It also reports an importance-sampling estimate of negative log density, a measure of how much probability a model assigns to observed data. Such estimates can be noisy, and Lee flags low effective sample sizes as a reason for caution.
What They Found
The synthetic experiment makes the central mismatch vivid. When the comparison changes both the skip and the observation variance—from no skip at the base variance to a skip with high variance—median reconstruction MSE falls from 0.0616 to 0.00368 across three runs. The generative measures move the other way: median energy score rises from 5.723 to 7.123, and median estimated negative log density rises from 0.133 to 1.201 nats per coordinate. Higher scores are worse for both measures.
Synthetic experiment: reconstruction error falls with the skip-plus-noise change
Median reconstruction mean squared error across three runs. The comparison changes both the input skip and observation variance; it is not an isolated causal effect of the skip alone.
| Label | Value |
|---|---|
| No skip, base variance | 0.0616 |
| Skip, high variance | 0.00368 |
The same synthetic comparison worsens generative scores
Median energy score and estimated negative importance-weighted log density for the two conditions. Higher values are worse for both measures in this comparison.
| Label | Value |
|---|---|
| No skip, base variance | 5.723 |
| Skip, high variance | 7.123 |
This is not a clean test of the skip alone: the observation variance changes too. That variance sets how much weight training gives to reconstruction relative to the latent-variable penalty. The paper’s point is precisely that a small reconstruction error can coexist with worse generative performance when these choices and the resulting training path change. In the high-variance condition, observation noise by itself exceeds the data variance in 185 of the 192 covariance directions. No amount of decoder flexibility can remove that noise contribution from generated samples.
A separate comparison isolates a different lesson. At the base observation variance, the skip model’s median MSE is 0.00250, while its median negative importance-weighted log-density estimate is 0.137. For context, the exact negative log score of the known Gaussian generator is 0.125, and PPCA’s is 0.127. The low reconstruction error does not certify the density estimate as best; indeed, the estimate is not identical to the exact score, and importance sampling brings its own uncertainty.
The DART results do not produce a universal verdict for skips. On the four original records, energy-score differences between skip and no-skip fits have both signs. One record, station 46407 in 2011, even changes which model has the lower median score when each observation window is centered by subtracting its own mean. That sensitivity matters: a model can capture fluctuations well but represent changes in overall level less well, or vice versa. The underlying time series include deployment-related gaps and level shifts, as the paper’s plotted records show.
All three 2018 records tell a more consistent story: the skip lowers all three reported mean energy scores at both observation variances. Yet the advantage is not uniform within those records. For two stations, differences in full-window scores change sign across 14-day intervals and training seeds. In other words, the aggregate result does not mean every period or every training run benefits.
The strongest baseline result is less flattering to the neural models. PPCA has a lower mean energy score than every neural fit on all seven DART cases, across all three score variants. The first 16 covariance directions explain almost all the training variance, making a linear model a particularly relevant benchmark. This does not show that PPCA is generally superior to neural generation: its advantage reflects both the model class and the fitting procedure. But it does show why a complex model should be compared with a simpler one that fits the structure of the data.
The paper also tests a tempting calibration step. Keeping the encoder and decoder fixed, it estimates observation variance from training reconstruction errors, then uses the revised variance when generating and evaluating samples. For all 42 fits trained at the lower variance, this procedure raises the estimated variance; for all 42 fits trained at the higher variance, it lowers it. All three mean energy scores improve in the first group and worsen in the second. Optimizing the reconstruction term on training data, in other words, does not guarantee better test-time samples.
Why This Changes Things
Generative models are now used to create images, synthesize data, fill gaps, and represent uncertainty. In each case, a model can appear successful if it reproduces an input or minimizes a convenient loss. But a generator is ultimately a claim about a distribution: what kinds of outputs can occur, how often, and with what uncertainty? A reconstruction metric answers a narrower question about a particular input passed through an encoder and decoder.
The distinction is easy to miss because reconstruction is tangible. We can compare an output with its input and get a single number. But for a model that generates new samples, the model’s distribution is the object of interest. Lee’s exact rescaling result is a sharp demonstration: a headline improvement in MSE can be manufactured without changing that object at all. This is not merely a failure of a particular score. The exact generated distribution stays fixed, so every proper score of that distribution stays fixed as well.
It also sharpens the difference between design and training. Mathematically equivalent parameterizations can be trained with the same optimizer settings and still yield different models, because the optimizer follows the coordinates it is given. Reporting only the architecture or the final reconstruction loss hides that path dependence. Comparisons should state the observation variance and skip configuration, and should evaluate fresh samples or density estimates on held-out data.
The DART case studies provide a useful reality check against overgeneralizing from the tidy Gaussian example. Skip connections sometimes helped the reported mean energy score, sometimes did not, and sometimes changed their apparent effect depending on whether evaluation retained each window’s mean level. The neural models also lost to a linear baseline on these records. The data are a specific application, not evidence about all ocean models or all VAEs; still, they show that model assessment can hinge on the features one asks a generator to reproduce.
For monitoring systems, the stakes are practical. A model used to generate plausible sensor records or flag unusual observations needs to distinguish real anomalies from changes in baseline, instrument deployment, or noise assumptions. A lower reconstruction error may still be useful for a narrowly defined reconstruction task. But it cannot, by itself, establish that generated records look like the world—or that uncertainty is calibrated well enough for a decision.
What’s Next
The study’s cleanest theorem applies to a constant scalar skip below one and Gaussian noise. An input-dependent skip, a matrix-valued transformation, or the singular boundary at α=1 needs separate analysis. The experiments are also limited: the synthetic data have a known Gaussian structure, while the ocean analysis covers seven selected annual records and uses finite samples and a small number of training seeds.
Those limits point toward stronger evaluation, not toward abandoning reconstruction metrics. For future work, report reconstruction and generative performance side by side; specify noise variance and the exact sample-generation procedure; and compare neural models against simple baselines. When scores disagree, inspect what they measure—whole-window levels, centered fluctuations, or changes over time—and whether the density estimate is reliable.
The broader opportunity is methodological. Generative modeling is moving into fields where outputs are used not just to look convincing, but to represent uncertainty about real systems. The useful question is not whether a model can make its error number smaller. It is whether its new samples preserve the patterns, variability, and surprises that matter outside the training set. Lee’s result gives researchers a precise reason to ask that question before celebrating a reconstruction.
Sign in to join the conversation.
Comments (0)
No comments yet. Be the first to share your thoughts.