Perfect Reconstruction Cannot Show Whether Two Codebooks on a VAE's Latent Space Agree

arXiv:2610.14012 · cs.LG, cs.IT, math.IT · Submitted 2026-09-29 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "Perfect Reconstruction Cannot Show Whether Two Codebooks on a VAE's Latent Space Agree".

Jane: The gist: No item of a standard training report can reveal whether two codebooks on a VAE’s latent space agree on encoded data,

Tom: First, who's behind it and why it matters.

Title and authors: Tom: So let’s talk about the title and who wrote this. It says "Perfect Reconstruction Cannot Show Whether Two Codebooks on a VAE's Latent Space Agree." That’s pretty direct, isn't it?

Jane: It really is. The authors are focusing on that gap between what the model is actually doing during training and what we measure in our reports. They aren't just looking at one thing; they are showing a limitation in how we evaluate these systems.

Lu: The paper shows how you can build two separate VAEs that both reconstruct every input perfectly, infer exactly, and even match on every single per-example Evidence Lower Bound or ELBO term and every code histogram.

Meng: So they’re setting up a scenario where the standard metrics look identical—perfect reconstruction—but the underlying interpretation of those latent codes can be completely different.

Lalam: And then they show that in one configuration, agreement is one for every item, but in another, it drops to zero on every code. That's the core demonstration of why a simple report doesn't tell us anything definitive about what's happening inside the latent space.

The paper's summary: Tom: So what’s the actual argument they’re making in this paper? Essentially, they are saying that no single item from a standard training report can reveal whether the written codebook and read codebook actually agree on encoded data.

Jane: It gets deeper than just saying we can't tell; it shows that there are two specific bounds—the variational gap and the rate—that dictate how far away that agreement could possibly move under different conditions.

Lu: The variational gap is about the distance between the actual latent code and what you get from exact inference, while the rate bound relates to how far measured agreement can drift when the model is generating from its prior distribution.

Meng: This means we have two separate ways this agreement can change, and these two quantities tell us different things about how reliable our measurements are.

Lalam: For Gaussian posteriors, they show that a mean-field encoder pays an exact price in that gap that depends entirely on the choice of axes you pick for your analysis.

The paper's improvements: Tom: So what’s the actual fix or the direction they suggest? They introduce a protocol called Certify-or-Measure, which is designed to be sound in both branches of this problem.

Jane: That sounds like a practical tool for researchers and engineers. It lets you decide whether to certify your model or just measure it, and it does that based on the budget constraints.

Lu: The protocol uses Theorem two(b) and a union bound over two Monte Carlo failure events to prove its soundness, which is pretty rigorous for a statement like this <ref:2610.14012#pg3>.

Meng: The certification branch relies on data processing and rate decomposition, but they have to be careful about the abstention region of that theorem, because it's not just an inconvenience; it’s a theoretical limitation.

Lalam: The protocol fires where the theory allows it, but crucially, it also stops firing when the dataset floor rules out certification entirely. It certifies broken codebooks rather than just non-working ones.

Conclusion: Tom: So to wrap this up, what’s the big picture for us as practitioners? The main point is that a clean training report doesn't show whether the code a pipeline writes is the same as the code it reads.

Jane: The practical rule they suggest is to log the joint code table within your own indices, report agreement with your own code map, and consider a mean-field budget based on your axes when deciding if you can certify or just measure.

Lu: It’s about being very specific about what you are measuring—the ELBO terms themselves bound how far that measured agreement can move.

Meng: For Gaussian posteriors, the paper shows that for every codebook size, there's a floor set by the rate and the data that predicts which models simply cannot be certified at all.

Lalam: Overall, this work on "Perfect Reconstruction Cannot Show Whether Two Codebooks on a VAE's Latent Space Agree" teaches us to be cautious about relying on simple reports and to use tools like Certify-or-Measure based on the budget constraints of our specific model setup.

Yusuke Hayashi

