AutoRef: Harness Optimization for Agentic Multi-Reference Image Generation

Yuta Oshima, Ku Onoda, Yusuke Iwasawa, Masahiro Suzuki, Yutaka Matsuo, Hiroki FurutaarXiv 2026

TL;DR

AutoRef automates the design of agentic workflows—or "harnesses"—that orchestrate how frozen AI models generate images from multiple references. By using a coding agent to iteratively optimize this orchestration code, the researchers enabled a relatively small, open-weight model (FLUX.2 4B) to match or exceed the performance of proprietary giants like GPT-Image-1.5 and Nano Banana Pro.

What Problem Does This Paper Address?

Multi-reference image generation (e.g., "take the cat from Image A and the chair from Image B and put them in a library") is notoriously difficult for current AI. Models frequently omit subjects, duplicate them, or produce "Frankenstein" results where elements look unnaturally pasted together.

While "agentic" systems—where a reasoning model (LLM) manages the generation process—can help, these systems rely on a harness: the executable code that defines how to interpret references, construct prompts, diagnose failures, and select the final output. Currently, these harnesses are hand-written by humans, leading to inconsistent performance and a "black art" approach to design. The authors sought a way to automate the discovery of the optimal harness.

Methods

The authors introduce AutoRef, a framework that treats the agentic harness as editable code and optimizes it through an iterative search.

  • Frozen Models: To keep the search efficient and focused on orchestration, the image generator (e.g., FLUX.2) and the reasoning model (e.g., GPT-5.5) remain frozen.
  • Iterative Beam Search: A coding agent (Claude) acts as a "proposer," reading the current harness code and performance logs to write new, improved versions. AutoRef maintains a "beam" of the top-performing harnesses to ensure the search explores diverse strategies.
  • Task Separation: A key innovation is the separation of tasks. Feedback from a training set (Dtrain) is given to the coding agent to suggest improvements, while a separate validation set (Dval) is used strictly to rank and select the best candidates. This prevents the system from "overfitting" to the quirks of the automated visual evaluator.
The AutoRef iteration loop, showing how the coding agent proposes new harnesses based on training evidence, which are then ranked on a validation set.

Datasets

  • MultiBanana: The primary benchmark for multi-reference text-to-image generation. It includes tasks requiring the composition of up to four reference images.
  • OmniContext: An external benchmark used to test how well the discovered harness generalizes to entirely new data distributions and different automated evaluators.

Key Insights and Ideas

  • The "Harness" Matters More Than Model Size: The most striking finding is that a well-optimized workflow can make a 4-billion parameter model punch way above its weight class.
  • Structural Diversity is Essential: The optimized harness (AutoRef-Harness) learned that simply resampling the same prompt rarely fixes a "pasted-in" look. Instead, it generates structurally diverse drafts—for example, one prompt might describe the scene subject-by-subject, while another uses one reference as a "canvas" to paint others into.
  • Failure-Aware Selection: Rather than just asking an LLM "which image is better," the discovered harness first performs a strict check for "hard failures" (like missing subjects or duplicated characters) before moving to a nuanced pairwise comparison.
Qualitative comparison showing how the AutoRef-Harness integrates multiple references into a coherent scene compared to baseline models that often duplicate or omit subjects.

Key Results

  • Beating the Giants: On the MultiBanana benchmark, AutoRef-Harness boosted FLUX.2 [klein] 4B’s score from 5.72 to 7.37, surpassing proprietary models like Nano Banana Pro (7.20) and GPT-Image-1.5 (7.07).
  • Zero-Shot Transfer: The harness discovered using 4-reference tasks worked immediately for 3 and 5 references without further tuning. It also improved performance when the underlying generator was swapped for a different model family (Qwen-Image-Edit).
  • Human Validation: In head-to-head human evaluations, the AutoRef-enhanced FLUX.2 4B achieved a 70% win rate against its vanilla version and remained competitive with top-tier proprietary models.
Performance charts showing AutoRef-Harness matching proprietary models and transferring successfully to unseen reference counts and different model families.

Limitations and Future Work

  • The Generator Ceiling: A harness can only select from what the generator produces. If a generator is fundamentally incapable of handling a high number of references (as seen with some models at 5+ references), even the best selection logic cannot fix the output.
  • Evaluator Bias: While the harness generalizes well, the optimization process is still guided by a Vision-Language Model (VLM) evaluator, which may have its own blind spots compared to human judgment.
  • Future Directions: The authors suggest that integrating more specialized tools, such as segmentation models for better diagnosis or even stronger coding agents, could further push the boundaries of what frozen models can achieve.

Summary updated

BibTeX
@misc{oshima2026autoref,
  author = {Yuta Oshima and Ku Onoda and Yusuke Iwasawa and Masahiro Suzuki and Yutaka Matsuo and Hiroki Furuta},
  title = {{AutoRef: Harness Optimization for Agentic Multi-Reference Image Generation}},
  year = {2026},
  eprint = {2609.35530},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.35530},
}
Figure