[Paper Review] Transflow Learning: Repurposing Flow Models Without Retraining
Transflow Learning enables zero-shot adaptation of pre-trained invertible generative models (e.g., normalizing flows) to generate data from new distributions without retraining. By performing Bayesian inference in the latent space to warp the prior distribution using few observed data points, it achieves strong few-shot classification and style transfer performance, outperforming k-NN baselines on MNIST with only 30 labeled examples.
It is well known that deep generative models have a rich latent space, and that it is possible to smoothly manipulate their outputs by traversing this latent space. Recently, architectures have emerged that allow for more complex manipulations, such as making an image look as though it were from a different class, or painted in a certain style. These methods typically require large amounts of training in order to learn a single class of manipulations. We present Transflow Learning, a method for transforming a pre-trained generative model so that its outputs more closely resemble data that we provide afterwards. In contrast to previous methods, Transflow Learning does not require any training at all, and instead warps the probability distribution from which we sample latent vectors using Bayesian inference. Transflow Learning can be used to solve a wide variety of tasks, such as neural style transfer and few-shot classification.
Motivation & Objective
- To enable transfer learning from pre-trained invertible generative models to new data distributions without retraining.
- To address the challenge of sample efficiency in few-shot learning by leveraging latent space inference.
- To demonstrate that knowledge from a pre-trained model (e.g., trained on CelebA) can be repurposed for downstream tasks like classification and style transfer.
- To provide a low-cost alternative to fine-tuning by avoiding gradient updates and backpropagation.
- To explore the feasibility of conditioning on partial or multimodal data (e.g., audio only) for generation.
Proposed method
- Treats the original latent prior $ q(\mathbf{z}) $ as a Bayesian prior and conditions it on $ m $ observed data points $ \mathbf{x}_{1:m} $ mapped to latent vectors $ \bm{\zeta}_i = f^{-1}(\mathbf{x}_i) $.
- Uses Bayesian posterior inference to compute a new posterior distribution $ q(\mathbf{z}|\bm{\zeta}_{1:m}) $, which shifts the sampling distribution toward the new data manifold.
- Employs the inverse flow $ f^{-1} $ to map observed data to latent space, enabling distributional warping without model retraining.
- Generates new samples by sampling from the posterior $ q(\mathbf{z}|\bm{\zeta}_{1:m}) $ and passing them through the forward flow $ f $.
- Applies a regularization term $ \lambda \| \mathbb{E}[\mathbf{z}] - \bar{\bm{\zeta}} \|_2^2 $ to stabilize the posterior and prevent mode collapse.
- Uses the posterior predictive distribution for classification, where the most likely class corresponds to the highest posterior probability.
Experimental results
Research questions
- RQ1Can a pre-trained invertible generative model be adapted to generate data from a new distribution without retraining?
- RQ2How effective is Bayesian latent space warping for few-shot classification using only a handful of labeled examples?
- RQ3Can Transflow Learning achieve competitive performance compared to fine-tuned models or k-NN baselines in low-data regimes?
- RQ4What are the limitations of applying this method to non-flow models or multimodal conditioning?
- RQ5How does the method perform when conditioning on incomplete or partial data (e.g., only audio)?
Key findings
- Transflow Learning achieved 69.52% accuracy on 30-shot MNIST classification using a CelebA-trained flow model, outperforming pixel-space k-NN (20.55%) and latent-space k-NN (47.58%).
- With only 1 labeled example per class, Transflow Learning achieved 30.39% accuracy, significantly outperforming pixel-space k-NN (14.99%) and matching latent-space k-NN (27.78%).
- Sample quality decreased with increasing $ m $, as posterior means converged toward the origin (i.e., 'natural' face distribution), but classification accuracy improved due to better posterior concentration.
- The method requires only $ m $ evaluations of the inverse flow $ f^{-1} $, making it computationally efficient compared to gradient-based fine-tuning.
- The approach successfully enabled style transfer and few-shot classification without any model updates, demonstrating zero-shot transfer from a pre-trained model.
- The method is generalizable to other invertible models like BiGANs, though smaller latent spaces may allow for finer-grained control and lower $ \lambda $ values.
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.