Twins: Learn to Predict Unified Representations with Focal Loss
Summary
Twins introduces a unified continuous token space for multimodal understanding and image generation, addressing the mismatch between semantic ViT features and detail-preserving VAE latents. This model concatenates SigLIP2 ViT and Flux.2 VAE features channel-wise on the same token grid, maintaining sequence length and attention cost. When training a Diffusion Transformer (DiT) with Twins, an optimization imbalance emerged, where the model favored ViT components over VAE latents. Researchers identified this imbalance stemmed from spectral bias, intrinsic dimensionality differences (SigLIP ID ≈ 15 vs. VAE ID ≈ 35), and conditional dependency. To counter this, a focal regression objective was adapted for flow matching, upweighting large-error VAE dimensions. This approach yielded up to a 10.57 gFID gain on ImageNet without classifier-free guidance, achieved a PSNR of 31.46, SSIM of 0.90, and rFID of 0.11, and improved multimodal understanding benchmarks like GQA (64.93) and TQA (58.89).
Key takeaway
For AI Scientists developing unified multimodal models, you should consider Twins' channel-wise feature concatenation to achieve both strong understanding and high-fidelity generation. If your models exhibit optimization imbalance between heterogeneous feature types, adapt a focal regression objective to prioritize harder-to-learn components, as this method significantly improves generation quality and reconstruction fidelity. This approach can help you overcome the "impossible triangle" trade-off.
Key insights
Channel-wise concatenation of ViT and VAE features creates a unified representation, balanced by focal loss to overcome optimization imbalance.
Principles
- Unified representations face optimization imbalance.
- Focal loss can balance heterogeneous feature learning.
- Low-frequency, low-ID features are learned first.
Method
Twins constructs unified embeddings by channel-wise concatenating SigLIP2 ViT and Flux.2 VAE features. Focal Loss is applied to flow matching, re-weighting VAE regression by assigning higher penalties to hard-to-learn features.
In practice
- Use Twins for high-fidelity image generation.
- Integrate Twins into LLaVA-style VLM pipelines.
- Apply focal regression to balance multi-component models.
Topics
- Unified Multimodal Models
- Visual Tokenization
- Diffusion Transformers
- Focal Loss
- Image Generation
- Multimodal Understanding
Code references
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, Computer Vision Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CV updates on arXiv.org.