| name | diffcot-diffusion-chain-of-thought |
| title | DiffCoT: Diffusion-styled Chain-of-Thought Reasoning in LLMs |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2601.03559 |
| keywords | ["Reasoning","Chain-of-Thought","Diffusion Models","Multi-Step Reasoning"] |
| description | Recast chain-of-thought reasoning as iterative denoising using diffusion principles to overcome exposure bias in autoregressive reasoning. DiffCoT enables retrospective refinement of intermediate steps while maintaining temporal consistency through causal noise scheduling. |
When to Use This Skill
- Multi-step mathematical reasoning (MATH, GSM8K benchmarks)
- Tasks where intermediate steps frequently contain errors
- Scenarios benefiting from iterative refinement of reasoning
- Models experiencing exposure bias in step-by-step generation
- Reasoning tasks with variable step counts
When NOT to Use This Skill
- Single-step inference (no iterative benefit)
- Real-time low-latency systems (multiple passes slower)
- Tasks without clear intermediate reasoning steps
- Domains where step ordering is fixed and cannot be refined
Problem Summary
Chain-of-thought reasoning in language models suffers from a fundamental vulnerability: early mistakes propagate irreversibly through autoregressive decoding. When step N depends on step N-1, and step N-1 is incorrect, cascading errors accumulate. Additionally, exposure bias—training on gold steps but decoding with model-generated ones—creates distribution mismatch that compounds across steps.
Solution: Diffusion-Based Iterative Step Refinement
Rather than generate steps linearly in single pass, use sliding-window approach to both generate AND retrospectively refine intermediate steps, maintaining temporal consistency through causal noise scheduling.
class DiffCoT:
def __init__(self, model, num_refine_steps=3):
self.model = model
self.num_refine_steps = num_refine_steps
def forward_with_denoising(self, question):
"""Generate reasoning steps with iterative refinement"""
steps = []
cumulative_text = question
while not_done():
next_step = self.model.generate_step(cumulative_text)
steps.append(next_step)
cumulative_text += next_step
for refine_iteration in (.num_refine_steps):
window_idx ((steps) - ):
prev_context = .join(steps[:window_idx])
window_step = steps[window_idx]
next_context = .join(steps[window_idx + :])
noise_schedule = compute_noise_schedule(
refine_iteration, .num_refine_steps
)
noisy_step = apply_noise(window_step, noise_schedule)
refined_step = .model.refine_step(
prev_context, noisy_step, next_context
)
coherence_score = compute_coherence(
prev_context + refined_step + next_context
)
coherence_score > original_coherence:
steps[window_idx] = refined_step
steps, final_answer
():
noise_level = - (iteration / total_iterations)
{
: noise_level * ,
: ,
:
}