Abstract
This paper establishes the first formal theoretical framework for analyzing the resilience of Variational Autoencoders (VAEs) against adversarial attacks. We introduce a novel metric, $r$-robustness, and derive a "robustness margin" that quantifies the maximum input perturbation a model can tolerate before reconstruction quality is compromised. Our analysis reveals that disentanglement techniques, such as those used in $\beta$-VAEs, inherently improve robustness by increasing encoder variance and reducing the sensitivity of the encoder Jacobian.
Introduction
Deep learning models are notoriously sensitive to adversarial perturbations—small, often imperceptible changes to input data that can lead to catastrophic failures in output. While empirical observations have suggested that Variational Autoencoders (VAEs) are more robust than deterministic autoencoders, a formal theoretical explanation has been lacking. The challenge lies in the stochastic nature of VAEs; unlike classifiers with discrete labels, VAEs produce continuous outputs where any input change results in some output variation. This work provides a formal definition of generative robustness and a method to certify it.
Theoretical Framework
To bridge the gap between input perturbations and reconstruction stability, we propose two key mathematical constructs:
- $r$-robustness: A VAE is defined as $r$-robust if, for a given perturbation, the resulting reconstruction is more likely to fall within a ball of radius $r$ around the original "clean" reconstruction than outside of it.
- The Robustness Margin ($R^r_X(x)$): Utilizing the Neyman-Pearson lemma and first-order Taylor expansions, we derive a theoretical bound representing the maximum size of an input perturbation ($\delta_x$) that a VAE can handle while maintaining $r$-robustness.
Our analysis of $\beta$-VAEs shows that the $\beta$ parameter acts as a critical lever. By increasing $\beta$, the model is forced to increase encoder variance and decrease the norm of the encoder Jacobian. These two factors together act as a buffer, effectively "swallowing" small perturbations and reducing the model's sensitivity to input noise.
Experimental Methodology
We evaluated our framework using three standard benchmarks: MNIST (handwritten digits), Fashion-MNIST (clothing items), and CIFAR10 (complex color images). To test the limits of these models, we developed a "Maximum Damage Attack" designed specifically to maximize the $L_2$ distance between original and perturbed reconstructions.
Key Results and Discussion
Empirical results strongly support our theoretical derivations. We observed a high correlation (up to $\rho = 0.879$ on CIFAR10) between the predicted theoretical robustness margin and actual model performance under attack.
As shown in the figure above, increasing the robustness margin $R^r_X(x)$ directly translates to visual stability. While standard VAEs produce garbled or incorrect reconstructions under attack, robust models maintain high-fidelity outputs even when the input is significantly distorted. This confirms that disentanglement is not just useful for interpretability, but serves as a powerful form of regularization for model stability.
Conclusion and Future Work
This research provides a path toward certifiable generative robustness. However, some limitations remain. Our current bounds rely on first-order approximations, which may be less accurate for highly non-linear architectures or extremely large perturbations. Additionally, the assumption of Gaussian encoders is standard but could be expanded to more complex posterior distributions like Normalizing Flows. Future work will focus on balancing the trade-off between robustness and reconstruction blurriness to find the optimal Pareto frontier for generative modeling.
Summary updated