Table of Contents
Fetching ...

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.

RODS: Robust Optimization Inspired Diffusion Sampling for Detecting and Reducing Hallucination in Generative Models

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.

Paper Structure

This paper contains 41 sections, 2 theorems, 35 equations, 14 figures, 2 tables, 3 algorithms.

Key Result

Theorem 1

Assume the image distribution can be approximated by a mixture of Gaussians, i.e. $p_0(x) \;=\; \sum_{i=1}^K w_i\,\mathcal{N}\bigl(x \mid \mu_i,\sigma_0^2\bigr), \quad \sum_{i=1}^K w_i = 1$. Define where $\tilde{w}_i(x) \;=\; \frac{w_i\,\mathcal{N}(x\mid\mu_i,\sigma_0^2)}{\sum_{j=1}^K\,w_j\,\mathcal{N}(x\mid\mu_j,\sigma_0^2)}, \quad \sum_{i=1}^K \tilde{w}_i(x)=1.$ Then Moreover, $f_t(x)$ shifts

Figures (14)

  • Figure 1: The roadmap of our paper: (a) Section \ref{['sec:formatting']} formulates the diffusion sampling process as an optimization problem solved based on the continuation method. (b) Section \ref{['RODS']} introduces the RODS framework to address the inaccurate approximation of the score function: (b1) Section \ref{['sec:detection']} details how we detect high-risk regions based on local curvature changes (highlighted in green). (b2) Section \ref{['sec:ros']} describes how robust updates are performed to mitigate potential hallucinations. (c) Section \ref{['sec:exp']} presents experimental results and analysis, illustrating improvements in hallucination detection and correction.
  • Figure 2: The equivalence between the diffusion sampling process and the optimization continuation method.
  • Figure 3: AFHQv2 sampling results. Left: Visual comparison across different samplers—EDM (Euler, Heun), and our RODS-SAS, RODS-CAS. Hallucinations include misplaced eye, incorrect facial structures, etc. Right: Confusion matrix at $\epsilon = 0.1$ and $\max \|\delta\| = 1$ over 1,080 samples using the proposed hallucination index $\mathcal{H}(x)$. RODS-CAS detects 87.5% of labeled hallucinations, correcting 10 cases (better), and introduces no degraded cases (worse).
  • Figure 4: FFHQ sampling results. Left: Visual results across EDM-Euler, EDM-Heun, and our RODS-SAS, RODS-CAS. Hallucinations include distorted eye regions and implausible facial geometry. Right: Confusion matrix at $\epsilon = 0.09$ and $\max \|\delta\| = 8$ over 1,080 samples using the proposed hallucination index $\mathcal{H}(x)$. RODS-CAS detects 72.5% of labeled hallucinations, corrects 9 cases (better), and introduces no degradation (worse).
  • Figure 5: 11k-hands sampling results. Left: Visual results for different samplers. RODS-CAS corrects hallucinations such as extra or missing fingers while preserving anatomical plausibility. Top-Right: Confusion matrix at $\epsilon = 0.014$ and $\max \|\delta\| = 30$ over 900 samples using the proposed hallucination index $\mathcal{H}(x)$. Bottom-Right: Quantitative metrics: hallucination rate (↓), correction rate (↑), new hallucination rate (↓), and inference time (in seconds).
  • ...and 9 more figures

Theorems & Definitions (4)

  • Theorem 1: Procedure Equivalence
  • Theorem 2: Euler = One-Step Gradient = Proximal Update
  • proof
  • proof