Skip to main content

score-matching-gradient-decomposition

Geometric decomposition of score matching errors in diffusion models using Helmholtz-Hodge decomposition. Proves that only gradient components affect marginal distribution quality, while solenoidal components are structurally invisible to Fokker-Planck dynamics.

Jump to install

Source facts

Repository
hiyenwong/ai_collection
Last source activity
June 8, 2026 at 08:11
Detected SKILL.md language
English
Stars
2
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
score-matching-gradient-decomposition
description
Geometric decomposition of score matching errors in diffusion models using Helmholtz-Hodge decomposition. Proves that only gradient components affect marginal distribution quality, while solenoidal components are structurally invisible to Fokker-Planck dynamics.
category
machine-learning
## Context Score-based diffusion models are trained by minimizing the L² score matching error, but standard theoretical analyses rely on this quantity to bound sampling discrepancy. This methodology reveals that L² score error is not the right intrinsic measure of marginal distributional quality. Source: arXiv:2606.06179 (Khelifa, Turner, Venkataramanan, June 2026) ## Core Methodology ### 1. Helmholtz-Hodge Decomposition of Score Errors Decompose the learned score error ε(x) into two orthogonal components: - **Gradient component** ε_∇ = ∇φ (irrotational, curl-free) - **Solenoidal component** ε_⊥ (divergence-free) ε(x) = ε_∇(x) + ε_⊥(x) **Key insight**: Only the gradient component enters the marginal Fokker-Planck dynamics. The solenoidal component is structurally invisible to the marginal distribution. ### 2. Impossibility Result **Theorem**: No monotone function of the L² score error can uniformly lower bound any divergence between the learned and target distributions. **Implication**: A model can have arbitrarily large L² score error while perfectly matching the target distribution (if all error is solenoidal). ### 3. Tightened KL Divergence Bound Derive an upper bound on Kullback-Leibler divergence depending only on the observable gradient component: D_KL(p_target || p_learned) ≤ C · ||ε_∇||² This tightens the standard Girsanov bound, identifying its looseness as the cost of operating on path-space rather than marginal-space dynamics. ### 4. Tractable Gradient Component Estimator Estimate the gradient component via a dual Sobolev identity: ||ε_∇||² = sup_{f ∈ H¹} [E[ε · ∇f] / ||f||_{H¹}]² **Practical use**: This estimator correlates substantially better with sample quality than the full L² error. ## Implementation Steps 1. **Train diffusion model** with standard score matching objective 2. **Compute score error** ε(x) = s_learned(x) - s_true(x) (or estimate) 3. **Estimate gradient component** using dual Sobolev identity: - Solve variational problem: max_f E[ε · ∇f] / ||f||_{H¹} - Use neural network parameterization for f 4. **Use ||ε_∇||** as quality metric instead of full ||ε||₂ 5. **Optionally remove solenoidal component** during training by projecting onto gradient space ## Mathematical Details ### Helmholtz-Hodge Decomposition For a vector field ε on domain Ω: - ε = ∇φ + ∇×A + h (where h is harmonic) - ∇·(∇×A) = 0 (solenoidal is divergence-free) - ∇×(∇φ) = 0 (gradient is curl-free) ### Fokker-Planck Connection The marginal distribution evolution is governed by: ∂p/∂t = -∇·(b·p) + ½∇²p Only ∇·(ε·p) matters, and ∇·(ε_⊥·p) = 0 since ε_⊥ is divergence-free. ### Dual Sobolev Identity ||ε_∇||²_{L²} = sup_{f ∈ H¹_0} [⟨ε, ∇f⟩ / ||∇f||_{L²}]² This provides a variational characterization computable via optimization. ## Pitfalls - **Solenoidal error is not free**: While invisible to marginals, it may affect sample path statistics - **Estimator variance**: The dual Sobolev estimator requires careful regularization - **High-dimensional domains**: Helmholtz-Hodge decomposition is computationally expensive in high dimensions - **Boundary conditions**: Decomposition depends on domain boundary conditions ## Verification 1. Train two diffusion models: one with gradient-only loss, one with full L² loss 2. Compare sample quality metrics (FID, KL) vs training loss 3. Verify that gradient-only model achieves better quality at same gradient error 4. Compute dual Sobolev estimator and correlate with FID ## Activation score matching, diffusion models, Helmholtz-Hodge decomposition, gradient decomposition, Fokker-Planck dynamics, KL divergence bound, Sobolev identity, 分数匹配梯度分解, 扩散模型几何
View on GitHub