TL;DR
FLAT introduces a unified multimodal pre-training framework that bridges the gap between contrastive representation learning (retrieval) and generative modeling (synthesis). By mapping images and text into a shared, continuous 1D sequence space and applying nested dropout, FLAT produces flexible-length embeddings that natively support both state-of-the-art cross-modal retrieval and high-quality generation while significantly reducing inference compute.
What Problem Does This Paper Address?
Traditionally, multimodal AI is split into two distinct stages: representation learning (like CLIP) and downstream generation (like Stable Diffusion or LLaVA). Generative models typically rely on frozen embeddings from these representation encoders. This decoupling creates a performance bottleneck because the frozen embeddings aren't optimized for generation, requiring complex, parameter-heavy adapters to re-align the modalities.
While some recent unified models try to solve this by training everything end-to-end using purely generative objectives, they often lose the explicit, linearly interpolatable embedding space that makes contrastive models so useful for tasks like retrieval and latent space arithmetic. FLAT aims to solve this by jointly optimizing a single, shared embedding space for both contrastive alignment and bidirectional generation (text-to-image and image-to-text).
Methods
The FLAT (Flexible-Length Aligned Transmodal representations) framework consists of three main components:
- A Shared Representation Encoder: Built on a Qwen3.5-2B backbone with LoRA adapters, it appends $N$ learnable register tokens to the input (image or text) and projects the final hidden states into a unified 1D continuous sequence space ($z$).
- Representation Dropout (Nested Dropout): To achieve variable sequence lengths, FLAT randomly samples a "keep-length" $K$ from a geometric ladder ($K \in \{1, 4, 16, 64, 256\}$) during training. Only the prefix sequence $z_{:K}$ is passed to the decoders. This forces the network to pack the most critical semantic information into the very first tokens.
- Dual Transmodal Decoders:
- An Image-to-Text (I2T) decoder (an autoregressive language model) that generates captions conditioned on visual tokens.
- A Text-to-Image (T2I) decoder (a rectified flow transformer initialized from SANA-1.6B) that synthesizes images conditioned on textual tokens.
The entire system is trained end-to-end using a joint objective function combining a bidirectional contrastive loss and two cross-modal generation losses (autoregressive cross-entropy for text and rectified flow matching for images).
Datasets
- Pre-training: A large-scale corpus of 65.7M image-text pairs, consisting of a mix of long-caption (30M), short-caption (33M), prompt-style (4M), and curated high-quality (0.1M) pairs.
- Evaluation & Fine-tuning:
- GenEval: For benchmarking compositional text-to-image synthesis.
- MS-COCO (Karpathy split): Used for image captioning, image-to-text retrieval, and text-to-image retrieval.
- Flickr30K: For cross-modal retrieval evaluation.
- ImageNet-1K: For evaluating representation quality via linear probing.
- MMEB CIRR: For zero-shot composed image retrieval.
Key Insights and Ideas
- Hierarchical Information Packing: Because of nested dropout, FLAT exhibits a "coarse-to-fine" representation structure. A single token ($K=1$) is dense enough to capture global semantics and perform highly accurate cross-modal retrieval. As $K$ increases, finer details like spatial relationships, attribute bindings, and secondary objects are unlocked.
- Closing the Modality Gap: Traditional dual-encoder models like CLIP suffer from a persistent "modality gap" where image and text embeddings cluster in completely separate regions of the latent space. By forcing the embeddings to serve as direct generative conditions for both text and image decoders, FLAT shrinks this gap dramatically, achieving a highly overlapping, unified transmodal space.
- Prefix-Dependent Compute Scaling: Since the representation encoder is causal, processing a shorter prefix length $K$ at inference time means you only need to compute the first $K$ registers. Reducing $K$ from 256 to 1 slashes encoder and text decoder compute by 50.0% and 71.1% respectively, allowing users to dynamically trade compute for detail.
Key Results
Generative Performance
- Text-to-Image (T2I): After task-specific fine-tuning, FLAT achieves a GenEval score of 83.1, outperforming specialized baselines like Janus-Pro-7B (80.0) and MetaQuery-XL (80.0), despite using a smaller 2B backbone and no prompt-rewriting mechanisms.
- Image-to-Text (I2T): On MS-COCO image captioning, FLAT achieves 40.5 BLEU-4 and 138.6 CIDEr, matching or exceeding competitive baselines while utilizing significantly fewer latent features.
Discriminative & Geometric Properties
- Cross-Modal Retrieval: FLAT's retrieval performance is remarkably stable across sequence lengths. On MS-COCO, a single token ($K=1$) achieves a Recall@5 of 86.44 (I2T), which is within one percentage point of the full $K=256$ width (86.82).
- Linear Probing: A linear classifier trained on top of frozen FLAT representations achieves 81.8% top-1 accuracy on ImageNet-1K, surpassing purely generative latent spaces.
- Emergent Latent Operations: Due to its tightly aligned geometry, FLAT natively supports zero-shot continuous feature interpolation and latent space arithmetic (e.g., modifying an image concept by adding/subtracting text embeddings) across both decoders simultaneously.
Limitations and Future Work
While FLAT demonstrates impressive versatility, the authors note a few limitations:
- Fine-Grained Imperfections: In text-to-image generation, minor imperfections still occur in highly complex layouts or rendering precise typography.
- Omission of Secondary Details: In zero-shot captioning setups, the model occasionally omits secondary objects or minor background actions in favor of the primary scene.
- Complex Counting Edits: In zero-shot composed retrieval, simultaneously preserving a reference category while successfully executing complex counting edits (e.g., "show multiple ostriches") remains a challenging frontier.
Summary updated