[Paper Analysis] The Free Transformer (and some Variational Autoencoder stuff)
Quick Overview
The Free Transformer is an extension of the decoder-only Transformer that conditions its generative process on unobserved random latent variables ($Z$) learned via a variational procedure, achieving substantial improvements on downstream tasks by allowing the model to learn richer, more natural density distributions.
Key Points: The Free Transformer extends the standard decoder Transformer by conditioning generation on a random latent variable $Z$ learned without explicit supervision. The architecture incorporates an encoder (non-causal) to estimate the distribution $Q(Z|S)$ and a decoder that samples $Z$ from this distribution to condition the generation process $P(Xt|X{1:t-1}, Z)$. The training objective minimizes a combination of the standard reconstruction loss ($L{rec}$) and the KL divergence between the encoder's output distribution $Q(Z|S)$ and a prior distribution $P(Z)$, aiming for $P(Z)$ to be a uniform distribution over $2^d$ bits during inference. Experimental results on synthetic data (Figure 4) show that when the KL divergence penalty ($\kappa$) is low (e.g., 1 bit), the model collapses to a vanilla decoder, but as $\kappa$ increases (e.g., to 8 bits), the model successfully learns to encode the position and the noise component ($Z$) separately. The encoder is structured to be non-causal (like in VAEs) to capture context from the entire sequence, while the decoder remains causal. The method avoids the need for complicated posterior estimation during inference, as $Z$ is sampled directly from the prior $P(Z)$.
Context: This video analyzes the research paper "The Free Transformer" by François Fleuret from FAIR at Meta, which proposes an extension to the standard decoder-only Transformer architecture. The core idea is to incorporate latent random variables ($Z$) into the generative process using a variational approach, conditioning the decoder on this latent information to improve performance on downstream tasks, especially those requiring nuanced control over generation.