1. Statement and relation to the primer
Tianhua Chen's revised Little Book of Generative AI Foundations connects PCA, latent Gaussian models, variational autoencoders, diffusion, exact-density methods, adversarial objectives, and energy models. Here each model has a sampling law, possible numerical objectives, and a space of presentations. Kernels account for sampling. Densities, divergence, and metric structure determine the objectives. An action groupoid of presentations keeps the latent changes of coordinates available for descent. The main example has one fixed Gaussian law and one fixed exact ELBO while its presentation space has nonzero fourth homotopy.
2. Kernel semantics and the variational identity
Use standard Borel spaces and Markov kernels. Composition is integration, $(LK)_x(C)=\int L_y(C)K_x(\mathrm dy)$. Dirac kernels embed measurable maps. Product kernels give the tensor, while deterministic copying and discarding give the Markov structure. A latent presentation consists of $\pi:*\rightsquigarrow Z$ and $K:Z\rightsquigarrow X$. The joint is $P(\mathrm dz,\mathrm dx)=\pi(\mathrm dz)K_z(\mathrm dx)$ and the evidence is $m=K\pi$. A recognition kernel $Q:X\rightsquigarrow Z$ is optional. Disintegration gives a posterior $R_x$ determined $m$-almost surely. A Borel isomorphism $h$ of latent coordinates transports the prior and both kernels, pushes the joint along $h\times\operatorname{id}$, and transports the posterior by $h_*$. The evidence stays fixed. At an observation of zero evidence, a conditional version can be changed without changing the joint.
For two joint laws $P=p(\mathrm dx)P_x(\mathrm dz)$ and $Q=q(\mathrm dx)Q_x(\mathrm dz)$, relative entropy obeys $$ D_{\mathrm{KL}}(P\|Q)=D_{\mathrm{KL}}(p\|q)+\int D_{\mathrm{KL}}(P_x\|Q_x)\,p(\mathrm dx). $$ When $P\ll Q$, put $a=\mathrm dp/\mathrm dq$ and $f=\mathrm dP/\mathrm dQ$. The function $f/a$ on $\{a>0\}$ is a conditional derivative by disintegration. Integrating $\log f=\log a+\log(f/a)$ proves the identity. Failure of marginal absolute continuity makes both sides infinite. With absolute continuity of the marginal, failure of conditional absolute continuity on a set of positive $p$-measure also makes both sides infinite. Applying the identity in both orders to two joints formed with a common kernel gives contraction under that kernel. A Borel isomorphism preserves relative entropy since its inverse contracts as well.
Fix an observation reference measure and compatible likelihood density $k(x\mid z)$. At observations of finite positive evidence density $m(x)$, under the indicated integrability and domination conditions, $$ \mathcal L(x)=\mathbb E_{Q_x}\log k(x\mid Z)-D_{\mathrm{KL}}(Q_x\|\pi),\qquad \log m(x)=\mathcal L(x)+D_{\mathrm{KL}}(Q_x\|R_x). $$ The identity follows from $\mathrm dR_x/\mathrm d\pi=k(x\mid -)/m(x)$. Its gap vanishes exactly for the exact posterior. It also defines the objective as $\log m(x)-D_{\mathrm{KL}}(Q_x\|R_x)$ when the gap is infinite. On the data support, use pointwise transported versions or versions that agree almost surely under the chosen data law. Then the log evidence, gap, and integrable expected ELBO are invariant under latent reparameterization. EM sets $Q$ to the old posterior and improves the bound at fixed $Q$. A VAE fits a restricted recognition family. Pathwise gradient formulas require differentiability and integrable derivative bounds in addition to the kernel model.
In ordinary PCA the orthonormal frame $U$ determines the projector $UU^\top$. It minimizes $\operatorname{tr} C-\operatorname{tr}(U^\top C U)$ when it spans a leading eigenspace of the covariance $C$. Frames are related by the free $\mathrm O(k)$ action, with quotient the Grassmannian. In Gaussian probabilistic PCA, $Z\sim N(0,I_k)$ and $X\mid Z=z\sim N(b+Wz,\sigma^2 I_d)$ with $\sigma>0$. The evidence is $N(b,WW^\top+\sigma^2 I_d)$. Completing the square gives posterior precision $A=I_k+\sigma^{-2}W^\top W$ and mean $A^{-1}\sigma^{-2}W^\top(x-b)$. The change $W\mapsto Wg^{-1}$ for $g\in\mathrm O(k)$ transports the posterior by $g$.
3. Diffusion and reversals
Let a finite strictly positive forward path law be $Q(x_{0:T})=\rho(x_0)\prod_{t=1}^T K_t(x_t\mid x_{t-1})$. Write $\mu_t$ for the time-$t$ marginal and let $$ R_t(u\mid v)=\frac{\mu_{t-1}(u)K_t(v\mid u)}{\mu_t(v)}. $$ Products telescope to $Q(x_{0:T})=\mu_T(x_T)\prod_t R_t(x_{t-1}\mid x_t)$. Summing over intermediate states proves that the reversal of a composite is the reverse-ordered composite of the individual reversals with the specified intermediate states. Thus reversal is contravariantly functorial on finite spaces equipped with positive states and state-preserving kernels. The starting state is essential. A binary flip kernel of probability $1/4$ with $\rho(1)=1/4$ has $R(1\mid1)=1/2$, whereas the same kernel with a fair starting state reverses to itself.
Let a backward generator have terminal law $\nu$ and kernels $S_t$. Taking logarithms of the factorizations and averaging gives $$ D_{\mathrm{KL}}(Q\|P)=D_{\mathrm{KL}}(\mu_T\|\nu)+\sum_t\mathbb E_{\mu_t}D_{\mathrm{KL}}(R_t(-\mid X_t)\|S_t(-\mid X_t)). $$ The formula remains valid in the extended sense when a comparison factor vanishes on a supported path. With positive comparison factors the conditional variational bound uses $Q(x_{1:T}\mid x_0)$ as recognition. Its negative average is $H(\rho)+D_{\mathrm{KL}}(Q\|P)$. Factoring conditional on $x_0$ yields a terminal divergence, the reconstruction term $-\mathbb E\log S_1(x_0\mid X_1)$, and terms involving $Q(X_{t-1}\mid X_t,x_0)$ for $t\geq2$. At each such step, averaging the conditional divergence over $X_0,X_t$ gives $$ I_Q(X_{t-1};X_0\mid X_t)+\mathbb E_{\mu_t}D_{\mathrm{KL}}(R_t(-\mid X_t)\|S_t(-\mid X_t)). $$ Adding and subtracting $\log R_t$ in the expectation proves the identity. The information term is independent of the fitted reverse kernel. The square-loss form of a Gaussian DDPM uses its additional covariance and parameterization assumptions.
A continuous Markov evolution obeys $K_{s,u}=K_{t,u}K_{s,t}$. With Euclidean drift $b_t$, position-independent diffusion matrix $a_t=\sigma_t\sigma_t^\top$, and smooth densities, its adjoint generator gives $\partial_t p_t=-\nabla\cdot(b_t p_t)+\tfrac12a_t:\nabla^2p_t$. If a regular time reversal exists and $p_t>0$, Bayes reversal gives the reverse generator $p_t^{-1}(L_t^*(p_t f)-f L_t^*p_t)$, hence reverse-clock drift $-b_t+a_t\nabla\log p_t$. This follows by applying the forward adjoint propagator to $p_{t-\epsilon}f$, dividing by $p_t$, and expanding to first order. The continuity equation with velocity $b_t-\tfrac12a_t\nabla\log p_t$ has the same marginal solution if the associated flow and unique density evolution exist. The two path laws can differ. For a smooth corruption density $k_t(y\mid x)$, differentiation under the integral gives $\nabla_y\log p_t(y)=\mathbb E[\nabla_y\log k_t(y\mid X_0)\mid X_t=y]$. Thus square-integrable denoising score regression recovers the marginal score by conditional expectation.
4. Flows, factorization, and comparison
A normalizing flow is an invertible pushforward. Its log-density correction $\log|\det Df^{-1}|$ adds along composition by the chain rule. In affine coupling layers it is tractable because the Jacobian is block triangular. Autoregression composes successive disintegrations along a chosen ordering. The conditionals are only determined almost surely under their prefix laws. The same joint law can admit different ordered presentations.
For a GAN with data law $\mu$ and generator law $\nu$, let $\eta=\mu+\nu$. The unrestricted discriminator maximizing the minimax objective is $\mathrm d\mu/\mathrm d\eta$ by pointwise optimization. The value is $-\log4+D_{\mathrm{KL}}(\mu\|M)+D_{\mathrm{KL}}(\nu\|M)$ for $M=(\mu+\nu)/2$. A WGAN instead uses metric and moment data. On a Polish metric space with finite first moments, the infimum of $\mathbb E_\gamma d(X,Y)$ over couplings equals the supremum of expectation differences over 1-Lipschitz tests. Isometries preserve this value and $L$-Lipschitz maps multiply it by at most $L$, by pushing forward couplings. Two distinct Dirac masses have saturated unrestricted GAN value and can have arbitrarily small Wasserstein distance.
An energy $E$ and reference measure $\lambda$ give $Z_E^{-1}e^{-E}\lambda$ when $Z_E=\int e^{-E}\mathrm d\lambda$ is positive and finite. Sequential normalization after weighting by $w$ and by $v$ agrees with normalization after weighting by $vw$ when both steps exist. Scores of smooth energy laws are $-\nabla E$ in Lebesgue coordinates. Equal scores can fail to fix a law on a disconnected domain because separate energy constants change the mass of its components. With regularity that identifies the diffusion semigroup, the drift $-\nabla E$ and diffusion coefficient $\sqrt2$ make this density stationary since its Fokker--Planck flux vanishes.
5. Descent theorem
In an infinity-topos $\mathcal X$, let a group object $G$ act on an object $M$ of model presentations. Put $M//G=|M\times G^\bullet|$. Suppose the observable law and loss give a coherent invariant map $a:M\to A=D\times L$, meaning an augmentation of the action groupoid to the constant groupoid on $A$. For finite positive stochastic matrices in smooth families, the evidence and integrable ELBO give such maps for latent permutations. Other examples require specifying the parameter site and the relevant analytic structure.
Theorem. If $V\to U$ is an effective epimorphism, then $$ \operatorname{Map}(U,M//G)\simeq\operatorname{Tot}\operatorname{Map}(V^{\times_U(\bullet+1)},M//G). $$ For each $B\to A$ there is also an equivalence $B\times_A(M//G)\simeq(B\times_AM)//G$. A map $U\to M//G$ amounts to a $G$-torsor over $U$ with an equivariant map to $M$. A lift through the atlas $M$ amounts to a section of that torsor.
Proof. The effective epimorphism exhibits $U$ as the realization of its Cech nerve. Mapping out gives the first equivalence. Universality of colimits gives the base-change equivalence by realizing the pulled-back action nerve. The action groupoid is effective. Pulling back its atlas along $U\to M//G$ gives $P\to U$ with $P\times G\simeq P\times_U P$, the torsor condition. Conversely, realize the map of groupoid nerves induced by an equivariant map $P\to M$ and use $P//G\simeq U$. These constructions are inverse by effectiveness. Sections are precisely lifts through the atlas.
The joint invariant fixes the base value and leaves a homotopy fiber of possible descriptions. On an orbit $O=G/H$ with local lifts to $G$, the quotient $O//G$ is $BH$. Indeed the equivariant map from a $G$-torsor to $G/H$ determines an $H$-reduction by pulling back the distinguished coset. Extending an $H$-torsor to $G$ gives the inverse construction. A loss value can therefore descend even when its presentation has no global coordinates. Descent of an optimization update also requires compatible metric or derivative data.
6. Two examples at fixed evidence and fixed loss
Finite monodromy. Let $Z=\{1,2,3\}$, $X=\{0,1\}$, $\pi=(1/4,1/4,1/2)$, and $K(1\mid-)=(3/4,3/4,1/4)$. The evidence is fair. Choose exact recognition so that the ELBO is $-\log2$ at either observation. The only nonidentity latent symmetry is the swap of $1,2$. On the open-cover site of $S^1$, the double cover $z\mapsto z^2$ gives a family with these local data. A section would have degree $1/2$, which is impossible. The trivial cover gives the same evidence and loss with a globally labeled presentation.
Higher Gaussian symmetry. Take $W_0=w e_1^\top$ with $w\ne0$, four latent coordinates, Gaussian prior and noise as above, and exact recognition. The $\mathrm O(4)$ orbit $O$ consists of $w v^\top$ for $v\in S^3$. The stabilizer fixes $e_1$ and is $\mathrm O(3)$. Smooth local lifts of $\mathrm O(4)\to S^3$ give the smooth classifying stack $B\mathrm O(3)$ on the site of smooth manifolds. Separately, the topological Borel quotient has homotopy type $B\mathrm O(3)$ since $E G\times_G G/H=E G/H$. Its fourth homotopy group is $\pi_3\mathrm O(3)=\pi_3\mathrm{SO}(3)=\mathbb Z$, using the unit-quaternion double cover of $\mathrm{SO}(3)$. Clutch an $\mathrm{SO}(3)$-bundle on $S^4$ by this covering map on the equator and extend it to $\mathrm O(3)$. The clutching class generates $\pi_3\mathrm O(3)$, hence the resulting torsor is nontrivial. A global lift to $O=S^3$ would make this torsor a pullback of $\mathrm O(4)\to S^3$. That bundle has a smooth section given by left multiplication by the unit quaternion $v$, viewed as an orthogonal transformation taking $1$ to $v$. Thus no lift exists. Every family in this orbit has law $N(b,ww^\top+\sigma^2 I_d)$ and the same expected exact ELBO for a fixed data law of finite second moment.
In general a rank-$r$ loading with $k$ latent coordinates has orthogonal stabilizer $\mathrm O(k-r)$, since the stabilizer fixes $\operatorname{im}W^\top$ pointwise and acts orthogonally on $\ker W$. The topology of these symmetries matters. Discretizing the group gives a 1-type and removes the fourth homotopy group in the example.
7. Scope and provenance
The probability calculus and the classical generative objectives use existing theory. The manuscript constructs a comparison of presentation stacks over their joint statistical invariants and exhibits finite and higher obstructions to choosing global latent coordinates. The higher topos organizes families and their gluing. It supplies no automatic probability monad, disintegration theorem, or convergence guarantee for training. The attached full manuscript gives hypotheses, proofs, and a longer bibliography. OpenAI Codex assisted source retrieval, mathematical drafting, and typesetting. This is an independent treatment. The cited primer's author is not a coauthor.
Selected references
- Chen, The Little Book of Generative AI Foundations, arXiv:2605.29713v2
- Fritz, A synthetic approach to Markov kernels
- Lurie, Higher Topos Theory
- Hatcher, Vector Bundles and K-Theory
- Tipping and Bishop, Probabilistic principal component analysis
- Kingma and Welling, Auto-Encoding Variational Bayes
- Ho, Jain, and Abbeel, Denoising Diffusion Probabilistic Models
- Song et al., Score-Based Generative Modeling through Stochastic Differential Equations
- Papamakarios et al., Normalizing Flows for Probabilistic Modeling and Inference
- Goodfellow et al., Generative Adversarial Networks
- Arjovsky, Chintala, and Bottou, Wasserstein Generative Adversarial Networks