TL;DR
Ask an image generator to paint a generic cat, and you get a masterpiece; ask it for a rare designer toy or a specific 1930s Nobel laureate, and it starts hallucinating. Unify-Agent fixes this "closed-book" amnesia by turning image generation into an open-book, four-step agentic workflow—thinking, searching the web, rewriting the prompt, and generating—all inside a single unified multimodal backbone. By teaching one model to both research what it doesn’t know and paint what it finds, it bridges the factual gap between open-source models and top proprietary systems.
What Problem Does This Paper Address?
Modern text-to-image (T2I) models and Unified Multimodal Models (UMMs—architectures that both understand text/images and generate images) are essentially taking a closed-book exam. Their world knowledge is frozen in their weights at training time. When prompted with "long-tail" concepts—niche video game robots, regional cultural symbols, or lesser-known historical figures—the bottleneck isn't rendering quality; the model simply doesn't know what the subject looks like.
Existing workarounds usually duct-tape separate tools together: a frozen text LLM plans a search, a retrieval API fetches results, and a standalone diffusion model generates the image. Because these stages are decoupled, errors cascade. Furthermore, naively dumping raw search results into a generator backfires: retrieved text lacks fine-grained visual details and distracts from instructions, while raw reference images act like a straitjacket, ruining compositional flexibility (like putting a known character in a brand-new pose).
Methods
Instead of stitching separate APIs together, the authors build Unify-Agent on top of Bagel, an open-source UMM that combines autoregressive text generation and continuous image synthesis (rectified flow) via shared self-attention.
Unify-Agent reframes generation as an end-to-end sequential trajectory inside this single backbone:
- THINK (Cognitive Gap Detection): Given a prompt, the model identifies what visual facts are missing from its parametric memory.
- RESEARCH (Sequential Evidence Acquisition): It queries external search APIs—crucially, text before images. Text search disambiguates the entity first so the subsequent image search doesn't pull up look-alikes.
- RECAPTION (Evidence-Grounded Filtering): Rather than feeding raw messy search data to the image generator, the model distills the evidence into a structured specification. It explicitly separates identity-preserving constraints (facial traits, signature colors from reference images) from scene-compositional constraints (pose, lighting, and environment from the user's prompt).
- GENERATE (Visual Synthesis): The image expert generates the final picture. What’s novel here is a hybrid attention mask: during synthesis, image tokens are only allowed to attend to the clean recaption and retrieved reference images, shielding the generator from upstream reasoning noise and raw search text.
The entire policy is trained jointly via supervised fine-tuning (mixing cross-entropy for text/tool tokens and flow-matching loss for images) on distilled agent trajectories.
Datasets
- Training Data (143K Agent Trajectories): Starting from 456K curated long-tail concepts across 12 domains (from Wikipedia and BabelNet), the authors used frontier models (Claude Opus 4.6, Gemini 3, GPT-4o, Nano Banana Pro) to simulate research traces, filter noisy web images, write recaptions, and rejection-sample the final rendered outputs.
- FactIP (New Benchmark): The authors introduce a held-out, 500-sample benchmark across 12 categories (celebrities, toys, landmarks, comics, etc.) specifically designed to defeat memorization and require external visual grounding while testing creative scene variations.
- Existing Benchmarks: Evaluated on WiSE, KiTTEN, and T2I-FactualBench, which test factual and world-knowledge alignment in T2I synthesis.
Key Insights and Ideas
- More raw data can mean worse images: In a motivating study, giving the base model both raw text and reference images actually performed worse (+14.0 gain) than giving it reference images alone (+15.0). Raw text adds non-visual clutter, proving why intelligent recaptioning is necessary.
- Text search anchors visual search: Searching Google Images directly with an ambiguous prompt yields noisy look-alikes. Searching text first provides the semantic context needed to formulate a precise visual query.
- Why a unified backbone actually matters: Because Unify-Agent lives inside a unified multimodal model, its language branch can "see" retrieved images through two pathways during recaptioning: high-level semantic tokens (ViT) and low-level appearance latents (VAE). Ablations show ViT features do the heavy lifting for identifying what matters, while VAE latents provide a complementary boost for fine textures and colors.
Key Results
Unify-Agent dominates open-source unified and generation-only baselines, closing in on heavyweight commercial systems:
- FactIP: Scores 73.2 overall, leaping +22.3 points over its base model Bagel (50.9) and crushing standalone generators like FLUX.1-dev (28.9) and SD-3.5-large (27.5). It even edges out commercial models like GPT-Image-1.5 (69.9).
- Other Factual Benchmarks: Achieves open-source SOTA among unified models on WiSE (0.77 WiScore vs. Bagel-CoT's 0.70), KiTTEN (4.08 overall), and T2I-FactBench (leading single- and multi-knowledge categories at 77.4 and 71.5).
- Ablations: Dropping image search tanks the FactIP score from 73.2 to 56.2, while removing recaptioning drops it to 62.9, confirming every stage pulls its weight.
Limitations and Future Work
Unify-Agent is constrained by its open-source base model (Bagel), which has limited long-context capacity and can only juggle a few reference images at once. Additionally, the current agent executes a shallow, linear one-pass workflow (Think $\rightarrow$ Text Search $\rightarrow$ Image Search $\rightarrow$ Recaption $\rightarrow$ Generate). Future work aims to scale this to stronger backbones and introduce truly iterative agent loops—allowing interleaved searches, self-reflection, and replanning when initial search results fall short.
Summary updated