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.

설치로 이동

소스 정보

저장소
hiyenwong/ai_collection
최근 소스 활동
2026년 6월 8일 08:11
감지된 SKILL.md 언어
영어
스타
2
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
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, 分数匹配梯度分解, 扩散模型几何
GitHub에서 보기