Overview

Summary

sθ(x)ypdata(y)pdata(x)

이것은 유명한 연속공간 score function xlog p와 categorical equivalent하다. (여기서 motivate 많이됨)
중요하게. 우리는 신경망 근사를 sθ(x)y로 쓴다. 이때, 하나의 네트워크 평가로 모든 비율 계산이 가능해야한다는 것이다. 이때 분모는 pdata(x)로 고정이다. 가능한 모든 y에 대해 계산하면, Nd개의 항이 생기는 것이기에, relevant ratio만 선택적으로 모델링하고, y가 x와 close 하다고 판단되는 경우에만 선택한다.
이를 yx라고 함.(그래프이론식 표기. y와 x는 이웃) 여기에서는 한 위치만 다른 문장을 이용함.
Pasted image 20250402133747.png
Cross entropy loss이용

Eypdata[log pθ(y)]=ypdata(y)log pθ(y)

Score entropy

yxsθ(x)ypdata(y)pdata(x)log sθ(x)y$$![.gif](/img/user/blog0,scorematchingtechque,$pdata(x)=yp(x|y)p0(y)$,denoisingscoreentropyloss$$Ex0p0,xp(|x0)[yxsθ(x)yp(y|x0)p(x|x0)log sθ(x)y]

data 분포가 아니라 x0에 대한 조건부 분포로 만든게 큼.

노이즈란 무엇인가?
연속공간은 가우시안 노이즈 때리지만, 이산공간은 다른 요소를 jump해야함

1. Intro

1.1 Background

2. Preliminaries

2.1 Discrete Diffusion Processes

dpTtdt=Q¯TtpTt            Q¯t(y,x)=pt(y)pt(x)Qt(x,y)Q¯t(x,x)=yxQ¯t(x,y)

2.2 Discrete Diffusion Models

Mean prediction
Ratio Matching
Concrete Score Matching
LCSM=12Expt[yx(sθ(xt,t)ypt(y)pt(x))2]
appendix.D

Concrete score matching 쓴거 GPT2 랑 score entropy랑 비교했는데 likelihood loss 3~4배,
perplexity는 만배 커짐. -> 수렴 잘 안됨.

Generative perplexity 평가
D.2. Further Evaluation of Generative Perplexity

We further evaluate our generative perplexity for uniform models as well as different sampling schemes (analytic sampling based on Tweedie’s vs Euler sampling based off of reverse diffusion). Results are shown in Figure 2. Generally, we find that uniform does not produce the same linear tradeoff curve as absorbing (most likely due to a bottleneck in generation quality). Futhermore, analytic generally outperforms Euler sampling, and this is a major factor for the uniform model.

We also generated on our trained baselines (Austin et al., 2021; Gulrajani & Hashimoto, 2023), finding both performed substantially worse than our SEDD Absorb baseline but slightly better than our SEDD Uniform.

Tweedie 이론이랑 Euler 방식 비교
Analytic 방식이 Euler 방식 보다 샘플링 성능(perplexity)가 괜찮았따. 몇가지 모델로도 더 해봤는데, SEDD absorb보다는 성능이 안좋았지만 SEDD uniform 보다는 좋았따.

Score Entropy Discrete Diffusion Models

Exp[yxwxy(sθ(x)yp(y)p(x)log sθ(x)y+K(p(y)p(x)))]

Fisher Divergence 대신 Bregman divergence를 이용한다.
DF(s(x)y,p(y)p(x)) when F=log is convex func
따라서 non-negative, symmetric, convex하다. 그리고 기존 cross entropy 도 general positive value로 일반화 할 수 있다.

Score Entropy Properties

Score entropy는 ground truth concrete score를 포함하는 적절한(suitable) loss function이다.

score entropy는 문제가 되는 gradients를 rescaling 함으로써 concrete score 보다 직접적으로 낫다. wxy=1, sθ(x)yLSE=1sθ(x)ysθ(x)yLCSM 각 (x,y)쌍의 gradient 신호들은 sθ(x)y를 마치 normalizing 항으로 이용하듯 scaling된다. 그리고 레전드 디자인 K(log-barrier)가 sθ를 0이상으로 유지한다.

concrete score matching과 같이 score entropy는 모르는 p(y)p(x)를 제거함으로써 계산적으로 다루기 쉽게 만든다. 왜? p(x),p(y)는 데이터 전채를 뜻어봐야하잖아.

Denoising Score Entropy
transition kernal p(|) (ie p(x)=x0p(x|x0)p0(x0))와 base density p0의 pertubation p를 가정하자. 이러면 score entorpy는 θ에 영향 안주는 상수를 제외하면 Denoising score entropy는 다음과 같다.

LDSE=Ex0p0xp(x0)[yxwxy(sθ(x)yp(y|x0)p(x|x0)log sθ(x)y)]

얘는 몬테카를로 샘플링 할때, 하나의 sθ(x)만 계산하면, sθ(x)y 값이 포함되어있고, x0으로 생기는 variance는 제어가능하므로 Denoising score entropy는 scalable하다.!

Likelihood Bound For Score Entropy Discrete Diffusion

ELBO를 정의할거임. -> likelihood-기반 학습과 평가에 필요함.

dependent score network sθ(,t) , parameterized reverse matrix Q¯tθ(y,x) =

sθ(x,y)yQt(x,y) when, xy,zxQ¯tθ(x,y) when, x=y

그리고 parameterized densities ptθ 는 다음 식을 만족.

dpTtθdt=Q¯TtθpTtθ  pTθ=pbasepT

diffusion 그리고 forward probabilities가 위에 구해졌으므로...

log p0θ(x0)<=LDWDSE(xo)+DKL(pT|0(|x)||pbase)

여기서 LDWDSE는 diffusion weighted denoising score entropy임.

식으로는. LDWDSE=

0TExtpt|0(|x0)yxtQt(xt,y)(sθ(xt,t)ypt|0(y|x0)pt|0(xt|x0)log sθ(xt,t)y+K(pt|0(y|x0)pt|0(xt|x0)))

DWDSE 디자인 해설
Remark. The DWDSE (and the implicit version) can be derived from the general framework of Benton et al. (2022) assuming a concrete score parameterization. In particu- lar, the implicit version coincides with the likelihood loss introduced in Campbell et al. (2022).

그리고 얘는 고차원 task 에서도 유지됨.
pt|0seq(x^|x) 를 각 토큰 별 joint distribution으로 표현가능 함.
우리가 Qttok=σ(t)Qtok로 설정했기 때문에 모델링 야무지게 가능.

근데 문제는 Q는 확산과정이므로, x^만큼 존재하는데 이건 Austin(Structured denoising diffusion models in dis- crete state-spaces)과 Campbell(A continuous time framework for discrete denoising models)의 이전 작업으로 처리. 두개의 standard matrix를 이용. MASK abosorbing state와 완전히 연결된 그래프구조로부터 소개된 것.
Pasted image 20250408135521.png

4. Simulating Reverse Diffusion with Concrete Scores

Campbell(A continuous time framework for discrete denoising models)에 τ-leaping 적용
given a sequence xt.

δxti(xtΔti)+ΔtQttok(xti,xtΔti)sθ(xt,t)i,xtΔti

근데 sθ가 true concrete을 잘 학습했는지는 알 수 없음(agnostic). 특히 모든 pt(y)pt(x) 를 모두 알아야 Tweedie's theoremTweedie’s formula and selection bias과 유사한 형태를 만들수있음.

pt 가 diffusion ODE dpt=Qpt를 따른다고 하면,
true denoiser는

p0|t(x0|xt)=(exp(tQ)[pt(i)pt(xt)]i=1N)x0exp(tQ)(xt,x0)

근데 모든 ratio 모르고ㅗ 오직 Hamming distance 가 1인 시퀀스만 파악할 수 있기 때문에 token transition probabilities를 다음과 같이 작성함.(for xtΔti)

(exp(σtΔtQ)sθ(xt,t)i)xtΔtiexp(σtΔtQ)(xti,xtΔti)where  σtΔt=(σ¯(t)σ¯(tΔt

(Tweedie τ-leaping). Let
p(tΔt|t)tweedie(xtΔt|xt)가 위 식의 token update rule의 확률이라고하자. KL divergence를 최소화하는 sθ가 완벽히 학습되었다면, 모든 τ-leaping strategies에 있어서 true인 p(tΔt|t)(xtΔt|xt)이다.

그리고

Pasted image 20250408142706.png

결과

Pasted image 20250408142737.png

Pasted image 20250408142747.png
Pasted image 20250408142755.png
Pasted image 20250408142809.png