RODS: Robust Optimization Inspired Diffusion Sampling for Detecting and Reducing Hallucination in Generative Models
Yiqi Tian, Pengfei Jin, Mingze Yuan, Na Li, Bo Zeng, Quanzheng Li
TL;DR
This work reframes diffusion sampling as a continuation-method optimization, introducing RODS, a plug-and-play framework that detects high-risk regions via local curvature cues and performs robust, worst-case updates (SAS or CAS) to reduce hallucinations without retraining. By linking diffusion dynamics to robust optimization, it enables adaptive corrections in mid-trajectory steps, improving sampling fidelity while preserving diversity and image quality. Extensive experiments on AFHQv2, FFHQ, and 11k-hands show high hallucination detection rates and meaningful correction without creating new artifacts, aided by a curvature-based detector and a targeted truncation strategy to balance accuracy and efficiency. The practical impact is a more reliable diffusion-based generation process that mitigates hallucinations in real-world, high-stakes settings with minimal computational overhead and no model retraining.
Abstract
Diffusion models have achieved state-of-the-art performance in generative modeling, yet their sampling procedures remain vulnerable to hallucinations-often stemming from inaccuracies in score approximation. In this work, we reinterpret diffusion sampling through the lens of optimization and introduce RODS (Robust Optimization-inspired Diffusion Sampler), a novel method that detects and corrects high-risk sampling steps using geometric cues from the loss landscape. RODS enforces smoother sampling trajectories and adaptively adjusts perturbations, reducing hallucinations without retraining and at minimal additional inference cost. Experiments on AFHQv2, FFHQ, and 11k-hands demonstrate that RODS maintains comparable image quality and preserves generation diversity. More importantly, it improves both sampling fidelity and robustness, detecting over 70% of hallucinated samples and correcting more than 25%, all while avoiding the introduction of new artifacts. We release our code at https://github.com/Yiqi-Verna-Tian/RODS.
