skills/skillxiv-v0.0.2-claude-opus-4.6/diffthinker-multimodal-reasoning/SKILL.md
Apply diffusion models as native generative agents for vision-centric reasoning tasks (sequential planning, constraint satisfaction, spatial configuration) instead of text-based LLM chains. Achieves 3x+ improvements over GPT-5 and Gemini-3 on visual reasoning. Use when image-to-image generation better captures the reasoning constraints than text-based problem decomposition.
npx skillsauth add ADu2021/skillXiv diffthinker-multimodal-reasoningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Traditional multimodal reasoning chains knowledge as text: LLMs decompose visual problems into linguistic steps, then reason through them sequentially. DiffThinker inverts this:
Instead of: Image → Extract facts → Reason in text → Generate image DiffThinker does: Image → Condition diffusion → Iteratively refine visual plan → Extract answer
This treats reasoning itself as an image-generation process where:
Diffusion models possess three properties that benefit multimodal reasoning:
# DiffThinker reasoning loop structure
class DiffusionReasoningAgent:
def __init__(self, vision_encoder, diffusion_model, solution_decoder):
self.encoder = vision_encoder # Extract semantic features from input image
self.diffusion = diffusion_model # Generative reasoning in image space
self.decoder = solution_decoder # Extract actionable output from final image
def solve(self, input_image, problem_type, num_steps=50):
"""Iterative reasoning via diffusion"""
# Encode problem constraints from input image
problem_context = self.encoder(input_image)
# Initialize random noise (unconstrained solution space)
x_t = torch.randn_like(input_image)
# Diffusion loop: iteratively refine solution
for step in range(num_steps):
# Condition on problem and previous solution state
denoised = self.diffusion.denoise_step(
x_t,
context=problem_context,
step=step,
guidance_scale=7.5 # Strength of problem constraint
)
# Mix with previous for smooth refinement
x_t = self.diffusion.reverse_step(denoised, x_t, step)
# Extract solution from final image
solution = self.decoder(x_t, problem_type)
return solution
Sequential Planning (e.g., Rearrange objects from start to goal):
Constraint Satisfaction (e.g., Packing, layout problems):
Spatial Reasoning (e.g., 3D object arrangement):
Empirical results from paper on visual reasoning benchmarks:
| Task | DiffThinker | GPT-5 | Gemini-3-Flash | Improvement | |------|---|---|---|---| | Sequential Planning | 94.2% | 30% | 45% | +314% | | Combinatorial Opt. | 87.5% | 28% | 38% | +212% | | Constraint Satisfaction | 91.8% | 25% | 42% | +267% |
(Note: Metric definitions specific to paper; improvements relative to these benchmarks)
| Aspect | Diffusion | Text-LLM | |--------|---|---| | Latency | 50-500ms (iterative) | 100-2000ms (token generation) | | Determinism | Stochastic | Deterministic with temperature | | Spatial reasoning | Native geometric constraints | Learned from language | | Interpretability | Visual solution path | Linguistic explanation | | Scalability | Fixed image resolution | Unbounded sequence length |
testing
Uses flow maps as look-ahead operators to enable principled reward-guided diffusion by predicting trajectory endpoints at any denoising step. Deploy when applying rewards or preferences to diffusion trajectories with meaningful gradients throughout generation.
testing
Train language models where each expert learns independently on closed datasets, enabling flexible inference with selective data inclusion or exclusion. 41% performance improvement while allowing users to opt out of specific data sources without retraining.
data-ai
Understand how token generation flexibility in diffusion LMs paradoxically constrains reasoning, as models exploit ordering flexibility to avoid uncertain tokens, and apply simplified approaches that preserve parallel decoding benefits. Use when optimizing diffusion-based language models for reasoning tasks.
devops
Enable LLM agents to improve continuously during deployment by constructing structured experience libraries through self-reflection on successes and failures—achieving 23% improvement on reasoning without gradient-based parameter updates or external training.