AI Alignment Network

cs.LG, cs.IT, math.IT

Submitted: 2026-09-29

Updated: 2026-09-29

Comments: 28 pages, 4 figures, 4 tables. Supplementary material (per-run results, precommit documents and verification scripts) is provided as ancillary files

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 78/100

The gist: The gist: No item of a standard training report can reveal whether two codebooks on a VAE’s latent space agree on encoded data, and agreement can drift when the model generates from its prior

Key concepts

Variational Autoencoder (VAE)
A type of generative model that learns a compressed, continuous latent space representation of data. It tries to map complex inputs into a lower-dimensional space where the data structure is easier to understand and manipulate.
ELBO
The Evidence Lower Bound, a mathematical objective function used to train VAEs. It balances two goals: accurately reconstructing the input data and ensuring the latent space follows a simple prior distribution, which helps in generating new data.
Variational Gap
A measure of how much agreement between the written and read codes can drift. This gap is bounded by terms from the ELBO, showing how far measured agreement can move when moving from exact inference to generation or vice versa.

Terminology

Summary

The gist: No item of a standard training report can reveal whether two codebooks on a VAE’s latent space agree on encoded data, and agreement can drift when the model generates from its prior

Invisibility of Agreement

The paper proves that no item of a standard training report can reveal whether the written and read codes agree on encoded data A variational autoencoder (VAE) is the natural place to ask The pipeline holds two codebooks on one space, and their agreement can change when the model generates Every item of the marginal package matches — agreement is 1 versus 0

The Role of Budgets in Certification

The variational gap and the rate bound how far a measured agreement can move under exact inference and under generation The gap bounds the distance between Aq and its value under exact inference, and the rate bounds the distance between Aq and Aprior A budget B allows no interval narrower than 1 − e − B For Gaussian posteriors, a mean-field encoder pays an exact price in the gap that depends on its choice of axes On probabilistic PCA, the gap certifies a trained encoder in all 75 settings we test, at agreement between 0.76 and 0.97

The Certify-or-Measure Protocol

The paper introduces a simple protocol, Certify-or-Measure, for any pipeline that reads a VAE as codes The protocol is sound in both branches by Theorem 2(b) and a union bound over the two Monte Carlo failure events The certify branch by Theorem 2(b) and part (b) is data processing plus the rate decomposition Its abstention region is a theorem, not an inconvenience

Bounds on Certification

Theorem 3 gives the exact price that a mean-field encoder, which works coordinate by coordinate, pays in the gap for Gaussian posteriors The floor dictates that a latent cannot carry more than log N nats about the N examples over which the rate is averaged On probabilistic PCA, where every quantity is exact, the gap certifies a trained mean-field encoder in all 75 cells of a sweep over latent dimension at agreement between 0.76 and 0.97

Experimental Findings

The audit detects four failure modes in the models below Generative drift shows Aq = 0.770 → Aprior = 0.525 on MNIST with a task probe and a label-free prototype control falling in step (both scored by the same external classifier, so the second is a sensitivity analysis rather than independent validation) The dataset floor predicts which models cannot be certified On six FashionMNIST models, the measured ˆI sits within 0.01 nats of log N, so DKL(¯q∥p) = R¯ − log N to that accuracy

Conclusion

A clean training report does not show that the code a pipeline writes is the code it reads Log the joint code table, and certify from the ELBO’s own terms when their budgets are small enough The practical rule is short: log the joint code table in the pipeline’s own indices, report agreement with its code map and a mean-field budget with its axes, and use Certify-or-Measure to decide whether to certify or to measure

How it works

The paper constructs two VAEs that reconstruct every input perfectly, infer exactly, and match on every per-example ELBO and every code histogram, yet agreement is one in the first and zero in the second The joint table of written against read codes shows the difference at once

The Price of Certification

Theorem 3(e) forbids certification in advance for 66 models, 0 certify The optimal mean-field Gaussian fit in (a) is classical (Bishop, 2006); what is new is reading its value as a price paid in Q and pairing it with the invariance statement (b)

