TL;DR
Autoencoding Probabilistic Circuits (APCs) combine the exact, tractable reasoning of Probabilistic Circuits (PCs) with the expressive power of neural networks for representation learning. By treating embeddings as first-class random variables inside a PC encoder paired with a neural decoder, APCs naturally handle arbitrarily missing inputs without needing imputation heuristics or approximations.
What Problem Does This Paper Address?
Standard autoencoders (AEs) and Variational Autoencoders (VAEs) are fundamental representation learning tools, but they struggle when input data is incomplete. Neural encoders require full vectors, forcing practitioners to resort to crude zero/mean imputation or slow, multi-step iterative imputation schemes (such as MIWAE or missForest) when values are missing at test time.
Conversely, Probabilistic Circuits (PCs) guarantee tractable probabilistic inference (computing marginals or conditionals in time linear with circuit size) and natively handle missing data simply by marginalizing out unobserved variables. However, PCs have rarely been used for representation learning because:
- Prior PC-based autoencoders (like SPAE) extracted embeddings post-hoc from circuit activations or internal discrete latent variables rather than training them end-to-end.
- PC sampling involves discrete choices at sum units, making backpropagation non-trivial.
- Pure PCs struggle with high-capacity image decoding, often exhibiting noticeable visual artifacts.
Methods
APCs bridge this gap with a hybrid architecture and an end-to-end differentiable training pipeline:
- Explicit Joint Modeling ($p_{\mathcal{C}}(\mathbf{X}, \mathbf{Z})$): Rather than modeling a separate conditional inference network $q(\mathbf{Z} \mid \mathbf{X})$, APCs model the joint distribution over data $\mathbf{X}$ and continuous embedding variables $\mathbf{Z}$ directly within a smooth and decomposable PC.
- Native Marginalization of Missing Inputs: When only a subset $\mathbf{X}_o \subset \mathbf{X}$ is observed, the encoder analytically marginalizes out missing features $\mathbf{X}_m = \mathbf{X} \setminus \mathbf{X}_o$ in a single forward pass, sampling embeddings from the exact data-conditional posterior $\mathbf{z} \sim p_{\mathcal{C}}(\mathbf{Z} \mid \mathbf{X}_o = \mathbf{x}_o)$.
- End-to-End Differentiable Sampling with SIMPLE: To train the PC encoder and neural decoder jointly, the authors replace traditional non-differentiable sum-unit ancestral sampling and standard Gumbel-Softmax tricks with the SIMPLE gradient estimator (configured for $k=1$ subset sampling). SIMPLE performs discrete sampling in the forward pass and exact conditional marginals in the backward pass, yielding significantly lower variance and faster convergence.
- Hybrid Decoding: The sampled embedding $\mathbf{z}$ is decoded into the original space using an expressive neural network (e.g., CNN or MLP). Because the PC encoder always outputs a complete embedding $\mathbf{z}$, the neural decoder never has to handle missing values.
- Multi-Objective Loss: APCs optimize a three-part objective: $$\mathcal{L} = \mathcal{L}_{\text{REC}} + \mathcal{L}_{\text{KL}} + \mathcal{L}_{\text{NLL}}$$ combining reconstruction loss, an analytic KL-divergence regularizer to enforce an isotropic Gaussian prior on $\mathbf{Z}$, and the joint negative log-likelihood $\mathcal{L}_{\text{NLL}} = -\log p_{\mathcal{C}}(\mathbf{x}, \mathbf{z})$ to prevent posterior collapse.
[Input x (with missing data)]
│
▼
┌───────────────────────────┐
│ Tractable PC Encoder │
│ Marginalizes missing Xm │
│ Samples z ~ p(Z | Xo) │ (Differentiable via SIMPLE)
└─────────────┬─────────────┘
│ Embedding z
▼
┌───────────────────────────┐
│ Neural Decoder │
│ Reconstructs complete x̂ │
└───────────────────────────┘
Datasets
The authors evaluate APCs across diverse domains:
- Image Benchmarks: MNIST, Fashion-MNIST, CIFAR-10, SVHN, Oxford Flowers, CelebA, LSUN (Church), and Tiny-ImageNet.
- Tabular Benchmarks: 20 standard density estimation datasets from the Discrete Estimation Benchmark Datasets (DEBD) collection (e.g., accidents, dna, bbc, voting).
- No new datasets were introduced. Missingness was evaluated under Missing Completely at Random (MCAR; uniform pixel drop from 0% to 95%) and Missing at Random (MAR; structured dropouts such as center squares, borders, and vertical/horizontal bands).
Key Insights and Ideas
- Tractable Inference Solves the Missing Data Problem: Instead of learning to predict what missing pixels might be, the circuit encoder mathematically integrates them out. As corruption grows from 0% to 95%, APC representations stay remarkably stable, while standard VAEs and MIWAE quickly degrade toward uninformative representations.
- Hybrid Architectures Get the Best of Both Worlds: PCs provide mathematically sound probabilistic operations (marginalization, likelihood evaluation), while neural decoders supply the inductive biases (like convolutions) needed to reconstruct sharp, high-fidelity images without PC-specific structural artifacts.
- Superiority of SIMPLE over Gumbel-Softmax: In synthetic experiments, replacing Gumbel-Softmax with the SIMPLE gradient estimator reduced KL divergence to ground truth by roughly $25\times$ on sum-unit parameter learning ($0.0033$ vs. $0.0817$ for $D=64$), preventing gradient explosion.
- Data-Free Knowledge Distillation: Pretrained VAEs that fail catastrophically under missing data can transfer their generative knowledge to an APC student without needing the original training dataset. The distilled APC matches the VAE's full-evidence performance while inheriting the circuit's missingness robustness.
- Out-of-Distribution (OOD) Detection for Free: Because $p_{\mathcal{C}}(\mathbf{Z}) = \int p_{\mathcal{C}}(\mathbf{X}, \mathbf{Z}) d\mathbf{X}$ is tractably computable, APCs can evaluate exact marginal embedding log-likelihoods, cleanly separating in-distribution data from OOD samples where VAEs fail due to overlapping latent densities.
Key Results
- Reconstruction Under Corruption:
- On MNIST at high MCAR corruption, APC achieves an average MSE of 5.07, outperforming SPAE (28.46), vanilla VAE (35.38), and MIWAE (9.16).
- On CelebA, APC yields an MSE of 166.89, vastly outperforming VAE (1095.90) and MIWAE (576.47).
- Tabular: APC achieves the lowest reconstruction error on 18 out of 20 DEBD tabular datasets.
- Structured MAR Corruptions: APC ranked #1 across all 9 structured MAR patterns (e.g., center-box, vertical band) in both MSE and SSIM.
- Downstream Linear Separability: When training a linear classifier on frozen embeddings under 90% missing data, APC maintains high classification accuracy (e.g., >80% on MNIST), whereas VAE and MIWAE embeddings collapse to random guessing.
- Ablation Studies:
- Removing differentiable sampling increases MSE by $13.4\times$ on MNIST and $11.9\times$ on CIFAR.
- Removing the neural decoder (using the circuit itself to decode) worsens MSE by $5\times$ on MNIST and $3.7\times$ on CIFAR.
Limitations and Future Work
- Training/Inference Latency: While faster than iterative imputation baselines (e.g., MIWAE takes 3933 ms/batch on CelebA vs. APC’s 236 ms), APC is still slower than a standard convolutional VAE (43.5 ms/batch) because the top-down backward sampling pass requires custom sparse operations that lack hardware-optimized CUDA kernels.
- Heuristic Circuit Architectures: In this work, circuit structures were fixed heuristically (e.g., convolutional layouts for images, EinsumNetworks/RAT for tabular data). Learning data-driven circuit structures automatically remains an open area.
- Shallow Embedding Placements: Embeddings were introduced at the input leaf level. The authors note that placing embedding variables at deeper, intermediate levels could enable hierarchical representation learning (low-level vs. high-level abstractions).
Summary updated