Twins: Learn to Predict Unified Representations with Focal Loss

· Source: Computer Vision and Pattern Recognition · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, quick

Summary

Twins proposes a unified continuous token space for multimodal models, integrating both understanding and generation capabilities. This space is created by channel-wise concatenating ViT and VAE features on the same token grid, maintaining sequence length and attention cost. When jointly modeled in a Diffusion Transformer, a significant optimization imbalance emerged, where the ViT component fit well but the VAE latent distribution struggled. This imbalance stems from frequency bias, intrinsic dimensionality, and condition-aligned vs. condition-independent uncertainty. To resolve this, Twins adapts a focal regression objective for flow matching, which upweights large-error VAE dimensions. This approach achieved up to 10.57 gFID gain on ImageNet over naive MSE loss, performs competitively on multimodal understanding benchmarks, and improves reconstruction fidelity.

Key takeaway

For machine learning engineers developing unified multimodal models or Diffusion Transformers, if you encounter optimization imbalances between understanding and generation components, consider adapting a focal regression objective for flow matching. This technique can effectively rebalance training by upweighting struggling dimensions, potentially yielding significant gFID gains and improving both understanding and reconstruction fidelity in your models.

Key insights

Twins unifies ViT and VAE features into a continuous token space, using focal regression to balance optimization for improved multimodal performance.

Principles

Method

Channel-wise concatenate ViT and VAE features on a shared token grid. Apply a focal regression objective for flow matching, upweighting large-error VAE dimensions to balance optimization.

In practice

Topics

Best for: Research Scientist, AI Scientist, Machine Learning Engineer, Computer Vision Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Computer Vision and Pattern Recognition.