[Paper Review] Affine Variational Autoencoders: An Efficient Approach for Improving Generalization and Robustness to Distribution Shift
This paper proposes the Affine Variational Autoencoder (AVAE), which improves generalization and robustness to affine distribution shifts by optimizing an affine transform to maximize the VAE's ELBO loss. By applying a learned affine transformation to inputs at test time, AVAE enhances reconstruction quality without increasing model complexity, achieving a 14% reduction in validation loss on general affine perturbations compared to standard VAEs.
In this study, we propose the Affine Variational Autoencoder (AVAE), a variant of Variational Autoencoder (VAE) designed to improve robustness by overcoming the inability of VAEs to generalize to distributional shifts in the form of affine perturbations. By optimizing an affine transform to maximize ELBO, the proposed AVAE transforms an input to the training distribution without the need to increase model complexity to model the full distribution of affine transforms. In addition, we introduce a training procedure to create an efficient model by learning a subset of the training distribution, and using the AVAE to improve generalization and robustness to distributional shift at test time. Experiments on affine perturbations demonstrate that the proposed AVAE significantly improves generalization and robustness to distributional shift in the form of affine perturbations without an increase in model complexity.
Motivation & Objective
- To address the poor generalization of standard VAEs under affine distribution shifts, such as rotations and scaling.
- To improve robustness to out-of-distribution samples without increasing model capacity.
- To develop a method that enables pre-trained VAEs to generalize to the full set of affine transformations through test-time optimization.
- To introduce a training procedure that allows AVAE to be trained on the full distribution of affine transforms without increasing model complexity.
- To balance generalization and reconstruction performance by learning a subset of the training distribution during training.
Proposed method
- Introduces an AVAE architecture with two affine layers: one to transform input before encoding, and another to invert the transform after decoding.
- Optimizes the affine transform parameters (α) at test time to minimize the VAE's reconstruction loss, effectively mapping out-of-distribution inputs back into the training distribution.
- Uses the evidence lower bound (ELBO) as the objective function to guide the optimization of the affine transform.
- Applies a differentiable optimization process over the affine parameters during inference, enabling end-to-end differentiability and gradient-based optimization.
- Proposes a training procedure where the affine transform is optimized per batch during training, allowing the model to implicitly learn a representative subset of the full affine distribution.
- Leverages the VAE’s latent space to implicitly model the distribution of affine-transformed data without explicit data augmentation or architectural changes.
Experimental results
Research questions
- RQ1Can a pre-trained VAE be made robust to affine distribution shifts without increasing model complexity?
- RQ2Does optimizing an affine transform at test time improve reconstruction quality under rotational and general affine perturbations?
- RQ3Can the AVAE be trained on the full set of affine transforms without increasing model capacity?
- RQ4How does the AVAE’s performance compare to standard VAEs and data-augmented VAEs under distribution shift?
- RQ5Does training with affine transform optimization lead to better generalization and robustness than training on a single orientation or random perturbations?
Key findings
- The AVAE reduces validation loss by 14% on general affine perturbations compared to standard VAEs, demonstrating significant robustness improvement.
- The AVAE achieves better performance than standard VAEs across all rotational perturbations, with the largest gains at extreme angles like 120°.
- The AVAE trained with transformation optimization during training outperforms both single-orientation and rotation-augmented VAEs at nearly all rotation angles.
- The model trained on a single orientation with test-time optimization performs nearly as well as the rotation-augmented model, indicating effective generalization.
- The AVAE maintains high performance even when the input is perturbed by random rotations, shears up to 55°, and scaling up to 50%.
- The method enables generalization to the full affine distribution without increasing model capacity, offering a computational trade-off for improved robustness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.