The Protocol

The protocol fires where the theory says it can, and none fires where the dataset floor rules it out The protocol certifies broken codebooks, not working ones

Experimental Details and Disclosures

The audit detects four failure modes in the models below What the audit detects. Four failure modes occur in the models below, each named by the reading that found it The protocol is run on the rate side for a licensing reason The frontier, at scale, at d ≥ 5 and R >¯ log N + log 2 forbids certification

The Final Verdict

The protocol certifies broken codebooks, not working ones Overall 131 of the 240 configurations certify, against 1 of the 6 SVHN models the licensed budget was re-audited on above The frontier is at scale and w∗ was not tuned under any outcome

How it works

The protocol fires where the channel is most degenerate—two-percent agreement, where B∗ is loosest The two routes differ; the destination does not The certificate fires 75/75 against 0/75 for a trained linear encoder, with widths growing 0.106 → 0.487 and crossing w∗ just above d = 32 The protocol certifies broken codebooks, not working ones

The Final Verdict

The protocol certifies broken codebooks, not working ones Overall 131 of the 240 configurations certify, against 1 of the 6 SVHN models the licensed budget was re-audited on above The frontier is at scale and w∗ was not tuned under any outcome The protocol certifies broken codebooks, not working ones

How it works

The protocol fires where the channel is most degenerate—two-percent agreement, where B∗ is loosest The two routes differ; the destination does not The certificate fires 75/75 against 0/75 for a trained linear encoder, with widths growing 0.106 → 0.

Improvements for AI systems

  1. Confidence in latent space interpretation: Implement a protocol where systems log the joint code table in the pipeline’s own indices, and certify from the ELBO’s own terms when their budgets are small enough, as this is shown to be a robust method to detect if the written and read codes agree on encoded data even when standard reports fail.

  2. Budget-based certification: Develop a Certify-or-Measure protocol where systems check if the budget B is small enough, stating that a budget B allows no band narrower than 1 − e − B, to decide whether to certify: report U, which contains Aprior with probability ≥ 1 − δB − δq or abstain and measure.

  3. Rate-side certification licensing: Establish a rule where systems check the rate budget against the bound, noting that the dataset floor rules out rate-side certification in advance for 66 models, to prevent attempting to certify when "R >¯ log N + log 2."

  4. Map-sensitivity awareness: Require systems to report agreement with its code map because a change of code map moves the quantity and not the budget, specifically noting that on a given checkpoint, the agreement is reported with its code map because the declared map’s majority labels cover a strict subset.

  5. Model-specific certificate pricing: For Gaussian posteriors, implement pricing based on the mean-field computation where the variational gap bounds the distance between Aq and its value under exact inference, using the coordinate price that depends on its choice of axes to determine if certification is feasible.

Abstract

Many systems read the latent space of a variational autoencoder (VAE) as discrete codes, and rely on each latent being read back as the code it was written as. Shannon (1948) took such a shared codebook as given; inside a VAE nothing enforces it. We prove that no item of a standard training report can reveal whether the written and read codes agree on encoded data. We construct two VAEs that reconstruct every input perfectly, infer exactly, and match on every per-example ELBO and every code histogram, yet agreement is one in the first and zero in the second. We then show that the ELBO's own terms bound how far a measured agreement can move: the variational gap bounds the shift to exact inference, and the rate bounds the shift to generation from the prior. For Gaussian posteriors, a mean-field encoder pays an exact price in the gap that depends on its choice of axes. On probabilistic PCA the gap certifies a trained encoder in all 75 settings we test, at agreement between 0.76 and 0.97. On 240 trained VAEs, a floor set by the rate and the dataset size rules out rate-side certification in advance for 66 models, and none of them certifies. The results yield a simple protocol, Certify-or-Measure, for any pipeline that reads a VAE as codes.

Sources

Related papers