{"id":"f2bc11c8-59d3-4918-8f5d-8c7bcde3f293","arxiv_id":"2412.10891","paper_version":2,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":4,"one_line_summary":"Z-Sampling alternates high-guidance denoising and low-guidance inversion at each step to improve prompt alignment in pretrained text-to-image diffusion models.","lead":"This paper introduces Z-Sampling, a training-free way to improve text-to-image diffusion models by alternating strong-guidance denoising with weak-guidance inversion step by step. It reports large quality gains on challenging prompts and works across several model families, though the theoretical explanation has a gap.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Theorem 3's derivation of the Z-Sampling gain assumes x_t = \\tilde{x}_t, while Algorithm 1 defines the method by their difference; the central theoretical evidence is therefore internally inconsistent as written.","rationale":"The reader's weakest-assumption analysis correctly identifies the same internal inconsistency: Theorem 3 requires \\tilde{x}_t = x_t to reduce the score difference to a guidance-gap term, while the method's entire premise is that the inverted latent differs from the original latent. I verified this directly from Algorithm 1, Eq. 5, Eq. 10, and Proof F.3; the equality assertion is not a minor typo because it is the step that converts a latent-space difference into the clean δγ(u_θ(x_t,c)-u_θ(x_t,∅)) formula. The empirical part of the paper is substantial: results across multiple models, benchmarks, and orthogonal methods, with public code, and the qualitative figures are consistent with a real inference-time benefit. Therefore the theoretical flaw does not by itself overturn the central empirical claim of self-improvement; it does invalidate the claimed proof that the guidance gap is the mechanism. A conditional verdict remains appropriate, with the theory either repaired (e.g., via a first-order Taylor analysis of the actual \\tilde{x}_t - x_t) or explicitly reframed as intuition. No stronger objection—such as an error in the squared-distance computation of Theorem 2—changes this assessment, since that sign issue cancels in the squared norm and the main concern is the unjustified equality in Proof F.3.","tokens_in":25189,"tokens_out":9490,"duration_ms":78653,"concrete_test":"Instrument the released implementation with SDXL on the first 100 Pick-a-Pic prompts at an early zigzag step (e.g., t=49), recording x_t, \\tilde{x}_t, and the score vectors ϵ_θ(x_t;γ1), ϵ_θ(\\tilde{x}_t;γ2), u_θ(x_t,c,t), u_θ(x_t,∅,t). Compute D_t = ||[ϵ_θ(x_t;γ1) - ϵ_θ(\\tilde{x}_t;γ2)] - (γ1-γ2)(u_θ(x_t,c,t)-u_θ(x_t,∅,t))||_2. If D_t is not at machine precision while ||x_t - \\tilde{x}_t|| is nonzero, Eq. 11 is not the exact identity asserted. Separately, recompute δ_{Z-Sampling} from Eq. 10 and from Eq. 11 over the same runs; a material mismatch confirms Theorem 3's derivation fails under the actual algorithm.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The load-bearing theoretical step is Proof F.3 / Theorem 3 (Eq. 11), and it is inconsistent with Algorithm 1. Algorithm 1 performs x_{t-1} = Φ_t(x_t|c,γ1), then \\tilde{x}_t = Ψ_t(x_{t-1}|c,γ2), then x_{t-1} = Φ_t(\\tilde{x}_t|c,γ1), and the claimed effect is δ_{Z-Sampling} = Σ_t (x_t - \\tilde{x}_t)^2 (Eq. 10). Thus \\tilde{x}_t is the inverted latent, which must differ from x_t for the method to have any effect at all. Proof F.3 nevertheless asserts that \"the step-by-step approach results in x_t and \\tilde{x}_t being the same at each timestep t\" and uses Eq. 5 to replace ϵ_θ(\\tilde{x}_t) - ϵ_θ(x_t) with (γ1-γ2)(u_θ(x_t,c,t)-u_θ(x_t,∅,t)). That substitution is valid only when the network inputs coincide. For the actual \\tilde{x}_t ≠ x_t, the score difference contains an additional Jacobian-type term involving \\tilde{x}_t - x_t, so Eq. 11 does not follow from Eq. 10. A separate sign inconsistency appears in the intermediate line of Proof F.2 (Eq. 22), although it cancels in the squared distance. The empirical results may still support a heuristic benefit, but they do not repair the stated theorem; the paper's \"theoretical evidence\" for semantic accumulation via the guidance gap is unproven as written.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"The paper proposes Z-Sampling, a training-free modification of DDIM-style sampling for text-to-image diffusion models. At each timestep in a chosen range, the method alternately performs a denoising step with classifier-free guidance scale gamma_1 and an inversion step with a smaller guidance scale gamma_2, then denoises again from the inverted latent. The authors claim this zigzag 'self-reflection' operation exploits the guidance gap delta_gamma = gamma_1 - gamma_2 to inject prompt-related semantic information into the latent path, improving generation quality and prompt alignment. The paper presents theoretical results (Theorems 1--3) intended to show that the cumulative squared latent displacement is proportional to the accumulated squared guidance-gap-weighted conditional--unconditional score difference, and extensive experiments across SD-2.1, SDXL, Hunyuan-DiT, and DreamShaper-xl-v2-turbo on Pick-a-Pic, DrawBench, GenEval, PartiPrompts, and MS-COCO, plus combinations with AYS and Diffusion-DPO, report consistent improvements over standard sampling.","tokens_in":25563,"tokens_out":7514,"duration_ms":64828,"significance":"If the empirical claims hold, Z-Sampling is practically valuable: it is a plug-and-play, training-free sampler that improves multiple diffusion architectures, including distilled and transformer-based models, and it can be combined with orthogonal methods. The experimental evaluation is broad, the reported winning rates on HPS v2 are high, and the public code is a concrete reproducibility asset. However, the theoretical contribution is not sound as written. The key theorem relies on an assumption that contradicts the algorithm's own definition, and the claimed derivation of the guidance-gap scaling is therefore invalid in its present form. The empirical results remain the main strength of the paper, but the theoretical narrative needs substantial repair before the paper can be accepted.","major_comments":[{"comment":"The proof of Theorem 3 contains an internal contradiction. It states that 'the step-by-step approach results in x_t and \\tilde{x}_t being the same at each timestep t,' but Proof F.2, Eq. (22), derives \\tilde{x}_t = x_t + \\sqrt{\\alpha_t} h_t (\\epsilon^\\theta_t(x_t) - \\epsilon^\\theta_t(\\tilde{x}_{t-1})), so the two latents differ by exactly the quantity whose accumulation the method exploits. The substitution of Eq. (5) into Eq. (24) is therefore valid only under the auxiliary assumption \\tilde{x}_t = x_t, which would make the zigzag step a no-op in the exact-inversion limit. The note at the end of Proof F.2 redefines \\epsilon^\\theta_t(\\tilde{x}_t) as the score evaluated at x_t with guidance \\gamma_2, whereas Eq. (5) defines it at the latent \\tilde{x}_t; this notational shift is load-bearing and is not justified. As written, Eq. (11) does not follow from Eq. (10). The theorem should either be proved under a consistent definition of the zigzag update, stated as an approximation with an explicit error bound, or removed and replaced by a heuristic argument.","section":"Appendix F.3, Theorem 3 / Eq. (11)"},{"comment":"The paper treats the squared latent displacement \\delta_{Z\\text{-Sampling}} = \\sum_t (x_t - \\tilde{x}_t)^2 as a 'semantic information gain' without proving that larger displacement corresponds to better prompt alignment or image quality. Theorems 1--3 establish algebraic relationships among latent displacements and score differences; they do not establish a monotonic link between these displacements and any quality metric. The connection is asserted through the seed-level examples in Sections 3.1 and 3.2 and is supported only indirectly by the downstream experiments. This assumption should be stated explicitly as a heuristic, or replaced with an analysis that connects the displacement to the conditional score and to an image-quality measure, rather than being presented as part of the theoretical derivation.","section":"Section 3.3, Theorem 2 / Eq. (10)"},{"comment":"The empirical observation that the gains vanish as \\gamma_2 approaches \\gamma_1 is presented as verification of Eq. (11), but it is also a consistency property of the algorithm's definition: when \\gamma_2 = \\gamma_1 and inversion is an exact inverse of the denoising step, the zigzag update leaves x_t unchanged, so any method of this form would show a disappearing effect at zero gap. The experiments confirm the expected qualitative trend but do not independently validate the quadratic-in-\\delta_\\gamma form or the specific score-difference expression in Eq. (11). This is not a criticism of the empirical improvement itself, which is substantial, but it should not be cited as evidence for the flawed theorem.","section":"Section 4, Figures 7 and 8"}],"minor_comments":[{"comment":"Algorithm 1 uses the condition `if t > T - \\lambda`; with the default \\lambda = T - 1 stated in Section 4.1, the zigzag operation is applied for t = T, ..., 2, not 'throughout the entire path,' because t = 1 is excluded. Please clarify the intended range or set \\lambda = T.","section":"Algorithm 1 and Section 4.1"},{"comment":"'lug (2022)' in the baselines paragraph is a broken citation; the corresponding reference list entry for RePaint lacks author names and is formatted inconsistently with the other references.","section":"Section 4.1"},{"comment":"The main text says 'As Table 10' when referring to the Semantic-CFG comparison, but that table is numbered Table 3 in the main text; the duplicate numbering of Semantic-CFG tables in the appendix should be reconciled.","section":"Section 4.2"},{"comment":"There are numerous typos and inconsistent spellings, including 'denosing' (Abstract, Section 2), 'procss' (Section 2), 'numeber' (Section 2), 'sclae' (Appendix D.4), 'Pick-a-Pick' versus 'Pick-a-Pic' throughout, and '\\epsilon^j_\\theta' in Eq. (21) of Proof F.1.","section":"Throughout"},{"comment":"Table 12's header lists 'AES↓', but AES is a higher-is-better metric; the arrow appears to be a typo and should be 'AES↑.'","section":"Table 12"},{"comment":"The sentence 'a deterministic sampler implies that the inversion process is imprecise' appears to contradict the surrounding discussion, which argues that stochastic samplers introduce inversion inaccuracy; the intended statement is likely about stochastic samplers.","section":"Appendix E.1"}],"recommendation":"major_revision","confidential_remarks":"The empirical study is considerably stronger than the theory. If the authors reframe the theoretical contribution honestly—either by stating the x_t = \\tilde{x}_t condition as an explicit approximation with error bounds, or by demoting Theorems 2 and 3 to heuristic motivation—the paper would be publishable. I would not accept the current version because the main theorem as stated is inconsistent with the algorithm's own definitions. The public code and the breadth of the evaluation are significant strengths that justify a revision rather than a rejection. Please also check the broken RePaint citation and the table-reference mismatch before resubmission."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Two things to know. First, the empirical recipe is simple and plausibly useful: at each of the last lambda steps, denoise with strong CFG, invert with weak CFG, and denoise again. It is genuinely different from resampling (which adds random noise) and from null-text inversion (which is an editing pipeline). Second, the theory section that supposedly explains why it works does not survive contact with Algorithm 1. The load-bearing Theorem 3 requires the inverted latent tilde x_t to equal x_t, while the method's whole premise is that they differ. So the theoretical derivation of the semantic gain is unproven as written.\n\nWhat the paper does well: the experiments are broad and consistent. Across SDXL, SD-2.1, Hunyuan-DiT, and a turbo model, Z-Sampling improves HPS v2, PickScore, ImageReward, and AES on Pick-a-Pic and DrawBench, with high winning rates. The qualitative examples show real gains in color binding, counting, and position. It stacks with DPO and AYS, and the efficiency discussion is honest: the zigzag costs extra compute, but even with 36% less time it matches the best standard performance. Code is public. That is a real contribution.\n\nWhere it is soft: the theory, as said. The proof in F.3 asserts x_t = tilde x_t and then uses the CFG formula to replace the score difference with the guidance gap times the conditional-minus-unconditional score. That substitution is only valid when the network inputs coincide. For the actual algorithm they do not coincide, and the score difference includes an extra term in tilde x_t - x_t. So Eq. 11 doesn't follow from Eq. 10. The scaling with delta_gamma shown in Figure 7 is then a consistency check of the algorithm's definition rather than independent evidence. There is also a sign slip in Proof F.2 (Eq. 22) that happens to cancel in the squared distance. On the experimental side, the tables lack error bars and some benchmarks use only 100 prompts. That makes the absolute numbers less convincing, but the winning rates are large enough that the effect is probably real.\n\nMy read: treat Z-Sampling as a heuristic inference-time intervention. The paper would be honest to say the theory is intuition, not proof. A referee should ask for that reframing and for error bars. The empirical claim deserves a serious look.","headline":"A training-free zigzag sampling trick that plausibly improves text-to-image alignment, with an empirical case strong enough to survive a muddled theory section.","tokens_in":26118,"tokens_out":1846,"would_cite":true,"duration_ms":17709,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"Z-Sampling claims a pretrained text-to-image diffusion model can improve its own outputs, without retraining, by alternately denoising and inverting each latent so that the guidance gap between the two operations accumulates…","keywords":["diffusion models","text-to-image generation","sampling methods","classifier-free guidance","DDIM inversion","training-free enhancement","prompt alignment","self-reflection"],"falsifier":"Run Z-Sampling with $\\gamma_2=\\gamma_1$ so the guidance gap is zero while keeping the zigzag updates; the paper predicts near-identical output to standard sampling, whereas a significant improvement would show the gain comes from the inversion path rather than the gap. A second check is to replace the inversion map with noise of the same magnitude: if the quality gain persists, the guidance-gap explanation is not needed.","tokens_in":24960,"feed_emoji":"🖼️","tokens_out":8306,"duration_ms":68478,"temperature":0.7,"pith_summary":"The paper's central claim is that a pretrained text-to-image diffusion model can improve its own generation quality and prompt alignment without any retraining, purely by changing the sampling procedure. The proposed Z-Sampling alternately performs one denoising step and one inversion step at each timestep, and the paper argues that the guidance gap between the two operations injects prompt-related semantic information into the latent. The paper derives this semantic accumulation as a sum of squared latent differences, shows that it is larger than the end-to-end analogue by Jensen's inequality, and reports consistent wins over standard sampling across SD-2.1, SDXL, Hunyuan-DiT, and DreamShaper, with HPS v2 winning rates up to 94% on DrawBench. A sympathetic reader would care because the improvement is plug-and-play: it adds a few lines of code, works with accelerated and transformer-based models, and compounds with orthogonal methods such as Diffusion-DPO.","feed_headline":"Alternating denoise and invert lifts text-to-image quality up to 94%","feed_subtitle":"A plug-and-play sampler accumulates prompt semantics step by step, beating standard sampling on human-preference scores.","key_machinery":"The named mechanism is diffusion self-reflection, executed as the zigzag cycle of one denoising step and one inversion step at the same timestep. The load-bearing identity is $\\delta_{Z\\text{-Sampling}}=\\sum_t (x_t-\\tilde{x}_t)^2 = \\sum_t \\alpha_t h_t^2(\\delta_\\gamma(u_\\theta(x_t,c,t)-u_\\theta(x_t,\\varnothing,t)))^2$, with guidance gap $\\delta_\\gamma=\\gamma_1-\\gamma_2$ and weights $h_t=\\sqrt{1/\\alpha_t-1}-\\sqrt{1/\\alpha_{t-1}-1}$. This identity carries the argument because it turns the semantic gain into a per-step accumulation controlled by a knob the user can set, and it shows why end-to-end inversion, whose gain is a squared sum of the same terms, loses to the step-by-step version by Jensen's inequality. The approximation error $\\tau_2$ from imperfect inversion is the opposing term that the paper argues zigzag truncation keeps small.","core_discovery":"Z-Sampling decomposes the DDIM sampler into one-step maps and, at each zigzag step, computes $x_{t-1}=\\Phi_t(x_t|c,\\gamma_1)$, $\\tilde{x}_t=\\Psi_t(x_{t-1}|c,\\gamma_2)$, then $x_{t-1}=\\Phi_t(\\tilde{x}_t|c,\\gamma_1)$. The paper's central discovery is that the accumulated latent difference $\\delta_{Z\\text{-Sampling}}=\\sum_t(x_t-\\tilde{x}_t)^2$ decomposes into a semantic information gain term $\\tau_1$ and an inversion approximation error term $\\tau_2$, and that, neglecting $\\tau_2$, the gain equals $\\sum_t \\alpha_t h_t^2(\\delta_\\gamma(u_\\theta(x_t,c,t)-u_\\theta(x_t,\\varnothing,t)))^2$, where $\\delta_\\gamma=\\gamma_1-\\gamma_2$. Because this is a sum of squares rather than the square of a sum, the paper argues it accumulates instead of cancelling, and it visualizes the effect via cross-attention maps in which entity tokens sharpen after zigzag steps. Stated on the paper's own terms, diffusion self-reflection is a training-free way for a frozen diffusion model to improve its own alignment and visual quality.","pith_inferences":["A natural next experiment is to measure per-prompt gain against the size of $u_\\theta(x_t,c,t)-u_\\theta(x_t,\\varnothing,t)$; if the mechanism is right, prompts with larger conditional-minus-unconditional score gaps should benefit most.","The early-steps result, where most gain comes from the first zigzag steps, suggests a cheap variant that applies the zigzag only where it matters, reducing the extra network calls.","If the latent-semantics story is correct, Z-Sampling should also improve prompt alignment for other deterministic conditional diffusion outputs, including video and 3D, whenever inversion is accurate enough; stochastic samplers would need a learned or corrected inversion first.","The paper's own zero-gap experiment implies a possible diagnostic: with $\\delta_\\gamma=0$, residual differences measure pure inversion error, so reporting the ratio of $\\tau_1$ to $\\tau_2$ effects would let future work separate semantic accumulation from artifact reduction."],"forward_implications":["Without any training, a frozen model's outputs can be improved on human-preference and alignment metrics; for instance, DreamShaper-xl-v2-turbo with Z-Sampling reaches a 94% HPS v2 winning rate over its own standard sampling on DrawBench.","The method applies to U-Net, DiT, and distilled-turbo architectures and to few-step samplers such as a 4-step setting, so it is not limited to slow or single-family models.","Challenging compositional prompts such as counting, position, color binding, and multi-object co-occurrence show the largest alignment gains, which is exactly where standard classifier-free guidance tends to fail.","Z-Sampling composes with orthogonal improvements: AYS sampling and Diffusion-DPO both improve further when combined with it.","The benefit requires a deterministic sampler; with stochastic samplers such as ancestral Euler, inversion error grows and the gains shrink or reverse."],"supporting_citations":[{"why":"Supplies the Monte Carlo decomposition of the diffusion process into T single-step denoising maps used throughout the derivation and algorithm.","marker":"Ho et al. (2020)"},{"why":"Supplies the DDIM deterministic sampling and inversion equations that Z-Sampling alternates between.","marker":"Song et al. (2020)"},{"why":"Defines classifier-free guidance, giving the interpolation of conditional and unconditional scores that produces the guidance gap.","marker":"Ho & Salimans (2022)"},{"why":"Establishes the weak-guidance inversion setting and the inversion approximation that the semantic-gap argument relies on.","marker":"Mokady et al. (2023)"},{"why":"Provides the HPS v2 human-preference metric used to report the headline winning rates.","marker":"Wu et al. (2023c)"},{"why":"Supplies the Pick-a-Pic prompts and PickScore metric used in the main experiments.","marker":"Kirstain et al. (2023)"},{"why":"Supplies Diffusion-DPO, the orthogonal training-based method that Z-Sampling further enhances.","marker":"Wallace et al. (2024)"}],"fun_headline_variants":["Zigzag sampling lets diffusion models self-reflect and improve","Self-reflection via zigzag denoise-invert lifts image fidelity","Training-free zigzag sampler raises text-to-image quality","Diffusion self-reflection: alternating denoise and invert","Z-Sampling: plug-and-play boost for text-to-image models"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The proof that the guidance gap is what injects semantics assumes the inverted latent $\\tilde{x}_t$ equals the denoised latent $x_t$ when the network evaluates both branches, whereas the method's mechanism depends on their being different; if inversion cannot be both accurate and different, the stated identity does not follow.","fun_headline_variants_meta":{"raw":{"variants":["Zigzag sampling lets diffusion models self-reflect and improve","Self-reflection via zigzag denoise-invert lifts image fidelity","Training-free zigzag sampler raises text-to-image quality","Diffusion self-reflection: alternating denoise and invert","Z-Sampling: plug-and-play boost for text-to-image models"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000373,"raw_usage":{"total_tokens":2065,"prompt_tokens":1089,"completion_tokens":976,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":705,"completion_tokens_details":{"reasoning_tokens":893}},"tokens_in":705,"tokens_out":976,"duration_ms":6821,"temperature":1.0,"reasoning_tokens":893,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-11T15:30:56.911695+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Run Z-Sampling with $\\gamma_2=\\gamma_1$ so the guidance gap is zero while keeping the zigzag updates; the paper predicts near-identical output to standard sampling, whereas a significant improvement would show the gain comes from the inversion path rather than the gap. A second check is to replace the inversion map with noise of the same magnitude: if the quality gain persists, the guidance-gap explanation is not needed.","supporting_citations":[{"cited_title":"Null-text inversion for editing real images using guided diffusion models","cited_arxiv_id":null,"evidence_quote":"Establishes the weak-guidance inversion setting and the inversion approximation that the semantic-gap argument relies on."}],"review_version":1}