# Tree-of-Thoughts Reasoning for Text-to-Image In-Context Learning

arXiv: https://arxiv.org/abs/2607.07117 · HTML: https://mlsanity.com/paper/2607.07117/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Placed in Multimodal reasoning, one of 17 directions in LLM reasoning.
- Builds on 20 of its 26 references that are in the map.
- First posted on arXiv 8 Jul 2026.

## Placed in

- LLM reasoning / [Multimodal reasoning](https://mlsanity.com/lr/multimodal-reasoning/)

## Builds on (most cited first, 20 of 20)

- [Learning Transferable Visual Models From Natural Language Supervision](https://mlsanity.com/paper/2103.00020/) (2021)
- [High-Resolution Image Synthesis with Latent Diffusion Models](https://mlsanity.com/paper/2112.10752/) (2021)
- [Chain-of-Thought Prompting Elicits Reasoning in Large Language Models](https://mlsanity.com/paper/2201.11903/) (2022)
- [Flamingo: a Visual Language Model for Few-Shot Learning](https://mlsanity.com/paper/2204.14198/) (2022)
- [Zero-Shot Text-to-Image Generation](https://mlsanity.com/paper/2102.12092/) (2021)
- [Tree of Thoughts: Deliberate Problem Solving with Large Language Models](https://mlsanity.com/paper/2305.10601/) (2023)
- [Compositional Visual Generation with Composable Diffusion Models](https://mlsanity.com/paper/2206.01714/) (2022)
- [Making LLaMA SEE and Draw with SEED Tokenizer](https://mlsanity.com/paper/2310.01218/) (2023)
- [In-Context Learning Unlocked for Diffusion Models](https://mlsanity.com/paper/2305.01115/) (2023)
- [Ranni: Taming Text-to-Image Diffusion for Accurate Instruction Following](https://mlsanity.com/paper/2311.17002/) (2023)
- [ImageGen-CoT: Enhancing Text-to-Image In-context Learning with Chain-of-Thought Reasoning](https://mlsanity.com/paper/2503.19312/) (2025)
- [Analogist: Out-of-the-box Visual In-Context Learning with Image Diffusion Model](https://mlsanity.com/paper/2405.10316/) (2024)
- [Context Diffusion: In-Context Aware Image Generation](https://mlsanity.com/paper/2312.03584/) (2023)
- [Explaining generative diffusion models via visual analysis for interpretable decision-making process](https://mlsanity.com/paper/2402.10404/) (2024)
- [Few-Shot Learning with Geometric Constraints](https://mlsanity.com/paper/2003.09151/) (2020)
- [Can MLLMs Perform Text-to-Image In-Context Learning?](https://mlsanity.com/paper/2402.01293/) (2024)
- [Self-Augmentation: Generalizing Deep Networks to Unseen Classes for Few-Shot Learning](https://mlsanity.com/paper/2004.00251/) (2020)
- [Spatial Reasoning for Few-Shot Object Detection](https://mlsanity.com/paper/2211.01080/) (2022)
- [VersaGen: Unleashing Versatile Visual Control for Text-to-Image Synthesis](https://mlsanity.com/paper/2412.11594/) (2024)
- [FlipConcept: Tuning-Free Multi-Concept Personalization for Text-to-Image Generation](https://mlsanity.com/paper/2502.15203/) (2025)

## Abstract (arXiv)

In text-to-image in-context learning (T2I-ICL), a model has to infer a latent compositional pattern from fewshot demonstrations for generating a query image. Recent studies show that state-of-the-art multimodal large language models struggle with this setting, particularly due to limited compositional reasoning and sensitivity to prompt construction. In this work, we propose a Tree-of-Thoughts (ToT) reasoning framework for T2I-ICL that introduces a multi-stage reasoning and selection layer that generates, evaluates, and selects among multiple candidate hypotheses before constructing the final prompt for image synthesis. By exploring alternative reasoning branches and selecting a coherent interpretation, the proposed approach mitigates prompt ambiguity and compositional errors. We implement the proposed approach in a complete ToT-T2IICL inference pipeline and evaluate it on the CoBSAT benchmark. Both qualitative and quantitative results show that structured multi-branch reasoning leads to more consistent and semantically aligned image generation compared to baseline and Chain-of-Thought prompting strategies, without any additional training or fine-tuning.
