ArXiv: 2603.12252
🎯 Pitch
Diffusion models don't actually reason—they commit blindly to a solution in their first few denoising steps. This paper shows that by making the text encoder iteratively refine its own latent thoughts in lockstep with generation, diffusion models can solve Sudoku and mazes with step-by-step logic that generalizes to unseen sizes and fonts.
1. Executive Summary
This paper proposes Endogenous Chain-of-Thought (EndoCoT), a novel framework that enables diffusion models to perform genuine step-by-step reasoning during generation by iteratively refining latent thought states in the MLLM text encoder rather than computing solutions in a single static pass. Evaluated on visual reasoning benchmarks including Maze, TSP, VSP, and Sudoku using Qwen-Image-Edit-2511 as the base model, EndoCoT introduces two key mechanisms: iterative thought guidance — recursively updating hidden states in the MLLM to create a CoT-like reasoning process that corresponds to the DiT's denoising steps (e.g., progressively extending a path through a maze) — and terminal thought grounding — aligning the final reasoning state with textual ground-truth supervision via an auxiliary semantic loss (e.g., matching the latent state to explicit solution directions like "D=Down, U=Up"). EndoCoT achieves an average accuracy of 92.1% across all benchmarks, outperforming the strongest baseline DiffThinker by 8.3 percentage points, with particularly striking gains on complex tasks — 90% on Maze-32 and 95% on Sudoku-35, representing 25% and 40% absolute improvements respectively — establishing that test-time reasoning scaling in diffusion models works only when intermediate reasoning steps are explicitly supervised and jointly trained across both the MLLM and DiT components.
2. Context and Motivation
The Core Problem: Diffusion Models Can Generate Visually Stunning Outputs But Cannot Reason
Diffusion models have achieved remarkable success in visual generation — producing photorealistic images, following complex text prompts, and enabling sophisticated image editing. However, the paper identifies a fundamental limitation that has gone largely unaddressed: current diffusion models cannot perform the kind of step-by-step logical reasoning required for tasks like solving mazes, planning Traveling Salesperson Problem (TSP) routes, or completing Sudoku puzzles. These are not merely "generation" tasks in the traditional sense — they require the model to understand and enforce strict sequential constraints (e.g., a maze path must not pass through walls, a Sudoku grid must satisfy row/column/block uniqueness rules) and to generalize these constraints to novel configurations never seen during training.
This gap matters for several reasons that go beyond benchmark performance:
-
Generalization failure as a capability signal. Prior work like DiffThinker [11] can achieve high accuracy on in-distribution maze configurations but fails catastrophically when tested on mazes with novel sizes or Sudoku puzzles with unfamiliar fonts (Fig. 1b). This is not just a robustness issue — it reveals that the model has not learned to reason at all. Instead, it has learned a fragile pattern-matching shortcut that collapses under distribution shift. The paper makes this explicit: "despite being built on powerful MLLMs, these models do not actually perform reasoning during generation. Instead... they commit to their final solution within the first few denoising steps and merely refine visual quality thereafter" (Section 1). This early-commitment behavior (visible in Fig. 1c, left panel) indicates that the model is doing visual refinement, not logical problem-solving.
-
The reasoning-versus-generation gap in multimodal systems. Modern diffusion models increasingly integrate Multimodal Large Language Models (MLLMs) as text encoders — models like Qwen-Image-Edit that embed Qwen-VL into the conditioning pipeline. These MLLMs demonstrably possess strong reasoning capabilities in their text-only or vision-language modes (as shown by Chain-of-Thought prompting in models like Qwen3-VL-8B). Yet when plugged into a diffusion framework, this reasoning potential is almost entirely unused. The paper's core intellectual puzzle is: given that the building blocks for reasoning exist, why can't diffusion models leverage them for generation-time problem-solving? The answer, as the paper's analysis reveals, lies not in the absence of capability but in the architecture of how reasoning is integrated — or rather, not integrated — into the generation process.
-
Practical applications requiring verifiable reasoning. The benchmarks the paper targets (Maze, TSP, VSP, Sudoku) are not arbitrary — they represent a class of problems where the output must be logically coherent and constraint-satisfying, not just visually plausible. This class includes real-world applications like floor plan generation, circuit layout, robotic path planning, and puzzle design. A model that generates a maze path with 65% accuracy on novel sizes (DiffThinker on Maze-32, Table 1) is unusable for these applications. A model that achieves 90% (EndoCoT) begins to approach practical utility.
The Two Bottlenecks That Prior Work Failed to Diagnose
The paper conducts a systematic empirical analysis (Section 3) that identifies two specific, previously uncharacterized bottlenecks that explain why prior approaches fail. This analysis is crucial because it does not merely observe that existing methods perform poorly — it provides a mechanistic diagnosis that directly motivates EndoCoT's design. The analysis is performed on Qwen-Image-Edit-2511, a representative state-of-the-art model that already integrates a powerful MLLM as its text encoder, ensuring the findings are not artifacts of a weak base model.
Bottleneck 1: Limited Single-Step Reasoning Depth
The first bottleneck concerns the MLLM text encoder. In standard diffusion architectures, the MLLM processes the input prompt and image in a single forward pass, producing a fixed set of text embeddings that condition the entire denoising trajectory. The paper's analysis reveals that a single pass is fundamentally insufficient for encoding the logical constraints of complex reasoning tasks.
The evidence is shown in Fig. 2(b). On relatively simple tasks (8×8 mazes), the DiT successfully focuses on the generated trajectory — the spatial attention is well-localized and the model produces correct paths. However, even on these simple tasks, the generated paths systematically violate physical constraints such as passing through walls. This is a critical observation because it isolates the failure to the MLLM rather than the DiT: the DiT can execute spatial grounding correctly — it knows where to draw — but it receives an incomplete or incorrect logical specification from the MLLM. The MLLM, constrained to a single forward pass, cannot fully encode all the constraint-checking logic needed to ensure the path is valid.
The paper frames this as a capacity problem: complex reasoning tasks require iterative refinement of understanding. The MLLM needs to explore partial solutions, check constraints, backtrack when necessary, and progressively build toward a complete solution — exactly the process that Chain-of-Thought reasoning enables in text-only LLMs. A single forward pass collapses this multi-step process into a single computation, which is provably insufficient for problems requiring sequential constraint propagation (like Sudoku, where filling one cell constrains what can go in others).
Bottleneck 2: Static-Guidance Failure During Complex DiT Decoding
The second bottleneck concerns the coupling between the MLLM's conditioning signal and the DiT's denoising process. Even if the MLLM could somehow produce perfect reasoning in a single pass (hypothetically), the paper identifies a separate failure mode: the conditioning signal is injected once at the start and remains static throughout the denoising trajectory, but complex tasks require dynamic, evolving guidance.
The evidence comes from a cross-attention entropy analysis shown in Fig. 2(c). The paper computes the entropy of the cross-attention distribution between generated spatial patches and ground-truth reasoning tokens during the denoising process. In simple scenarios (low-complexity mazes), the attention entropy is low and structured — specific spatial patches attend strongly to specific text tokens, indicating precise cross-modal alignment. But as complexity increases (32×32 mazes), the attention entropy becomes globally high and diffuse. The DiT loses its ability to anchor spatial features to specific logical text tokens, the attention distribution "averages out" across all tokens, and spatial grounding collapses.
This is not a capacity issue in the traditional sense. The DiT has enough parameters to handle complex spatial layouts — it generates photorealistic images with intricate compositions routinely. The failure is specifically in the static coupling mechanism. Complex reasoning requires the conditioning signal to change as the denoising process progresses: early denoising steps might need high-level plan guidance (e.g., "the path should head right initially"), while later steps need fine-grained constraint enforcement (e.g., "the current path segment must not intersect a wall at pixel position (x,y)"). A one-time injection of static embeddings cannot provide this temporally structured guidance, causing the cross-modal alignment to break down under dense spatial topologies.
The Joint Implication
These two bottlenecks are complementary and compounding. Bottleneck 1 means the MLLM provides incomplete reasoning. Bottleneck 2 means even the reasoning that is provided gets lost during decoding. Together, they explain why prior attempts to integrate MLLMs into diffusion models produce models that appear to work on simple cases but fail on complex ones: the system is architecturally incapable of performing multi-step reasoning, regardless of how powerful the individual components are.
Where Prior Approaches Fall Short
The paper situates its contributions against several existing lines of work, identifying specific limitations in each.
MLLM-as-Static-Encoder Paradigms
The dominant approach to integrating MLLMs into diffusion models — exemplified by Qwen-Image-Edit [32] and similar architectures — treats the MLLM as a static conditional encoder. The MLLM processes the input prompt once, at the very beginning of generation, and produces text embeddings that condition all denoising steps. This is computationally efficient and works well for standard text-to-image generation where prompts describe what to draw (e.g., "a red truck on a snowy mountain road"), but is fundamentally mismatched with reasoning tasks where the prompt describes how to solve a problem step-by-step.
The paper's analysis in Section 3 directly quantifies why: the MLLM has substantial reasoning potential — the layer-wise sensitivity analysis in Fig. 2(a) shows peak activation precisely at the MLLM layers — but this potential is bottlenecked by the single-pass architecture. The MLLM is asked to compress all logical deduction into one embedding, which is analogous to asking a human to solve a Sudoku puzzle by looking at it once and immediately writing down the complete solution. Humans cannot do this; they need to fill cells incrementally, check constraints, and revise. MLLMs face the same computational limitation.
Explicit Reasoning Injection (DiffThinker)
DiffThinker [11] represents the most direct prior attempt to address reasoning in diffusion models. It tries to "inject" reasoning by having the model condition on explicit textual reasoning traces during generation. However, the paper's analysis reveals this as superficial alignment rather than genuine cognitive processing.
The evidence is stark. As shown in Fig. 1(b), DiffThinker achieves high accuracy on in-distribution mazes but fails catastrophically when generalizing to novel sizes — the generated paths become disconnected, pass through walls, or fail to reach the goal. This is the hallmark of pattern matching, not reasoning. A truly reasoning model would apply the same logical rules (e.g., "cannot pass through walls") regardless of maze size. Fig. 1(c) provides the mechanistic explanation: DiffThinker commits to its final solution structure within the first few denoising steps, then merely refines visual quality. It does not use the reasoning trace to progressively constrain and revise its generation — the reasoning trace is effectively dead information after the initial conditioning step.
The paper frames this as a forced alignment failure: without an endogenous mechanism that couples reasoning to generation throughout the process, the model learns to map input patterns to output patterns rather than learning to apply logical rules. The reasoning injected via conditioning becomes a spurious correlation — helpful when the test distribution matches the training distribution, harmful or irrelevant when it doesn't.
ThinkGen and ChronoEdit (Video Prior Approaches)
ThinkGen [15] and ChronoEdit [33] take a different approach: they leverage video generation priors to perform reasoning-like tasks, essentially treating logical state transitions as temporal sequences in a video. For example, a maze solution might be generated by producing a sequence of frames, each showing the path extended by one step, with temporal consistency enforced by the video model.
The paper's results (Table 1) show these approaches fail near-completely on the evaluated benchmarks. ThinkGen achieves 0% accuracy on Maze, TSP, and Sudoku at all scales. ChronoEdit achieves 1% on Maze-8 and 26% on Maze-32 (inconsistently), with near-zero performance elsewhere. The paper attributes this to a fundamental mismatch: video priors enforce smoothness, not logical consistency. A video model can smoothly interpolate between frames showing a path extending, but it has no mechanism to check whether the extended path obeys maze wall constraints or Sudoku rules. Smoothness is a poor proxy for correctness in discrete logical tasks.
This is a crucial distinction. The temporal smoothness that makes video models effective for object removal, style transfer, or gradual scene changes is actively misleading for reasoning tasks. A path that smoothly curves through a wall looks temporally coherent but is logically invalid. The video-prior approach conflates visual continuity with logical validity, and the benchmarks expose this conflation ruthlessly.
Zero-Shot MLLM Prompting (Qwen3-VL-8B)
One might ask: if MLLMs can reason so well, why not simply prompt them to generate the solution as text and then render it? The zero-shot results in Table 1 answer this. Qwen3-VL-8B, a state-of-the-art multimodal model, achieves 1% accuracy on Maze-8, 0% on Maze-32, and essentially 0% on TSP and Sudoku. Even with explicit textual reasoning capabilities, the model cannot translate its reasoning into correct visual outputs when operating zero-shot through a diffusion pipeline.
This reveals a cross-modal grounding problem. MLLMs can reason about spatial relationships in an abstract, linguistic sense ("the path should go right, then up, then up..."), but they cannot directly map these linguistic descriptions to precise pixel-level spatial coordinates within the diffusion model's latent space. The DiT component is essential for this spatial grounding — the layer-wise sensitivity analysis shows peak activation at the LLM-DiT junction precisely because this is where abstract reasoning meets concrete visual generation. Removing the DiT's joint training (as in the MLLM-Only ablation, Table 3) causes complete failure (0% accuracy on Maze-32) because the MLLM alone cannot perform the spatial-to-pixel mapping.
Text-Only Latent Reasoning (COCONUT, CoDi)
A more distant but relevant line of work has shown that text-only LLMs can perform reasoning in continuous latent spaces rather than discrete token spaces. COCONUT [10] and CoDi [24] demonstrate that compressing reasoning chains into continuous representations enables faster, more flexible reasoning with reduced token costs. This established that "thought" does not need to be verbalized — it can exist and be manipulated in continuous latent manifolds.
EndoCoT extends this insight to the multimodal generation domain, but with a crucial difference: in text-only latent reasoning, the latent state only needs to eventually decode to text. In EndoCoT, the latent state must simultaneously guide visual generation through the DiT while maintaining alignment with ground-truth textual reasoning. This dual requirement — latent states must be useful for both generation conditioning and textual grounding — is novel and motivates the paper's terminal thought grounding loss (Section 4.2.2), which has no direct analog in text-only latent reasoning.
How This Paper Positions Itself
The paper's positioning is built on a clear narrative arc that the prior sections establish:
-
Diagnosis first. Rather than proposing a method and then evaluating it, the paper devotes an entire section (Section 3) to understanding why existing approaches fail, using quantitative analysis (layer-wise sensitivity, attention entropy) to ground its claims. This is unusual for a methods paper and signals that the contribution is as much about conceptual understanding as about the specific technique.
-
Endogenous reasoning as the solution principle. The paper's central claim is that reasoning must be endogenous — generated from within the model's own iterative computation rather than injected externally. This is more than a terminological choice. "Endogenous" specifically means that the reasoning states are produced by the MLLM processing its own previous states (Equation 4:
h_τ = e_{L+1}^⊤ f_φ([P; h_{τ-1}])), creating a genuine feedback loop where each reasoning step conditions on the model's own prior thoughts. This contrasts with exogenous approaches where reasoning is pre-computed (e.g., by an external solver) and fed in as conditioning. -
Joint training across the MLLM-DiT boundary as the enabling mechanism. The paper's ablation showing that neither MLLM-only nor DiT-only training works (Table 3) is central to its positioning. EndoCoT is not just "add more reasoning steps" — it is specifically about co-adapting the MLLM and DiT through joint LoRA fine-tuning so that the MLLM learns to produce latent states that the DiT can effectively use for spatial grounding, and the DiT learns to interpret evolving latent states for progressive generation. The paper positions this as unlocking a "synergistic coupling" (Section 6) that neither component achieves alone.
-
Test-time scaling as a capability amplifier, not a capability creator. The inference-time scaling results (Table 4) show that accuracy on Maze-32 improves from 11% at τ=2 steps to 90% at τ=50 steps. This positions EndoCoT as enabling a compute-controlled reasoning depth — users can trade inference time for accuracy. However, the paper is careful to acknowledge limitations: the number of reasoning steps τ currently requires manual tuning. This positions the work as establishing a proof-of-concept for scaling laws in diffusion model reasoning while acknowledging that automatic optimal step selection remains unsolved.
-
A unified framework for reasoning and generation. Perhaps most ambitiously, the paper positions EndoCoT as a framework that dissolves the boundary between "reasoning" and "generation" in diffusion models. In the standard paradigm, reasoning (if it happens at all) is pre-processing; generation is a separate, downstream step. In EndoCoT, reasoning is the generation process — each reasoning step produces a visual output, and the visual output feeds back into the next reasoning step through the updated latent state. The progressive image editing results (Fig. 9) — where a deer gradually transforms into a sheep across controlled reasoning steps — demonstrate this unification in a visually compelling way that goes beyond the structured reasoning benchmarks.
3. Technical Approach
3.1 Reader Orientation
EndoCoT is a training and inference framework that teaches diffusion models to perform step-by-step logical reasoning by iteratively updating hidden thought states in the model's language encoder and using those evolving states to guide visual generation at each reasoning step. The system solves the problem that current diffusion models collapse complex reasoning into a single forward pass through their language encoder, producing static conditioning signals that fail to maintain logical constraints through the denoising process — EndoCoT replaces this with a recursive loop where the MLLM processes its own previous thought state to produce an updated thought state, which then conditions a complete flow-matching generation, repeated across multiple reasoning steps to build solutions incrementally rather than committing to a final answer in the first few denoising steps.
3.2 Big-Picture Architecture (Diagram in Words)
The EndoCoT system has four major components connected by a training-time and inference-time pipeline:
-
Multimodal Large Language Model (MLLM) — denoted
$f_\varphi$— the text encoder (specifically Qwen-VL's language model component, excluding embedding and projection layers) that performs the actual reasoning computation. It takes prefix embeddings (from the textual prompt and input image) concatenated with the previous thought state as input, processes them through its transformer layers, and outputs an updated hidden state at a designated sequence position. This component is LoRA fine-tuned. -
Diffusion Transformer (DiT) — denoted
$f_\psi$— the visual generator that converts noise into images conditioned on thought states. At each reasoning step$\tau$, it receives the current thought state$h_\tau$as conditioning and executes a complete flow-matching denoising trajectory (from pure noise at$t=1$to clean image at$t=0$) to produce an intermediate visual output$I_\tau$. This component is also LoRA fine-tuned. -
Iterative Thought Guidance Module — the recursive loop connecting the MLLM to itself across reasoning steps. At step
$\tau$, the MLLM takes the previous thought state$h_{\tau-1}$concatenated with fixed prefix embeddings$P$, produces an updated hidden state, and extracts the thought state$h_\tau$from a specific sequence position. This new thought state then conditions the DiT's generation for step$\tau$and also serves as input to the MLLM for step$\tau+1$. This creates a genuine feedback loop where each reasoning step builds on the model's own prior thoughts. -
Terminal Thought Grounding Module — an auxiliary alignment mechanism active only at the final reasoning step
$\mathcal{T}$. It computes a reference thought state$h_{\text{ref}}$by running the MLLM on the ground-truth textual reasoning sequence (e.g., explicit step-by-step solution directions), then penalizes the Euclidean distance between the model's final thought state$h_\mathcal{T}$and this reference. This prevents the latent reasoning trajectory from drifting away from semantically meaningful directions during training.
Information flow during training (Fig. 3a): An input image and textual prompt are encoded into fixed prefix embeddings $P$. The model initializes $h_0$ (from the MLLM's output at sequence position $L+1$ after processing $P$ alone). For each reasoning step $\tau = 1, \ldots, \mathcal{T}$: the MLLM processes $[P; h_{\tau-1}]$ to produce $h_\tau$; the DiT runs a complete flow-matching trajectory conditioned on $h_\tau$ to generate intermediate image $I_\tau$; the flow matching loss $\mathcal{L}^{\tau}_{\text{FM}}$ compares $I_\tau$ against the ground-truth intermediate target $I^*_\tau$; if $\tau = \mathcal{T}$, the semantic alignment loss $\mathcal{L}_{\text{align}}$ penalizes the distance between $h_\mathcal{T}$ and a reference state computed from ground-truth textual reasoning. During Stage 1 training, gradients flow through all steps. During Stage 2, gradients flow only through the final step $\mathcal{T}$.
Information flow during inference (Fig. 3b): The same loop executes but without ground-truth supervision. The model recursively updates $h_\tau$ through the MLLM for a user-specified number of reasoning steps $\mathcal{T}$. Only the final visual output $I_\mathcal{T}$ is returned to the user; intermediate visual states are not decoded. The model does not require access to ground-truth answers or textual reasoning traces at inference time.
3.3 Roadmap for the Deep Dive
- First, the flow matching preliminary (Section 4.1) — the generative framework underlying the DiT — since every reasoning step executes a complete flow matching trajectory and the training loss depends on understanding this process.
- Second, the iterative thought guidance mechanism (Section 4.2.1) — the core recursive loop that enables multi-step reasoning, including how thought states are represented, updated, and used to condition generation — because this is the fundamental departure from static single-pass encoding.
- Third, the terminal thought grounding mechanism (Section 4.2.2) — the auxiliary alignment loss that prevents latent reasoning drift — because it addresses a failure mode specific to purely visual supervision and explains why the iterative loop doesn't collapse.
- Fourth, the progressive training strategy (Section 4.2.3) — the two-stage curriculum (reasoning development then terminal consolidation) — because training all reasoning steps jointly with equal weight produces suboptimal final outputs, and this section explains the gradient conflict and how the two-stage schedule resolves it.
- Fifth, the inference process (Section 4.2.4) and key design rationales — how the trained model operates at test time, why the specific LoRA configuration (rank 32) and joint MLLM-DiT adaptation are essential, why implicit continuous tokens rather than explicit discrete text tokens are used for reasoning, and how the method connects back to the bottlenecks diagnosed in Section 3.
3.4 Detailed, Sentence-Based Technical Breakdown
This is primarily a methods paper with strong empirical motivation whose core idea is that diffusion models can perform genuine chain-of-thought reasoning if the MLLM text encoder is allowed to iteratively refine its own latent states and those evolving states are used to condition progressive visual generation, with explicit textual grounding preventing the latent trajectory from drifting into semantically meaningless regions.
Flow Matching Preliminary (Section 4.1)
EndoCoT builds on the flow matching generative framework rather than traditional denoising diffusion, so understanding the underlying mechanics is essential for understanding how each reasoning step's visual output is generated. Flow matching simplifies generative modeling by constructing a linear probability path between a data distribution and a noise distribution and training a neural network to predict the velocity field along this path.
The core idea of flow matching is to define a direct interpolation between clean data and pure noise, then learn the vector field that transforms one into the other. Let $X_0 \sim \pi_0$ be a sample from the data distribution (a clean image, in this case a maze solution or Sudoku grid) and $X_1 \sim \pi_1$ be a sample from the noise prior (standard Gaussian noise). A linear trajectory $X_t$ interpolates between them over a continuous time parameter $t \in [0, 1]$:
where $X_0$ is the clean data sample, $X_1$ is Gaussian noise, $t$ is the flow time (0 = clean data, 1 = pure noise), and $X_t$ is the intermediate state at time $t$ along the linear path from data to noise.
What it computes: a convex combination of the data point and a noise sample, parameterized by time $t$. At $t=0$, the result is the clean data $X_0$. At $t=1$, the result is pure noise $X_1$. At intermediate $t$, the result is a partially corrupted version where the signal-to-noise ratio smoothly decreases as $t$ increases. This defines a specific continuous path through the space of images between any data point and any noise sample.
Why this form: the linear interpolation is the simplest possible path connecting two points in Euclidean space, which makes the corresponding vector field constant and easy to learn. The linearity ensures that the ground-truth velocity (derivative with respect to $t$) is simply $X_1 - X_0$ everywhere along the path — there are no curvature terms or acceleration components that the neural network would need to model. This constant-velocity property is what makes flow matching computationally tractable: the network only needs to predict a single direction per $(X_t, t)$ pair rather than a complex time-varying field.
Differentiating this trajectory with respect to time $t$ yields the ground-truth vector field $u_t(X_t)$:
where $u_t(X_t)$ is the instantaneous velocity at point $X_t$ along the trajectory — literally, how fast and in what direction $X_t$ should move to follow the linear path from data to noise.
What it computes: the derivative of the interpolation with respect to $t$, which is simply the constant vector pointing from the clean data point $X_0$ to the noise sample $X_1$. This is the ground-truth "direction of noise addition" — adding this vector to $X_t$ with an infinitesimal $dt$ moves it along the defined linear trajectory.
Why this form: because the interpolation is linear in $t$, the derivative is constant — it does not depend on $t$ at all. This means that at any point along the path, the model should predict the same direction, which dramatically simplifies learning. In score-based diffusion models, the score function changes with noise level, requiring the network to learn different behaviors at different $t$. In flow matching with linear paths, the target is $t$-invariant, reducing the burden on the network's temporal conditioning.
A neural network $v_\theta(X_t, t, c)$ is trained to approximate this vector field, where $c$ is an optional conditioning variable (in EndoCoT, the current thought state $h_\tau$). The training objective is the conditional flow matching loss:
where $v_\theta(X_t, t, c)$ is the network's predicted velocity at point $X_t$, time $t$, given conditioning $c$; $u_t(X_t) = X_1 - X_0$ is the ground-truth velocity; and the expectation is over uniformly sampled times $t$, data samples $X_0$, and noise samples $X_1$.
What it computes: the mean squared error between the network's predicted velocity and the true velocity along the linear path, averaged over all times, data samples, and noise samples. For each training example, the network sees a noisy intermediate state $X_t$ at some time $t$, knows the conditioning $c$, and must predict the direction from $X_t$ toward the clean data $X_0$ (which is $-u_t(X_t)$, i.e., pointing from noise to data). The loss is simply the Euclidean distance between the predicted and true vectors.
Why this form: MSE is the natural regression loss for a vector-valued prediction task. It implicitly assumes Gaussian errors in the velocity prediction, which is reasonable for continuous image latents. The expectation over $t$ ensures the network learns the velocity field at all noise levels equally, including both high-noise regimes (where global structure must be inferred) and low-noise regimes (where fine details are refined).
At inference time, generation proceeds by solving the flow ODE backward in time — starting from pure noise $X_1 \sim \mathcal{N}(0, I)$ at $t=1$ and integrating the learned velocity field to $t=0$ to obtain the clean image. In EndoCoT, this entire generation process is executed once per reasoning step, conditioned on the evolving thought state.
A crucial distinction the paper makes explicit: the reasoning steps $\tau$ are separate from and orthogonal to the flow time $t$. Each reasoning step $\tau$ involves a complete flow matching trajectory from $t=1$ (noise) to $t=0$ (clean image), producing a full intermediate visual output $I_\tau$. The reasoning steps iterate at the semantic level — updating the model's understanding of the problem — while the flow matching steps iterate at the pixel level — generating the image. Conflating these two levels of iteration would be a category error; the paper keeps them cleanly separated.
Iterative Thought Guidance (Section 4.2.1)
This is the core mechanism that enables multi-step reasoning. It replaces the standard paradigm of "encode prompt once, condition all denoising steps" with a recursive process where the MLLM's hidden state evolves across reasoning steps and each evolved state conditions a separate generation.
Representation of thought states. The thought state at reasoning step $\tau$ is a single vector $h_\tau \in \mathbb{R}^d$, where $d$ is the hidden dimension of the MLLM (the same dimensionality as the transformer's residual stream). This is not a full sequence of token embeddings — it is a single high-dimensional representation extracted from a specific sequence position after processing. The paper refers to these as "implicit tokens" to contrast with explicit discrete text tokens. The key property is that $h_\tau$ lives in the same continuous space as the MLLM's internal representations, so it can be directly fed back into the MLLM's first layer without going through the discrete embedding lookup table.
Prefix embeddings. The textual prompt and input image are encoded once at the start and remain fixed throughout all reasoning steps. Let $P \in \mathbb{R}^{L \times d}$ be the prefix embeddings, where $L$ is the sequence length of the encoded prompt plus image tokens. These are obtained by passing the raw text and image through their respective embedding layers (token embeddings for text, patch embeddings for vision) and are stored for reuse across all reasoning steps. The computation of $P$ involves the vision encoder and the embedding layer of the MLLM, but not the MLLM's transformer layers — those are applied when $P$ is processed together with $h_{\tau-1}$ at each reasoning step.
Initial thought state $h_0$. Before the reasoning loop begins, the model needs an initial thought state. The paper obtains $h_0$ by running the MLLM $f_\varphi$ on the prefix embeddings alone (without any prior thought state concatenated), then extracting the hidden state at sequence position $L+1$:
where $e_{L+1}$ is a one-hot basis vector selecting the $(L+1)$-th position in the output sequence, and $f_\varphi(P)$ processes the prefix embeddings of length $L$ through the MLLM's transformer layers. This initial state captures the model's understanding of the problem before any iterative refinement.
Recursive thought state update. For each reasoning step $\tau = 1, \ldots, \mathcal{T}$, the thought state is updated by:
where $[P; h_{\tau-1}]$ denotes concatenation along the sequence dimension — the prefix embeddings of length $L$ are followed by the single vector $h_{\tau-1}$ at position $L+1$, forming a sequence of length $L+1$; $f_\varphi(\cdot)$ processes this concatenated sequence through all transformer layers of the MLLM; and $e_{L+1}$ extracts the hidden state at position $L+1$ (the position that received $h_{\tau-1}$ as input).
What it computes: a recursive function where the MLLM reads its own previous thought state alongside the fixed problem description and produces an updated thought state. The previous thought $h_{\tau-1}$ is injected directly into the residual stream at the first layer of the MLLM (bypassing the embedding lookup), so the MLLM "sees" it as a continuous representation at a specific sequence position. The MLLM's self-attention layers can then attend between the prefix tokens (the problem description) and the thought token (the current solution state), blending problem understanding with solution progress. The output at the thought token's position becomes $h_\tau$, the refined thought for this reasoning step.
Why this form: the recursive structure $h_\tau = \text{MLLM}(P, h_{\tau-1})$ is the minimal modification to enable iterative reasoning while preserving the MLLM's pretrained capabilities. The MLLM was trained to process sequences of discrete tokens through an embedding layer; by feeding $h_{\tau-1}$ directly into the residual stream at the first transformer layer, the paper bypasses the embedding lookup that would otherwise quantize or distort the continuous thought representation. This is crucial because $h_{\tau-1}$ encodes fine-grained reasoning progress that a discrete vocabulary cannot capture — it is a point in a continuous $d$-dimensional manifold, not a token from a finite vocabulary. The concatenation with prefix embeddings ensures the MLLM always has access to the original problem description (preventing forgetting) while the recurrence enables iterative refinement.
A subtle but important detail: $h_{\tau-1}$ is not processed through the vision encoder or any projection layer before being concatenated — it is fed raw into the MLLM's first transformer layer. This means the MLLM must learn during fine-tuning to interpret these continuous thought states alongside discrete token embeddings, which is enabled by the LoRA adaptation applied to the MLLM's attention and FFN layers. Without this joint adaptation, the MLLM would treat $h_{\tau-1}$ as out-of-distribution noise.
Conditional flow generation from thought states. At each reasoning step $\tau$, the current thought state $h_\tau$ conditions a complete flow matching generation to produce an intermediate visual output $I_\tau$. The generation proceeds by solving the flow ODE:
with initial condition $z_\tau(1) \sim \mathcal{N}(0, I)$ (pure noise at flow time $t=1$) and final output $I_\tau = z_\tau(0)$ (clean image at flow time $t=0$). Here $v_\psi$ is the DiT with LoRA weights, $z_\tau(t)$ is the latent state at flow time $t$ during reasoning step $\tau$, and $h_\tau$ is the conditioning signal (the thought state).
What it computes: a standard flow-matching generation, but conditioned on $h_\tau$ rather than a static text embedding. The DiT receives the thought state through its cross-attention or adaptive normalization layers (the exact conditioning mechanism is inherited from the base Qwen-Image-Edit architecture) and uses it to guide the denoising trajectory. Since $h_\tau$ changes across reasoning steps, the DiT receives different guidance at each step, enabling progressive solution construction.
Training objective for generation. The flow matching loss at reasoning step $\tau$ compares the generated image against a ground-truth intermediate target $I^*_\tau$:
where $\tau$ indexes the reasoning step, $t$ is the flow time, $z_\tau(0)$ is the ground-truth intermediate image (the target $I^*_\tau$), $z_\tau(1)$ is the sampled noise, and $v_\psi(z_\tau(t), t, h_\tau)$ is the DiT's velocity prediction.
What it computes: for each reasoning step $\tau$, the standard flow matching loss where the clean data sample $X_0$ is the ground-truth intermediate target $I^*_\tau$ and the conditioning is the current thought state $h_\tau$. The expectation is over reasoning steps, flow times, and noise samples. The loss encourages the DiT to generate an image that matches the intermediate solution state when conditioned on the corresponding thought state.
Why this form: supervising each reasoning step separately with its own ground-truth target is what enables the model to learn progressive solution construction. If the model were only supervised on the final output, there would be no signal for what intermediate states should look like, and the iterative refinement would collapse into the standard single-pass behavior that the paper's analysis showed is insufficient. The ground-truth intermediate targets $I^*_\tau$ are obtained through "sequential ground-truth decomposition" — for mazes, this means partial path segments (the path extended by $\tau$ steps); for Sudoku, the grid with $\tau$ cells filled incrementally; for TSP, the tour with $\tau$ cities visited. This decomposition is described in detail in Appendix B.
Joint LoRA fine-tuning. A critical enabling detail: both the MLLM $f_\varphi$ and the DiT $f_\psi$ are adapted using LoRA with rank 32. The LoRA is applied to specific target modules (Appendix E, Table 7): for the DiT, this includes attention projections (to_q/k/v, add_*_proj, to_*_out), FFN layers (img/txt_mlp.net.2), and modulation layers (img/txt_mod.1); for the text encoder (MLLM), this includes attention projections (q/k/v/o_proj) and FFN layers (gate/up/down_proj). The learning rate is $1 \times 10^{-4}$ with training for 5 epochs.
The joint fine-tuning is motivated directly by the layer-wise sensitivity analysis in Section 3: peak sensitivity occurs at the MLLM layers and at the MLLM-DiT junction, indicating that both components must adapt collaboratively for reasoning to emerge. Training only the DiT (DiT-Only ablation, Table 3) limits logical reasoning capacity — the DiT can generate spatially grounded outputs but the MLLM provides static, incomplete guidance. Training only the MLLM (MLLM-Only ablation, Table 3) fails because the MLLM cannot map abstract reasoning to pixel-level coordinates without the DiT learning to interpret its evolving thought states. Joint adaptation creates a co-adaptation loop: the MLLM learns to produce thought states that the DiT can effectively use for spatial grounding, and the DiT learns to attend to and utilize the evolving thought representation.
Terminal Thought Grounding (Section 4.2.2)
While the iterative thought guidance mechanism enables multi-step visual refinement through flow matching losses alone, the paper identifies a critical failure mode: training with only visual supervision (the $\mathcal{L}_{\text{FM}}$ terms) allows the latent thought states $h_\tau$ to drift into regions of the continuous latent space that are useful for conditioning the DiT (because the flow matching loss still decreases) but are semantically meaningless — they no longer correspond to interpretable reasoning steps. This drift manifests as degraded generalization and reduced logical consistency, as shown in the ablation (Table 2, "w/o semantic loss": Maze-32 accuracy drops from 90% to 14%).
The terminal thought grounding mechanism addresses this by introducing an auxiliary loss that aligns the final thought state $h_\mathcal{T}$ with an explicit textual representation of the correct reasoning. This serves as a semantic anchor — it ensures that the trajectory through latent thought space, even if not directly interpretable at intermediate steps, terminates at a point that corresponds to the verifiably correct solution.
Reference thought state computation. The reference state $h_{\text{ref}}$ is computed by running the MLLM on the ground-truth reasoning sequence expressed as text, together with the input image. Specifically:
where $P_{\text{gt}} \in \mathbb{R}^{L_{\text{gt}} \times d}$ is the embedding of the ground-truth textual reasoning steps — for mazes, this is the explicit sequence of direction commands like "DDLUULUL..." that solves the maze; for Sudoku, the step-by-step cell-filling instructions; for TSP, the city visitation order; for VSP, the sequence of movement directions. $I_{\text{input}}$ denotes the task input (the initial maze configuration, the empty Sudoku grid, etc.), and $e_{L_{\text{gt}}+1}$ extracts the hidden state after the ground-truth sequence.
What it computes: the MLLM processes the concatenation of textual ground-truth reasoning and the input image, producing a hidden state that represents "the model's encoding of the correct solution expressed in text." This is the target toward which the model's latent thought trajectory should converge. This computation is only needed during training (when ground truth is available); at inference, the model never sees textual ground truth.
Why this form: by using the same MLLM $f_\varphi$ to compute the reference, the paper ensures the reference state lives in the same representation space as the model's own thought states. This is crucial — if the reference came from a different model or a different representation, the alignment loss would force the thought states into a potentially incompatible region of the latent space, disrupting the MLLM-DiT co-adaptation. Using the same MLLM means the reference is "what the MLLM would produce if given the explicit text answer," creating a natural target that is both semantically grounded and representationally compatible.
Alignment loss. The terminal thought state $h_\mathcal{T}$ is aligned with the reference using a simple Euclidean (L2/Semantic) loss:
where $h_\mathcal{T}$ is the thought state at the final reasoning step (produced by the recursive update process) and $h_{\text{ref}}$ is the reference computed from ground-truth text as above.
What it computes: the squared Euclidean distance between two vectors in the MLLM's hidden space. This penalizes any deviation between the model's final latent thought and the encoding of the explicit textual solution. The loss is a single non-negative scalar that is small when the model's implicit reasoning terminates at a state that matches explicit text-based reasoning and large when the latent trajectory drifts away.
Why this form: squared L2 is the simplest metric that enforces pointwise alignment in the latent space. It assumes that closeness in Euclidean distance corresponds to semantic similarity in the MLLM's representation manifold, which is reasonable because the MLLM was pretrained to map semantically similar inputs to nearby representations. Alternative forms like cosine similarity would ignore magnitude information (which may encode confidence or solution quality), and more complex distributional matching (e.g., MMD or adversarial losses) would be computationally expensive and potentially unstable during joint fine-tuning.
Overall training objective. The total loss for a single reasoning step combines the flow matching loss with the alignment term:
where $\mathbb{I}\{\tau = \mathcal{T}\}$ is the indicator function that is 1 only at the final reasoning step and 0 otherwise, and $\lambda_{\text{align}}$ is a hyperparameter balancing visual generation quality against textual grounding. The paper sets $\lambda_{\text{align}} = 1$ empirically.
What it computes: the flow matching loss is always applied (every reasoning step must generate the correct intermediate image), but the semantic alignment loss is only applied at the final step. This is a deliberate sparsity choice: applying semantic loss to intermediate steps would force the model's latent trajectory to mimic the explicit textual reasoning at every step, which the paper found empirically to "disrupt the synergy between the DiT rendering capability and the MLLM's understanding" (Appendix E.3). The model needs freedom to develop its own implicit reasoning dynamics at intermediate steps; only the terminal state must be verifiably correct.
Why this form (sparse grounding): the paper's empirical observation that "more semantic supervision is not necessarily better" (Appendix E.3) is a non-obvious finding. Intuitively, one might expect that aligning every intermediate thought state with the corresponding step of explicit textual reasoning would provide stronger supervision. However, the paper found this degrades performance because the DiT and MLLM co-adapt in ways that do not cleanly correspond to discrete textual steps. The MLLM might learn to encode spatial information, confidence estimates, or backtracking signals in the thought states that have no textual equivalent but are essential for the DiT's generation. Forcing these rich continuous representations to match sparse text tokens at every step constrains the co-adaptation and reduces overall synergy. The terminal-only grounding provides a semantic "destination" while leaving the path through latent space unconstrained.
Progressive Training Strategy (Section 4.2.3)
The paper observes that training all reasoning steps with equal weight — the natural approach of simply optimizing the sum of losses across all $\tau$ — leads to a gradient conflict. Intermediate reasoning steps serve the purpose of exploring solution paths and building toward the final answer, while the final step must produce a visually polished, correct output. These objectives can conflict: gradients that improve intermediate reasoning fluency may degrade final output quality, and gradients that improve final visual quality may disrupt the learned reasoning dynamics. The two-stage progressive training strategy explicitly separates these objectives.
Stage 1: Reasoning Development. In this stage, the model is trained to learn step-by-step visual reasoning by supervising all reasoning steps $\tau = 1, \ldots, \mathcal{T}$:
where $\mathcal{L}^{\tau}_{\text{FM}}$ is the flow matching loss at reasoning step $\tau$ and the alignment loss is still only applied at the final step $\mathcal{T}$.
What it computes: the sum of flow matching losses over all reasoning steps, plus the terminal alignment loss. Every intermediate visual output $I_\tau$ is compared against its ground-truth target $I^*_\tau$, so the model receives explicit supervision for each step of the reasoning chain. Gradients flow through all MLLM and DiT parameters, enabling the model to learn the full multi-step reasoning trajectory.
Why this form: the full-step supervision is essential for the model to learn that intermediate reasoning steps exist and how to perform them. Without it, the model would default to the single-pass behavior that the paper's analysis showed is insufficient — there would be no training signal encouraging progressive solution construction. Each step's supervision provides a local learning signal: for mazes, the model learns that extending a path by one step while respecting wall constraints is a meaningful sub-task; for Sudoku, that filling one cell while maintaining row/column/block consistency is a valid operation. These local signals build the foundation for coherent long-horizon reasoning.
Stage 2: Terminal Consolidation. Once the model has developed robust reasoning capabilities (after Stage 1 training), the training focus shifts to solidifying the visual accuracy of the final output. While the intermediate reasoning process is preserved during the forward pass (the model still generates $I_1, I_2, \ldots, I_{\mathcal{T}-1}, I_\mathcal{T}$ sequentially), gradients are computed exclusively for the final output:
where $\mathcal{L}^{\mathcal{T}}_{\text{FM}}$ is the flow matching loss at the final step only, and no gradient flows through intermediate steps $\tau < \mathcal{T}$.
What it computes: the same losses as Stage 1, but the computation graph is truncated — intermediate steps are executed in the forward pass (the thought states $h_1, \ldots, h_{\mathcal{T}-1}$ are computed, and images $I_1, \ldots, I_{\mathcal{T}-1}$ are generated) but their losses are not backpropagated. Only the final step's flow matching and alignment losses contribute to parameter updates. The intermediate steps serve as "reasoning scaffolding" — they provide the context and trajectory that enables the final step to produce a high-quality output, but they are not themselves optimized in this stage.
Why this form: this addresses a specific pathology the paper observed. When all steps are optimized throughout training, the model can overfit to producing perfect intermediate outputs at the expense of final output quality — a form of "reasoning myopia" where the model invests capacity in making Step 3 look slightly better rather than ensuring Step 10 (the answer) is correct. By freezing gradients through intermediate steps, Stage 2 tells the model: "the reasoning trajectory you learned in Stage 1 is good enough — now focus on making the final answer perfect." The intermediate states still influence the final output through the recurrent thought state updates (the MLLM processes them in the forward pass), so the reasoning chain remains causally relevant; it is simply not directly optimized.
Preventing reasoning chain degradation. The paper notes a crucial practical detail: Stage 2 "employs a short-cycle fine-tuning strategy with limited iterations." This is because extended Stage 2 training causes intermediate reasoning steps to become sparse or degenerate, as the model learns that it can ignore intermediate reasoning quality since those steps receive no gradient. The ablation in Appendix D.2 (Table 6 and Fig. 10) quantifies this: single-stage training (equivalent to only Stage 1) achieves 90% accuracy on Maze-32 but only 90.34% path repetition (the generated path doesn't perfectly match the ground truth), while two-stage training achieves both 90% accuracy and 98.13% path repetition. However, excessive Stage 2 training (too many iterations) causes intermediate steps to become sparse, and at inference time with a fixed reasoning budget $\tau$, the model converges too quickly to the target state without visible intermediate reasoning.
Why two stages rather than loss weighting: the paper could have attempted to balance the intermediate and final objectives through loss weighting (e.g., $\mathcal{L} = \alpha \mathcal{L}_{\text{intermediate}} + \beta \mathcal{L}_{\text{final}}$). The two-stage approach is superior because it cleanly separates the "exploration" phase (Stage 1, where all steps contribute) from the "exploitation" phase (Stage 2, where only the final answer matters). Loss weighting would produce a compromise solution that is suboptimal for both objectives; the two-stage approach allows each stage to fully optimize its respective objective before transitioning.
Inference Process and Key Design Rationales (Section 4.2.4 and Supporting Ablations)
Inference procedure. At inference time, EndoCoT operates with a user-specified number of reasoning steps $\mathcal{T}$. The model does not decode intermediate visual states — only the final image $I_\mathcal{T}$ is returned. The inference loop is:
- Encode the input prompt and image into prefix embeddings
$P$(one-time cost). - Compute initial thought state
$h_0$from the MLLM processing$P$alone. - For
$\tau = 1$to$\mathcal{T}$: compute$h_\tau$from the MLLM processing$[P; h_{\tau-1}]$; run full flow matching generation from noise to image conditioned on$h_\tau$; if$\tau < \mathcal{T}$, discard$I_\tau$(or keep it only for visualization). - Return
$I_\mathcal{T}$.
The intermediate visual outputs are generated but discarded because (a) they are not needed for the downstream task (only the final solution matters) and (b) generating them would add computational cost. The thought states $h_\tau$ are kept because they are needed as input to the next reasoning step.
Inference-time scaling (Table 4, Fig. 6). The number of reasoning steps $\mathcal{T}$ functions as a test-time compute budget that can be scaled to trade inference time for accuracy. On Maze-32: $\tau = 2$ achieves 11% accuracy; $\tau = 5$ achieves 27%; $\tau = 10$ achieves 49%; $\tau = 20$ achieves 74%; $\tau = 50$ achieves 90%. The inference time scales roughly linearly with $\tau$ (16.02s at $\tau = 2$ to 24.81s at $\tau = 50$), with a base encoding overhead of approximately 15.7 seconds that is independent of reasoning depth (Fig. 6).
Crucially, this scaling property is not shared by prior methods. DiffThinker achieves 56% accuracy on Maze-32 regardless of compute budget because it commits to its solution in the first few denoising steps — additional denoising steps refine visual quality but not logical correctness. EndoCoT's accuracy improves because additional reasoning steps represent actual additional logical computation through the MLLM's recurrent processing.
Resolution scaling advantage (Fig. 7). As image resolution increases, EndoCoT's relative computational cost decreases compared to baselines. This is because the reasoning iterations only re-execute the MLLM's forward pass (which is independent of image resolution, operating on fixed-length prefix embeddings and a single thought vector) and the flow matching generation (which scales with resolution). The baselines re-execute the full DiT denoising trajectory for every frame or sample, incurring the full resolution-dependent cost multiple times. At 1024×1024 resolution, EndoCoT with $\tau = 50$ takes approximately 45 seconds, comparable to DiffThinker at the same resolution but with substantially higher accuracy (90% vs. 56% on Maze-32).
Why implicit continuous tokens over explicit text tokens. One of the paper's key design choices is using continuous latent vectors $h_\tau$ as the reasoning representation rather than explicit discrete text tokens (e.g., having the MLLM autoregressively generate "the next step is to move right, then up..." before generating each image). The ablation in Table 2 ("Explicit token") shows this choice is critical: explicit token variants achieve only 34% accuracy on Maze-8 and 0% on Maze-32.
The failure analysis reveals the cause: when generating long-horizon plans with a discrete vocabulary, the model suffers from autoregressive error accumulation and mode collapse. The paper provides a concrete failure case showing the explicit token model degenerating into repetitive token loops: "Rencontre Rencontre Rencontre ... Rencontre Rencontre" — the model gets stuck repeating a single token indefinitely. This is a known failure mode of autoregressive generation over discrete sequences: once an error is made, the model has no mechanism to backtrack or revise without explicit training for error correction, and the error compounds through subsequent steps.
Continuous latent states avoid this because: (1) They are not decoded through a softmax bottleneck — the thought state is a real-valued vector with full representational capacity, so small errors manifest as small vector perturbations rather than wrong discrete tokens. (2) The recurrent update $h_\tau = \text{MLLM}(P, h_{\tau-1})$ is a continuous dynamical system — it can smoothly adjust the thought state, correct previous errors implicitly, and maintain multiple hypotheses simultaneously in the high-dimensional representation (the capacity to represent uncertainty or alternatives in a single vector through distributed representations). (3) The semantic alignment loss provides a gradient signal that pulls the trajectory toward the correct terminal state, which would be much harder to propagate through discrete token sequences.
Why joint MLLM-DiT fine-tuning is necessary. The ablation in Table 3 ("MLLM-Only" vs. "DiT-Only" vs. "Ours") provides the empirical justification. The MLLM-Only variant (where the DiT is frozen and only the MLLM is fine-tuned) achieves 0% accuracy on all maze scales — the model cannot produce any correct paths. This is because, as the layer-wise sensitivity analysis showed, reasoning signals originate in the MLLM but must be grounded by the DiT into spatial coordinates. If the DiT is frozen, it cannot learn to interpret the evolving thought states — the DiT continues to expect static conditioning embeddings and cannot leverage the iterative refinement.
The DiT-Only variant (frozen MLLM, fine-tuned DiT) achieves 57%, 43%, and 18% on Maze-8/16/32 — better than MLLM-Only but far below joint training. This is because the MLLM still produces static, single-pass reasoning, and the DiT alone cannot compensate for the MLLM's insufficient logical encoding. The DiT can improve spatial grounding, but it cannot create logical constraints that the MLLM failed to encode.
Qualitatively, Fig. 8 shows the MLLM-Only baseline producing "erratic, wandering trajectories that frequently become trapped in dead ends, lacking global spatial awareness." The model understands the basic topology (it knows walls exist) but cannot maintain coherent path planning because the DiT doesn't know how to map the MLLM's reasoning to pixel-level path coordinates.
Connection back to the Section 3 analysis. Each design choice in EndoCoT directly addresses one of the diagnosed bottlenecks:
-
The iterative thought guidance mechanism addresses Bottleneck 1 (Limited Single-Step Reasoning Depth) by replacing the single forward pass through the MLLM with a recursive process where the MLLM can iteratively refine its understanding. The MLLM no longer needs to encode all logical constraints in one shot — it can explore partial solutions, check constraint satisfaction, and progressively build a complete solution.
-
The joint MLLM-DiT fine-tuning addresses the architectural junction sensitivity identified in the layer-wise analysis (Fig. 2a). By co-adapting both components, the model creates a "synergistic coupling" where reasoning and generation are not separate stages but interleaved processes.
-
The evolving conditioning signal (different
$h_\tau$at each reasoning step) addresses Bottleneck 2 (Static-Guidance Failure) . Instead of a one-time injection of text embeddings, the DiT receives dynamically updated conditioning that provides temporally appropriate guidance — high-level plan information at early reasoning steps, fine-grained constraint enforcement at later steps. -
The terminal thought grounding and progressive training strategy address the drift and gradient conflict problems that arise when training with only visual supervision — ensuring that the latent reasoning trajectory remains semantically anchored while allowing intermediate steps to explore flexible, unconstrained representations.
Training hyperparameters summary. All experiments use Qwen-Image-Edit-2511 as the base model with LoRA fine-tuning of rank 32 on the DiT and text encoder target modules specified in Appendix E, Table 7. The learning rate is $1 \times 10^{-4}$, trained for 5 epochs. The semantic alignment weight $\lambda_{\text{align}}$ is set to 1. The number of supervised reasoning steps during training is typically larger than the number used at inference (Appendix E.3 notes: "the number of reasoning steps performed during inference is typically much smaller than the number of steps supervised during training" — fine-grained intermediate supervision is necessary for the model to learn latent reasoning processes that generalize to different inference-time step counts). Stage 2 uses limited iterations (short-cycle fine-tuning) to prevent intermediate reasoning degradation. The dataset comprises 182.4K instances total: 75K Maze, 40K Sudoku, 30K TSP, and 37.4K VSP, each with ground-truth intermediate targets obtained through algorithmic decomposition (Appendix B).
4. Key Insights and Innovations
Innovation 1: Diagnosing the Two-Bottleneck Failure Mode of Static MLLM-DiT Integration
The paper's most distinctive intellectual contribution is not a method but a mechanistic diagnosis of why diffusion models fail at reasoning despite integrating powerful MLLMs. Prior to this work, the field knew that models like DiffThinker produced fragile solutions that collapsed under distribution shift (Fig. 1b), but the cause was attributed vaguely to "insufficient reasoning" or "lack of generalization." The paper replaces this vague attribution with a precise, quantitative characterization of two distinct bottlenecks.
What was the field's prior assumption? The implicit assumption was that if an MLLM with strong reasoning capabilities (like Qwen-VL or similar) is integrated as a text encoder, the diffusion model should inherit some of that reasoning ability. The MLLM would "think" in its forward pass, and the resulting embeddings would guide the DiT to produce logically coherent outputs. If performance was poor, the natural assumption was that the MLLM wasn't powerful enough, the training data was insufficient, or the task was simply too hard. DiffThinker's approach — injecting explicit reasoning traces as conditioning — reflects this assumption: give the model more reasoning information, and it should perform better.
What the paper shows instead. The analysis in Section 3 demonstrates that the failure is architectural, not capability-limited. The layer-wise sensitivity analysis (Fig. 2a) shows that the MLLM does activate strongly during reasoning tasks — the capability is present — but it's bottlenecked by the single-pass architecture. More importantly, even if the MLLM could reason perfectly, a second independent bottleneck exists: the cross-attention entropy analysis (Fig. 2c) reveals that the DiT loses its ability to anchor spatial features to specific logical tokens as task complexity increases, causing a complete collapse of cross-modal grounding. These are two distinct failure modes, and addressing only one (e.g., improving the MLLM) cannot fix the other.
This dual-bottleneck diagnosis is a conceptual advance because it explains the pattern of prior failures that had puzzled the field: why models like DiffThinker work on simple mazes but collapse on larger ones, why video-prior approaches (ThinkGen, ChronoEdit) achieve near-zero despite their temporal coherence, and why zero-shot MLLM prompting fails completely. Each prior approach addresses at most one bottleneck. DiffThinker tries to inject better reasoning (addressing Bottleneck 1) but uses static conditioning (ignoring Bottleneck 2). Video-prior approaches provide temporal consistency (partially addressing Bottleneck 2 through frame-to-frame smoothness) but have no mechanism for logical constraint enforcement (ignoring Bottleneck 1). Zero-shot prompting relies on the MLLM alone (no DiT co-adaptation) and fails at both bottlenecks simultaneously.
Why this is fundamental rather than incremental. This is not a small refinement of an existing diagnostic. It establishes a new conceptual vocabulary for analyzing reasoning failures in multimodal generative models — "single-step reasoning depth" and "static-guidance failure" as identifiable, measurable bottlenecks. The attention entropy metric introduced in Fig. 2c is a novel diagnostic tool that could be applied to other tasks and architectures beyond the specific benchmarks in this paper. It transforms the question from "does this model reason well?" to "which specific coupling mechanism is failing and at what complexity threshold?" — a much more actionable framing.
The evidence anchoring this claim is the combination of Fig. 2a (showing localized peak sensitivity at the MLLM-DiT junction, motivating joint training), Fig. 2b (showing DiT spatial grounding works but trajectory violates constraints, isolating Bottleneck 1 to the MLLM), and Fig. 2c (showing attention entropy becoming diffuse at high complexity, isolating Bottleneck 2 to the static coupling). These three analyses together form a coherent mechanistic picture that no prior work had assembled.
Innovation 2: Reframing Diffusion Model Reasoning as Iterative Latent State Refinement Rather Than Pre-Computation
The paper's second conceptual move is redefining what "reasoning" means in the context of diffusion models. Prior work implicitly treated reasoning as a pre-computation step: the model figures out the solution (or receives it via conditioning), then generates the corresponding visual output. EndoCoT reframes reasoning as an endogenous, iterative process that is inseparable from generation itself.
What was the field's prior approach? In the standard paradigm (exemplified by Qwen-Image-Edit, DiffThinker, and essentially all MLLM-augmented diffusion models), the MLLM's forward pass is a single atomic operation that produces a fixed conditioning vector. If reasoning happens at all, it happens entirely within that single pass — the MLLM must compress all logical deduction into one set of embeddings. The subsequent denoising process is purely generative; it does not participate in reasoning. This is reasoning-as-preprocessing: think first, then draw.
DiffThinker attempted to improve this by injecting explicit reasoning traces into the conditioning, but these traces are still pre-computed (by the MLLM or an external solver) and injected statically. The model does not "rethink" during generation; it merely has access to more detailed pre-computed reasoning. This is why Fig. 1c shows DiffThinker committing to its solution in the first few denoising steps — once the pre-computed reasoning is consumed, there is no mechanism for further logical refinement.
What the paper reframes instead. EndoCoT's core equation — h_τ = MLLM(P, h_{τ-1}) — embodies a fundamentally different model of reasoning. Reasoning is not something that happens before generation; it is something that happens through generation, with each visual output feeding back into the next reasoning step. The model explores the solution space incrementally: generate a partial solution, evaluate it, update understanding, generate a better partial solution. This is reasoning-as-exploration rather than reasoning-as-computation.
This reframing is significant beyond the specific mechanism because it provides a unified framework for reasoning and generation that dissolves the artificial boundary between them. In text-only LLMs, Chain-of-Thought reasoning produces intermediate textual outputs that are both the reasoning trace and the output. In diffusion models, the visual outputs serve the same dual role — they are both the product of reasoning at step τ and the input to reasoning at step τ+1. The progressive image editing results (Fig. 9) — where a deer gradually transforms into a sheep across controlled reasoning steps — demonstrate this unification visually. Each intermediate image is both a partial editing result and a reasoning state about what has been changed and what remains to be done.
Comparison to text-only latent reasoning. Prior work like COCONUT and CoDi demonstrated that reasoning can happen in continuous latent spaces rather than discrete token spaces, but these operate in text-only domains where the latent state only needs to decode to text eventually. EndoCoT extends this to multimodal generation, where the latent state must simultaneously condition visual generation (through the DiT) and maintain semantic meaningfulness (through the grounding loss). This dual requirement — latent states as both reasoning representations and generation conditions — is a novel extension that has no direct precedent.
Why this is fundamental rather than incremental. This is a paradigm-level shift, not a technique improvement. It changes the question from "how do we make the MLLM encode better reasoning?" to "how do we structure the generation process so that reasoning emerges from the iterative coupling of the MLLM and DiT?" The former question assumes reasoning is a property of the encoder; the latter assumes reasoning is a property of the interaction. The distinction matters because it opens up an entirely different design space: what matters is not just the MLLM's capability but the dynamics of the recurrent loop.
The evidence for this reframing's validity is the inference-time scaling results (Table 4): accuracy on Maze-32 scales smoothly from 11% at τ=2 to 90% at τ=50. This would be impossible if reasoning were purely pre-computed — a fixed-accuracy ceiling would exist regardless of compute budget. The smooth scaling demonstrates that each additional reasoning step produces genuine additional logical refinement, consistent with the reframing of reasoning as an iterative process.
Innovation 3: Establishing the Necessity of Joint MLLM-DiT Co-Adaptation Through Counterintuitive Ablation Results
The paper's third contribution is empirical evidence that reasoning in multimodal diffusion models cannot be achieved by improving either component in isolation — it requires co-adaptation of the language model and the visual generator. This finding is counterintuitive because it contradicts the natural modularity assumption that underlies most MLLM-integrated diffusion architectures.
What was the field's prior assumption? The modularity assumption is deeply embedded in diffusion model architecture design. MLLMs are treated as drop-in text encoders — swap a better MLLM (e.g., upgrade from CLIP to Qwen-VL) and generation quality should improve because the conditioning signal is richer. The DiT is treated as a conditional decoder that maps conditioning to pixels. These are assumed to be separable concerns: improving the encoder helps reasoning, improving the decoder helps visual quality. This modularity is computationally convenient (components can be developed independently) and aligns with the software engineering principle of separation of concerns.
What the paper shows instead. The ablation in Table 3 demolishes this modularity assumption for reasoning tasks. The MLLM-Only variant (DiT frozen, only MLLM fine-tuned) achieves 0% accuracy on all maze scales. This is not just poor performance — it is complete failure. The MLLM possesses strong reasoning capabilities (as evidenced by Qwen3-VL-8B's text-only reasoning performance), but those capabilities are entirely useless when the DiT cannot interpret the MLLM's evolved thought representations. The DiT-Only variant (MLLM frozen, only DiT fine-tuned) achieves 57%, 43%, and 18% on Maze-8/16/32 — substantially better than MLLM-Only but far below joint training. The DiT alone cannot create logical constraints that the MLLM failed to encode.
The finding is counterintuitive because it suggests that the MLLM and the DiT must both change to enable reasoning, even though reasoning is ostensibly a cognitive capability that should reside in the language model. The DiT is not just a "dumb renderer" — it must learn to attend to and utilize evolving thought states in ways that were not required during pretraining. Conversely, the MLLM must learn to produce thought states that are not just semantically meaningful but also visually actionable — representations that the DiT can effectively decode into spatial coordinates.
What makes this finding significant beyond the specific model. This has implications for the broader field of multimodal model design. The dominant paradigm of "better encoder → better generation" may be fundamentally insufficient for tasks requiring tight coupling between reasoning and spatial output. Future architectures may need to be designed from the ground up with co-adaptation in mind, rather than treating encoders and decoders as modular components. The paper's specific finding — that the MLLM-DiT junction is the locus of peak sensitivity (Fig. 2a) — provides a concrete architectural target for such co-design.
Why this is fundamental rather than incremental. This is a negative result that refutes a widely held assumption (modularity works for reasoning). Negative results that disprove convenient assumptions are often more impactful than positive results that confirm them, because they redirect research effort away from dead ends. If the modularity assumption held, researchers could simply wait for better MLLMs and plug them in. The paper shows this strategy has a hard ceiling — without joint training, even a perfect MLLM would fail because the DiT cannot ground its reasoning.
The evidence is the stark quantitative gap in Table 3: 0% vs. 100% on Maze-8, 0% vs. 100% on Maze-16, 0% vs. 90% on Maze-32 between MLLM-Only and joint training. The qualitative evidence in Fig. 8 reinforces this: the MLLM-Only baseline produces paths that demonstrate some topological awareness (they generally stay within the maze) but lack global coherence, suggesting the MLLM can reason about local connectivity but cannot communicate spatial plans to a frozen DiT.
Innovation 4: Demonstrating Test-Time Compute Scaling for Diffusion Model Reasoning with Smooth Accuracy-Compute Tradeoffs
The paper's fourth contribution is establishing that diffusion models can exhibit smooth test-time scaling laws for reasoning tasks — a property previously demonstrated only for text-only LLMs and assumed absent from diffusion models due to their single-pass architecture. This finding has both practical and theoretical significance.
What was the field's prior understanding? Test-time compute scaling — the idea that giving a model more inference-time computation improves its accuracy along a predictable curve — is a well-established property of autoregressive LLMs using techniques like Chain-of-Thought, best-of-N sampling, and tree search. However, diffusion models were not thought to exhibit this property for reasoning because their generation process is fundamentally different: they generate the entire output simultaneously (in parallel across spatial dimensions) through iterative denoising, rather than sequentially token-by-token. Prior work like DiffThinker (Fig. 1c, left panel) confirmed this: the model commits to its final solution structure early in the denoising process, and additional denoising steps only refine visual quality without changing the logical solution. This is a plateau, not a scaling law.
What the paper shows instead. Table 4 and Fig. 6 demonstrate a smooth, predictable scaling relationship between the number of reasoning steps τ and accuracy. On Maze-32: τ=2 → 11%, τ=5 → 27%, τ=10 → 49%, τ=20 → 74%, τ=50 → 90%. The accuracy improves monotonically with compute budget, and the marginal improvement per additional step is positive across the entire tested range — there is no evidence of a plateau (though the paper does not test beyond τ=50). The inference time scales roughly linearly (Fig. 6: 16.02s at τ=2 to 24.81s at τ=50, with a base overhead of ~15.7s), meaning the accuracy-compute tradeoff is approximately log-linear.
This is significant because it establishes that EndoCoT's reasoning is genuinely iterative — each additional reasoning step produces new logical refinement, not just visual polishing. If the model were merely doing pattern matching with early commitment (like DiffThinker), the curve would saturate quickly. The smooth scaling implies that the recurrent thought state update h_τ = MLLM(P, h_{τ-1}) is doing meaningful computational work at each step, progressively constraining and improving the solution.
Comparison to text-only LLM scaling. This finding parallels the test-time scaling laws observed in LLMs (e.g., best-of-N sampling, chain-of-thought length scaling), but with a crucial architectural difference. In LLMs, scaling test-time compute typically involves generating more tokens or sampling more trajectories — the computation is inherently sequential or parallel in token space. In EndoCoT, the scaling is in a hybrid continuous-discrete space: the thought states h_τ are continuous vectors, and the computation is recurrent through the MLLM's transformer layers. This represents a different kind of scaling — reasoning depth in a latent representational space rather than in token space — and its smoothness suggests that continuous latent reasoning may be a viable alternative to discrete token-based reasoning for domains where the output is visual rather than textual.
Resolution scaling advantage. A related finding in Fig. 7 shows that EndoCoT's relative computational cost compared to baselines decreases as image resolution increases. This is because the reasoning iterations mainly add MLLM forward passes (which are resolution-independent) rather than additional DiT denoising trajectories (which scale with resolution). At 1024×1024, EndoCoT with τ=50 takes ~45 seconds — comparable to baselines at the same resolution but with substantially higher accuracy. This suggests that continuous latent reasoning has favorable scaling properties for high-resolution visual tasks, where the cost of discrete token generation would scale with sequence length.
Why this is more than a performance result. This is a conceptual finding about the nature of the learned computation. The smooth scaling curve is evidence that the model has not merely memorized training solutions but has learned a generalizable iterative refinement process. Memoization would produce a step function (works for seen configurations, fails for unseen ones) not a smooth curve. The fact that intermediate τ values produce intermediate accuracy — not just pass/fail — suggests the model is making progressive partial progress, correcting some fraction of errors at each additional reasoning step. This is characteristic of algorithmic reasoning, not pattern matching.
The evidence is in Table 4, with the path repetition rate (measuring overlap between generated and ground-truth paths) providing corroboration: the repetition rate scales from 45.26% at τ=2 to 98.13% at τ=50, indicating that the model is getting progressively closer to the optimal solution, not just randomly sampling different solutions.
5. Experimental Analysis
Evaluation Methodology
-
Dataset. The experiments use four procedurally generated visual reasoning benchmarks: Maze navigation (75K instances, with sizes 8×8, 16×16, and 32×32), Traveling Salesman Problem (TSP, 30K instances, with 12, 15, and 18 cities), Sudoku solving (40K instances, with 35, 40, and 45 cells filled), Visual Spatial Planning (VSP, 37.4K instances, with grid sizes 4×4 through 8×8), and VSP-Super with larger map sizes up to 32×32. The total dataset comprises 182.4K training instances, each rendered at 512×512 resolution with ground-truth intermediate targets obtained through algorithmic decomposition — mazes use DFS followed by BFS for optimal path extraction, TSP uses the Held-Karp dynamic programming algorithm, Sudoku uses backtracking with unique-solution verification, and VSP uses Dijkstra's algorithm on safe graphs (Appendix B). Full pseudocode for dataset generation appears in Fig. 14 (Appendix B.2). The evaluation protocol follows DiffThinker [11], testing on held-out configurations not seen during training, with generalization tests including novel maze sizes, Sudoku fonts, and resolutions.
-
Base model. All experiments build on Qwen-Image-Edit-2511 [32], a state-of-the-art multimodal diffusion model that integrates a Qwen-VL MLLM as its text encoder within an MMDiT (Multimodal Diffusion Transformer) architecture. The paper argues this model is "representative" of contemporary architectures where reasoning-capable MLLMs are integrated as text encoders, and its non-trivial but far-from-saturated performance on reasoning tasks provides a useful testbed for evaluating whether reasoning can be unlocked through architectural modifications. The model uses flow matching as its generative framework.
-
Metrics. The primary metric across all benchmarks is accuracy — the fraction of generated solutions that are logically correct (maze paths reaching the goal without passing through walls; TSP tours visiting all cities exactly once with optimal length; Sudoku grids satisfying all row/column/block constraints; VSP paths reaching the goal while avoiding holes). For maze benchmarks specifically, the paper also reports path repetition rate — the overlap ratio between the generated path and the ground-truth optimal path, measured as the fraction of path segments that match the reference solution. This metric distinguishes between solutions that are merely "correct" (any valid path) and those that match the intended optimal solution. Inference time is reported in seconds on consistent hardware for scaling analysis.
-
Baselines. The paper compares against two categories of baselines. Zero-shot baselines (no task-specific training): ThinkGen [15] — a generalized thinking framework for visual generation that injects reasoning signals into conditioning; ChronoEdit [33] — a video-prior approach that treats logical state transitions as temporal sequences; Qwen3-VL-8B [35] — a state-of-the-art multimodal LLM prompted zero-shot to generate solutions; and the base Qwen-Image-Edit-2511 [32] without fine-tuning. Task-specific training baselines: Qwen3-VL-8B with supervised fine-tuning (SFT) and with GRPO reinforcement learning [11]; DiffThinker [11] — the prior state-of-the-art that injects explicit reasoning traces into diffusion model conditioning; these baselines are trained on the same datasets following the protocol from [11]. Additionally, MLLM-Only and DiT-Only variants of EndoCoT serve as internal baselines to isolate the contribution of joint training.
-
Generation budget / compute accounting. The test-time compute budget is measured by the number of reasoning steps τ — each step involves one MLLM forward pass (to update the thought state) plus one complete flow matching denoising trajectory (to generate the corresponding image). This differs from standard best-of-N or beam search budgets in LLM reasoning literature; here, "budget" directly controls reasoning depth rather than parallel sampling breadth. Inference time is reported in Fig. 6 and Fig. 7, decomposed into a base encoding overhead (~15.7 seconds, independent of τ) plus a per-step cost that scales roughly linearly with τ. For resolution scaling comparisons, execution time is measured across resolutions from 512×512 to 1024×1024 for EndoCoT at various τ values and for baseline methods. No cross-validation protocol is explicitly described; results appear to be reported on held-out test splits of the procedurally generated datasets.
Main Quantitative Results
Overall Performance Across Reasoning Tasks (Table 1)
The headline result: EndoCoT achieves an average accuracy of 92.1% across all benchmarks under task-specific training, outperforming the strongest baseline DiffThinker (83.8%) by 8.3 percentage points. On the most challenging task configurations — Maze-32, Sudoku-35, and VSP-Super-32 — EndoCoT achieves 90%, 95%, and 85% respectively, representing absolute improvements of 25, 40, and 5 percentage points over DiffThinker.
Task-specific training results (Table 1, "Task-Specific Training" section):
Maze: EndoCoT achieves 100%, 100%, and 90% on Maze-8, Maze-16, and Maze-32, compared to DiffThinker's 100%, 100%, and 65% — the gap widens dramatically with maze complexity. The zero-shot baselines (ThinkGen, ChronoEdit, Qwen3-VL-8B, Qwen-Image-Edit-2511) achieve 0% across all maze scales, establishing that some form of training is essential.
TSP: EndoCoT achieves 77%, 77%, and 73% on TSP-12, TSP-15, and TSP-18, compared to DiffThinker's 76%, 72%, and 59%. The improvement is modest on smaller instances but grows to 14 percentage points on TSP-18. The GRPO-trained Qwen3-VL-8B baseline achieves 0% across all TSP scales, suggesting that reinforcement learning alone is insufficient for this combinatorial optimization task.
Sudoku: EndoCoT achieves 100%, 100%, 95%, and 64% on Sudoku-35, Sudoku-40, Sudoku-45, and Sudoku-30 (reverse difficulty order reflects fewer clues = harder), compared to DiffThinker's 97%, 94%, 55%, and 13%. The gap on Sudoku-30 is particularly striking — 64% vs. 13% — indicating that EndoCoT's iterative reasoning provides substantial robustness as the number of given clues decreases.
VSP: EndoCoT achieves 100%, 100%, 100%, 99%, 100%, 99%, 99%, and 85% across the eight VSP configurations (VSP-3 through VSP-8 and VSP-Super 8/16/32), compared to DiffThinker's 100%, 100%, 100%, 98%, 100%, 100%, 99%, and 80%. Both models perform near-perfectly on standard VSP scales, with EndoCoT's advantage concentrated in the most challenging VSP-Super-32 setting (85% vs. 80%).
Unified training results (Table 1, "Unified Training" section): When a single model is trained on the combined dataset of all four tasks (Maze+TSP+Sudoku+VSP), EndoCoT achieves 84.2% average accuracy, compared to DiffThinker's 77.1% — a 7.1 percentage point advantage. However, unified training degrades EndoCoT's performance relative to task-specific training more sharply than it degrades DiffThinker's: EndoCoT drops from 92.1% to 84.2% (a 7.9 point decrease), while DiffThinker drops from 83.8% to 77.1% (a 6.7 point decrease). The most notable regression occurs on Maze-32, where EndoCoT falls from 90% (task-specific) to 52% (unified), suggesting that the iterative reasoning mechanism requires task-specific training to fully specialize its thought dynamics.
Zero-shot results (Table 1, "Zero-Shot" section): All zero-shot baselines fail comprehensively. Qwen3-VL-8B achieves at most 64% on VSP-3 (the simplest spatial planning task) but 0% on all maze, TSP, and Sudoku configurations. Qwen-Image-Edit-2511 without fine-tuning achieves 0% on Maze, TSP, and Sudoku, with at most 55% on VSP configurations. ThinkGen and ChronoEdit achieve between 0% and 1% on Maze and TSP, 0% on Sudoku, and between 4% and 60% on various VSP configurations (peaking at 60% for ChronoEdit on VSP-3). These numbers establish the baseline: without task-specific training incorporating iterative reasoning supervision, even powerful MLLMs cannot perform these visual reasoning tasks.
Inference-Time Scaling (Table 4, Figs. 6 and 7)
The central finding on scaling behavior: accuracy on complex mazes scales smoothly and substantially with the number of reasoning steps τ, demonstrating genuine test-time compute scaling for diffusion model reasoning.
On Maze-32 (Table 4): τ=2 achieves 11% accuracy with 45.26% path repetition; τ=5 achieves 27% with 63.90% repetition; τ=10 achieves 49% with 82.33% repetition; τ=20 achieves 74% with 96.47% repetition; τ=50 achieves 90% with 98.13% repetition. The path repetition rate provides corroborating evidence that the model is converging toward the optimal solution rather than randomly sampling different valid paths.
For comparison, DiffThinker achieves 97% on Maze-16 and 56% on Maze-32 (Table 4, "DiffThinker" row), with inference time of 15.72 seconds. EndoCoT at τ=20 surpasses DiffThinker on Maze-32 (74% vs. 56%) while requiring only modestly more inference time (19.27s vs. 15.72s). At τ=5, EndoCoT already achieves 94% on Maze-16, approaching DiffThinker's 97% but with the crucial advantage that EndoCoT's accuracy continues to improve with additional τ (reaching 100% at τ=20) while DiffThinker's accuracy saturates.
The accuracy-time tradeoff (Fig. 6) reveals that EndoCoT's inference time scales from approximately 16.0s at τ=2 to 24.8s at τ=50, with a base encoding overhead of approximately 15.7s that is independent of reasoning depth. The scaling is approximately log-linear: each doubling of τ yields diminishing but still positive accuracy gains. The paper does not report accuracy beyond τ=50, so the asymptotic behavior (whether accuracy would plateau at some τ > 50) remains uncharacterized.
Resolution scaling (Fig. 7): EndoCoT demonstrates favorable scaling properties as image resolution increases. At 512×512, EndoCoT with τ=50 takes approximately 25s, comparable to DiffThinker (~16s) and ThinkGen (~10s). At 1024×1024, EndoCoT with τ=50 takes approximately 45s, while DiffThinker and ChronoEdit take approximately 45–60s and ThinkGen takes approximately 110s. The key observation: EndoCoT's relative overhead compared to baselines decreases with resolution because the reasoning iterations primarily add MLLM forward passes (resolution-independent) rather than additional DiT denoising trajectories. EndoCoT with τ=100 at 1024×1024 takes approximately 90s, while ThinkGen at the same resolution takes ~110s with near-zero accuracy.
Generalization Under Distribution Shift (Fig. 1b, Fig. 11, Appendix D.3)
While the main benchmarks test within-distribution configurations (same generation algorithm, different random seeds), the paper provides qualitative evidence for out-of-distribution (OOD) generalization on the Sudoku task (Appendix D.3, Fig. 11). When tested on Sudoku puzzles with novel font styles not seen during training, EndoCoT consistently produces correct solutions while DiffThinker fails to generate valid grids. When tested at higher resolutions than training (960×960 and 1024×1024), EndoCoT correctly fills the 9×9 grid in the center of the image, while at lower resolutions, it can recover partially cropped correct answers — DiffThinker fails in both scenarios. The paper does not provide quantitative OOD accuracy numbers, relying on Fig. 11 for qualitative demonstration. This limits the strength of the generalization claim; quantitative metrics across multiple OOD test sets would substantially strengthen this result.
Image Editing Results (Fig. 9)
Beyond the primary reasoning benchmarks, the paper demonstrates EndoCoT's progressive editing capability on natural image editing tasks. Given step-by-step editing instructions (e.g., "add a stone lantern," then "add a deer," then "transform the deer into a sheep"), the model iteratively plans and executes each modification, with the reasoning depth τ controlling how many editing operations are carried out. Fig. 9 shows two examples: sequential object addition (lantern → deer) and object transformation (deer → sheep morphing). These results demonstrate that the iterative thought mechanism generalizes beyond structured reasoning tasks to open-ended visual manipulation, though no quantitative metrics (editing accuracy, user studies, consistency measures) are reported for this setting. The editing dataset construction (Appendix F) involves 10,000 unique scenes and 30,000 images generated using Gemini 2.5 for instruction generation and Qwen-Image-Edit-2511 for intermediate image rendering, with optional RIFE interpolation for temporal smoothness.
Ablation Studies and Robustness Checks
Semantic loss (Terminal Thought Grounding): Removing the auxiliary semantic alignment loss causes severe performance degradation on complex mazes, as shown in Table 2 ("w/o semantic loss"). On Maze-32, accuracy drops from 90% to 14%, and path repetition rate falls from 98.13% to 67.24%. On Maze-8 and Maze-16, the model retains some routing ability (39% and 42% accuracy respectively) but path repetition rates degrade significantly (93.44% and 92.23% vs. 100% for both with semantic loss). This confirms that purely visual supervision is insufficient to prevent latent thought state drift — without the semantic anchor, the model's reasoning trajectory wanders into regions of latent space that produce visually plausible but logically incorrect solutions. The finding that intermediate-complexity tasks (Maze-16) degrade less severely than high-complexity tasks (Maze-32) suggests that drift accumulates over longer reasoning horizons, making the grounding loss progressively more important as task complexity increases.
Implicit vs. explicit tokens: Replacing continuous latent thought states with explicit autoregressive text generation (where the MLLM must produce discrete intermediate reasoning steps as text tokens before generating each visual output) leads to catastrophic failure, as shown in Table 2 ("Explicit token"). Accuracy drops from 100% to 34% on Maze-8, from 100% to 8% on Maze-16, and from 90% to 0% on Maze-32. The path repetition rate collapses from 100% to 81.47% on Maze-8, 100% to 33.35% on Maze-16, and 98.13% to 0.08% on Maze-32. The paper provides a qualitative failure case showing the model degenerating into repetitive token loops ("Rencontre Rencontre Rencontre...") — a classic autoregressive error accumulation and mode collapse problem. This ablation is critical because it justifies the central design choice of continuous latent reasoning over the seemingly more interpretable alternative of explicit textual chain-of-thought.
Joint training necessity (MLLM-Only vs. DiT-Only): Table 3 demonstrates that neither component alone can support reasoning. The MLLM-Only variant (DiT weights frozen, only MLLM fine-tuned with LoRA) achieves 0% accuracy on all maze scales, with path repetition rates of 0.00%, 0.62%, and 0.20% on Maze-8/16/32 — essentially random behavior. This is a striking finding because the MLLM should be capable of reasoning about maze paths in the abstract (as evidenced by text-only LLMs solving similar puzzles), but that reasoning capability cannot be translated into correct visual outputs without co-adapting the DiT. The DiT-Only variant (MLLM frozen, only DiT fine-tuned) achieves 57%, 43%, and 18% on Maze-8/16/32 — substantially better than MLLM-Only but far below joint training (100%, 100%, 90%). The DiT appears to learn some spatial grounding improvements, but without the MLLM learning to produce more informative thought representations, the gains are limited and degrade sharply with task complexity. Qualitatively (Fig. 8), the MLLM-Only baseline produces "erratic and wandering paths" that understand basic maze topology but lack global coherence, frequently becoming trapped in dead ends.
Two-stage vs. single-stage training: Appendix D.1 (Table 6) compares single-stage training (all reasoning steps supervised throughout, equivalent to only Stage 1) against the full two-stage progressive strategy. On Maze-32, single-stage training achieves only 14% accuracy with 90.34% path repetition, while two-stage training achieves 90% accuracy with 98.13% path repetition. Interestingly, single-stage training achieves comparable path repetition on Maze-16 (91.34% vs. two-stage's 100%) but substantially lower accuracy (42% vs. 100%), suggesting that single-stage training produces paths that partially overlap with the ground truth but violate constraints at key decision points. This validates the paper's claim of gradient conflict: optimizing all steps simultaneously degrades the final output quality.
Terminal consolidation training duration: Appendix D.2 (Fig. 10) shows that excessive Stage 2 training (beyond the recommended short-cycle fine-tuning) causes intermediate reasoning steps to become sparse. Checkpoints trained with more Stage 2 iterations, when evaluated with a fixed reasoning budget τ, exhibit inference behavior that converges more rapidly toward the target state, effectively skipping intermediate reasoning visualization. This suggests a delicate balance: Stage 2 is necessary for final output quality, but too much Stage 2 causes the model to "shortcut" the reasoning process. The paper does not quantify the optimal Stage 2 iteration count or report sensitivity to this hyperparameter across tasks.
LoRA rank and target module configuration: The paper uses LoRA rank 32 applied to specific attention and FFN modules in both the DiT and text encoder (detailed in Appendix E, Table 7). No ablation over LoRA rank (e.g., rank 8, 16, 64) or alternative target module configurations is reported. The learning rate (1 × 10^-4) and training epochs (5) are fixed without sensitivity analysis. This is a standard but untuned configuration; the robustness of results to these hyperparameters is unknown.
Semantic supervision density: Appendix E.3 reports an empirical finding without an accompanying ablation table: "applying semantic loss to intermediate steps can disrupt the synergy between the DiT rendering capability and the MLLM's understanding," leading to inferior performance compared to sparse (terminal-only) semantic supervision. This finding is critical because it reveals a non-obvious interaction between the alignment loss and the co-adaptation dynamics — too much grounding constrains the latent trajectory and prevents the model from developing its own effective intermediate representations. However, quantitative results for different semantic supervision densities (e.g., semantic loss at every step, every other step, only the final step) are not provided, leaving the precise relationship between supervision sparsity and performance uncharacterized.
Number of latent tokens dependency: Appendix E.3 notes that "the number of latent tokens required to solve a puzzle is determined not only by the algorithmic complexity of the task, but also by its visual complexity." This suggests that tasks with more intricate visual structure need more reasoning steps even if the underlying algorithm is simple. No quantitative experiments vary visual complexity independently of algorithmic complexity to isolate this effect.
Fine-grained vs. coarse step supervision: Appendix E.3 reports that "fine-grained intermediate step supervision is necessary for the model to learn latent reasoning processes," noting that the number of reasoning steps performed during inference is typically much smaller than the number of steps supervised during training. However, no ablation varies the granularity of training supervision (e.g., training with 10 vs. 50 vs. 100 supervised intermediate steps) and measures the effect on inference-time scaling behavior.
Critical Assessment
Does EndoCoT genuinely perform chain-of-thought reasoning, or does it learn a more robust form of pattern matching that degrades more gracefully under distribution shift?
The paper's central claim is that EndoCoT enables "genuine chain-of-thought reasoning" (title and Section 1), contrasting with DiffThinker's "fragile pattern matching." The primary evidence for this claim is: (1) the smooth inference-time scaling curve (Table 4) suggesting progressive refinement rather than early commitment; (2) the intermediate reasoning visualizations in Fig. 5 and Fig. 1c showing interpretable step-by-step solution construction; and (3) the generalization to novel fonts and resolutions on Sudoku (Fig. 11).
However, the evidence is more nuanced than the strong claim suggests. The scaling curve (Table 4) shows that accuracy improves from 11% to 90% on Maze-32 as τ increases, which is consistent with iterative refinement. But this could also be explained by the model learning that higher τ correlates with more constrained outputs — effectively using τ as a "precision knob" that increases probability mass on correct solutions without the model actually performing internal logical deduction. The path repetition rate improves in parallel with accuracy, which is consistent with either genuine reasoning or learned calibration. A stronger test would be to evaluate whether intermediate states at early τ values are partially correct in systematic ways (e.g., paths that are correct for the first few segments before diverging) rather than randomly wrong — the paper's qualitative figures suggest this is the case, but no quantitative metric for "partial correctness" or "constraint violation rate" is reported.
The OOD generalization evidence (Fig. 11) is qualitative only. Without quantitative accuracy numbers for multiple OOD test sets (novel fonts, resolutions, maze generation algorithms, TSP city distributions), it is impossible to distinguish between "generalizes to minor visual variations" (a robustness property that pattern matchers can exhibit) and "generalizes to novel problem structures" (a reasoning property). The Sudoku font generalization is a visual robustness test, not a reasoning generalization test — the underlying Sudoku rules are identical, only the glyph rendering changes. Maze size generalization (tested at 32×32 when trained on up to 32×32, as the dataset statistics in Appendix B suggest) is an algorithmic generalization test only if the model was trained on smaller mazes and evaluated on larger ones — the paper does not clarify the training-evaluation split along size dimensions for the generalization experiments.
The progressive editing results (Fig. 9) are compelling but entirely qualitative and on a dataset of only 10,000 scenes (Appendix F). No metrics — editing accuracy, instruction adherence, user preference scores, or coherence measures — are reported for this setting. This limits the strength of the claim that EndoCoT unifies reasoning and generation in a general way beyond the structured benchmarks.
Does joint MLLM-DiT training specifically enable reasoning, or does it simply provide more capacity for the task?
The MLLM-Only vs. DiT-Only vs. joint training ablation (Table 3) demonstrates that both components must be fine-tuned for the system to work. However, this does not necessarily prove that the iterative thought mechanism is what enables reasoning — it could be that any form of additional capacity (e.g., fine-tuning more layers, using a larger LoRA rank, training for more epochs) would achieve similar gains. The paper does not include a control that provides equivalent additional capacity without the recurrent structure — for example, an ablative variant that fine-tunes both MLLM and DiT but only uses a single reasoning step (τ=1) with the same total parameter budget. If such a variant achieved comparable performance to multi-step EndoCoT, the iterative mechanism would be unnecessary; if it failed, the recurrent structure would be validated as essential.
The single-stage vs. two-stage training ablation (Table 6) partially addresses this: single-stage training (which still uses the full multi-step architecture but optimizes all steps equally) achieves only 14% on Maze-32 vs. 90% for two-stage. This suggests that the training strategy matters beyond just the architectural capacity. But it still does not isolate whether the recurrence itself is necessary or whether the two-stage strategy applied to a non-recurrent architecture could work.
Is the semantic grounding loss essential for reasoning per se, or only for maintaining long-horizon trajectory stability?
The ablation in Table 2 shows that removing the semantic loss causes severe accuracy degradation, particularly on Maze-32 (90% → 14%). This demonstrates that the loss is important, but the paper's interpretation — that it prevents "latent reasoning drift" and ensures "semantic grounding" — is one of several possible explanations. An alternative explanation: the semantic loss provides additional training signal (more supervision per sample), and its removal simply reduces the effective training data for the MLLM component. If the performance drop is due to reduced supervision rather than loss of semantic grounding specifically, then any auxiliary loss providing equivalent information content (even a purely visual one) might recover performance.
A convincing ablation would be: replace the semantic loss with an alternative auxiliary objective that provides equivalent information content without explicit textual grounding (e.g., an additional visual reconstruction loss, a contrastive loss between thought states, or a learned prior on the thought state distribution). If this alternative matched the semantic loss's performance, the grounding interpretation would be weakened; if it failed, the interpretation would be strengthened. This ablation is absent.
How robust are the results to dataset construction choices?
All training data is procedurally generated using specific algorithms (DFS for mazes, Held-Karp for TSP, backtracking for Sudoku, Dijkstra for VSP). The intermediate supervision targets (ground-truth intermediate images) are derived from the step-by-step execution trace of these algorithms. This means the model is learning to mimic the behavior of specific solvers, not learning to reason from first principles. If trained on mazes generated with a different algorithm (e.g., Prim's algorithm instead of DFS) and tested on DFS mazes, would EndoCoT transfer? If trained on optimal TSP solutions from one solver and tested on instances where the optimal tour differs due to tie-breaking, would it produce any valid tour? These tests are not performed.
The reliance on algorithmic decomposition for intermediate supervision is both a strength (provides clean training signal) and a limitation (the model may overfit to the specific solution trajectory of the training algorithm rather than learning general reasoning principles). The paper's claim of "chain-of-thought reasoning" would be substantially stronger if the model demonstrated the ability to recover from erroneous intermediate steps (e.g., initially heading in a wrong direction in a maze and then backtracking), rather than always following the optimal trajectory from the training solver. The paper does not test this.
Statistical rigor and reproducibility.
The paper does not report confidence intervals, error bars, or standard deviations for any results. The test set sizes for the reasoning benchmarks are not explicitly stated (the 182.4K figure in Appendix B includes training data; test splits are unspecified). Without knowing test set sizes, it is impossible to assess whether the reported accuracy differences (e.g., 92.1% vs. 83.8% average) are statistically significant or could arise from test set variance. For tasks with near-perfect accuracy (100% on Maze-8, Maze-16, VSP at smaller scales), ceiling effects mask any potential differences between methods.
The training hyperparameters (LoRA rank 32, learning rate 1 × 10^-4, 5 epochs, λ_align = 1) are fixed without sensitivity analysis. The progressive training strategy involves a "short-cycle fine-tuning" for Stage 2 with unspecified iteration count — different choices could yield different results. The optimal number of reasoning steps τ is manually tuned per task (Appendix E.3 notes this as a limitation) without automated selection criteria.
Missing baselines and experiments.
Several experiments would have strengthened the paper's claims:
- τ=0 baseline: What accuracy does a single-pass fine-tuned model achieve? This would isolate whether the gains come from the fine-tuning itself (separate from the iterative mechanism).
- Ensemble baseline: Does generating N independent solutions (using standard best-of-N with the same base model) and selecting the best achieve comparable accuracy to N-step reasoning? This would test whether the iterative mechanism provides gains beyond simple parallel sampling.
- Scaling to larger τ: The paper tests up to τ=50 on Maze-32. Does accuracy plateau at some τ, or does it approach 100%? The scaling curve's asymptote would reveal whether the iterative mechanism has fundamental limits.
- Cross-task transfer: The unified training results (84.2% average) show EndoCoT outperforms DiffThinker (77.1%) but degrades more from task-specific training. Training on three tasks and testing on the fourth would measure reasoning transfer more cleanly than joint training with evaluation on all tasks.
- Computational cost parity: The inference-time scaling comparison (Table 4) reports time but not FLOPs. A FLOPs-matched comparison between EndoCoT at high τ and DiffThinker (or other baselines) at their maximum budget would clarify whether the accuracy gains are simply buying more computation.
Conditional scope of claims.
The paper's claims hold most strongly under the following conditions:
- Task-specific training with algorithmic intermediate supervision: All strong results (92.1% average) use separate models trained on individual tasks with ground-truth intermediate steps derived from known optimal solvers. The unified training results are substantially weaker (84.2%), and no zero-shot or few-shot reasoning is demonstrated.
- Procedurally generated data with known optimal solutions: The method requires explicit intermediate supervision targets for each reasoning step, which presumes access to a solver that can produce step-by-step solution traces. For real-world tasks without algorithmic solvers, creating this supervision would be difficult or impossible.
- Tasks with clear sequential decomposition: The evaluated tasks (maze paths, tour construction, grid filling, spatial planning) naturally decompose into sequential steps. The method's applicability to tasks without obvious step structure (e.g., "generate an image that satisfies a complex global constraint") is untested.
- Fixed reasoning depth at inference: The number of reasoning steps τ is manually specified and uniform across all test instances. The method does not learn to adaptively determine when reasoning is complete — it runs for exactly τ steps regardless of whether the solution is found earlier or requires more steps.
The paper acknowledges some of these limitations in Section 6, noting that "our approach currently requires manual tuning for the optimal number of reasoning steps and relies on high-quality datasets with explicit intermediate supervision." This candor is appropriate, but it means that the broader framing of EndoCoT as enabling "genuine chain-of-thought reasoning" should be understood as applying specifically to settings where step-by-step solution traces are available and tasks have inherent sequential structure. The leap to general visual reasoning remains aspirational rather than demonstrated.
6. Limitations and Trade-offs
6.1 Manual Tuning of Reasoning Depth – No Adaptive Stopping or Difficulty-Aware Allocation
The assumption or constraint. EndoCoT requires a manually specified, fixed number of reasoning steps τ for all test instances within a task. The paper explicitly acknowledges this in Section 6: "our approach currently requires manual tuning for the optimal number of reasoning steps." The inference-time scaling results (Table 4) demonstrate that performance varies dramatically with τ — from 11% accuracy at τ=2 to 90% at τ=50 on Maze-32 — meaning this parameter is not just a minor tuning knob but a primary determinant of success. Yet the paper provides no mechanism for selecting τ automatically, no criterion for determining when reasoning is "done," and no adaptive allocation that varies τ per instance based on estimated difficulty.
The consequence. In practice, a deployer faces a painful tradeoff with no principled resolution. Choose a low τ to minimize inference cost, and difficult instances will fail — the model has no way to recognize it needs more reasoning and request additional steps. Choose a high τ to ensure difficult instances succeed, and easy instances waste substantial computation — the model runs the full reasoning chain regardless of whether the solution was found at step 3 or step 30. The inference-time scaling results (Fig. 6) show that τ=50 consumes ~25 seconds while τ=2 consumes ~16 seconds — a ~56% latency increase. If 80% of instances could be solved at τ=5 (~16.5s), forcing τ=50 on all instances wastes ~8.5 seconds per inference with no accuracy benefit on those easy cases. Conversely, if τ is set too low for the task distribution, the system silently produces incorrect answers without any confidence signal or fallback mechanism.
This is a more consequential gap than typical hyperparameter tuning issues because τ controls a fundamental capability spectrum — it is not merely about finding a "best" value but about the fact that the optimal value is instance-dependent. The difficulty range within a single benchmark is substantial (Maze-32 accuracy spans 11%–90% across τ values), and real-world task distributions would exhibit even wider difficulty variation.
What evidence exists in the paper. Table 4 and Fig. 6 provide the direct evidence for τ-dependent performance. The smooth scaling curve from τ=2 to τ=50 demonstrates that τ meaningfully controls reasoning quality — it is not a saturating parameter with diminishing returns after a small value. The paper provides no experiment testing adaptive τ, no confidence estimation mechanism that could be thresholded, and no analysis of how many instances are "solved" at early τ values (e.g., what fraction of Maze-32 instances are correct at τ=10 but unchanged at τ=20?).
Mitigation status. The paper explicitly defers this to future work in Section 6: "Future work will focus on adaptive mechanisms for automatic reasoning depth control." No partial solution is proposed, evaluated, or discussed. This is a clean acknowledgment but means the method as presented is not deployable in cost-sensitive or latency-sensitive settings without manual per-task calibration using a held-out validation set — and even then, the fixed-τ regime leaves substantial efficiency on the table compared to an oracle that could stop early on solved instances.
6.2 Dependency on Algorithmic Intermediate Supervision – Requires Ground-Truth Step-by-Step Solution Traces
The assumption or constraint. EndoCoT's training pipeline requires explicit ground-truth intermediate targets I*_τ for each reasoning step, obtained through "sequential ground-truth decomposition" of tasks using known optimal solvers. Section 4.2.1 states this directly: "The intermediate targets I*_τ can be obtained through sequential ground-truth decomposition (e.g., partial path segments for mazes)." The dataset construction (Appendix B) describes generating these targets by executing specific algorithms — DFS followed by BFS for mazes, the Held-Karp dynamic programming algorithm for TSP, backtracking for Sudoku, and Dijkstra's algorithm for VSP — and recording the step-by-step execution trace. The terminal thought grounding mechanism (Section 4.2.2) additionally requires the ground-truth textual reasoning sequence P_gt (e.g., the explicit direction string "DDLUULUL..." for mazes) to compute the reference thought state h_ref.
The consequence. This assumption limits EndoCoT's applicability to tasks where three conditions simultaneously hold: (1) the task has a clear sequential decomposition into meaningful intermediate steps; (2) an optimal solver exists that can produce step-by-step solution traces; (3) the solver's solution trajectory provides useful supervision for the model. For many real-world visual reasoning problems — e.g., "generate an architectural floor plan that satisfies building codes," "design a circuit layout meeting timing constraints," or "produce a visually appealing composition following aesthetic principles" — at least one of these conditions fails. There may be no algorithmic decomposition into clean sequential steps, no known optimal solver (the problem may be ill-posed or rely on subjective judgment), or the solver's trajectory may not correspond to a cognitively meaningful reasoning process.
Even when solvers exist, the dependency introduces a distributional concern: the model learns to mimic the specific solution trajectory of the training algorithm, not to reason about the underlying constraints. If the DFS solver always explores the maze in a particular spatial order (e.g., prefers right branches over left), the model will learn that spatial bias as part of "correct reasoning." When deployed on instances where the optimal path has a different spatial structure, the model may fail not because it cannot solve mazes but because it cannot produce paths that diverge from the training algorithm's exploration bias. The paper's generalization tests (novel maze sizes, Sudoku fonts) do not vary the solution trajectory generator — all training and test data use the same solver algorithms — so this failure mode is not tested.
The paper also acknowledges this in Section 6: the approach "relies on high-quality datasets with explicit intermediate supervision." This is framed as a current limitation, but the paper does not discuss how severe the constraint is or whether semi-supervised, self-supervised, or reinforcement learning-based alternatives could relax it.
What evidence exists in the paper. The dataset construction is detailed in Appendix B with pseudocode in Fig. 14, confirming the use of specific algorithmic solvers. The experimental results (Table 1) demonstrate strong performance under this supervised regime but provide no evidence about what happens when intermediate supervision is unavailable, coarser, or from a different solver. The paper's own ablation (Table 2, "w/o semantic loss") shows that removing even the terminal textual grounding alone causes severe degradation — suggesting that the supervision requirements are not incidental but essential to the method's functioning. There is no experiment testing training with only final-answer supervision (τ=1 equivalent) or with synthetic/approximate intermediate targets.
Mitigation status. The paper acknowledges the limitation in Section 6 but does not propose or evaluate any relaxation. The suggestion of "extending the framework to broader general-purpose tasks" is stated as future work without specifying how the intermediate supervision bottleneck would be addressed. No experiments explore training with weaker supervision (e.g., only final-answer labels, only sparse intermediate labels, or automatically discovered subgoals), leaving the method's robustness to supervision quality entirely uncharacterized.
6.3 Single Base Model Architecture – All Results on Qwen-Image-Edit-2511 with No Cross-Architecture Validation
The assumption or constraint. All experiments in the paper use Qwen-Image-Edit-2511 as the base model. The layer-wise sensitivity analysis (Section 3, Fig. 2a) that motivates the design — showing peak sensitivity at the MLLM-DiT junction — is architecture-specific. The LoRA target modules and rank configuration (Appendix E, Table 7) are tailored to this model's specific attention and FFN structures. The claim that reasoning emerges from "synergistic coupling of the multimodal text encoder and the DiT backbone" (Section 6) is based entirely on experiments with one specific coupling architecture.
The consequence. The paper's central claims — that iterative latent state refinement enables chain-of-thought reasoning in diffusion models, that joint MLLM-DiT training is necessary, that the two-stage progressive strategy resolves gradient conflicts — may be specific to the Qwen-Image-Edit architecture rather than general properties of diffusion models. Several architectural factors could be critical: Qwen-Image-Edit uses an MMDiT (Multimodal Diffusion Transformer) with specific cross-attention patterns between text and image modalities, the MLLM is a particular version of Qwen-VL with specific pretraining data and capabilities, and the flow matching framework uses a specific conditioning injection mechanism. A different architecture — e.g., one using a CLIP-based text encoder with a U-Net denoiser, or a next-token autoregressive visual generator — might not exhibit the same sensitivity pattern at the text-encoder/decoder junction, and the recurrent thought state update mechanism might not transfer because the conditioning pathway is architecturally different.
Even within similar MLLM-integrated diffusion models, the paper provides no evidence about how the choice of base MLLM affects results. Qwen-Image-Edit uses a specific Qwen-VL variant; would EndoCoT work with FLUX.2's T5-based encoder, with InternVL, or with a smaller vision-language model? The MLLM-Only ablation (Table 3) showing 0% accuracy when the DiT is frozen suggests that the DiT's architecture matters substantially — different DiT designs might co-adapt differently with the MLLM, and the specific LoRA target modules (attention projections, FFN layers in specific positions) might not have direct analogs in other architectures.
What evidence exists in the paper. The entire experimental section (Section 5, Tables 1–4, Figs. 5–11) uses Qwen-Image-Edit-2511. The paper does not compare against or adapt to any other base diffusion model. The ablation studies (Tables 2–3, Table 6) vary training configurations but never vary the base architecture. The paper does not discuss whether the findings depend on Qwen-Image-Edit's specific MMDiT design, its particular MLLM integration, or its flow matching framework. No experiments test a different MLLM (e.g., replacing the text encoder while keeping the DiT) or a different DiT architecture (e.g., a U-Net-based diffusion model with iterative conditioning).
Mitigation status. Not addressed. The paper does not claim generalizability to other architectures, which is appropriate — the results are presented as specific to the tested model. However, the framing in the introduction and conclusion uses general language ("diffusion models," "a novel framework that enables diffusion models to perform endogenous Chain-of-Thought reasoning") that implies broader applicability. The discrepancy between the general framing and the single-architecture evaluation means readers should treat the findings as proven for Qwen-Image-Edit-2511 but unverified for other diffusion model architectures until replication studies are conducted.
6.4 Hard Problem Performance Gap – Accuracy Drops Sharply with Task Complexity Despite Iterative Reasoning
The assumption or constraint. EndoCoT substantially outperforms baselines on the most challenging task configurations, but the absolute performance still degrades significantly as complexity increases. Several key numbers from Table 1: on TSP, accuracy drops from 77% (12 cities) to 73% (18 cities) — a modest decline that still leaves ~27% of hard TSP instances unsolved. On Sudoku, accuracy drops from 100% (35 given cells, easiest) to 95% (40 cells) to 64% (30 cells, hardest) — a 36-point gap between the easiest and hardest configurations. On Maze, accuracy drops from 100% (8×8 and 16×16) to 90% (32×32). On VSP-Super, accuracy reaches only 85% at scale 32.
The scaling behavior with τ (Table 4) shows improvement but does not approach 100%: at τ=50 on Maze-32, accuracy plateaus at 90% with 98.13% path repetition. The paper does not test τ > 50, so it is unknown whether additional reasoning steps would close the remaining 10% gap or whether a fundamental accuracy ceiling exists. The path repetition rate of 98.13% means that on ~2% of the path segments, the model still diverges from the optimal solution — this divergence could represent minor local variations or complete path failures on a small fraction of mazes.
The consequence. The paper positions EndoCoT as enabling "genuine chain-of-thought reasoning" that addresses the "fragile pattern matching" of prior work (Section 1). However, the residual error on hard instances suggests that EndoCoT has its own brittleness boundary, just at a higher complexity threshold than baselines. The ~10% failure rate on Maze-32 and ~36% failure rate on hard Sudoku means the model is not reliably solving these problems — it is failing on a non-trivial fraction of instances. For applications where correctness is critical (e.g., automated puzzle verification, educational tools, logical constraint enforcement in design), a 10–36% error rate is likely unacceptable without human verification or a confidence estimation mechanism.
The uncharacterized behavior at high τ is also a practical concern. Does the 90% accuracy at τ=50 on Maze-32 represent a true asymptote (no amount of additional reasoning helps because the MLLM fundamentally cannot encode solutions for the hardest mazes) or is it still improving slowly? Without testing beyond τ=50, a deployer cannot determine whether investing in more inference compute (e.g., τ=100, τ=200) would push accuracy toward 99% or whether the remaining errors are systematic and irreducible. The ~25-second inference time at τ=50 already represents a substantial latency; whether doubling that cost yields proportional gains is unknown.
What evidence exists in the paper. Table 1 provides the accuracy breakdown by task complexity. Table 4 provides the scaling curve only up to τ=50 on Maze. Fig. 6 shows inference time scaling but not accuracy beyond τ=50. The paper does not analyze the characteristics of failure cases — are the remaining errors on Maze-32 concentrated in mazes with particular topological properties (e.g., long winding paths, multiple near-optimal alternatives, deceptive local choices)? Are the Sudoku failures on puzzles where the constraint propagation chain is exceptionally long? Without error analysis, it is unclear whether the remaining failures are "hard for everyone" (genuinely difficult instances that stress the MLLM's reasoning capacity) or "hard in a way that reveals a specific weakness" (e.g., the model systematically fails when backtracking is required).
Mitigation status. Not addressed as a limitation. The paper presents the 90% Maze-32 and 95% Sudoku-35 numbers as successes (which they are, relative to baselines' 65% and 55%) but does not discuss the residual error rate, its implications for practical deployment, or potential strategies for closing the gap. The inference-time scaling experiment stops at τ=50 without characterizing asymptotic behavior. The acknowledgment that "manual tuning for the optimal number of reasoning steps" is required (Section 6) is related but not equivalent — it acknowledges the tuning burden but not the possibility that even optimally tuned τ may leave a non-trivial error rate.
6.5 Cost of Difficulty Estimation and Missing Efficiency Accounting for the Full Inference Pipeline
The assumption or constraint. The paper's headline efficiency claims — specifically the inference-time scaling advantage (Table 4) and resolution scaling advantage (Fig. 7) — report inference time measured from the start of the reasoning loop to the final output. This accounting includes the MLLM forward passes (to update thought states) and the DiT denoising trajectories (to generate images at each reasoning step). However, it excludes the base encoding overhead of approximately 15.7 seconds that the paper itself reports in Fig. 6, which is described as independent of τ. This overhead is substantial: at τ=5 on Maze-32, the total time is ~16.5 seconds, meaning the actual reasoning computation (τ-dependent portion) is only ~0.8 seconds — over 95% of the inference time is overhead. At τ=50, the overhead still represents ~63% of total time (15.7/24.8).
Furthermore, the comparison against baselines (Fig. 7) reports execution time for EndoCoT at various τ values against DiffThinker, ChronoEdit, and ThinkGen at different resolutions, but does not clarify what is included in these times. If the baselines do not incur a comparable encoding overhead (e.g., if they use a smaller text encoder or reuse embeddings across samples), the time comparison may be systematically favorable to EndoCoT on a per-sample basis but unfair on an absolute output quality basis. A deployer who cares about throughput would need to know: for a target accuracy of 90% on Maze-32, what is the total wall-clock time per instance for EndoCoT vs. the best baseline configuration that can approach that accuracy? This comparison is not provided.
The consequence. The inference-time scaling law presented in Fig. 6 — showing accuracy improving as inference time increases from ~16s to ~25s — is misleading as a portrayal of computational efficiency because the x-axis is dominated by a fixed cost. A deployment that processes many instances would pay this 15.7-second overhead on every instance regardless of τ. If the overhead could be reduced (e.g., by caching prefix embeddings for repeated prompts, using a smaller MLLM encoder, or optimizing the vision encoder), the τ-dependent cost would become the dominant factor, and the scaling relationship might look very different. The paper provides no guidance on how to reduce this overhead or whether it is intrinsic to the method.
The comparison against baselines at high resolution (Fig. 7, 1024×1024) shows EndoCoT at τ=50 (~45 seconds) compared to ThinkGen (~110 seconds) and DiffThinker/ChronoEdit (~45–60 seconds). But ThinkGen achieves 0% accuracy on Maze and Sudoku — the time comparison is meaningless if the outputs are incorrect. DiffThinker achieves moderate accuracy on some tasks (65% on Maze-32) but takes comparable time to EndoCoT at τ=50, which achieves 90% — a favorable tradeoff. However, without an accuracy-matched time comparison (how long does EndoCoT take to achieve DiffThinker's 65% accuracy? How long does DiffThinker take to approach EndoCoT's 90%, if it can?), the Fig. 7 comparison overstates EndoCoT's advantage by mixing accuracy and time on separate axes in a way that obscures the accuracy-cost Pareto frontier.
What evidence exists in the paper. Fig. 6 explicitly shows the ~15.7s base encoding overhead with a dashed line labeled "Base Encoding Overhead." Table 4 reports inference times for EndoCoT at various τ values and for DiffThinker (15.72s). Fig. 7 reports execution time across resolutions but does not decompose overhead vs. per-step cost or specify what baseline times include. The paper's resolution scaling argument ("our approach does not require repeating the computationally expensive DiT denoising steps") is technically correct for the MLLM component but does not address the encoding overhead that scales with prompt/image complexity regardless of τ.
Mitigation status. The paper does not discuss the base encoding overhead in the main text or propose strategies for reducing it. The acknowledgment that the method "requires manual tuning for the optimal number of reasoning steps" (Section 6) touches on efficiency indirectly but does not address the overhead problem. Future work on reducing encoding cost (e.g., through lightweight prefix encoders, amortized inference across instances sharing the same prompt structure, or adaptive early stopping that avoids generating unnecessary intermediate images) is not suggested.
6.6 OOD Generalization Evidence Is Qualitative and Insufficient to Support Strong Generalization Claims
The assumption or constraint. The paper claims that EndoCoT demonstrates stronger generalization than baselines, supported by Fig. 1(b) (novel maze sizes and Sudoku fonts compared to DiffThinker) and Appendix D.3, Fig. 11 (Sudoku generalization across fonts and resolutions). These figures show qualitative examples — side-by-side comparisons of a few images — without quantitative metrics. The main benchmark results (Table 1) test within-distribution configurations: training and testing use the same procedural generation algorithms (DFS for mazes, Held-Karp for TSP, backtracking for Sudoku, Dijkstra for VSP) with different random seeds. This measures generalization to novel instances of the same distribution, not generalization to novel distributions.
The consequence. The distinction between "generalizes to new random seeds" and "generalizes to new problem structures" is critical for assessing whether the method has learned reasoning or robust pattern matching. The paper's central claim — that EndoCoT enables "genuine chain-of-thought reasoning" while DiffThinker does "fragile pattern matching" — hinges partly on the generalization evidence. But the evidence for generalization beyond the training distribution is only qualitative and covers a small number of hand-picked examples. A practitioner cannot determine from the paper whether:
- EndoCoT generalizes to mazes generated with a different algorithm (e.g., Prim's vs. DFS), which would produce mazes with different topological properties (different branching patterns, different typical path lengths).
- EndoCoT generalizes to TSP instances where cities are distributed differently (e.g., clustered vs. uniform random), which changes the combinatorial structure of optimal tours.
- EndoCoT generalizes to Sudoku puzzles with different clue patterns or from different difficulty rating systems.
- The visual generalization to novel fonts (Fig. 11) is robust across many font styles or only for the specific fonts shown. Font variation is a visual robustness test, not a reasoning generalization test — the underlying Sudoku logic is identical regardless of how the digits are rendered.
The qualitative nature of the evidence also raises a selection concern: the paper shows examples where EndoCoT succeeds and baselines fail, but does not characterize failure cases where EndoCoT also breaks down under distribution shift. Without quantitative OOD test results (accuracy percentage on a systematic OOD test set), the generalization claim is supported by anecdote rather than measurement.
What evidence exists in the paper. Fig. 1(b) shows two qualitative comparisons: one maze size generalization example and one Sudoku font generalization example. Appendix D.3, Fig. 11 shows a 3×3 grid of qualitative comparisons for Sudoku (three OOD conditions: different fonts, high resolution, low resolution), with one example per cell. No sample sizes, accuracy numbers, or statistical tests are provided. The main experiments (Table 1) report accuracy on test splits drawn from the same procedural generation algorithms as training. The unified training results (Table 1) partially test cross-task generalization (training on all tasks, evaluating on each), but this still uses the same generation algorithms — it tests whether a single model can handle multiple task types, not whether the learned reasoning transfers to novel algorithmic distributions.
Mitigation status. Not addressed. The paper does not discuss the limitations of qualitative OOD evaluation or acknowledge the gap between "generalizes to new instances from the same distribution" and "generalizes to new distributions." No quantitative OOD benchmark is proposed or evaluated. This is a significant gap because the paper's strongest rhetorical claim — that EndoCoT represents "genuine" reasoning while prior work is "fragile pattern matching" — requires evidence of systematic generalization that is not provided. Future work on "extending the framework to broader general-purpose tasks" (Section 6) could incorporate proper OOD evaluation, but the current paper does not establish the generalization baseline.
7. Implications and Future Directions
How This Work Changes the Landscape
This paper does not introduce a new architecture or a new diffusion model — it introduces a new mode of operation for diffusion models that fundamentally redefines what "reasoning" means in the context of visual generation. Prior to EndoCoT, the field operated under an implicit assumption: reasoning, if it happened at all, was a preprocessing step separated from generation. The MLLM text encoder was a black box that produced conditioning embeddings in a single forward pass; the DiT was a renderer that consumed those embeddings. EndoCoT demonstrates that this separation is not merely suboptimal — it is the root cause of systematic reasoning failures. The paper's central reframing — that reasoning and generation should be endogenous, interleaved processes rather than sequential stages — represents a conceptual shift in how multimodal generative models should be designed for tasks requiring logical coherence.
The magnitude of this shift can be calibrated by what the paper overturns. The finding that a frozen MLLM, no matter how powerful, achieves 0% accuracy on maze solving (Table 3, MLLM-Only) directly contradicts the modularity assumption that underlies virtually all MLLM-integrated diffusion architectures. If this result generalizes — and the paper provides mechanistic evidence through the layer-wise sensitivity analysis (Fig. 2a) and cross-attention entropy analysis (Fig. 2c) that it should — then the entire paradigm of "drop in a better MLLM encoder and generation improves" is insufficient for reasoning tasks. This is a negative result with positive implications: it tells the field where not to invest effort (bigger frozen encoders) and where to invest instead (co-adapted encoder-decoder pairs with iterative coupling). Negative results that disprove convenient assumptions often redirect more research energy than positive results that confirm them.
The paper resolves a specific contradiction that had been accumulating in the literature. Prior work on reasoning in diffusion models showed conflicting patterns: DiffThinker achieved strong in-distribution results but collapsed under distribution shift (Fig. 1b), video-prior approaches like ChronoEdit showed temporal coherence on some tasks but failed completely on others (Table 1, zero-shot), and explicit reasoning injection improved metrics on benchmarks but produced solutions that committed to their final structure in early denoising steps (Fig. 1c). These results were individually puzzling — different methods failing in different ways on different tasks — and the field lacked a unifying explanation. EndoCoT's two-bottleneck diagnosis (Section 3) provides that explanation: DiffThinker addresses Bottleneck 1 (insufficient reasoning depth) through explicit reasoning injection but ignores Bottleneck 2 (static-guidance failure), which is why it commits early and fails on complex topologies. Video-prior approaches partially address Bottleneck 2 through temporal smoothness but have no mechanism for logical constraint enforcement (Bottleneck 1), which is why they fail on discrete tasks. Zero-shot MLLM prompting fails at both bottlenecks simultaneously. The paper does not merely outperform these prior methods — it provides a diagnostic vocabulary (single-step reasoning depth, static-guidance failure, cross-attention entropy as a metric) that explains why they failed and when they will fail, enabling future researchers to design experiments with appropriate controls and to predict failure modes before running expensive benchmarks.
The conceptual unification of reasoning and generation also opens a new design space. Prior to this work, "reasoning" and "generation" were distinct research sub-problems in multimodal AI, addressed by different communities with different methods. The text-based reasoning community developed Chain-of-Thought, tree search, and latent reasoning techniques for LLMs; the visual generation community developed diffusion models, flow matching, and DiT architectures. EndoCoT demonstrates that these can be unified: the same recurrent latent state update that performs reasoning simultaneously conditions visual generation, and the visual output from one reasoning step feeds back into the next. This is not just a technical integration — it suggests that visual generation can be a reasoning medium in its own right, not merely a downstream rendering of separately computed logic. The progressive image editing results (Fig. 9), where a deer morphs into a sheep across controlled reasoning steps, make this point visually: the transformation itself is a form of reasoning about object identity and scene composition, and the visual intermediates are the reasoning trace. This unification makes research directions at the intersection of reasoning and generation more attractive — rather than treating them as separate capabilities to be connected post-hoc, researchers can now ask how visual generation can constitute reasoning, and how reasoning can require visual feedback.
The inference-time scaling results (Table 4, Fig. 6) shift the conversation around test-time compute from text-only LLMs to multimodal generative models. Prior to this work, test-time scaling was a property associated almost exclusively with autoregressive models: you could sample more tokens, generate multiple completions, or run tree search. Diffusion models were not thought to exhibit this property for reasoning because their generation is parallel across spatial dimensions and because prior methods showed early-commitment behavior (Fig. 1c, left). EndoCoT demonstrates that diffusion models can scale test-time compute in a qualitatively different dimension — reasoning depth in a continuous latent space — with smooth accuracy-compute tradeoffs that parallel the scaling laws observed in LLMs. This means that future research on test-time compute allocation (which currently focuses overwhelmingly on LLM inference strategies like best-of-N, beam search, and debate) should also consider diffusion-model-specific scaling strategies. The resolution scaling advantage (Fig. 7) — where EndoCoT's relative computational cost decreases compared to baselines as image resolution increases — suggests that this new scaling dimension may be particularly important for high-resolution visual tasks, where discrete token-based reasoning would be prohibitively expensive.
Finally, the paper makes verifier over-optimization visible in a new domain. The text-based LLM literature has extensively documented that reward model over-optimization limits test-time compute scaling — search algorithms find solutions that score highly under the verifier but are actually incorrect. EndoCoT's semantic grounding loss (Section 4.2.2) and its ablation (Table 2) reveal an analogous phenomenon in continuous latent reasoning: without explicit textual grounding, the latent thought trajectory drifts into regions of the representation space that are useful for conditioning the DiT (the flow matching loss still decreases) but are semantically meaningless, causing a collapse in logical consistency. The terminal thought grounding mechanism is essentially a verifier robustness intervention — it ensures that the latent state being optimized remains anchored to semantically verifiable text, preventing the over-optimization of a purely visual objective. This connects the diffusion model reasoning literature to the broader test-time compute scaling literature and suggests that verifier design (not just search algorithm design) will be the bottleneck for further scaling.
Follow-Up Research This Work Enables
Adaptive reasoning depth control with confidence estimation. EndoCoT requires a manually specified, fixed number of reasoning steps τ, leaving a clear open problem: can the model learn to decide for itself when reasoning is complete? A direct extension would be to train a lightweight "stop-prediction" head on the thought states h_τ that estimates the probability that the current solution is correct. At inference time, the model would iterate until the confidence exceeds a threshold or until a maximum budget is reached, then output the final image. The training data for this head already exists: at each reasoning step during training, we know whether the intermediate visual output I_τ matches the final ground truth I*_𝒯 (i.e., whether the solution is "done" at step τ). A strong follow-up would measure the efficiency gain — what fraction of instances can early-stop at τ < 50 while maintaining 90% Maze-32 accuracy? — and characterize the calibration of the confidence estimates across tasks. A negative result (the stop-prediction head is poorly calibrated or degrades final accuracy) would reveal that the thought state representation, while useful for conditioning, does not encode a reliable self-assessment signal, which would constrain theories about what the latent states actually represent.
REINFORCE-based training without intermediate visual supervision. The paper's strongest limitation (Section 6) is the dependency on ground-truth intermediate targets I*_τ obtained from algorithmic solvers. Can EndoCoT be trained without these targets? A natural experiment is to replace the per-step flow matching loss with a reinforcement learning objective: at each reasoning step τ, generate an image I_τ, then provide a reward only at the final step (e.g., +1 if the final path is valid, 0 otherwise, or a shaped reward based on path length or constraint satisfaction). Use the flow matching loss on the final step (which has a ground-truth target) plus REINFORCE or PPO to update the MLLM's thought state generation policy for intermediate steps. The key open question is whether the model can discover its own intermediate representations that lead to correct final outputs without explicit per-step visual exemplars. A positive result would dramatically expand EndoCoT's applicability to tasks where algorithmic solvers are unavailable; a negative result (the model fails to learn meaningful intermediate representations from sparse reward alone) would indicate that the visual intermediate supervision is not just helpful but essential, constraining the method to tasks with decomposable solution traces. The paper's progressive training strategy (Section 4.2.3) provides a natural framework for this: Stage 1 uses supervised intermediate targets, Stage 2 freezes those and optimizes only the final output — a Stage 1.5 could replace intermediate supervision with RL.
Cross-architecture replication on FLUX, Stable Diffusion 3, or autoregressive visual models. Every experiment in the paper uses Qwen-Image-Edit-2511. To establish whether EndoCoT's mechanism generalizes beyond this specific MMDiT architecture, a replication study should test on at least one other MLLM-integrated diffusion model with a different conditioning architecture — for example, FLUX.2 with its T5-based text encoder and MMDiT backbone, or Stable Diffusion 3 with its dual text encoders (CLIP + T5). The specific question is: does the iterative thought state update h_τ = MLLM(P, h_{τ-1}) transfer to architectures where the conditioning injection mechanism differs? A positive result (similar performance gains on Maze/TSP/Sudoku benchmarks with another base model, using the same LoRA fine-tuning recipe) would validate the generality of the endogenous reasoning principle. A negative result (the method fails on architectures with different text-image conditioning pathways) would reveal that EndoCoT's success depends on Qwen-Image-Edit's specific cross-attention design, constraining the scope of the contribution and motivating architecture-specific analysis.
Combining EndoCoT with explicit search over latent thought trajectories. The current method generates a single chain of thought states deterministically: h_0 → h_1 → h_2 → ... → h_𝒯 with no branching or backtracking. But the latent continuous thought space enables a form of search that is computationally cheaper than explicit token-based tree search: at any reasoning step, the model could generate multiple candidate next-thought states (by sampling with different noise or by branching the DiT generation), evaluate each using a learned value function or the semantic grounding loss as a proxy, and keep the most promising trajectories. This is essentially Monte Carlo Tree Search (MCTS) in continuous latent space. The paper's existing components provide the building blocks: the semantic loss ℒ_align serves as a terminal state evaluator, and the flow matching loss serves as a step-wise quality signal. The specific experiment: on Maze-32, compare an EndoCoT variant that searches over K latent branches per step (with total compute budget matched to single-trajectory τ=50) against the single-trajectory baseline. The hypothesis is that search would be particularly beneficial on hard instances where the model's initial trajectory leads to dead ends — search could discover alternative paths that the single deterministic trajectory misses. A negative result (search provides no benefit or degrades performance due to verifier over-optimization of the semantic loss signal) would parallel findings from the LLM test-time compute literature and would reveal that the latent thought space, while useful for progressive refinement, does not support effective search without more sophisticated value functions.
Systematic OOD evaluation across maze generation algorithms, TSP instance distributions, and Sudoku clue patterns. The paper's generalization evidence is qualitative (Fig. 1b, Fig. 11). A rigorous follow-up would construct systematic OOD test sets that vary the data-generating process while holding the task rules constant: (a) train on DFS-generated mazes, test on Prim's-algorithm-generated mazes, measuring whether EndoCoT can solve mazes with different topological properties (branching factor, path length distribution, corridor structure); (b) train on uniformly distributed TSP cities, test on clustered distributions (where cities group into clusters with sparse inter-cluster connections), measuring whether the model adapts to different combinatorial structures; (c) train on Sudoku puzzles generated by one backtracking solver with a specific clue-removal order, test on puzzles from a different solver or difficulty rating system; (d) vary rendering parameters systematically — line thickness, color schemes, grid styles, distractor elements. For each OOD condition, report both accuracy and the path repetition rate (or equivalent constraint-satisfaction metric). The specific research question: does EndoCoT's iterative latent reasoning learn the rules of the task (which should generalize across algorithmic distributions) or does it learn the solution trajectories of the training algorithm (which would break when the algorithm changes)? The answer would distinguish between genuine reasoning and robust pattern matching, directly testing the paper's strongest claim.
Understanding the representation geometry of latent thought states. The paper treats thought states h_τ as opaque continuous vectors and evaluates their quality indirectly through downstream task performance. A representation analysis would probe what information these states encode: (a) train linear probes on the thought states to predict ground-truth properties — for mazes, the current path length, the Manhattan distance to the goal, the next correct direction, or whether the current partial path is on the optimal trajectory; (b) measure the intrinsic dimensionality of the thought state manifold across τ (e.g., via PCA) to quantify how much the representation compresses the reasoning process compared to explicit text tokens; (c) apply the semantic grounding loss to intermediate thought states (not just the terminal state, as the paper found harmful) and measure how the performance degradation manifests in the representation geometry — do intermediate states move away from text-decodable regions, or do they remain text-decodable but the DiT's ability to use them degrades? A negative result (linear probes fail to extract meaningful properties, or the thought states show no interpretable structure) would suggest that EndoCoT's reasoning is genuinely non-verbal and distributed in ways that resist simple analysis, which would be an important constraint on theories of how multimodal models represent logical reasoning — it would mean the model reasons in a fundamentally pre-linguistic representational space that cannot be aligned with discrete symbolic reasoning without disrupting the MLLM-DiT synergy. A positive result (thought states encode interpretable properties that align with explicit reasoning steps) would support the claim that continuous latent reasoning compresses discrete CoT without losing information, validating latent-space reasoning as a general technique.
Practical Applications and Downstream Use Cases
Automated puzzle and game content generation with correctness guarantees. Game developers and educational content creators need to generate valid puzzles (mazes, Sudoku boards, logic grids) that are guaranteed to be solvable and have unique solutions. Current procedural generation algorithms can produce valid puzzles but are limited to hand-coded rules and lack visual diversity. EndoCoT offers a path to trainable, visually diverse puzzle generators that produce solutions verified through internal reasoning: train on procedurally generated puzzles with diverse visual styles (the same logical structure rendered with different art assets, grid styles, and theming), then deploy with τ set high enough to ensure correctness (90% on Maze-32, 95% on Sudoku-35 per Table 1). The advantage over traditional procedural generation is that the model can learn to generate visually novel puzzle presentations (different art styles, layouts, visual themes) that still obey the underlying logical constraints, because the iterative reasoning enforces those constraints at generation time rather than relying on a fixed template. The remaining error rates (~10% on Maze-32, ~5% on Sudoku-35) would require a verification step — generate multiple candidates with EndoCoT and verify with a lightweight constraint checker — but the generation itself would be orders of magnitude faster than solving from scratch with a traditional solver because the model's reasoning is amortized through the learned representations.
Instruction-guided progressive image editing with controllable transformation granularity. EndoCoT's progressive editing capability (Fig. 9, Appendix F) enables a new interaction paradigm: a user provides a sequence of editing instructions ("add a stone lantern, then add a deer, then transform the deer into a sheep"), and the model executes them in order while maintaining scene coherence, with the number of reasoning steps τ controlling how many operations are performed and how smoothly the transformations interpolate. This differs from existing image editing interfaces in two ways: (1) the editing sequence is planned and executed step-by-step, not applied as independent operations, meaning the model can maintain global consistency (lighting, shadows, object placements) across multiple edits; (2) the user can control the granularity of editing by varying τ — low τ produces coarse, rapid transformations; high τ produces smooth, incremental morphing. The practical benefit is in creative workflows where iterative refinement is natural (character design, scene composition, architectural visualization) — rather than describing the final desired image in one prompt and hoping for coherence, the user can guide the model through intermediate states, inspecting and approving each step. The paper's editing dataset (10,000 scenes, 30,000 images, Appendix F) provides a training recipe, though the current results are qualitative only, and a production system would need quantitative metrics for editing accuracy and instruction adherence.
Explainable AI for visual reasoning through inspectable intermediate states. One of the persistent challenges in deploying AI for high-stakes visual reasoning tasks (medical image analysis with diagnostic reasoning, autonomous vehicle path planning, architectural compliance checking) is the black-box nature of the output — the model produces a final answer without showing its work. EndoCoT's intermediate visual outputs provide a built-in explainability mechanism: the sequence of images I_1, I_2, ..., I_𝒯 is the reasoning trace, showing how the model progressively constructed its solution. A human inspector can examine intermediate states to verify that the reasoning is proceeding correctly (for maze-like spatial planning, checking that the path hasn't passed through obstacles; for constraint satisfaction, checking that intermediate grids obey rules). This is particularly valuable in domains where the final output alone is insufficient for trust — a doctor needs to see how a diagnostic conclusion was reached, not just the conclusion itself. The paper's results on VSP (99% accuracy on standard scales, 85% on VSP-Super-32, Table 1) demonstrate that EndoCoT can produce verifiably correct spatial plans — extending this to real-world spatial planning domains (warehouse robot navigation, construction site layout, emergency evacuation routes) would combine high accuracy with human-inspectable reasoning, meeting regulatory and safety requirements that pure black-box systems cannot satisfy.
When to Prefer This Method
The paper positions EndoCoT primarily against DiffThinker (explicit reasoning injection) and against the standard static-encoder paradigm for diffusion models. Several clear tradeoffs emerge from the experimental results that guide when a practitioner should adopt this approach versus alternatives:
-
When intermediate visual supervision is available. EndoCoT requires ground-truth intermediate targets
I*_τfor each reasoning step (Section 4.2.1). If your task naturally decomposes into sequential steps and you can generate training data with per-step visual targets (either through algorithmic solvers, as in the paper, or through human annotation of intermediate states), EndoCoT is applicable and, per Table 1, likely to substantially outperform alternatives that use only final-answer supervision. If intermediate supervision is unavailable or too expensive to collect, the method as presented is not directly applicable — future RL-based variants might relax this constraint, but those are not demonstrated. -
When task complexity requires more than single-pass encoding. The paper's analysis (Section 3, Fig. 2b) shows that single-pass MLLM encoding fails even on 8×8 mazes due to constraint violation. If your task involves multi-step logical constraints that cannot be encoded in a single forward pass (sequentially dependent decisions, constraint propagation, backtracking), EndoCoT's iterative refinement mechanism directly addresses this bottleneck and, per Table 4, enables accuracy scaling that single-pass approaches cannot match. If your task's constraints are simple enough to encode in one shot (e.g., "generate an image of a red truck" — no sequential dependency), the overhead of multiple reasoning steps is unnecessary and a standard diffusion model with a frozen encoder will be faster and comparably accurate.
-
When inference compute can be traded for accuracy. EndoCoT's scaling behavior (Fig. 6) is approximately log-linear — accuracy improves smoothly with τ, but inference time increases predictably (~16s at τ=2 to ~25s at τ=50 on Maze-32, with ~15.7s base overhead). In deployment scenarios where latency is critical (real-time interactive editing, high-throughput batch processing), the overhead of multiple MLLM passes may be prohibitive, and a single-pass model (even with lower accuracy) may be preferable. In scenarios where accuracy is paramount and inference time is flexible (offline puzzle generation, one-time content creation, verification-required applications), EndoCoT's ability to scale accuracy with compute is a decisive advantage — no plateau is observed up to τ=50, suggesting further gains are possible.
-
When the base model is an MLLM-integrated diffusion architecture amenable to LoRA fine-tuning. The method has been validated only on Qwen-Image-Edit-2511 with LoRA rank 32 on specific attention and FFN modules (Appendix E, Table 7). If your base model uses a different text conditioning mechanism (e.g., CLIP text encoder with cross-attention in a U-Net), the specific recurrent thought state injection mechanism (
h_τfed into the MLLM's first transformer layer) may not have a direct analog. In such cases, DiffThinker's approach (injecting explicit reasoning tokens through the standard text conditioning pipeline) may be more directly applicable, even though it underperforms EndoCoT on complex instances. -
When visual interpretability of reasoning matters. If your application requires that the reasoning process be inspectable by humans (medical, legal, safety-critical), EndoCoT's intermediate visual outputs provide a built-in audit trail that single-pass models and purely text-based reasoning models do not. A human can examine
I_1, I_2, ..., I_𝒯and verify that the solution is being constructed correctly before trusting the final output, which is not possible with models that commit to their solution in early denoising steps (Fig. 1c, left). -
When unified multi-task reasoning is required and some accuracy degradation is acceptable. The unified training results (Table 1, bottom) show that EndoCoT maintains an advantage over DiffThinker (84.2% vs. 77.1% average) when trained on all tasks jointly, but degrades more from task-specific training (92.1% → 84.2%, a 7.9-point drop) than DiffThinker does (83.8% → 77.1%, a 6.7-point drop). On Maze-32 specifically, EndoCoT falls from 90% to 52% under unified training. If you need a single model to handle diverse reasoning tasks, EndoCoT still leads, but the margin narrows and some individual tasks regress sharply — DiffThinker may be more robust to multi-task interference on certain configurations. If separate models per task are feasible, EndoCoT's task-specific advantage is decisive.